From 8d1eb25a311e16ddb7bf89d2b21fb1ca0aa058a7 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Mon, 17 Aug 2026 12:28:03 +0200 Subject: test(oracle): compare reading citations against missalemeum Layer 4 (test_oracle.ml) now extracts and compares the Epistle/Gospel citation for every one of the 730 days in the 2026-2027 fixture, the same axis Task 8 already added to layer 3. tools/ extract_missalemeum_oracle.py gained a structural citation-span detector (the first "*...*"-wrapped span under 40 chars containing a chapter:verse-shaped digit pair), verified exhaustively over all 1 458 Lectio/Evangelium sections. 728 of 730 days are comparable; the 2 that are not (Good Friday, both years) have no such section in missalemeum's own JSON at all -- a structural limit on the oracle's own side (M23), not a colitur gap. 451 of 730 days differ and are all explained across 19 cited entries; 0 unexplained. Chain step 4 (the Commons) has no layer-4 witness: confirmed empirically (a scratch sweep, not merely re-asserted from Task 6's own report) that none of the 15 Commons/proper saints is ever the observed office in this window. The comparison surfaced three genuine colitur bugs in data/ef/lectionary.sexp, all fixed at the source in tools/bootstrap_lectionary.ml: 1. Holy Name of Jesus (ef-holy-name-sunday/ef-holy-name) carried a mis-derived citation, borrowed by analogy from an unrelated ini section ("ef-christmas-sunday-0", the Sunday-within-the-Octave's own Mass) on the wrong assumption the two share a Mass. Disproved by missalemeum's own extraction for both real Holy Name Sundays in its window, confirmed against the Missal itself, twice, both scans (Acts 4:8-12/Luke 2:21, not Gal 4:1-7/Luke 2:33-40). 2. RG 17(a)'s own "diebus ferialibus" rubric (immediately following the Holy Name heading, both scans) was never implemented: 2-5 January ferias repeat 1 January's Mass, 7-12 January ferias before Holy Family Sunday repeat Epiphany's, and Holy Family's own week has a named formula ("Missa Dominicae Primae post Epiphaniam"). All three fell to step 3's undifferentiated Sunday walkback instead. Fixed for three 5-weekday families, deliberately excluding Saturday from all three -- RG 78's BVM Saturday Office wins there unconditionally, confirmed against missalemeum's own title on this window's own such Saturdays. 3. Corpus Christi and Sacred Heart (both real, never-impeded I-class movable feasts) had no lectionary entry at all. Both engines independently fell back to Trinity Sunday's own citation and silently agreed on the wrong answer -- the "Holy Thursday violet in both" shape CLAUDE.md names for exactly this reason. Because lectionary.sexp is shared with layer 3 (the lectio differential, 2005-2050), these fixes changed colitur's output for the whole domain, not only 2026-2027. data/ef/expected-divergences.sexp and test_differential.ml needed matching updates: C1 narrowed 361->173 and C25 narrowed 57->13 (rows that now resolve correctly moved to new entries), C16's note corrected (count unchanged), and six new entries added (C29-C34, 397 rows total, all verdict colitur). test_lectionary.ml and test_lectionary_ef.ml's own pins were updated to match (entry count 131->148; one step-3 regression test re-pointed to a date that still genuinely exercises that step). One entry, M26 (30 rows, verdict open), is a genuine unfixed gap: colitur's step-3 "resume the preceding Sunday" fallback is its only ferial-Mass mechanism, and missalemeum's own selection is more granular in three confirmed ways (a rotating votive Mass of the BVM, a named weekly formula for at least one week, and later Time-after-Pentecost weeks this task's own investigation did not narrow to a single rule) -- the same "needs a season-keyed selection mechanism, new behaviour not new data" shape data/ef/expected-divergences.sexp's own C6/C25 and Task 6's own residual concern already name, out of this task's own scope to build. dune test: 358 tests green. COLITUR_EXHAUSTIVE_SWEEP=1 dune test --force: 359 tests green, 89.5s. --- test/test_lectionary_ef.ml | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'test/test_lectionary_ef.ml') diff --git a/test/test_lectionary_ef.ml b/test/test_lectionary_ef.ml index 51c3233..39e3cb8 100644 --- a/test/test_lectionary_ef.ml +++ b/test/test_lectionary_ef.ml @@ -157,19 +157,30 @@ let test_step3_advent_feria_resumes_sunday () = December now resolves the same way -- there is no date left in that specific window this test could use to exercise step 3. - Replaced with 2028-01-05 (a Wednesday in Holy Name week, "ef-christmas- - 1-wednesday"), which still has no citation of its own and genuinely - resumes ITS preceding Sunday, 2028-01-02 -- confirmed a real Sunday - that year, and confirmed to be Holy Name Sunday specifically (its own - [ef-holy-name-sunday] slug, RG 17(a)), not a coincidence: the whole - POINT of this test is a Christmas-season feria genuinely falling - through to step 3, and this is the closest remaining civil-calendar - case to the original 29-31 December window that still does. *) + REPLACED AGAIN, Task 9 (branch ef-lectionary, layer-4 oracle): 2028-01-05 + ("ef-christmas-1-wednesday") stopped exercising step 3 too, the SAME + fate as the 2025-12-29 case this comment already documents -- RG 17(a)'s + own "diebus ferialibus a 2 ad 5 ianuarii" rubric now gives it a direct + entry (tools/bootstrap_lectionary.ml's own + [epiphanytide_opening_entries]), so it resolves at step 2. The three + families this task's own fix closed (2-5 January, 7-12 January, Holy + Family's own week) cover every NON-SATURDAY Christmastide feria in + January now; the SATURDAYS of those same three families are + DELIBERATELY left without a direct entry (RG 78's BVM Saturday Office + wins there instead, {!Rite_ef.Temporal_ef.bvm_saturday_names} -- which + itself carries no citations of its own, see task-6-report.md's own + residual concern 4), so they are the closest remaining case: 2026-01-03 + ("ef-christmas-1-saturday") still has no citation of its own and + genuinely resumes ITS preceding Sunday, 2025-12-28 -- confirmed a real + Sunday that year, unaffected by any of this task's own fixes (still the + historical "Sunday within the Octave of the Nativity", RG 69, + unchanged by this task, see [colitur_keys]'s own CORRECTED note for why + only the Holy-Name-Sunday alias was wrong, not this citation itself). *) let test_step3_christmas_feria_resumes_sunday () = Alcotest.(check (list string)) - "Wednesday of Holy Name week resumes Holy Name Sunday's Mass" + "Saturday of Holy Name week resumes the Nativity-Octave Sunday's Mass" [ "Gal 4:1-7"; "Luke 2:33-40" ] - (refs (day 2028 1 5)) + (refs (day 2026 1 3)) (* Fix round 1 (coordinator review, Important finding 1): the original test here (2028-12-26) did not exercise step 3 at all -- 26 December is always -- cgit v1.3