Skip to content

feat(learn): label Jan/Feb month anchors common-year vs leap (#8) - #29

Merged
tsenoner merged 2 commits into
mainfrom
fix/8-month-anchor-labels
Jun 23, 2026
Merged

feat(learn): label Jan/Feb month anchors common-year vs leap (#8)#29
tsenoner merged 2 commits into
mainfrom
fix/8-month-anchor-labels

Conversation

@tsenoner

Copy link
Copy Markdown
Owner

Closes #8. Roadmap item 4/7.

Stage 3 "Month anchors" listed January: the 3rd (the 4th in leap years) — the lead value (3rd, 28th) was the silent non-leap anchor and the parenthetical the silent leap variant. A learner skimming the list reads "the 3rd" as always-true and misses the override — the exact "trap that catches everyone" the stage warns about.

Change

Label each Jan/Feb item explicitly (per-item, so even a list-skimmer can't miss it):

  • January: the 3rd in common years, the 4th in leap years
  • February: the last day — the 28th in common years, the 29th in leap years

The framing line drops its now-redundant "shift by one" mechanic but keeps the warning and adds that only Jan/Feb change: "Only Jan and Feb change in leap years — the trap that catches everyone. Every other anchor is the same all years."

Even-month doubles (4/4…) and the 9-to-5 / 7-Eleven odd mnemonic are leap-invariant (verified) — left untouched. CheatSheet.tsx gains a caption so its terse cells are labeled too.

Note: I went per-item rather than the "state it once in the paragraph" framing I mentioned earlier — it's the more skim-proof fix and directly satisfies the issue's acceptance criteria (each item labels common vs leap). Easy to dial back in review if you prefer the lighter touch.

Verification

Values match the engine (monthAnchor: common Jan 3 / Feb 28, leap Jan 4 / Feb 29). New test locks the common/leap labels + digits and asserts no leap qualifier leaks onto the even-month doubles. typecheck ✓ · lint ✓ · tests ✓ · build ✓.

🤖 Generated with Claude Code

Stage 3 listed "January: the 3rd (the 4th in leap years)" — the lead value (3rd,
28th) was the silent non-leap anchor and the parenthetical the silent leap
variant, the exact skim-trap the stage warns about. Label each explicitly.

- curriculum.ts: "January: the 3rd in common years, the 4th in leap years";
  "February: the last day — the 28th in common years, the 29th in leap years".
  Trim the framing line's redundant "shift by one" mechanic, keeping the "trap
  that catches everyone" warning + that only Jan/Feb change. Even-month doubles
  and the 9-to-5 odd mnemonic are leap-invariant — left untouched.
- CheatSheet.tsx: add a caption "Jan/Feb shown for common years; each is +1 in a
  leap year" so the terse table cells are labeled too.
- curriculum.test.ts: lock the common/leap labels + digits on Jan/Feb and assert
  no leap qualifier leaks onto the even-month doubles.

Values match the engine (monthAnchor: common Jan 3/Feb 28, leap Jan 4/Feb 29).
Gates: typecheck, lint, tests, build — all green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daycipher Ready Ready Preview, Comment Jun 23, 2026 4:27pm

Cleanup from /simplify + /code-review on the Jan/Feb labels PR:
- Drop the framing line's redundant second sentence — "Only Jan and Feb
  change in leap years" already implies every other anchor is unchanged.
- Tighten the test's even-month-doubles filter to same-number-both-sides
  so it no longer also matches March's "3/14"; the `doubles` set (and its
  length>0 guard) now means what its name says.

typecheck ✓ · lint --max-warnings 0 ✓ · tests ✓

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tsenoner
tsenoner merged commit aaaafa0 into main Jun 23, 2026
3 checks passed
@tsenoner
tsenoner deleted the fix/8-month-anchor-labels branch June 23, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Learn Stage 3 (Month anchors): make Jan/Feb anchors explicitly non-leap and label the parenthetical as the leap variant

1 participant