Competition/Round architecture: full platform rewrite (Phases 1-9)
All checks were successful
Build and Push Docker Image / build (push) Successful in 7m45s

Replace Pipeline/Stage system with Competition/Round architecture.
New schema: Competition, Round (7 types), JuryGroup, AssignmentPolicy,
ProjectRoundState, DeliberationSession, ResultLock, SubmissionWindow.
New services: round-engine, round-assignment, deliberation, result-lock,
submission-manager, competition-context, ai-prompt-guard.
Full admin/jury/applicant/mentor UI rewrite. AI prompt hardening with
structured prompts, retry logic, and injection detection. All legacy
pipeline/stage code removed. 4 new migrations + seed aligned.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-15 23:04:15 +01:00
parent 9ab4717f96
commit 6ca39c976b
349 changed files with 69938 additions and 28767 deletions

View File

@@ -145,14 +145,14 @@ async function getDigestContent(
where: {
userId,
isCompleted: false,
stage: {
status: 'STAGE_ACTIVE',
round: {
status: 'ROUND_ACTIVE',
windowCloseAt: { gt: now },
},
},
include: {
project: { select: { id: true, title: true } },
stage: { select: { name: true, windowCloseAt: true } },
round: { select: { name: true, windowCloseAt: true } },
},
})
@@ -162,9 +162,9 @@ async function getDigestContent(
title: `Pending Evaluations (${pendingAssignments.length})`,
items: pendingAssignments.map(
(a) =>
`${a.project.title} - ${a.stage?.name ?? 'Unknown'}${
a.stage?.windowCloseAt
? ` (due ${a.stage.windowCloseAt.toLocaleDateString('en-US', {
`${a.project.title} - ${a.round?.name ?? 'Unknown'}${
a.round?.windowCloseAt
? ` (due ${a.round.windowCloseAt.toLocaleDateString('en-US', {
month: 'short',
day: 'numeric',
})})`
@@ -175,12 +175,12 @@ async function getDigestContent(
}
}
// 2. Upcoming deadlines (stages closing within 7 days)
// 2. Upcoming deadlines (rounds closing within 7 days)
if (enabledSections.includes('upcoming_deadlines')) {
const sevenDaysFromNow = new Date(now.getTime() + 7 * 24 * 60 * 60 * 1000)
const upcomingStages = await prisma.stage.findMany({
const upcomingRounds = await prisma.round.findMany({
where: {
status: 'STAGE_ACTIVE',
status: 'ROUND_ACTIVE',
windowCloseAt: {
gt: now,
lte: sevenDaysFromNow,
@@ -198,11 +198,11 @@ async function getDigestContent(
},
})
upcomingDeadlines = upcomingStages.length
if (upcomingStages.length > 0) {
upcomingDeadlines = upcomingRounds.length
if (upcomingRounds.length > 0) {
sections.push({
title: 'Upcoming Deadlines',
items: upcomingStages.map(
items: upcomingRounds.map(
(s) =>
`${s.name} - ${s.windowCloseAt?.toLocaleDateString('en-US', {
weekday: 'short',
@@ -233,7 +233,7 @@ async function getDigestContent(
},
include: {
project: { select: { id: true, title: true } },
stage: { select: { name: true } },
round: { select: { name: true } },
},
})
@@ -242,7 +242,7 @@ async function getDigestContent(
sections.push({
title: `New Assignments (${recentAssignments.length})`,
items: recentAssignments.map(
(a) => `${a.project.title} - ${a.stage?.name ?? 'Unknown'}`
(a) => `${a.project.title} - ${a.round?.name ?? 'Unknown'}`
),
})
}