feat: freeze resolveYear() as a golden-fixture safety gate (#365) #416
No reviewers
Labels
No labels
area: build
area: ci
area: compare
area: data
area: engine
area: model
area: provenance
area: rite
area: validation
backport
blocked
breaking
confirmed
dependencies
duplicate
epic
github_actions
invalid
needs-info
needs-triage
php
priority: high
priority: low
priority: medium
regression
type: bug
type: chore
type: correction
type: docs
type: enhancement
type: feature
type: fix
type: perf
type: refactor
type: security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Directorium/Core!416
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/365-golden-year-fixture"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #365.
Freezes the engine's resolved liturgy as a byte-stable golden fixture so the corpus data-for-code swaps (#41 sanctoral, #42 temporal, #43 precedence) can be proven inert — data replaces code without moving the resolved calendar by a byte.
What
tests/Golden/GoldenYear— per-year digest: SHA-256 of each day'sDayContractJSON with the volatile provenance stamps (corpusVersion,engineVersion) stripped, so the digest tracks the liturgy, not metadata. The #41 plumbing swap (same feasts, new corpus id) is therefore inert; any real change is caught.tests/Golden/resolve-year-digests.ndjson— the committed fixture, one{"year","days","sha256"}line per year, 1584–2200 (617 years).tests/Golden/GoldenYearDigestTest— the CI guard: re-resolves every year, asserts byte-identical digests, names any drift. Runs in thecheckjob viacomposer test, so it gates #42/#43.bin/freeze-golden-year.php— regenerates the fixture; run only when a calendar change is reviewed and accepted (e.g. #41 expanding the sanctoral), then commit the result.Boundary note
resolveYear()reaches back one year for the trailing Christmas cycle, so its effective floor is 1584 (resolving 1583 would need the pre-Gregorian-floor 1582 cycle). The fixture covers 1584–2200; the 1583 gap is documented inKNOWN-LIMITATIONS.mdand tracked in #415.Verification
contractVersion/office content present.[OK], 576 tests / 30,619 assertions green (~7s).