Full pipeline/track/stage architecture replacing the legacy round system. Schema: 11 new models (Pipeline, Track, Stage, StageTransition, ProjectStageState, RoutingRule, Cohort, CohortProject, LiveProgressCursor, OverrideAction, AudienceVoter) + 8 new enums. Backend: 9 new routers (pipeline, stage, routing, stageFiltering, stageAssignment, cohort, live, decision, award) + 6 new services (stage-engine, routing-engine, stage-filtering, stage-assignment, stage-notifications, live-control). Frontend: Pipeline wizard (17 components), jury stage pages (7), applicant pipeline pages (3), public stage pages (2), admin pipeline pages (5), shared stage components (3), SSE route, live hook. Phase 6 refit: 23 routers/services migrated from roundId to stageId, all frontend components refitted. Deleted round.ts (985 lines), roundTemplate.ts, round-helpers.ts, round-settings.ts, round-type-settings.tsx, 10 legacy admin pages, 7 legacy jury pages, 3 legacy dialogs. Phase 7 validation: 36 tests (10 unit + 8 integration files) all passing, TypeScript 0 errors, Next.js build succeeds, 13 integrity checks, legacy symbol sweep clean, auto-seed on first Docker startup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2.8 KiB
2.8 KiB
Test Matrix
All IDs are mandatory unless explicitly marked non-blocking with sign-off.
Unit Tests
| ID | Area | Scenario | Expected |
|---|---|---|---|
| U-001 | Transition Engine | legal transition | persisted with audit event |
| U-002 | Transition Engine | illegal transition | typed validation error |
| U-003 | Routing | multiple rule match | deterministic priority winner |
| U-004 | Filtering Gates | missing required docs | blocked before AI pass |
| U-005 | AI Banding | uncertain confidence band | routed to manual queue |
| U-006 | Assignment | COI conflict | excluded from pool |
| U-007 | Assignment | insufficient capacity | overflow flagged + coverage preserved |
| U-008 | Override | missing reason fields | mutation rejected |
| U-009 | Live Cursor | concurrent cursor update | conflict handled and retried |
| U-010 | Award Governance | AWARD_MASTER on unauthorized award |
forbidden |
Integration Tests
| ID | Area | Scenario | Expected |
|---|---|---|---|
| I-001 | Pipeline CRUD | create/update/publish | graph integrity maintained |
| I-002 | Stage Config | invalid config schema | rejected |
| I-003 | Transition + Routing | filter pass to main + award parallel | dual states created |
| I-004 | Award Exclusive Routing | exclusive route | removed from main continuation |
| I-005 | Assignment API | preview vs execute parity | same constraints and outcomes |
| I-006 | Live Runtime | jump + reorder + open/close windows | consistent cursor state |
| I-007 | Cohort Voting | closed window submit | vote rejected |
| I-008 | Decision Audit | override applied | complete immutable timeline |
End-to-End Tests
| ID | Persona | Scenario | Expected |
|---|---|---|---|
| E-001 | Admin | complete setup via wizard | no hidden edit-only blockers |
| E-002 | Applicant | upload intake requirements | status and deadlines enforced |
| E-003 | Admin | run filtering stage | gates + AI + manual queue behave |
| E-004 | Jury | complete evaluation workflow | criteria and lock policy enforced |
| E-005 | Admin | selection + override | finalists and audit aligned |
| E-006 | Live Admin | advance/back/jump + reorder | jury and audience sync realtime |
| E-007 | Audience | vote by cohort on mobile | visibility and dedupe enforced |
| E-008 | Admin | finalize results | ranking and publish outputs valid |
Performance and Resilience
| ID | Area | Scenario | Threshold |
|---|---|---|---|
| P-001 | Assignment | 1000+ project batch | under agreed SLA |
| P-002 | Filtering | large AI queue | deterministic retry, no dropped jobs |
| P-003 | Live Voting | peak audience burst | acceptable p95 and no data loss |
| P-004 | Reconnect | disconnect/reconnect | state converges quickly |
Release Block Rule
Any failing U-*, I-*, E-*, or P-* is release-blocking unless signed waiver exists.