ShiftCircle

ShiftCircle — requirement-to-proof traceability

Status as of 24 Nov 2026, before release v1.3 (the counts and pins in this paragraph are pre-S4; the current counts are in docs/process/release-notes.md and docs/10-testing.md, and the rows below carry the v1.3 S4 pins) (5a3be22; counts re-run at 5a38580; web unit tests re-counted at 8ae4bbd). Every test class and method named in this file was checked against the sources (all exist; the rows added for release 11 name test files and e2e specs). Counts today, all run: API 470 = 127 rules + 28 infrastructure + 315 api (mvn verify, green), web unit tests 532 in 54 files (at 8ae4bbd), Playwright against the real API desktop-datasets 124 passed and tablet-datasets 123 passed + 1 skipped, fixtures 23 passed. The sources for each number are in docs/10-testing.md (“Current counts”). Rows added since the first derivation cover the not-built states (FR-30/31, M1, M3), the Reports pickers (S1), the dataset notice and Other absence (S6, S8), the demo session (S11), CI, and release 11: the board views, filters and export, the gap panel, the readable quarter plan, planned leave and the menu fixes. Two requirements stay PARTIAL: FR-06 (publishing is recorded and shown on the board, but My schedule is not filtered by period status) and FR-07 (a real changed-since-publish count, no notice rule). The older paragraphs below keep the counts of their day. At v1.3, the course submission (25 Nov 2026, final main d3d1d28): API 624 = 140 + 38 + 446, web 695 in 66 files, Playwright desktop 144 passed, tablet 143 passed + 1 skipped, 0 failed; the supervisor rows are §10 and the ADR-031/032 rows in §5. At v1.2 (PR-O, PR-M, PR-N and PR-Q, not the submission tag) the counts are API 503 = 127 + 28 + 348, web 591 in 58 files, Playwright desktop 132, tablet 131 + 1 skipped; see docs/10-testing.md (“Current counts”). PR-M’s plan inputs are proven by PlanInputsApiTest (counts on 120 and 150, roles, snapshot through a hand edit and a staff change, a closure, a forced pattern), PlanInputsNeededTest (the floor’s stretch and tie-break), planInputs.test.tsx and planner-inputs.spec.ts.

First derived from the test sources, not from the prose. Checked on 2026-11-21 against main at 5d0f810 by grepping @Test, Playwright test(...) titles and the Flyway migrations. The sources hold 123 rules + 27 infrastructure + 272 api = 422 tests, counted as @Test methods on their own line (no parameterised tests). dev-qa’s independent run at 5d0f810 is 422 green, 0 failures/errors/skipped, in the default order and with random seed 20261121; web unit tests are 277, 0 failed; Playwright against the real api, a fresh stack per viewport, is desktop 101 passed / 0 failed and tablet 100 passed + 1 skipped / 0 failed; fixtures 22 + 21. The 100 dataset checksum is 4156077d...da6b with the payroll golden 9f2d51b3...04ff; the 120 checksum is 82b19cf8...32ca. The round history and each earlier count are in docs/process/review-rounds.md R1–R62. The security-fix branch p3-sec at 74a58c0 adds three api tests (PlannerDiscardRaceApiTest, DemoResetFailureTest, and the concurrency method in PlannerAbsenceApiTest); the author run is 425 = 123 + 27 + 275 in both orders, with dev-qa verification pending. A proof below names the test class and method that makes the claim, not the document that hopes it exists.

Phase 3 preference/pattern (p3-pref; final tip at handover; dev-qa gate pending). The branch adds 19 api tests: preference multi-select and the V9 backfill, coverage extraPercent, the Block sentence, V10 and the per-officer pattern. Author run from a clean worktree at the code tip 761f763 (Java identical to the handover tip): 444 = 123 rules + 27 infrastructure + 294 api in the default order, 0 failures/errors/skipped (dev-qa’s gate runs both orders); web 290. The 120 and 100 drafts are sha256-identical to c9ac073; the checksums and payroll golden are unchanged.

Release 3 (p4-unit, code tip ee4020c; gate pending). The dated unit closures, relief and staffing branch adds 8 api tests (UnitAvailabilityMigrationTest, UnitApiTest, UnitPlanningApiTest, the identity assertions in Demo120ResetApiTest, and Demo150ResetApiTest). Author run: 450 = 123 + 27 + 300 in a clean default run before dataset 150; the 150/100/120 and Unit tests are green at the 150 tip (12 targeted); the full 452 run is dev-qa’s gate (my repeat was killed by the harness timeout under host load, no test failure). Web 313 at the merged tip; dev-qa gate pending. With no closure rows the 120/100 fingerprints and all checksums are unchanged.

Release 4 (p5, code tip a23fa47; docs handover tip follows). The release adds 8 tests: 4 rules (EightHourNightWarningTest ×3 and the shift-types alternative check in RuleRowValidatorTest) and 4 api (RuleSentenceTest pin over all Block + ACKNOWLEDGE rows, RuleSetV3SeedTest, the NOT_ROSTERED headline test in PlannerPreferenceKindsTest, and the owner-token test in DemoOperationLockTest). Author run on the merged tree in Docker: 460 = 127 rules + 27 infrastructure + 306 api, 0 failures/errors/skipped; web 316; audit codes 49. The 100/120/150 checksums, the three plan fingerprints and the payroll golden are exact. 120 stays 38 gaps / 7 warnings / 5,103 shifts / 107 officers; its preferences headline is 196 of 214 (92%), the same on the scorecard and Compare.

Release 5 (p6, API tip 60f8f7d; web merges follow). L16 retirement (option b full + V13 inactive). The 100 seed has 0 L16 rows (was 270), V13 sets the template inactive without deleting old history, and the API refuses new L16 assignments/open shifts with a plain 400. PC-03 is P12 + a 5 h actual (17 h). New pins: 100 checksum 4156077d...da6b, golden 9f2d51b3...04ff (1,037 rows, 8,197.60 h), plan fingerprint unchanged ec337014...409e1b (6,586 / 727); warnings move 117 -> 135 because removing L16 history exposed 18 real U-14 plan warnings that the old baseline subtracted (U-12 78, U-14 57). 120 (82b19cf8...32ca, e8b29ce6...fe9d31) and 150 (2e6cd938...d7f8, a1e093f7...838030) are exact. Author run: 462 = 127 rules + 28 infrastructure + 307 api, web 318 at the merged tip, build clean, lint 4 pre-existing warnings, audit 49. The gate finding that PC-01 lost U-14 and Tara had no block-free pick-up was repaired in the same seed: Nia Mon 16 E8->P12 (+4 h), Thu 19 E8 added (+8 h), Sat 14 removed (saved week 56 h, proposal 64 h, U-01/U-05/U-08/U-14), and Tara Sun 29 removed (block-free Sun 29 pick-up). The self-check now asserts PC-01’s block set and Tara’s free slot. Proofs: DemoDataGeneratorTest (no L16, template inactive, PC-03), DemoResetApiTest (new checksum/golden), PlannerApiTest (135 = 78+57), AssignmentApiTest/OvertimeApiTest (400), ReferenceApiTest (7 active templates), L16RetirementMigrationTest (old DB keeps its rows), Demo120ResetApiTest/Demo150ResetApiTest (120/150 exact).

Release 6 (#6 Option A, p7; API tip da08dde). The quarter-plan scorecard gains a read-only qualification card: failing/checked block-days per active unit/block, three sentence forms, validFromRespected:false and the start-date note. It counts active unit-days only (closed days are not checked) and counts relief placements in the unit where the officer is placed, with their own qualifications. Measured with no closures: 100 346 of 1,470, 120 0 of 1,470, 150 103 of 1,470 (15 requirements x 98 days; the earlier 1,274 was wrong). No enforcement, no placement change, no migration. 100/120/150 checksums, the payroll golden and all plan fingerprints are unchanged. Proof: Demo120ResetApiTest/Demo150ResetApiTest compare the card with an independent SQL count; UnitPlanningApiTest closes Unit C from 15 Feb 2027 and checks 42 days/requirement, 1,302 total (1,470 - 3 C requirements x 56 closed days; a closure from 1 Mar removes 3 x 42 and gives 1,344, as gate 6 saw); PlannerApiTest pins the card key. Author run: 462 = 127 + 28 + 307 green; web 325/325 at the final merged tip, build clean, lint 4 pre-existing, audit 49.

Release 7 (#27 planner draft edits, p8; API tip 5c6e922, merged code tip eb7132c). A PLANNER can add, move (time or unit), reassign one-way (not a swap) or remove one shift in an uncommitted DRAFT. Rows stay in plan_draft_assignment; the live board is untouched until commit. Every save needs If-Match with the draft version (428/412), locks the draft row, runs the same rule engine (Block refuses and saves nothing; a Warn needs a second save with acknowledgeWarnings:true; no EMERGENCY override), writes one edit_plan_draft audit row with kind ADD/MOVE/REASSIGN/REMOVE, and re-scores the whole draft synchronously (gaps, warnings, scorecard, staffing and qualification cards). handEdits, editedAssignmentIds and the roster edited flag derive from the audit rows; there is no migration. Generate and discard drop the edits; commit still re-verifies every row. The pre-extraction characterization at 84d0ea0 pins the 100/120/150 checksums, payroll golden, plan fingerprints, row counts and warning totals, and stays green through the extraction; remove+add restores the 5,103-row fingerprint and a fresh generate after edits is the unedited plan. Author run: 464 = 127 rules + 28 infrastructure + 309 api, 0 failures/errors/skipped, default and reverse order; web 341/341, build clean, lint 4 pre-existing, audit 50; dev-qa gate pending. Pins exact: 4156077d…da6b, 82b19cf8…32ca, 2e6cd938…d7f8; golden 9f2d51b3…04ff; plans ec337014…409e1b, e8b29ce6…fe9d31, a1e093f7…838030.

Path shorthand. RulesTest = a class in api/shiftcircle-rules/src/test/java/ca/shiftcircle/rules/; ApiTest = a class in api/shiftcircle-api/src/test/java/ca/shiftcircle/api/; InfraTest = a class in api/shiftcircle-infrastructure/src/test/java/ca/shiftcircle/infrastructure/; WebTest = a component test in web/src/; e2e = a spec in e2e/tests/.

Status. PASS = an automated test asserts the behaviour. PARTIAL = a test asserts part of it (shape, one side of a boundary, or one layer). NOT COVERED = no test. PROCESS = enforced by review or convention, with no code assertion.

1. Rules — every rule the assessment names

Rule What the proof must show Test(s) Status
U-01 8 h rest in 24 h: 7 h 59 m BLOCK, exactly 8 h PASS; evidence names both shifts RestRulesTest#u01BlocksWithSevenHoursFiftyNineMinutesRest, #u01PassesAtExactlyEightHours, #u01PassesJustOverEightHours; RuleScenarioRunnerTest#everyNamedScenarioPassesOnThePublishedRuleSet (T2/T3) PASS
U-02 12 h target: 11 h 59 m WARN, 12 h PASS, 16 h shifts exempt RestRulesTest#u02WarnsAtElevenHoursFiftyNineMinutesAfterARegularShift, #u02PassesAtExactlyTwelveHours, #u02DoesNotApplyAfterSixteenHourShifts PASS
U-03 12 h after a 16 h shift: 11 h 59 m BLOCK, 12 h PASS RestRulesTest#u03BlocksAtElevenHoursFiftyNineMinutesAfterASixteenHourShift, #u03PassesAtExactlyTwelveHours; RuleScenarioRunnerTest#everyNamedScenarioPassesOnThePublishedRuleSet (T4) PASS on a fixture-only L16 row; DORMANT on live data (keyed to the retired L16 template; docs/05, docs/roadmap.md)
U-04 OT extension ≥ 4 h: 9 h 59 m rest WARN, 10 h PASS, 3 h 59 m extension not triggered RestRulesTest#u04WarnsAfterAFourHourExtensionWithNineHoursFiftyNineMinutesRest, #u04PassesAtExactlyTenHours, #u04DoesNotTriggerForAnExtensionOfThreeHoursFiftyNineMinutes PASS
U-05 16 h in any 24 h: rostered 16 h PASS, +15 min extension BLOCK HoursAndRunsRulesTest#u05PassesForARosteredSixteenHourShift, #u05BlocksWithAFifteenMinuteExtension; RuleScenarioRunnerTest (T2) PASS
U-08 7 consecutive days PASS, 8th scheduled BLOCK, 8th OT WARN, tied runs BLOCK HoursAndRunsRulesTest#u08PassesAtSevenConsecutiveDays, #u08BlocksAnEighthScheduledDay, #u08WarnsWhenTheEighthDayIsPickedUpOvertime, #u08BlocksWhenAnOvertimeRunTiesAScheduledRun PASS
U-09 4 consecutive 12 h shifts PASS, 5th scheduled/extended BLOCK, 5th OT WARN, tied runs BLOCK HoursAndRunsRulesTest#u09PassesAtFourConsecutiveTwelveHourShifts, #u09BlocksAFifthScheduledTwelveHourShift, #u09BlocksAFifthTwelveHourShiftEvenWhenItIsExtended, #u09BlocksWhenAFiveShiftScheduledRunTiesAnOvertimeRun, #u09WarnsWhenTheFifthShiftIsPickedUpOvertime PASS
U-10 4 overnight 12 h shifts PASS, 5th WARN HoursAndRunsRulesTest#u10PassesAtFourOvernightShiftsAndWarnsAtFive; RuleScenarioRunnerTest (T5) PASS
U-11 3 per 7 d and 10 per 28 d; 4th in 7 d WARN, 11th in 28 d WARN, 7-day boundary PASS HoursAndRunsRulesTest#u11PassesAtThreeSixteenHourShiftsInSevenDays, #u11WarnsAtAFourthSixteenHourShiftWithinSevenDays, #u11CountsAnExtendedSixteenHourShift, #u11PassesWhenTheFourthShiftIsExactlySevenDaysAfterTheFirst, #u11WarnsAtAnEleventhSixteenHourShiftWithinTwentyEightDays PASS
U-12 2 consecutive days off in 7; 48 h PASS, 47 h 59 m WARN, break boundary and leading/trailing breaks counted HoursAndRunsRulesTest#u12PassesWithFortyEightHoursOff, #u12CountsABreakOfTwentyFourHoursAsNoDayOff, #u12CountsABreakOfTwentyFourHoursOneMinuteAsOneDay, #u12IgnoresALongBreakFromAnEarlierWeek, #u12CountsLeadingAndTrailingBreaksInTheWindow, #u12WarnsWithFortySevenHoursFiftyNineMinutesOff, #u12CountsDaysOffAtTheBreakBoundary PASS
U-14 48 h PASS, 48.25 h WARN, exactly 60.00 h WARN, 60.25 h BLOCK; no override HoursAndRunsRulesTest#u14PassesAtExactlyFortyEightHours, #u14WarnsAtFortyEightHoursFifteenMinutes, #u14BlocksAtSixtyHoursFifteenMinutes, #u14CountsN12AcrossMidnightAndBlocksAboveSixtyHours (four N12 = 48 h pass; five = exactly 60 h WARN; plus a D8 = 68 h BLOCK); override refusal in AssignmentApiTest#aBlockRuleWithoutAnEmergencyOverrideCannotBeOverridden PASS
U-15 Board shows under / approaching / in overtime for the current period; 71.99 h UNDER, exactly 72 h APPROACHING, 79.99 h APPROACHING, exactly 80 h IN_OVERTIME; last day and midnight-crossing entry stay in their own period ScheduleApiTest#overtimeStatusChangesAtThePayPeriodThresholdBoundaries, #overtimeStatusUsesThePeriodThatContainsTheBoardDateAndCountsAMidnightCrossing, #listsTheOfficerRowsWithAssignmentsAndOvertimeStatus; PlanningPage.test.tsx#shows the officer pay-period hours with the overtime status pill PASS
U-16 8 h officer on a night shift: N8 WARN, D8 and N12 clean; v3 publishes the row and retains v2; the planner never makes the assignment, so the 100/120/150 plan fingerprints stay exact EightHourNightWarningTest#theShippedRowIsAWarningTheSupervisorAcknowledges, #anEightHourNightShiftWarns, #anEightHourDayShiftAndATwelveHourNightShiftDoNotWarn; RuleSetV3SeedTest#v3IsPublishedWithU16AndV2IsRetained; Demo120ResetApiTest, DemoResetApiTest, Demo150ResetApiTest (fingerprints) PASS
P-01 80 h REG, 80.5 h → 0.5 OT15, 96 h → 80 REG + 16 OT15, rostered 16 h inside 80 h all REG PayAndShiftLengthRulesTest#p01TreatsEightyHoursAsRegular, #p01ClassifiesHalfAnHourBeyondTheThreshold, #p01TreatsRosteredHoursAndAPickedUpSixteenHourShiftAsDesigned; PayrollApiTest#adjustedTimesSplitPeriodOvertimeThroughThePayClassifier PASS
P-01b OT paid at 1.5× PayAndShiftLengthRulesTest#p01ClassifiesHalfAnHourBeyondTheThreshold (rate 1.5); PayrollExportGoldenTest#theLockedPeriodsExportMatchesTheGoldenFileAndTheActualHours (OT15 rows) PASS
P-04 OT under 30 min unpaid; 29 m → 0, 30 m → 0.5 h PayAndShiftLengthRulesTest#p04DoesNotPayTwentyNineMinutesOfOvertime, #p04PaysThirtyMinutesOfOvertime PASS
L-01 Only 8/12/16 h; unexpected length BLOCK; an extended 16 h shift not blocked PayAndShiftLengthRulesTest#l01AcceptsEightTwelveAndSixteenHourShifts, #l01BlocksAnUnexpectedShiftLength, #l01DoesNotBlockAnExtendedSixteenHourShift PASS
S-03 16 h only where the unit has the agreement; 12 h agreement flag enforced PayAndShiftLengthRulesTest#s03BlocksASixteenHourShiftOnAUnitWithoutTheAgreement, #s03AllowsATwelveHourShiftWhereTheUnitHasTheAgreement, #s03BlocksATwelveHourShiftWhereTheUnitHasNoAgreement PASS
O-01 Ranking policy comes from the OT_RANKING rows; blocked officers keep their place OvertimeRankerTest#thePolicyComesFromTheOtRankingRows, #aBlockedOfficerIsSkippedAndKeepsTheirPlace, #theRankingRuleRowsRecordThePolicy; OvertimeApiTest#theRankedListIsFewestOvertimeThenSeniority PASS
O-02 Fewest overtime hours first, then seniority, deterministic ties OvertimeRankerTest#fewestOvertimeHoursRanksFirst, #equalOvertimeIsBrokenBySeniority, #tiesAreBrokenDeterministically; RuleScenarioRunnerTest#theRankingCheckPassesOnThePublishedPolicy PASS
O-03 Skip officers who would break a rule, keep their fairness place; unqualified officer UNAVAILABLE OvertimeRankerTest#aBlockedOfficerIsSkippedAndKeepsTheirPlace, #keepPlaceCanBeTurnedOffByThePolicy; OvertimeApiTest#theRankedListIsFewestOvertimeThenSeniority, #theUnqualifiedOfficerHeadsTheControlListAsUnavailable PASS
S-04 Workflow-enforced: only a supervisor creates/confirms EXTRA shifts or offers, and each writes an audit event AuthorizationMatrixTest#extraShiftsAreASeparateSupervisorActionAndAreAudited; OvertimeApiTest#anEmployeeCannotSendOrConfirmOffers, #creatingAnOpenShiftIsSupervisorOnlyAndAudited; AssignmentApiTest#aBlockIsSavedWithAnEmergencyOverrideAndAudited (audit rows) PASS

U-06, U-07 and U-13 are not in rule set v1; docs/05-union-rules.md §3 says so. They are not a missing test, but they are also not a delivered rule.

2. Scenarios T1–T14

The publish pipeline runs the rule-firing scenarios T1–T5 plus the T6 ranking check (RuleScenarioRunner, RuleSetApiTest#t7DroppingToThreeNightsShowsTheDryRunAndWarnsAfterPublish reports the scenario counts). T7–T14 are database or workflow scenarios; they are proved by their own API/DB tests, not by the rule-set build.

ID Proof Status
T1 RuleScenarioRunnerTest#everyNamedScenarioPassesOnThePublishedRuleSet includes T1 (rested officer, clean day) PASS (rule outcome only; no separate API save test)
T2 RuleScenarioRunnerTest#everyNamedScenarioPassesOnThePublishedRuleSet (T2 expects U-01 + U-05); AssignmentApiTest#previewReturnsBlockingResultsAndSavesNothing; evidence naming both shifts in RestRulesTest#u01BlocksWithSevenHoursFiftyNineMinutesRest; e2e/e1-blocked-assignment.spec.ts @api PC-01 blocks from the empty cell, and the override and overtime links work PASS
T3 RuleScenarioRunnerTest#everyNamedScenarioPassesOnThePublishedRuleSet (T3); AssignmentApiTest#warningsNeedExplicitAcknowledgement; OvertimeApiTest#exactlyEightHoursRestIsAWarningNotABlock PASS
T4 RuleScenarioRunnerTest#everyNamedScenarioPassesOnThePublishedRuleSet (T4); RestRulesTest#u03BlocksAtElevenHoursFiftyNineMinutesAfterASixteenHourShift PASS
T5 RuleScenarioRunnerTest#everyNamedScenarioPassesOnThePublishedRuleSet (T5); HoursAndRunsRulesTest#u10PassesAtFourOvernightShiftsAndWarnsAtFive PASS
T6 RuleScenarioRunnerTest#theRankingCheckPassesOnThePublishedPolicy; OvertimeRankerTest (10 tests); OvertimeApiTest#theRankedListIsFewestOvertimeThenSeniority, #theUnqualifiedOfficerHeadsTheControlListAsUnavailable PASS
T7 RuleSetApiTest#t7DroppingToThreeNightsShowsTheDryRunAndWarnsAfterPublish (dry run impact, submit/approve/publish, same check warns, live version) PASS
T8 PayrollExportGoldenTest#theLockedPeriodsExportMatchesTheGoldenFileAndTheActualHours (byte-for-byte golden file, actual hours, OT15) PASS
T9 AssignmentApiTest#aBlockIsSavedWithAnEmergencyOverrideAndAudited (reason ≥ 10, override + audit); ReportsApiTest#overridesReconcileWithTheOverrideRowsAndCarryReasonActorAndRuleCodes (report row); DemoDataGeneratorTest#generatesADatasetThatPassesItsOwnSelfCheck (PC-03 17 h override exists) PASS
T10 RuleSetApiTest#t10TheAuthorCannotApproveTheirOwnDraft (403); SchemaConstraintsTest#rejectsAVersionApprovedByItsOwnAuthor (DB CHECK) PASS
T11 PayrollApiTest#aLockedPeriodIsReadOnlyInTheApiAndInTheDatabase (409 + trigger); SchemaConstraintsTest#rejectsTimeEntryChangesInALockedPayPeriod PASS
T12 PayrollApiTest#authorizationAndScopeCells — another officer’s hours answer 404 PASS
T13 RuleSetApiTest#t13ARowBelowTheLegalFloorFailsValidationAndCannotBeSubmitted; RuleRowValidatorTest#aRestFloorBelowEightHoursIsRefused PASS
T14 PayrollApiTest#refusesToLockWithMissingActualsAndNamesThem (3 missing, 409, stays OPEN); #locksOnceEveryEndedShiftHasAnActualAndAuditsIt PASS

3. Flows E1–E5

ID Spec file Test titles Recorded run Status
E1 e2e/e1-blocked-assignment.spec.ts (+ keyboard.spec.ts) @fixtures a Block shows its reasons and offers no way to save; @fixtures the emergency override needs a reason of at least 10 characters; @api PC-01 blocks from the empty cell, and the override and overtime links work; @fixtures with a reason the override saves; @fixtures Find eligible officer leads to the ranked list and offers to two officers; keyboard @fixtures E1: reach the PC-01 block, open the override, and back out Real api, desktop + tablet: ai-dev-log 61 (8 passed / 2 skipped per viewport) PASS
E2 e2e/e2-offer-accept-confirm.spec.ts an offer reaches Tara, she accepts, the supervisor confirms; an employee sees no colleague hours or overtime totals Real api: ai-dev-log 61 PASS
E3 e2e/e3-rule-change.spec.ts (+ keyboard.spec.ts) admin edits, builds and submits; approver approves and publishes; a supervisor can read the rules but not build, submit, approve or publish; keyboard @fixtures E3: edit, build, submit, sign out, approve, publish Real api: ai-dev-log 61 PASS
E4 e2e/e4-lock-and-payroll.spec.ts @fixtures the open period refuses to lock while actuals are missing; the open period can be locked at the demo clock; a locked period is read-only and exports the payroll CSV; unlocking a period asks for a reason of at least 10 characters Real api: ai-dev-log 61 PASS
E5 e2e/e5-wall-display.spec.ts shows counts only, with no officer names or employee numbers anywhere in the page; refreshes every 60 seconds and says when it last did; @api says it is not live when the api cannot be reached, and recovers; a supervisor sees only their own units; fits a 1920×1080 TV and a 1366×768 screen without scrolling PASS — dev-qa ran the full suite on a private fresh stack at web-display a4b307e (docs/process/review-rounds.md R26) and again for the stale fix at 067e556 (R27): 9 passed / 1 skipped per run, the skip being the fit test on the tablet project by design. Re-confirmed on the clean clone at 17308b7. API counterpart DisplayApiTest 3/3 PASS

Every spec calls expectAccessible (axe, WCAG 2.1 AA, serious/critical fail) on the screens it reaches; E1 also calls expectDisclaimer. E2–E5 rely on the web shell test for the footer.

4. Guardrails (HANDOFF §5)

# Guardrail How it is enforced Proof Status
1 Synthetic data only Fixed fictional units/users in V3; generated officers from a fixed seed; no real names in the UI DemoDataGeneratorTest#generatesADatasetThatPassesItsOwnSelfCheck (100 officers, counts); DisplayApiTest#theDisplayContainsNoNamesOrEmployeeIdentifiers; AppShell.test.tsx#does not use a government logo, wheat sheaf or coat of arms PARTIAL — a test can prove the generator’s shape and that no names leak to the wall display, not that every name is fictional
2 No secrets in the repo .env.example only; compose requires the variables; the API refuses to start StartupSecretsTest#startsWhenBothSecretsAreSet, #refusesToStartWithoutTheDatabasePassword, #refusesToStartWithoutTheJwtSecret, #refusesAShortJwtSecret; README.md §4 PASS
3 Never weaken a safeguard 422/ack/override contract; maker/checker; locked-period trigger; append-only audit; no auto-approval; a database conflict answers a problem document, not a 500 AssignmentApiTest#aBlockRuleWithoutAnEmergencyOverrideCannotBeOverridden, #anEmergencyOverrideMustAlsoAcknowledgeTheWarnings, #aShortOverrideReasonIsRefused; AssignmentMoveCancelApiTest#cancelNeedsAReasonAndTheCurrentVersion; RuleSetApiTest#t10TheAuthorCannotApproveTheirOwnDraft; PayrollApiTest#aLockedPeriodIsReadOnlyInTheApiAndInTheDatabase; AuditApiTest#theTrailCannotBeChangedThroughTheApiOrTheDatabase; SchemaConstraintsTest#auditEventsCannotBeUpdatedOrDeleted; ConstraintProblemApiTest#anOverlappingEmergencyOverrideAnswersAConflictAndSavesNothing, #movingAShiftOntoAnotherOneAnswersAConflict PASS
4 Every rule needs boundary tests, reviewed by a human Rule boundary classes + scenario runner; human review waived by the lead, AI verifiers instead RestRulesTest, HoursAndRunsRulesTest, PayAndShiftLengthRulesTest, RuleRowValidatorTest, RuleScenarioRunnerTest; exception recorded in docs/process/HANDOFF.md §5 and ai-dev-log 24 PARTIAL — automated boundary tests exist; no human review has taken place (waived, not hidden)
5 Log AI use, corrections and rejections docs/process/ai-dev-log.md (phase 1–3 entries) and docs/process/review-rounds.md Process only; the log is part of the submission PROCESS
6 Keep docs in sync; record new decisions as ADRs docs/decisions.md ADR-001…ADR-027; this traceability file Process only; this document is itself the sync check PROCESS
7 Small descriptive commits; the lead pushes Local commits on main; no agent push git log (small commits per slice); README/CLAUDE instruction PROCESS
8 Footer line on every screen Shared app shell + wall-display footer AppShell.test.tsx#shows the required footer disclaimer on every screen; PlanningPage.test.tsx#keeps the footer disclaimer; WallDisplayPage.test.tsx (disclaimer assertion); e2e/tests/support.ts#expectDisclaimer used by E1 PASS

5. ADRs with a testable consequence

ADR Testable consequence Proof Status  
001 Superseded by ADR-009 — —  
002 Rules decide; humans approve; nothing auto-approves AssignmentApiTest#savingABlockedChangeReturns422WithResults, #warningsNeedExplicitAcknowledgement, #aBlockIsSavedWithAnEmergencyOverrideAndAudited; RuleSetApiTest#t10TheAuthorCannotApproveTheirOwnDraft PASS  
003 Superseded by ADR-006 — —  
004 Fictional facility, public rules DemoDataGeneratorTest#generatesADatasetThatPassesItsOwnSelfCheck; DisplayApiTest#theDisplayContainsNoNamesOrEmployeeIdentifiers PARTIAL (see guardrail 1)  
005 No AI at runtime No runtime AI dependency or external model call; rules are Drools + Java Inspection only; no automated test PROCESS
006 Three containers (web, api, db) docker-compose.yml; VersionEndpointTest#returnsBuildAndRuleSetInformation exercises the api in-container in tests No test starts the three composed containers PROCESS
007 Superseded by ADR-012 — —  
008 Simulated integrations stay inside the containers PayrollExportGoldenTest (CSV bytes), CsvTest (quoting/formulas) PASS  
009 Scope: planning, employee, overtime, time/payroll, reports, rules, display Presence/absence of endpoints and screens; out-of-scope items listed in docs/10 §8 No test asserts scope PROCESS
010 No trades/notifications; 100 officers × 90 days DemoDataGeneratorTest#generatesADatasetThatPassesItsOwnSelfCheck (counts, seed reproducibility) PASS for data size; features absent by design PARTIAL
011 Java + Spring Boot middle tier The Maven build and every Spring test ShiftCircleApplicationTests, VersionEndpointTest PASS
012 Drools decision tables, editable rows, compile + scenarios + dry run + hot swap RuleRowValidatorTest; RuleScenarioRunnerTest; RuleSetApiTest#t7DroppingToThreeNightsShowsTheDryRunAndWarnsAfterPublish, #e3ARestTargetChangePublishesAndIncrementsTheLiveVersion PASS  
013 Coverage is hourly, by unit and block ScheduleApiTest#reportsHourlyCoverageForTheDay; ReportsApiTest#coverageHoursReconcileWithTheAssignmentsHourByHour; DisplayApiTest#theDisplayShowsCoverageWithTheAdr017Shape PASS  
014 REST, Problem Details, 422 rule results, preview, ETags ProblemDetailsApiTest (404/400); ApiProblemAdviceTest; AssignmentApiTest#savingABlockedChangeReturns422WithResults; AssignmentMoveCancelApiTest#cancelNeedsAReasonAndTheCurrentVersion (428/412), #movingUpdatesInPlaceAuditsBothSidesAndBumpsTheVersion (ETag) PASS  
015 8/12/16 h shift times; start times configurable through the rules flow SchemaConstraintsTest#migrationsApplyAndSeedTheReferenceData (6 templates; A12 starts 00:00); PlanningPage.test.tsx#uses the ADR-015 shift codes and the extra label PARTIAL — seed and codes are tested; the rules screen’s shift-types route aliases the SHIFT_LENGTHS table (RuleSetService), so start times are not editable through the approval flow  
016 Overtime is hours beyond the pay-period threshold PayAndShiftLengthRulesTest#p01TreatsEightyHoursAsRegular, #p01ClassifiesHalfAnHourBeyondTheThreshold; PayrollApiTest#adjustedTimesSplitPeriodOvertimeThroughThePayClassifier; PayrollExportGoldenTest PASS  
017 Hourly coverage; lock only when ended shifts have actuals; counts-only rule review; explicit proposal decisions ScheduleApiTest#reportsHourlyCoverageForTheDay; PayrollApiTest#refusesToLockWithMissingActualsAndNamesThem; RuleSetApiTest#t7DroppingToThreeNightsShowsTheDryRunAndWarnsAfterPublish (dry-run impact has no names); DisplayApiTest#theDisplayContainsNoNamesOrEmployeeIdentifiers PASS — item 4 is built in v1.3: ProposalDecisionApiTest#aSupervisorDecidesOnlyTheShiftsOnTheirUnits (accept one, decline one), #aBlockAtDecisionTimeIsRefusedAndNothingIsSaved (re-run rules, 422), #aWarningThatAppearedAfterTheSendNeedsAcknowledgement; no override from a proposal (ADR-032)  
018 Audit-log grants deferred; triggers are the proof SchemaConstraintsTest#auditEventsCannotBeUpdatedOrDeleted; AuditApiTest#theTrailCannotBeChangedThroughTheApiOrTheDatabase PASS  
019 S-04 is workflow-enforced, not a table row AuthorizationMatrixTest#extraShiftsAreASeparateSupervisorActionAndAreAudited; OvertimeApiTest#creatingAnOpenShiftIsSupervisorOnlyAndAudited; audit rows in AssignmentApiTest PASS  
020 Demo data: 100 officers × 90 days, OT band 3–8%, reproducible checksum DemoDataGeneratorTest#generatesADatasetThatPassesItsOwnSelfCheck, #theSameSeedProducesTheSameRosterTwice, #fewerThanThreeFourNightRunsFailsTheSelfCheck PASS  
021 Save-time safeguards: one scope guard, one officer lock, overrides never swallow warnings AssignmentApiTest#concurrentSavesCannotBothBypassBlockRules, #anEmergencyOverrideMustAlsoAcknowledgeTheWarnings; AssignmentMoveCancelApiTest#twoConcurrentMovesWithOneVersionCannotBothWin PASS  
022 Lock/unlock/export facility-wide; double lock idempotent PayrollApiTest#lowConcurrentLocksWriteExactlyOneAuditRow, #authorizationAndScopeCells; SchedulePublishApiTest for publish scope PASS  
023 Only EMERGENCY-policy Blocks can be overridden; U-08/U-09/U-14 cannot RuleRowValidatorTest#aMustRulesDocumentedOverridePolicyCannotBeChanged; AssignmentApiTest#aBlockRuleWithoutAnEmergencyOverrideCannotBeOverridden PASS  
026 Quarter planner: deterministic heuristic, engine-verified draft, patterns, commit and absences PlannerApiTest#theSameSeedAndDataProduceTheSamePlan, #noDraftAssignmentViolatesABlockRuleAndDefaultPatternsStayAtEightyHours, #previewAndCommitWriteEveryShiftAtomicallyAndAuditOnce, #aSecondDraftOverACommittedQuarterIsRefusedWithAReason, #theCommittedPlanStaysReadableAndComparesWithTheCurrentBoard; PlannerPreferenceKindsTest#twelveHourCrewsScoreAsTheirTemplateSays; PlannerAbsenceApiTest; PlanGeneratorFteTest#casualsFillGapsWithoutExceedingTheirTarget; PlanGeneratorCrewTest#dayAndNightCrewsStaySeparateAndCoverEveryDay; WeekendRotationProbeTest; RotatingBreakProbeTest PASS  
027 D12/N12 templates and additive rule-set v2; 100 seed isolated HoursAndRunsRulesTest#d12AndN12AreTwelveHourKindsWithNominalSevenTwenty, #u02WarnsAfterAnN12ThatEndsWhenTheD8Starts, #u09FourD12PassAndFiveBlock, #u10FourN12PassAndFiveWarn, #u14CountsN12AcrossMidnightAndBlocksAboveSixtyHours, #u05PassesAtSixteenHoursForAD12ExtensionAndBlocksFifteenMinutesOver; PlanGeneratorCrewTest#dayAndNightCrewsStaySeparateAndCoverEveryDay; ReferenceDataMatchesRuleRowsTest#v1SeedRowsMatchTheCodeRuleSet; DemoResetApiTest#resetsTwiceToTheSameSeededStateAndAuditsIt PASS for the rules and isolation; the V6 baseline is seeded PUBLISHED by migration without maker/checker (PROCESS, recorded in ADR-027)  
031 Supervisor posts are SUPERVISION units; R-01/R-02 in rule set v4; the planner never cross-covers; separate overtime pools; never your own records; every dataset re-pinned once, officers unchanged See §10 (the rows for owner item 17) PASS  
032 Proposals decided per shift by scope or the planner; no override; nobody decides their own; planted demo proposals ProposalApiTest, ProposalDecisionApiTest, DemoResetApiTest, DemoPlantedProposalsBootTest; e2e proposals-officer, proposals-inbox, proposals-demo (the FR-30/31 row in §6) PASS  

6. Other Must requirements and NFRs (spot-check)

Requirement Proof Status
FR-01 assign, unassign and move; every change runs the rules AssignmentApiTest; AssignmentMoveCancelApiTest (move re-runs the pipeline); E1/E4 PASS
FR-02 shift templates configurable SchemaConstraintsTest#migrationsApplyAndSeedTheReferenceData (the eight seeded templates: six in V2, D12/N12 in V6; seven active after V13); ReferenceApiTest#shiftTemplatesAndQualificationsAreReadableByAnySignedInRole (read) PARTIAL — start times/lengths are seed data, not editable in the prototype
FR-03/04 required vs scheduled vs actual per block; qualifications ScheduleApiTest#reportsHourlyCoverageForTheDay; ReportsApiTest#coverageHoursReconcileWithTheAssignmentsHourByHour; OvertimeRankerTest#anUnqualifiedOfficerKeepsTheFairnessPlaceButIsUnavailable PASS
FR-05 overtime status live ScheduleApiTest#overtimeStatusChangesAtThePayPeriodThresholdBoundaries; #overtimeStatusUsesThePeriodThatContainsTheBoardDateAndCountsAMidnightCrossing; PlanningPage.test.tsx#shows the officer pay-period hours with the overtime status pill PASS
FR-06 publish a period SchedulePublishApiTest#publishingIsScopedAuditedAndOneWay, #aDraftWeekReadsAsUnpublishedUntilItIsPublished; SchedulePeriodSeedApiTest#publishingASeededPeriodWorksOnAFreshDataset (publishes a generated period, no planted row), #theBoardCarriesThePeriodItReadsSoTheWebCanPublish (the board hands over the id), #theBoardCountsTheShiftsChangedAfterThePublication, #aPastWeekIsAlreadyPublishedAndCannotBePublishedAgain PARTIAL: publishing is recorded and shown on the board (the proofs here), but My schedule is not filtered by period status, so “visible to employees” is not delivered (docs/02 FR-06, docs/07 §4.2)
FR-07 notice check and per-officer “changed” flag after publishing The board counts the shifts changed after the publication (publishedState.unpublishedChanges, from the audit trail) and names the period; there is no P-05/S-01 rule row and no per-officer changed marker PARTIAL — the count is real; the notice rule and the per-officer flag are not built (docs/10 §8)
FR-30/31 employee proposals: sandbox, submit, supervisor decision Built in v1.3 (P1–P5), no sandbox roster. API: ProposalApiTest, ProposalDecisionApiTest (send, withdraw, expiry, decision re-check, Block 422, warn and out-of-order acknowledgements, self-approval 403, #aMixedScopeCardShowsEachSupervisorOnlyTheShiftsOnTheirUnits); planted demo proposals (P5): DemoResetApiTest#resetsTwiceToTheSameSeededStateAndAuditsIt (the five planted shifts, none waiting Blocked, the same ids twice, nav counts Ellis 1 / Chen 2 / planner 2, checksums unchanged), SupervisorDatasetsApiTest (the same on 120 and 150). Web: ProposeShifts.test.tsx, ProposalsPage.test.tsx, inboxWords.test.ts. e2e: proposals-officer.spec.ts, proposals-inbox.spec.ts (approve one, decline one with a comment, a rule change refused with was/now, the officer sees both outcomes; J. Chen sees only the planted Admissions shift and M. Ellis’s own proposal). Demo walk: docs/demo-script.md §8 PASS (FR-30 partial: no sandbox roster)
S-04 shift planner (screen) My schedule → Propose shifts and My proposals (FR-30/31 above); ProposeShifts.test.tsx; e2e proposals-officer.spec.ts PASS (no sandbox copy of the roster)
S-06 requests inbox (screen) /proposals, Proposals (n): ProposalsPage.test.tsx, inboxWords.test.ts; ProposalDecisionApiTest (inbox scope, count, mixed-scope card); e2e proposals-inbox.spec.ts; overtime acceptances stay on the Overtime board (e2-offer-accept-confirm.spec.ts) PASS
M3: Find eligible officer on a slot with no open shift OvertimePage.test.tsx#M3: says a slot has no open shift instead of opening a different one, #M3: an unknown shift id also says so, and a picked shift still opens; e2e not-built-states.spec.ts (M3, @api). No screen creates an open shift; the API does (OvertimeApiTest#creatingAnOpenShiftIsSupervisorOnlyAndAudited) PASS (the state), creation in the UI not built
Reports: date range and unit pickers (S1) ReportsApiTest#theAuditorsUnitFilterNarrowsTheHoursAndOverridesReports, #authorizationAndScopeCells; ReportsPage.test.tsx (default range, ranged read and CSV, refused reversed/over-long range, auditor sees all units, no picker without a scope); reportRange.test.ts (defaults per report, 366-day limit); e2e reports.spec.ts (a supervisor picks a range and unit; the auditor narrows the overrides) PASS
The quarter plan names an under-staffed dataset (S6) and the Other absence code is recorded (S8) DemoActiveDatasetTest (3 methods: the active dataset read once, 100 when no reset row exists, database error not cached); Demo120ResetApiTest; PlannerPage.test.tsx#says Dataset 100 is under-staffed for nights and links to About & version, #stays quiet on Dataset 120; TimeAttendancePage.test.tsx#records and reopens the Other absence code (FR-51); AbsenceChip.test.tsx#names each absence code the api sends (FR-51); e2e s6-s8-dataset-notice-other-absence.spec.ts PASS
The demo session survives a refresh, and a build switch turns that off (S11, ADR-025 amendment) session.test.ts (six tests: memory-only unless the demo profile enabled it, restore after a reload, no restore on prod-like, cleared on sign-out and 401, corrupt value ignored, the VITE_PERSIST_DEMO_SESSION=false kill switch); e2e session-and-nav.spec.ts (demo: refresh keeps the session; sign-out and 401 clear it) PASS
CI runs the checks on every pull request .github/workflows/ci.yml (check scripts, web lint/tsc -b/tests/build, API mvn verify); Playwright is not in CI PROCESS (runs on GitHub, not provable from the repository)
One open shift is filled once, and one unlock is audited once OvertimePayrollConcurrencyApiTest#threeDifferentOfficersCannotFillOneOpenShift, #twoAcceptedOffersForOneShiftConfirmOnlyOnce, #twoShiftsAndTwoOfficersAssignInParallelWithoutDeadlock, #concurrentUnlocksWriteOneAuditRow (all over HTTP, real threads) PASS (dev-qa, c0dcaf3)
The employee roster without a unit filter is scoped AuthorizationMatrixTest#theEmployeeListIsScopedWhenNoUnitIsGiven (ellis A/B, chen ADM/CTL/ESC, auditor all, out-of-scope unit 404) PASS (dev-qa, c0dcaf3)
A rules-admin row edit is saved or refused, and a stored bad value is a validation error, not a 500 RuleRowEditApiTest#aRawAfterShiftKindEditIsSavedInsteadOfDropped, #aFriendlyAfterLabelStillMapsToTheStoredPattern, #aHostileAfterShiftKindIsRefusedAndNothingIsSaved, #anUnknownParamsKeyIsRefusedNamingIt, #aStringInANumericColumnIsRefusedNamingTheColumn, #aStringInTheExtensionColumnIsRefusedNamingTheColumn, #aStringAllowedLengthsIsRefused, #aNullAllowedLengthsIsRefused, #aHugeAllowedLengthsListIsRefusedAtTheCap, #minRestHoursOutsideTheRangeIsRefused, #anUnsafeRuleCodeIsRefusedInPlainWords, #aBuildWithAStoredWrongTypeAnswersValidationNotAFiveHundred, #aBuildWithAStoredAllowedLengthsStringAnswersValidationNotAFiveHundred, #aBuildWithAStoredAllowedLengthsNullAnswersValidationNotAFiveHundred, #aBuildRefusesAStoredRestAboveTheCeiling, #aBuildDoesNotReturnThousandsOfErrorsForOneHugeList, #aBuildCapsTheNumberOfErrorsItReturns (all over HTTP); RuleRowValidatorTest (27 tests: null/empty/string/5/true params roots and the numeric bounds), RuleRowEditApiTest (31 @Test: the whole PUT refusal contract, including unknown top-level fields, the after conflict, the numeric ranges and the new-row extension column) PASS (dev-qa, c0dcaf3)
The rule sentence is plain language, never the stored pattern or enum RuleSentenceTest#everyShippedRowReadsAsPlainLanguage, #theRestSentenceNamesTheShiftAndTheOutcomeInWords (all 97 shipped rows); RuleSetApiTest#theRuleSentenceIsPlainLanguage (the GET) PASS (author’s full runs at dc6890e, default and random seed 20261121; dev-qa’s independent run pending)
A refusal names the visible column, not the params key RuleRowEditApiTest#minRestHoursOutsideTheRangeIsRefused, #aGarbageLabelIsRefusedNotIgnored (the message keeps the label and drops (minRestHours) / (after)) PASS (author’s full runs at c8c05cd, default and random seed 20261121; dev-qa pending)
Rule evidence reads in words, without internal ids RestRulesTest#u01BlocksWithSevenHoursFiftyNineMinutesRest (no UUID pattern; “D8 ending … next shift N8 starts”); FactEvidenceTest#theRollingHoursEvidenceNamesNoAssignmentId, #theLongShiftEvidenceNamesNoAssignmentId, #theConsecutiveRunEvidenceNamesNoAssignmentId, #theShiftLengthEvidenceNamesNoAssignmentId (real UUID ids, no id in evidence; the ids travel in RuleResult.evidenceAssignmentIds, which the demo self-check matches on) PASS (author’s full runs at 8a2257a, default and random seed 20261121; dev-qa pending)
A locked pay period names its actor on the seeded and the API paths PayrollLockActorApiTest#theSeededLockedPeriodNamesItsActor (generated demo, HTTP GET, “M. Ellis”); PayrollApiTest#locksOnceEveryEndedShiftHasAnActualAndAuditsIt (API lock) PASS (author’s full runs at c8c05cd)
A change’s type and startAt are validation problems, not conflicts AssignmentInputApiTest#aGarbageChangeTypeIsRefusedNamingTheField, #anAbsurdStartYearIsRefusedNamingTheField, #aValidPreviewIsStillAccepted PASS (dev-qa, c0dcaf3)
A missing JWT secret answers the actionable message, not a raw placeholder JwtServiceTest#aMissingSecretExplainsWhatToDo, #aShortSecretExplainsWhatToDo; StartupSecretsTest PASS (dev-qa, c0dcaf3)
Every error body is RFC 9457 problem+json, a database conflict is a 409 rather than a 500, and every hidden cause is logged server-side under the trace id the caller gets ConstraintProblemApiTest#anOverlappingEmergencyOverrideAnswersAConflictAndSavesNothing, #movingAShiftOntoAnotherOneAnswersAConflict, #anOvertimeConfirmThatWouldOverlapIsRefusedBeforeTheDatabaseIsAsked (all over HTTP and pinning the WARN line); ApiProblemAdviceTest#theExclusionConstraintNamesTheConflictWithoutTheSql, #aUniqueConstraintBecomesA409Problem, #aNumericOverflowIsABadRequestNotAServerError, #aCheckConstraintStaysAConflict; UnexpectedFailureApiTest#anUnexpectedFailureAnswersAProblemDocumentWithoutInternals (body traceId matches the ERROR log), #springWebFailuresKeepTheirOwnStatus, #aRoleRefusalKeepsItsStatusAndGetsAProblemBody; RuleSetServiceCompileFailureTest#aCompileFailureIsLoggedWithItsDetailAndRefusedInPlainWords; PublishedRuleSetBootTest#aDirectEditToAPublishedRowRefusesToStartAndNamesTheProblem, #aPublishedRowThatCannotBeReadRefusesToStartInsteadOfServingV1; ProblemDetailsApiTest (404 and 400 over HTTP) PASS
FR-20–23 open shift, eligible list, offers, direct assign OvertimeApiTest#creatingAnOpenShiftIsSupervisorOnlyAndAudited, #theRankedListIsFewestOvertimeThenSeniority, #offerAcceptAndConfirmCreateTheAssignment, #directAssignRunsTheRulesAndFillsTheShift, #anEmployeeCannotSendOrConfirmOffers PASS
FR-50–54 actuals, pay codes, lock, payroll CSV PayrollApiTest (13 tests); PayrollExportGoldenTest; CsvTest PASS
FR-60–62/64 hours, overtime, coverage reports and CSV ReportsApiTest#coverageHoursReconcileWithTheAssignmentsHourByHour, #hoursAndOvertimeReconcileWithTheTimeEntriesAndThePayrollExport, #csvExportsUseTheDocumentedHeaders, #m4DisplayIsDeniedEveryReport PASS
FR-70/71/75/76 decision tables, versions, maker/checker, scenarios before publish RuleSetApiTest; RuleRowValidatorTest; RuleScenarioRunnerTest PASS
FR-73 append-only audit AuditApiTest (5 tests); SchemaConstraintsTest#auditEventsCannotBeUpdatedOrDeleted; payroll/override audit assertions PASS
FR-80/81/83/84 100 officers × 90 days, actuals before today, planted cases, fictional footer DemoDataGeneratorTest; AppShell.test.tsx#shows the required footer disclaimer on every screen PASS (fictionality is generator design, not proven by test)
The demo’s roster weeks are publishable (docs/10 §6.1) DemoDataGeneratorTest#seedsTheRosterWeeksEveryUnitCanPublish (84 periods: one Monday-to-Sunday week per unit, past weeks published, current and later weeks drafts, every shift in its period), #aMissingSchedulePeriodFailsTheSelfCheck; SchedulePeriodSeedApiTest#everyUnitHasARosterWeekForTheWindowAndOnlyThePastOnesArePublished PASS
NFR-01 three containers, no paid services docker-compose.yml; README §4 PROCESS (no automated compose test)
NFR-02 responsive desktop/tablet/TV Playwright projects desktop/tablet; e5-wall-display.spec.ts#fits a 1920×1080 TV and a 1366×768 screen without scrolling PASS
NFR-03/04 consistent, accessible UI expectAccessible in every e2e spec; web component tests; keyboard.spec.ts PASS
NFR-05 board < 1 s, rule check < 200 ms, 90-day report < 2 s PerformanceSmokeTest#nfr05TheHeavyScreensMeetTheirLimits (28-day board, stricter) PASS
NFR-06 deterministic, boundary-tested rules engine Rule boundary classes; RuleScenarioRunnerTest; ReferenceDataMatchesRuleRowsTest PASS
NFR-07 no secrets in repo StartupSecretsTest; .env.example PASS
NFR-08 synthetic data labelled in the footer AppShell.test.tsx; PlanningPage.test.tsx; WallDisplayPage.test.tsx; e2e/support.ts#expectDisclaimer PASS
NFR-09 OpenAPI / Swagger UI None found in code or dependencies; docs/07 §1 promises /api/v1/openapi.json and Swagger UI NOT COVERED
NFR-10 API-enforced authorization AuthorizationMatrixTest (9 methods); per-endpoint authz cells in AssignmentApiTest, AssignmentMoveCancelApiTest, PayrollApiTest#authorizationAndScopeCells, ReportsApiTest#authorizationAndScopeCells, AuditApiTest#onlyTheAuditorAndSupervisorsMayReadTheTrail PASS

7. Where the documents overstate the proof (found by this derivation)

  1. Scenario library format. docs/10 §2 and docs/process/HANDOFF.md §7 say the scenarios are data files in src/test/resources/scenarios/*.json and that T1–T13 run in the publish pipeline. No such directory exists. RuleScenarioRunner holds T1–T5 and the T6 ranking check in Java; the build pipeline runs exactly those (RuleSetService step 3). T7–T14 are API/DB tests. ai-dev-log 43 already described this correctly; the test-strategy header did not.
  2. U-15 boundary (fixed after this derivation). The planning board computes UNDER/APPROACHING/IN_OVERTIME; this derivation first found only UNDER asserted. ScheduleApiTest now pins 71.99 h, 72 h, 79.99 h, 80 h and 80.01 h plus the last-day/midnight-crossing period edge, and the rule row above is PASS.
  3. FR-07 notice/changed flag. Not built. Only publishedState.unpublishedChanges (a count) is returned; there is no P-05/S-01 row and no per-officer “changed since published” marker. It is now listed in docs/10 §8.
  4. NFR-09 OpenAPI. docs/07 §1 promises a generated OpenAPI document and Swagger UI. No springdoc dependency, controller or endpoint exists. It is now listed in docs/10 §8.
  5. ADR-015 shift-time editing. Start times are seeded in V2; the rules screen’s /rules/{version}/shift-types route resolves to the SHIFT_LENGTHS table (RuleSetService), not a shift-template editor. FR-02’s “configurable” is therefore seed-level only, not an admin flow. It is now listed in docs/10 §8.
  6. docs/10 §2 performance layer says “E2E timing + a JUnit timing test”. Only the JUnit PerformanceSmokeTest measures timings; no Playwright test asserts a time budget.
  7. docs/10 §2 authorization layer says “one test per denied/scoped cell”. The matrix is asserted, but grouped into nine area methods plus per-endpoint authz tests, not one method per cell. The coverage is real; the phrasing is stronger than the structure.
  8. T2’s U-14 detail. The real-api E1 test accepts “Blocked: 2 or 3 rules” and asserts U-01; the comment says U-14 also fires, but no assertion names U-14. AssignmentApiTest asserts U-01 only.

8. UI test (Playwright, Chromium only)

The suite in e2e/tests covers every screen by role and state at desktop 1440×900 and tablet 768×1024, runs axe WCAG 2.1 AA on every screen reached (a serious or critical finding fails), and runs E1 and E3 by keyboard only. The whole matrix, the captures and the defects found are in e2e/COVERAGE.md. Results below are dev-qa’s independent real-api run at 5d0f810 (a first-pass record; current counts are in docs/10-testing.md): desktop 101 passed / 0 failed, tablet 100 + 1 skipped / 0 failed (the TV-size check is desktop-only); fixtures 22 passed and 21.

Phase 3 specs added to the same matrix: planner, planner-absences, planner-committed, planner-preferences-committed, planner-a11y, dataset120, reset-datasets, reset, absence-correction, clear-actual, publish-period, move-cancel, week-navigation, time-grid-refresh and layout. They cover the planner draft/gaps/compare/commit and its axe and keyboard path, the preferences-after-commit case (N12 12 h NIGHT reads Met), dataset 120, the reset card, absence correction and clear-actual, the publish action, move/cancel, week navigation and the time-grid refresh.

Spec (e2e/tests/) What it proves Status
a11y-every-screen axe on sign-in, the supervisor screens (including a locked period and the wall display), not-built/not-found, employee refusals, rules admin/approver/auditor and the display account; D10 (a sideways-scrolling table with no keyboard access) pinned PASS
audit-viewer the auditor filters, loads older events and clears the filters; a supervisor does not see rule-change events PASS
display-short a short unit is shown in words and with an icon on the wall display PASS
keyboard-api E1 and the audit filter by keyboard only, and focus returns after the Block dialog closes PASS
overtime-decline-filled a decline is visible to the supervisor; a filled shift offers no checkbox, offer or assign; no Confirm on a leftover accepted offer (D5) PASS
planning-override an emergency-only Block saves with a reason; a warning saves after acknowledgement; the board shows the saved shift without leaving the screen (D9) PASS
reports all four reports and their CSV export; an empty report says so (D2); the report named in the address opens (D3); the planted override is visible PASS
routes-and-errors not-built/not-found wording; the api-unreachable panel and Try again; the error panel for broken data (D4); a wrong role gets plain words PASS
not-built-states M1: Propose shifts checks the rules and makes no request to /proposals; M3: Find eligible officer on a slot with no open shift says so and returns to that week PASS
s6-s8-dataset-notice-other-absence the Quarter plan names Dataset 100 and links to About & version; a supervisor records the Other absence code PASS
rules-refusals the floor and 24 h refusals in plain words; the approver cannot edit; the sentence is words, with no .* or bare enum (D6) PASS
screenshots 40 full-page captures per viewport plus index.json PASS
session-and-nav sign-in and the demo users (the spec title still says seven; there are eight), landing and nav per role, TV with no nav, sign-out, the 401 notice, the top-bar demo date (D1), no supervisor nav when signed out (D8), and the requested route after sign-in (D11) PASS

The phase’s defects D1–D11 are pinned by these specs and fixed; the test.fail markers are gone and no assertion was weakened.

9. Phase 3: trial fixes and the quarter planner (2026-11-21)

Proof Test(s) Status
An absence can be corrected to worked, worked to an absence, and cleared back to needs actual; locked period 409; pay codes recalculated PayrollApiTest#anAbsenceCanBeCorrectedToWorkedAndPayCodesRecalculate, #aWorkedShiftCanBeCorrectedToAnAbsence, #aClearedActualReturnsTheShiftToNeedsActual, #clearingAnActualInALockedPeriodIsRefused PASS
The clear event is visible to the scoped supervisor and in the actor list (the dangling-entry bug) PayrollApiTest#aClearedActualReturnsTheShiftToNeedsActual (audit GET + /audit-events/actors) PASS
The audit actor list is scoped like the trail AuditApiTest#theActorListIsScopedLikeTheEvents (auditor sees all, j.chen cannot see m.ellis, 401 anonymous) PASS
Coverage reports “of which overtime/extra” per bucket and block ReportsApiTest#coverageHoursReconcileWithTheAssignmentsHourByHour (hourly SQL reconciliation, block split sums to the total), #csvExportsUseTheDocumentedHeaders (extra_hours,extra_day,extra_evening,extra_night) PASS
The planner generates the same plan from the same seed and data PlannerApiTest#theSameSeedAndDataProduceTheSamePlan PASS
No generated assignment violates a Block rule; default-pattern officers work 80 h per period PlannerApiTest#noDraftAssignmentViolatesABlockRuleAndDefaultPatternsStayAtEightyHours (the whole draft re-run through the real engine, then the period hours) PASS
Newest-first nights hold; the scorecard carries thirds, share and nights against a wish PlannerApiTest#newestFirstNightsHoldsInTheScorecard PASS
Preferences are editable by the officer and readable only by PLANNER PlannerApiTest#preferencesAreEditableAndPlannerCanReadThem (12/EVENING/SAT,MON round-trip, 3 days 400, supervisor 403, 100 rows, delete 204) PASS
Commit writes every row atomically with one audit event; a second commit is 409 PlannerApiTest#previewAndCommitWriteEveryShiftAtomicallyAndAuditOnce PASS
A draft that touches a locked period is refused at commit PlannerApiTest#previewAndCommitWriteEveryShiftAtomicallyAndAuditOnce (inserts a LOCKED pay period, expects 409 LOCKED_PERIOD, removes it, then commits 200) PASS
Commit needs If-Match and a stale version is refused PlannerApiTest#previewAndCommitWriteEveryShiftAtomicallyAndAuditOnce (no header 428, If-Match: "999" 412, then the real version 200) PASS
PLANNER reads the board but other roles cannot; discard leaves no open draft PlannerApiTest#plannerReadsTheBoardButCannotPublishOrSave, #discardLeavesNoOpenDraftAndTheRolesAreEnforced PASS
The weekend pattern default is chosen from engine evidence WeekendRotationProbeTest#aFixedDaysOffPairIsClean (fixed pairs clean), #everyPhaseOfARotatingSevenPeriodQuarterWarnsAtTheWrap (each rotating phase hits Sun-Mon and warns U-12 inside 7 periods), #advancingThePairCreatesRestDayWarnings, #aPairMovingEarlierOncePerPayPeriodIsCleanAtEightyHours, #movingThePairEarlierEveryWeekWarns PASS
Demo reset empties and reloads the exact seed; twice, same checksum and golden DemoResetApiTest#resetsTwiceToTheSameSeededStateAndAuditsIt (100 officers + 10 supervisors since v1.3 S4, the demo sign-ins linked, 8 users, no planner drafts/2027 periods, checksum beb2e222…b7d1 and the officers-only 4156077d…da6b, golden b946ef1f…00e6 (1,124 lines; its first 1,038 are the pre-S4 9f2d51b3…04ff), no L16 rows, template inactive, demo_reset first audit row), #guardsTheReset (400/401/403, status PLANNER-only, demoMode); DemoResetProfileTest#resetDoesNotExistOutsideTheDemoProfile PASS
Full-time officers keep the pattern; FTE<1 casuals fill gaps without exceeding target PlanGeneratorFteTest#casualsFillGapsWithoutExceedingTheirTarget (100 FT + 50 casuals, gaps 617 -> 223, every casual at/under FTE x 80 per period, fteBands present) PASS
The planner rosters no 16 h shifts; that preference is shown unmet PlannerApiTest#noDraftAssignmentViolatesABlockRuleAndDefaultPatternsStayAtEightyHours (no L16 in the draft), #preferencesAreEditableAndPlannerCanReadThem (16 h unmet reason) PASS
A second draft over a committed quarter is refused with a reason, not an empty failure list PlannerApiTest#aSecondDraftOverACommittedQuarterIsRefusedWithAReason (409 problem+json, ALREADY_COMMITTED_WINDOW, date/author sentence, Reset the demo data), #previewAndCommitWriteEveryShiftAtomicallyAndAuditOnce (a real LOCKED period still 409s, then the same draft commits 200) PASS
The planner compare is real, not two rows with a hard-coded board gap PlannerApiTest#theCompareUsesTheRealBoardAndTheSameCoverageForBothSides (10 measure rows + 6 unit gap rows; board == draft for gaps/shifts/officers/hours/warnings/weekends after commit; directions present) PASS
The board and the plan measure coverage in absolute time PlannerApiTest#theCompareUsesTheRealBoardAndTheSameCoverageForBothSides (board gaps == plan gaps, per unit), ScheduleApiTest (board payload unchanged shape), PlanGeneratorFteTest (synthetic 223 under the same measure before the night rule) PASS
Only 12 h officers work nights; an 8 h preference is shown unmet PlannerApiTest#noDraftAssignmentViolatesABlockRuleAndDefaultPatternsStayAtEightyHours (no N8, 8 h officers D8/E8 only, 12 h A12 present), #preferencesAreEditableAndPlannerCanReadThem (NIGHT reason), #newestFirstNightsHoldsInTheScorecard (nightPolicy, bands) PASS
D12/N12 are 12 h kinds and the rules see them across midnight HoursAndRunsRulesTest#d12AndN12AreTwelveHourKindsWithNominalSevenTwenty, #u02WarnsAfterAnN12ThatEndsWhenTheD8Starts, #u09FourD12PassAndFiveBlock, #u10FourN12PassAndFiveWarn, #u14CountsN12AcrossMidnightAndBlocksAboveSixtyHours, #u05PassesAtSixteenHoursForAD12ExtensionAndBlocksFifteenMinutesOver PASS
D12/N12 crews stay separate and cover every night PlanGeneratorCrewTest#dayAndNightCrewsStaySeparateAndCoverEveryDay (196 N12 on 98 nights, 196 D12, no N8/L16/A12/P12, no mixed crews, n12 scorecard fields) PASS
V6 keeps the 100 seed and its agreements untouched DemoResetApiTest#resetsTwiceToTheSameSeededStateAndAuditsIt (checksum, no D12/N12 in the roster, ADM/ESC allows_12h false), ReferenceDataMatchesRuleRowsTest#v1SeedRowsMatchTheCodeRuleSet (published v2 == code rows) PASS
The demo lock can be released by the reset’s worker thread DemoOperationLockTest#aPermitAcquiredOnOneThreadCanBeReleasedOnAnother, #aDoubleReleaseDoesNotCreateASecondPermit; DemoResetApiTest resets twice in a row PASS
A workedAsScheduled body with actual times is rejected and writes nothing PayrollApiTest#aContradictoryWorkedAsScheduledAndTimesBodyIsRejected (400 problem+json, no time entry) PASS
Part-time/casual officers fill leftovers without exceeding target PlanGeneratorFteTest#casualsFillGapsWithoutExceedingTheirTarget (689 -> 588 with 8 h-only casuals; every casual at/under FTE x 80; full-time plan not shifted by the pool) PASS
Qualification coverage card is warn-only and equals the SQL count; closures and relief are date/placement-aware Demo120ResetApiTest and Demo150ResetApiTest (card total and per-unit/block equal the independent SQL; 100 346, 120 0, 150 103; 1,470 checked), UnitPlanningApiTest (Unit C closed from 15 Feb 2027: 42 checked days per C requirement, 1,302 total = 1,470 - 3 x 56 closed days; a closure from 1 Mar gives 1,344 = 1,470 - 3 x 42, as gate 6 saw; no C failure after), PlannerApiTest (scorecard key; plan fingerprints unchanged) PASS
L16 retired: no new 16 h rows, old history keeps rendering, new use refused DemoDataGeneratorTest#generatesADatasetThatPassesItsOwnSelfCheck (no L16 row, template inactive, PC-03 12 h + 17 h actual), L16RetirementMigrationTest#v13RetiresTheTemplateWithoutDeletingOldHistory (V12 -> V13, assignment survives), AssignmentApiTest#aNewAssignmentCannotNameTheRetiredSixteenHourTemplate and OvertimeApiTest#creatingAnOpenShiftIsSupervisorOnlyAndAudited (plain 400), ReferenceApiTest#shiftTemplatesAndQualificationsAreReadableByAnySignedInRole (7 active templates), DemoResetApiTest#resetsTwiceToTheSameSeededStateAndAuditsIt (new checksum/golden), PlannerApiTest#generatesAScorecardForTheQuarter (135 = 78 U-12 + 57 U-14 with the unchanged fingerprint) PASS
The 120 dataset resets deterministically to 100 FT crews + 20 casuals, then back to 100 Demo120ResetApiTest#resetsToTheCrewDatasetTwiceThenBackTo100 (38 N12 + 54 D12 + 3 E8 + 5 relief + 8 CASUAL_12 + 12 CASUAL_8 = 120; FTE 100/20; ADM/ESC 12 h; plus 10 supervisors since v1.3 S4 (2 D12 + 2 N12 + 1 relief per post); two resets same checksum ca73467d…a64a, officers-only 82b19cf8…32ca; reset 100 gives beb2e222…b7d1 and flags false; reset < 30 s) PASS
The 120 plan covers the roster with a bounded gap count and no Block Demo120ResetApiTest#resetsToTheCrewDatasetTwiceThenBackTo100 (gaps 20-60 of 1,764, warnings <= 30, every draft assignment re-checked against the rule engine with zero Block) PASS
The 120 composition and qualification limit are visible Demo120ResetApiTest#resetsToTheCrewDatasetTwiceThenBackTo100 (composition counts; qualificationReport prints per-unit/block failures for 120 and 100; scorecard qualificationPolicy; no qualification engine) PASS
The plan dataset selector is 100 by default, 120 available, unknown 400 Demo120ResetApiTest#rejectsAnUnknownDataset (400 “Unknown demo dataset”), #resetsToTheCrewDatasetTwiceThenBackTo100 (/version datasets = [100,120]) PASS
Commit needs If-Match and a stale version is refused PlannerApiTest#previewAndCommitWriteEveryShiftAtomicallyAndAuditOnce (428 no header, 412 stale, 200 current) PASS
The rotating 3-day wrap has engine evidence for all variants RotatingBreakProbeTest#variantAEightyHours, #variantBSeventyTwoHours, #variantC..., #variantD..., #variantE..., #variantF..., #fixedPairsForComparison PASS
The committed plan stays readable and its compare names the basis PlannerApiTest#theCommittedPlanStaysReadableAndComparesWithTheCurrentBoard (state: COMMITTED, committedDraft with scorecard, gaps/warnings/schedule/coverage/compare 200 for the committed id, 401/403 unchanged; cancelling a committed shift moves only the board column, draftStatus/basis say the comparison includes edits since the commit) PASS
The 120 dataset commits and the board shows the committed week; both datasets commit Demo120ResetApiTest#resetsToTheCrewDatasetTwiceThenBackTo100 (120 commit 5,103 shifts, supervisor board 77 shift rows for 4-10 Jan; LOCKED first period 409 LOCKED_PERIOD; 100 commit 6,586) PASS
A plan period that overlaps an existing one is refused, not absorbed PlannerApiTest#previewAndCommitWriteEveryShiftAtomicallyAndAuditOnce (409 PAY_PERIOD_OVERLAP with a plain sentence before any write) PASS
A 23P01 pay-period overlap is not reported as an officer shift conflict ApiProblemAdviceTest#aPayPeriodOverlapIsNotReportedAsAnOfficerShiftConflict (.../pay-period-overlap, no SQL/constraint text, no “already has a shift”) PASS
Planned absences are a read-only skip and the plan is reproducible PlannerAbsenceApiTest#aPlannedAbsenceSkipsTheOfficerAndTheSameInputsProduceTheSamePlan (no shift for the absent officer; relief/gap covers; scorecard absences line; same inputs same fingerprint; no absences = baseline), #absenceEntryIsPlannerOnlyAndValidated (401/403/400) PASS
Planned leave shows on the draft roster; the live board is unchanged (PR-D, fit-gap B1-lite) PlannerLeaveRosterApiTest#plannedLeaveShowsOnTheDraftRosterAsAbsenceItems (a week of VACATION: leave-only row “On leave”, 7 ABSENCE/VACATION items, no shift; SICK after generate: SHIFT then ABSENCE/SICK in the cell; another unit’s leave not shown), #theLiveBoardScheduleStillCarriesNoAbsenceItems (/schedule has no ABSENCE); web PlannedLeaveDialog.test.tsx (one POST per day, validation, 409 listed, stop on failure), contract.test.ts; e2e planned-leave.spec.ts (Dataset 150, axe) PASS
The planning board shows a week, a 14-day pay period or a month, in a comfortable or compact density, with the view and density in the address (board views, fit-gap items A1, A4, A5 in the sprint plan; not the token names in docs/ui/README.md) rosterView.test.ts (view and density from the address, 14-day pay periods, range per view, stepping, per-officer and per-day totals, the day and night 12 h crews); PlanningPage.test.tsx; RosterGrid.test.tsx; CoverageCell.test.tsx; e2e board-views.spec.ts (week default, pay period 9 – 22 Nov, month, axe, no sideways page scroll at 1440 and 390; a pay period says “Spans two roster weeks” and offers no publish) PASS
The board finds, filters, sorts and exports officers (A3) filterRoster.test.ts (name, overtime, rotation, works, qualification together; sorts; the address; no Casual option unless the rows name one); exportRoster.test.ts (CSV for Excel with BOM, CRLF, quoting and the formula guard; TSV for the clipboard; file name); e2e board-filters.spec.ts (the filter line “Showing n of m officers”, whole-unit counts kept, CSV download, copy, print media with the full disclaimer, 390 px) PASS
A short coverage cell opens the free officers, ranked by pay-period hours, and Check & assign runs the normal rule check (A2) gapFill.test.ts (only free officers, lowest hours first, rest as a fact, run of work days, overtime wording, only today or later); PlanningPage.test.tsx; e2e gap-fill.spec.ts (Unit B Sat 21 Nov days: Nia Thompson is listed with a rest hint and then Blocked by U-01 and U-14, nothing saved; a phone) PASS
The quarter plan reads as a plan: part-time capacity line, grouped gaps under a weeks-by-units strip, a week picker with gap counts, the all-units table collapsed, a warning marker on each flagged shift (A6 to A8, fit-gap i-6) quarterPlan.test.ts (14 weeks, runs across a month end, the plain reason, part-time bands planned against target, never negative); PlannerRosterTab.test.tsx; PlannerPage.test.tsx; e2e quarterPlanChecks.ts run from dataset120.spec.ts (the line recomputed from the API’s own FTE bands, the strip, 14 week options, the ⚠ tooltip by hover and keyboard) PASS
The planner enters planned leave in a dialog; the draft roster shows it and the audit log records each day (A9, PR-D) PlannedLeaveDialog.test.tsx (one absence per day in order, validation before any call, a day already recorded as another type listed, a server failure stops and says how many were saved); PlannerLeaveRosterApiTest; e2e planned-leave.spec.ts (Dataset 150: seeded Vac and Sick chips; three Sick days entered, three record_absence audit events, axe on the dialog) PASS
The menu follows the API: Reports only for supervisors and auditors, the supervisor’s own schedule only with a linked employee record (PR #14; the item is My schedule since release v1.3 S7, Employee view before) roles.test.ts (“hides Reports from the planner, whom the api answers 403”, “hides My schedule from a supervisor with no linked employee record”, “calls the supervisor’s own schedule My schedule, not Employee view”); nav.test.tsx; e2e session-and-nav.spec.ts (the demo supervisors’ menu has their own schedule since release v1.3 S4 linked them to supervisor records; before it, it had none; no browser test opens the planner’s menu) and supervisor-my-schedule.spec.ts. The API side (a planner is 403 on the reports) is enforced by @PreAuthorize and not covered by an automated test PASS (UI); API planner cells not covered
Owner item 17, release v1.3 S7: a supervisor sees their own schedule under My schedule, headed with their position and post; the wall display shows each supervisor post as counts only; the hours and overtime reports carry each person’s position and read one rank at a time; the plan inputs, the scorecard and the commit say how many officers and supervisors API: SupervisorDatasetsApiTest#theDemoSupervisorsSeeTheirOwnScheduleOnEveryDataset (employee.post “Supervision · Operations (ADM, CTL, ESC)” on 100/120/150; an officer’s is null); DisplayApiTest#theSupervisorPostsHaveTheirOwnCountsOnlyStrip (two posts, counts only, the unit tiles and totals unchanged) and #theDisplayContainsNoNamesOrEmployeeIdentifiers (a supervisor’s name, number and id included); ReportsApiTest#thePositionFilterReadsTheHoursAndOvertimeForOneRank, #theOvertimeReportsPoolIsOneRankWhenFiltered; PlanInputsApiTest#dataset120InputsMatchTheEmployeeTable (rows split 120 + 10, headline); PlannerSupervisorApiTest (post row 0 + 4, lineUnitWarnings/postWarnings). Web: roles.test.ts, nav.test.tsx, MySchedulePage.test.tsx, WallDisplayPage.test.tsx, ReportsPage.test.tsx, planInputs.test.tsx, SupervisorPostsCard.test.tsx, contract.test.tsx (re-captured samples). e2e: supervisor-my-schedule.spec.ts (J. Chen’s My schedule, the posts strip with no names, the reports by position), planner-inputs.spec.ts (the split headline on 150 and 120, Supervisors by post, the supervisor card, the commit dialog) PASS
v1.2 plan options: Generate takes staffTypes, partTimeFill and crossUnitFill, validated (400 problem detail), PLANNER-only, stored on the draft (V14, V15) and shown with it; the defaults make the same plan; Fill up to FTE adds only, within FTE x 80 h, paced through the period; Cover gaps from other units covers gaps with officers from other units qualified for every block the borrowed shift covers, within FTE, in a tested order, before the extras, says why the rest are still short, and the roster marks them “From”; every option commits; Generate again is filled in and says what changed; the plan inputs carry the options, follow the form and count only the staff a full-time-only draft plans with PlanGeneratorOptionsTest (14: defaults equal the old overload; full-time only; up to FTE adds only, caps, a Block, determinism, even pace; cross-unit covers another unit’s gaps and only adds, caps and one shift a day, qualification for the gap and for every block a 12 h shift covers, a Block refuses, determinism, gaps before the extras, the order (share, then newest, then number), no 12 h officer in a unit without 12 h, the no-shift-fits reason); PlannerOptionsApiTest (6: eight bad bodies are 400 naming the field; 403 for supervisor, auditor, officer; Dataset 150 pinned: defaults, up to FTE (51 warnings, commits, 5,746 shifts), other units (72 gaps, 59 warnings, 5,455 shifts, commits; 28 covered by 41 shifts from 26 officers; reasons 46/14/12; no unqualified borrowed shift; homeUnit on the draft roster, not on the board), both (71 warnings = the commit’s recount, 5,769 shifts, commits), full-time only (687) and full-time + other units (529, 115, 4,894, 158 covered, reasons 268/201/51/9); Dataset 120 other units covers 0 with 38 not qualified, all Escort evenings, and full-time + other units 152/6/4,958; GET /planner/inputs with the form’s options and a 400; options on the row, GET /drafts/{id}, GET /plan and the audit event); PlanInputsFillOrderTest (3: the steps per option); GeneratorCharacterizationTest (100/120/150 fingerprints and warnings identical with the default options sent); planOptions.test.ts (the still-short words for 150 and 120); planInputs.test.tsx (the full-time-only headline, the summary line); PlannerPage.test.tsx (sentences, the request body, Made with, the cross-unit and still-short lines, the prefilled dialog, the comparison with the previous draft); RosterGrid.test.tsx (the From marker); e2e planner-options.spec.ts PASS
Repeating a planned absence is idempotent; a conflicting type is refused PlannerAbsenceApiTest#duplicateAbsenceIsIdempotentAndAConflictingTypeIsRefused (first 201, second 200 same id, one row; VACATION same date 409 “already recorded”) PASS
The 120 officers have real synthetic names, unique and stable; the 120 checksum includes them Demo120ResetApiTest#resetsToTheCrewDatasetTwiceThenBackTo100 (no FirstN/LastN, 130 distinct names with the 10 supervisors, same names across two resets, provider checksum ca73467d…a64a, officers-only 82b19cf8…32ca; v1.3 S4 re-pinned the 100 checksum/golden once) PASS
U-14 is labelled by its warning level, not the Block PlannerApiTest#generatesAScorecardForTheQuarter (U-14 group “Week over 48 hours”, never “Week over 60 hours”) PASS
The compare preference count uses the scorecard’s definition PlannerApiTest#theCompareUsesTheRealBoardAndTheSameCoverageForBothSides (preferencesMet.draft == scorecard.preferences.met; board == draft on the committed plan) PASS
Preferences after a commit evaluate the committed plan PlannerApiTest#theCommittedPlanStaysReadableAndComparesWithTheCurrentBoard (100 rows, none NO_DRAFT, at least one MET/PARTLY/NOT_MET) PASS
All 120 gaps are the known ESC evening trade-off Demo120ResetApiTest#resetsToTheCrewDatasetTwiceThenBackTo100 (GAPS120 is exactly {ESC, EVENING, 38}; docs/ADR/spec state it) PASS
D12/N12 preferences use the template row, not a code list PlannerPreferenceKindsTest#twelveHourCrewsScoreAsTheirTemplateSays (120: scorecard preferences.met == compare preferencesMet; N12 12/NIGHT MET; D12 asked 8h evenings NOT_MET with plain reasons; nights bands/n12 count still valid) PASS
A recorded extension moves the rule check to the actual end ActualTimesInRulesTest#aFourHourExtensionWarnsUnderU04AndKeepsTheNextShiftRestChecked (U-04 WARN and the next shift’s rest), #aSixHourExtensionBlocksUnderU05 (18 h in 24 h BLOCK), #anExtensionOfExactlySixteenHoursInTwentyFourDoesNotBlockUnderU05 (the limit passes), #aShorterActualAlsoMovesTheRestWindow, #anAbsenceEntryKeepsTheRosterTimes, #bothAnswersInOnePutAreRefused PASS
The planner’s 21-29 Dec look-back history uses the same actual resolver PlannerHistoryActualApiTest#anExtensionOnTheLookBackHistoryIsReadByTheGenerator (an extension on a seeded history shift changes the generated plan) PASS
Shift-less officers are not counted as MET (candidate 4) Not built: no NOT_ROSTERED status; the 120 plan’s 13 shift-less casuals still read their asked criteria as MET (26 criteria of 195). The fix is queued, not delivered NOT COVERED (known limit)
The two extra selectable patterns are not added Probe only at p3-api-pat 3f94937 (not merged): 8 h 7/3+7/4 warns U-12 and U-14 in all 21 phases and is 56-88 h per period; 12 h 4/2+4/3 warns U-14 at exactly 60.00 h in a 168 h window, 96-108 h per period. Both Block-free; not added (decision 15) NOT COVERED (measured known limit)
A discard racing a commit cannot answer DISCARDED while the quarter commits PlannerDiscardRaceApiTest#aDiscardRacingACommitCannotSayDiscarded (commit in one thread, discard 300 ms later; commit 200, discard 409, status COMMITTED, no discard audit row; the plain discard 200 and the committed discard 409 are in the same test) PASS on p3-sec, author run; dev-qa pending
A short or moved actual cannot shorten a shift and relax U-01 or U-05 ActualTimesInRulesTest#aShortActualCannotRelaxTheRestOrHoursBlock (a 1-minute actual leaves U-01 and U-05 BLOCK and the assignment 422), plus the four extension cases (U-04 WARN, U-05 block/pass) PASS on p3-sec, author run; dev-qa pending
One planned absence per officer-day under concurrency PlannerAbsenceApiTest#concurrentAbsencesForOneOfficerDayLeaveOneRow (six simultaneous posts, one row, one type, 200/201/409), backed by V8’s partial unique index and the ON CONFLICT insert PASS on p3-sec, author run; dev-qa pending
A reset Error releases the lock, sets FAILED and hides the raw detail DemoResetFailureTest#anErrorDuringTheResetReleasesTheLockAndHidesTheDetail (a test provider throws AssertionError; status FAILED with a generic message, lock not busy, a following 100 reset reaches DONE) PASS on p3-sec, author run; dev-qa pending
Rules help explains Block/Warn/Info/Pass and the main rules’ limits and results from the live published tables, and the planner sees the read-only variant (observation 29) PlanningPage.test.tsx (dialog named Rules help, outcomes, every listed code, live params change follows, no “acknowledge it before” wording, Esc closes and focus returns, planner variant without tables or link) PASS
Coverage tab shows how much of each week’s coverage came only from overtime/extra shifts, stacked in red with a hatch, a legend, one summary sentence and an “of which extra shifts” column (observation 31) CoverageChart.test.tsx (barSegments heights, red only when extra > 0, the four summary cases and the tie, table column + title, aria contains the summary); ReportsPage.test.tsx (no overtime bars on Coverage, they stay on Overtime) PASS
Roster tab heads the grid with the selected unit and the unit picker counts the visible week’s gaps per unit, singular and plural (observation 32) PlannerRosterTab.test.tsx (1 gap / no gaps / 2 gaps per week, heading, strip click); PlannerPage.test.tsx (wiring) PASS
A preference asks a set of day parts: any chosen part matches, the response carries timesOfDay only, and the one-release legacy value is accepted PreferenceTimesTest#normalizeCanonicalisesAndCollapsesDuplicates, #legacyMapsToOneElementOrEmpty, #anyChosenPartMatches, #nightVolunteerAndAvoidsNights, #rankingUsesTheEarliestChosenPart; PreferenceMultiSelectApiTest#multiSelectRoundTripAndLegacyInput (round-trip, legacy accepted, timesOfDay wins when both are sent, empty = none), #validationAndDuplicateCollapse (unknown/non-array/null 400, duplicates collapse, over-three raw values that collapse are accepted); PlanGeneratorPreferenceTest#aMixedSetIsMetAndANightOnlySetOnAnEightHourOfficerIsNot PASS
V9 backfills every old single value and drops time_of_day PreferenceTimesMigrationTest#v9BackfillsEveryLegacyValueAndDropsTheOldColumn (DAY/EVENING/NIGHT/NONE/null to the same set, old column gone) PASS
The coverage week carries extraPercent = extraHours / requiredHours * 100 and the axis floor includes scheduledPercent - extraPercent CoverageExtraPercentApiTest#everyWeekCarriesTheOvertimeShareAndTheAxisIncludesTheRegularPart (ratio, zero case, axis floor, weekly SQL sum equals the non-cancelled EXTRA/overtime-offer assignment hours; not payroll overtime) PASS
A Block row with ACKNOWLEDGE policy says it cannot be saved and has no override; other rows keep their plain sentence RuleSentenceTest#anAcknowledgeBlockSaysItCannotBeSaved, #everyShippedRowReadsAsPlainLanguage PASS
The shift pattern is per officer; 8 h officers mix rotating, fixed and 7/3; 12 h is read-only; the default plan is unchanged OfficerPatternApiTest#everyOfficerHasAPatternAndThePlannerCanChangeAnEightHourOne (fields, PUT, persistence, draft pattern8h null, scorecard words), #twelveHourOfficersAreReadOnlyAndBadCodesSayWhy (400/404 plain messages), #theOldFacilityPatternStillWorksAsAOneReleaseOverride; OfficerPatternMigrationTest#v10GivesEveryExistingAndNewEmployeeTheRotatingDefault (default, nullability, invalid code); PlanGeneratorPatternTest#mixedCohortsKeepTheirOwnCycleAndAreDeterministic (14-day/7-day/10-day cycles, fixed off-pair, determinism, scorecard words), #theLegacyOverrideStillWinsForOneRelease, #aBlockedProposalIsSkippedWithoutChangingThePatternOfOthers; Demo120ResetApiTest#resetsToTheCrewDatasetTwiceThenBackTo100 (all seeded patterns valid; plan fingerprints since v1.3 S4: 120 5a3763c7…983f, 100 94aeae1f…7c11; the officers-only fingerprints, e8b29ce6…fe9d31 and ec337014…409e1b, are asserted in GeneratorCharacterizationTest) PASS
Shift patterns are per officer (option C): no facility pattern select, the planner sets an 8-hour officer’s pattern on Preferences, 12-hour officers keep the crew pattern, and the scorecard lists every officer’s pattern in words PlannerPage.test.tsx (no picker, draft sent without pattern8h, Shift patterns card in words, no raw codes); preferences.test.tsx (8 h select saves through the api, 12 h read-only) PASS
Units can be closed from a date and optionally reopened; history stays and future published shifts are flagged, never deleted UnitAvailabilityMigrationTest#v11AddsTheTablesAndTheSharedActiveFunction (V11 tables and unit_active_on on/off days), UnitApiTest#unitsCarryTodayStatusAndClosurePreview (today status, preview, add/change/remove, overlap/past/reopen/reason 400s, 403), UnitApiTest#flaggedShiftsListFuturePublishedShiftsInAClosedUnit PASS
A closed unit has no requirement, roster or gap; its full-time officers work as relief; the plan before the closure is unchanged; it is deterministic; reopening restores it UnitPlanningApiTest#closesUnitCMidQuarterWithoutChangingTheDaysBeforeIt (Unit C from 2027-02-15: zero C assignments and gaps after, pre-close rows bit-identical, relief in other units, no Block, two runs identical, C returns after 2027-03-29) PASS
The 100/120 checksums, payroll golden and plan fingerprints are unchanged when no unit is closed Demo120ResetApiTest#resetsToTheCrewDatasetTwiceThenBackTo100 (no unit_availability/unit_staffing rows, leave 0.20, 120 5a3763c7…983f, 100 94aeae1f…7c11 since v1.3 S4; GeneratorCharacterizationTest holds the officers-only e8b29ce6…fe9d31 and ec337014…409e1b) PASS
Staffing splits at every closure boundary, uses the 12 h/8 h post mapping and the leave formula, and the rows sum to the totals UnitApiTest#staffingSplitsAtEveryClosureBoundaryAndUsesTheFormula (3 periods, C 0 closed, posts/raw/needed/shortfall, totals by sum, allocated audit, leave 15% and 400s) PASS
Dataset 150 is selectable with its own pinned checksum/plan and the Unit C close works on it, while 100/120 stay identical (observation 34 addition) Demo150ResetApiTest#resetsTo150TwiceWithStableNumbers (120 FT + 30 PT officers and, since v1.3 S4, 12 supervisors with their composition, leave and Ellis’s planted week; N12/D12/E8 counts, 20% leave rows, checksum 353e2e62…91a5 (officers-only 2e6cd938…d7f8), 100 officer gaps / 1,764, 93 supervisor-post gaps / 588, 39 officer warnings, 5,877 shifts (5,414 officer), 162 people, fingerprint 7368ef13…0587 (officers-only a1e093f7… in GeneratorCharacterizationTest)), #unitCMidQuarterCloseWorksOn150; Demo120ResetApiTest/DemoResetApiTest (100/120 unchanged) PASS
Audit codes for closures, staffing, leave and draft edits have web labels scripts/check-audit-codes.sh (50 codes agree, edit_plan_draft -> “Draft shift edited”); auditCodes.test.ts (labels for every action/entity) PASS
Units can be closed from a date (optionally reopened), the planner plans without them and their officers work as relief; planned shifts are flagged, never deleted; a staffing tile/panel shows allocated, on staff, needed and short with the formula in words and an editable leave allowance (observation 34) UnitsPage.test.tsx, PlannerPage.test.tsx (staffing tile/panel/flagged), PlannerRosterTab.test.tsx (closed note/label/cells), PlanningPage.test.tsx (board note), CoverageChart.test.tsx (closure note), WallDisplayPage.test.tsx (closed card), unit-closure.spec.ts (real api: close C, generate, read the closed week, reopen) PASS
A planner can add, move (time or unit), reassign (one-way) or remove one shift in a DRAFT only, and nothing pinned moves (release 7 #27) PlanDraftEditApiTest#plannerEditsAreRuleCheckedRecomputedAuditedAndCommitted (preview saves nothing and leaves the version/count; DELETE then POST restores the 5,103-row fingerprint; REASSIGN audit row; duplicate 409, stale 412, missing If-Match 428, non-PLANNER 403, retired L16 400, closed unit 409; commit 200 then edit 409); Demo120ResetApiTest/Demo150ResetApiTest (checksums, fingerprints and golden unchanged) PASS
A draft edit runs the rules: a Block is refused and saves nothing, a Warn needs a second acknowledged save, and no EMERGENCY override is offered PlanDraftEditApiTest (UI-shaped Wade ESC D12->N8 same-day move 422 blocked-by-rules, version unchanged; Bram E8 warning move 422 warnings-need-acknowledgement, then acknowledgeWarnings:true 200) PASS
Every draft edit is audited as edit_plan_draft with kind ADD/MOVE/REASSIGN/REMOVE, and the draft summary/roster mark hand-edited shifts without a migration PlanDraftEditApiTest (one audit row per edit, REASSIGN kind, handEdits/editedAssignmentIds, roster edited derived from audit rows) PASS
The draft is re-scored synchronously after an edit, and commit still re-verifies every row including edits PlanDraftEditApiTest (scorecard, warnings and gaps returned on each save; commit after edits 200) PASS
Editing does not change generation: the 100/120/150 checksums, payroll golden and plan fingerprints stay exact and a no-edit generate is byte-identical GeneratorCharacterizationTest (pins at 84d0ea0, green through the assess extraction at the tip); DemoResetApiTest/Demo120ResetApiTest/Demo150ResetApiTest PASS

10. Release v1.3: supervisors on their own posts (owner item 17, ADR-031)

The S7 row (My schedule, the wall display, the reports and the plan split) is in §9 with the other screen rows. FR-35 to FR-38 are in docs/02-requirements.md.

Requirement Proof Status
FR-35: positions are reference rows; seniority within the rank; an unknown rank is the lowest, non-supervisory one (S1) PositionTest; SchemaConstraintsTest (the position rows, the classification foreign key 23503, position_since not before the service date, the unit_supervision triggers 23514) PASS
FR-37: R-01 Block (no override) for an officer on a post, Warn with ACTING_SUP on the date; R-02 Warn for a supervisor on an officer post; v4 = v3 + R-01/R-02; edited through maker/checker with a dry run that sees the posts table (S2) PostEligibilityRulesTest (boundary cases per position, kind and acting qualification); RuleSetV4SeedTest; ReferenceDataMatchesRuleRowsTest; RuleRowValidatorTest, RuleSentenceTest (the POSTS columns and sentence); PostEligibilityApiTest (the board check; R-01 is not overridable, R-02 is acknowledged); PostsMakerCheckerApiTest PASS
FR-37: the planner never cross-covers, in every placement pass; seniority within rank orders the pools; a supervisor post can’t be closed (S3) PlanGeneratorSupervisorTest (6; a mutation run with the guard removed fails 5); PlannerPostEligibilityApiTest; PlannerSupervisorApiTest; UnitApiTest (409 “Supervisor posts can’t be closed; change the minimum instead”) PASS
FR-36: two posts and their supervisors in every dataset, M. Ellis and J. Chen linked, the single re-pin with the officers’ rows unchanged (S4) SupervisorDatasetsApiTest; GeneratorCharacterizationTest (new pins and the officers-only pins); DemoResetApiTest, Demo120ResetApiTest, Demo150ResetApiTest; the generator self-check item 10 (docs/10-testing.md §6.7) PASS
FR-38: a supervisor can’t change their own shift, time entry, absence, overtime or proposal (403) (S4) SelfEditGuardApiTest (every write path); ProposalDecisionApiTest (self-approval) PASS
FR-38: overtime pools by position; an offer outside the pool is 422 and writes nothing; confirm checks the pool again (S5) OvertimeSupervisorPoolApiTest; SupervisorDatasetsApiTest#theOvertimeListKeepsToThePostsPool (the demo §3 list: 36 candidates, 18 Skipped, 10 Not available, 8 eligible with a warning) PASS
FR-36/37 on screen: posts grouped on the board, Supervisor on duty, the Sup / Officer / Acting badges, gap fill by position, the shift dialog naming the rank (S6) ScheduleApiTest (unit.kind, position, supervisorsOnDuty); web supervisorPosts.test.tsx, gapFill.test.ts; e2e supervisor-posts.spec.ts PASS