Year-boundary and leap-year regression test for custody rotation (Feature 05, task 7) #63

Member

Final task of Feature 05.

Delivered

  • The week-parity regression guard: a parametrized test walking a two-week alternating rotation across every day of 2020 (366-day leap year, 53 ISO weeks) and 2015 (365 days, 53 ISO weeks). Expectations derive from the anchor's 7-day blocks (uniform within, alternating between) — NOT the engine's formula — so a parity-based implementation that resets at January 1st fails block uniformity or alternation. Year facts (day counts, ISO week 53) asserted inline; the docstring names the guard.

Verification

uv run pytest: 1004 passed.

Closes task 5841f120 (Feature 05).

Final task of Feature 05. ## Delivered - The week-parity regression guard: a parametrized test walking a two-week alternating rotation across every day of 2020 (366-day leap year, 53 ISO weeks) and 2015 (365 days, 53 ISO weeks). Expectations derive from the anchor's 7-day blocks (uniform within, alternating between) — NOT the engine's formula — so a parity-based implementation that resets at January 1st fails block uniformity or alternation. Year facts (day counts, ISO week 53) asserted inline; the docstring names the guard. ## Verification uv run pytest: 1004 passed. Closes task 5841f120 (Feature 05).
dev_agent added 1 commit 2026-09-15 18:25:34 -04:00
The week-parity regression test (D-004): walks a two-week alternating
rotation day by day across a FULL 366-day leap year (2020) and a full
365-day year with 53 ISO weeks (2015), asserting the present-day
sequence never breaks or inverts, including January 1st.  The
expectation is derived from the anchor's 7-day blocks — each block
uniform, consecutive blocks alternating — not from the engine's own
index formula, so a parity-based implementation that resets on
January 1st breaks block uniformity or alternation (most visibly in
the block spanning the boundary).  Year facts asserted: 2020 = 366
days and ISO week 53; 2015 = 365 days and ISO week 53.  The test
docstring names itself as the regression guard.  Suite: 1004 passed.
overseer added 1 commit 2026-09-15 18:28:41 -04:00
Review round 1 (Codex gpt-5.6-terra, MEDIUM): the walk stopped at
December 31st, so the boundary block's next-January days went
unchecked and a year-resetting implementation would pass. The walk
now runs through January 14th of the following year, asserting block
uniformity across the December 31st -> January 1st transition
(including the post-53-week jump), and the walked-year day count is
verified independently of the walk. Suite: 1005 passed.
overseer added 1 commit 2026-09-15 18:31:40 -04:00
Review round 2 (Codex gpt-5.6-terra, 2 LOW): 2015-01-06 is a Tuesday,
not a Monday — the anchor is now the computed first Monday of January
(asserted weekday 0); the docstring names the ISO-week rollover
precisely (the Monday on or after January 4th — January 4th in both
walked years, which end ISO week 53) instead of 'January 1st'. Suite:
1005 passed.
Member

Independent review — Codex gpt-5.6-terra

R1 — CHANGES_REQUIRED (MEDIUM): the walk stopped at December 31st, so a year-resetting implementation would pass (boundary block's next-January days unchecked). Fixed in a18c006: walk extended through January 14th; block uniformity asserted across the transition.
R2 — CHANGES_REQUIRED (2 LOW): 2015-01-06 is a Tuesday (anchor now the computed first Monday of January); ISO parity flips at the ISO rollover (Jan 4 in these years), not January 1 — docstring corrected. Fixed in fec607f.
R3 — APPROVED (zero findings). Suite 1005 passed, reviewer-verified.

## Independent review — Codex gpt-5.6-terra **R1 — CHANGES_REQUIRED (MEDIUM):** the walk stopped at December 31st, so a year-resetting implementation would pass (boundary block's next-January days unchecked). *Fixed in a18c006:* walk extended through January 14th; block uniformity asserted across the transition. **R2 — CHANGES_REQUIRED (2 LOW):** 2015-01-06 is a Tuesday (anchor now the computed first Monday of January); ISO parity flips at the ISO rollover (Jan 4 in these years), not January 1 — docstring corrected. *Fixed in fec607f.* **R3 — APPROVED (zero findings).** Suite 1005 passed, reviewer-verified.
dev_agent merged commit 9d21f29eea into feature/167e3565-704d-41c7-adf6-3b88ed266f78-presence-custody-schedules 2026-09-15 18:32:45 -04:00
Sign in to join this conversation.
No Reviewers
No labels
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Maniacs_Mansion/NestQuest#63