aboutsummaryrefslogtreecommitdiff
path: root/test/test_differential.ml
Commit message (Collapse)AuthorAgeFilesLines
* kernel(temporal): Holy Thursday is white, per RG128(b)'s named exceptionLukasz Kasprzak2026-08-121-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | RG 128(b) excepts "Missa sive Chrismatis sive in Cena Domini feria V Hebdomadae sanctae" from the Septuagesima-to-Easter-Vigil violet span as a whole-Mass exception (unlike Palm Sunday's blessing/procession, which the same sentence carves out as only part of that day) -- so Holy Thursday's Mass is white, not violet. temporal_ef.ml fell through to the generic Passiontide ferial path (season_colour Passiontide = violet) for this date, since [named] has no entry for the Triduum at all (rank was already correct via [privileged_feria]; only colour was wrong). Found via Task 16's missalemeum oracle comparison: every other Triduum day's oracle colour set includes violet as an option (Good Friday "bv", Holy Saturday "vw" -- already-flagged, deliberately deferred per-action gaps, register ยง3b), but Holy Thursday's is white alone. This is a genuine NEW divergence from lectio too (lectio has no such exception and still prints violet for Holy Thursday) -- added as Layer C11 to the differential harness and data/ef/expected-divergences .sexp, 46 rows (2005-2050), rather than silently changing what that harness accepts. Also corrected a stale comment on season_colour claiming white's RG paragraph was never pinned -- RG 119 was found and cited in the register on 2026-08-11 but the correction was never copied into this file's own comment.
* test(differential): gate C1/C6 on slug family, pin the fixture's SHA-256Lukasz Kasprzak2026-08-121-10/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix round 1 on Task 15's review, four findings closed. C1 and C6 previously gated on calendar date alone -- unlike every other Layer C entry, which also checks the actual colitur slug that won. A future sanctoral change producing an unrelated celebration with the same diff shape (e.g. a promoted 29-31 December saint landing on C6's own [Slug_f; Rank]) would have been silently absorbed under a citation that has nothing to do with the real cause. Both entries now require, whenever Slug_f is in the diff set, that colitur's own slug be a member of an explicit closed list (jan_6_13_slug, nativity_octave_day_slugs) -- the same style advent_feria_slug already used for C4. Constructed the exact substitution via a temporary (unshipped) overlay Replace directive promoting thomas-becket to Class1 Feast White; confirmed the tightened predicate refuses to absorb it (46 unexplained rows, one per year); reverted. C10 gained the diff-field-subset restriction every other entry already had (it previously fired on the two pinned dates regardless of which fields differed). Fixed a stale doc comment ("SIX" columns; field has five constructors). The fixture's provenance note now records its SHA-256, and the suite asserts it as its own first test case (test_fixture_checksum), so a hand-edited or partially re-copied fixture fails loudly instead of silently becoming an unlabelled snapshot. Computed via the system sha256sum binary through Sys.command plus a redirected-output temp file -- no new library dependency, not even unix. Constructed a one-byte fixture edit and confirmed the checksum test fails independently of the row-comparison test; reverted. 237/237 tests green, clean-build verified.
* test: differential vs lectio 2005-2050 with a cited allow-listLukasz Kasprzak2026-08-121-0/+494
Validation layer 3 (design spec's five): compares colitur's real day-by-day EF output against lectio (sibling project, Go), 2005-2050, one line per civil day. Of 16801 day-pairs, 11206 already agree on the seven leading columns; the 5595 that don't resolve into exactly 25 distinct field-diff signatures, all triaged. Three strictly separate layers, per the controller's ruling (the brief's single flat allow-list assumed a handful of differences, not 5595): - Layer A (test_differential.ml, norm_season/norm_slug): vocabulary. An explicit, closed table of naming synonyms with no liturgical substance (lectio's easter/christmas vs colitur's paschaltide/christmastide; a handful of slugs that are two names for the identical office). No wildcards -- every entry is a literal string pair. - Layer B (strip_epiphany_index): numbering. The one slug family whose lectio/colitur index offset is not a constant (Time-after-Epiphany week numbering, register 3c#5) has its embedded digit stripped to a common form on both sides before comparing; rank and colour stay fully compared. - Layer C (data/ef/expected-divergences.sexp): the cited allow-list. Ten genuine liturgical disagreements, each citing its RG paragraph and naming which engine is right (always colitur, verified against the Missal/register, never against lectio's own behaviour). This is the only layer permitted to cover a difference in rank, colour, or which celebration is observed. Five extend or restate register 3c's already- documented divergences (season boundary, Sunday I-class, Advent Ember ferias, Rogations); five are new, found and adjudicated in this task (Lent Ember days, the Nativity Octave, Ember-day-vs-saint precedence, the St Joseph transfer off a Lent Sunday, and the 2011 Sacred Heart / Precious Blood / Visitation collision). expected_rows on each entry is an exact regression pin, asserted by the test, not documentation. 13 January (register 6's long-open "Baptism of the Lord" item) is confirmed empirically fixed already -- Task 11's sanctoral wiring closed it before this task started -- so it is not allow-listed; the only residual difference there is the season boundary already covered by C1. Two stated limits carried from the brief (commemorations are not comparable; lectio's own EF oracle asserts season only, 2025-2026 only, so a rank/colour difference is not presumptive evidence against colitur) plus a third found during this task (the week column is a display convention on both sides, not a liturgical fact, and is not compared at all) are documented in the test file's own doc comment. Fixture: test/fixtures/lectio-ef-2005-2050.txt, committed as plain text (1.4 MB), generated by lectio commit 2386a45; provenance recorded in the sibling .provenance file. Colitur's side is recomputed fresh from the library on every run, through the same Calendar/Rite_ef pipeline `colitur day` uses, not the compiled binary. Proved the harness has teeth by two reverted perturbations: a genuine colour difference injected into a fully-covered fixture row fails the "no unexplained differences" check with the exact mismatched row printed; a one-row drift in an allow-list entry's expected_rows fails the count check independently, showing it is not merely a duplicate of the first assertion. 236/236 tests green, clean-build verified, deterministic across OCAMLRUNPARAM=R.