From e6cb5937be7f009eab11f3cf85205d1fde25eb48 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Wed, 26 Aug 2026 12:29:17 +0200 Subject: test(of): validation layers -- Layer 2 properties, litcal grade/identity, golden pins Task 6 (2026-08-25-colitur-of-phases-3-5), the final task of OF Phases 3-5. Layer 2 (test/test_validate_of.ml, new): Colitur_kernel.Validate.run against the real, assembled Rite_of.context -- landmark years, the 9999 domain edge, a 200-year QCheck sample, and the full 8417-year exhaustive sweep under COLITUR_EXHAUSTIVE_SWEEP=1, all filtered through the same three pinned-not-fixed gaps test_rite_of.ml already names (Normae n.35(a) Holy Family fallback, the 25-December lectionary gap, St Joseph/Palm Sunday), duplicated verbatim rather than shared so this file's own filtering cannot drift from Task 5's silently. Two dedicated 200-sample properties confirm Ordinary Time weeks are 1..34 with the final week always 34, and Calendar.year covers its own liturgical year exactly once with no gaps, both through the resolved pipeline (a genuinely different code path from Phase 1's own already-exhaustive Temporal_of-level property). An early version folded a second Calendar.year pass into the exhaustive loop for these two properties too and measured ~365s for that alone (a scratch timing harness, not committed); dropped in favour of one Val.run-only exhaustive loop (~200s), matching the EF harness's shape (one property, one sweep) rather than tripling it. test/test_litcal_of.ml extended beyond season/week to GRADE (litcal's own grade_lcl bucketed against the real Tabula band Precedence_of.band assigns the day's observed office) and IDENTITY (observed slug against a hand-verified event_key -> slug table for the closed 46-entity FIXED/ NAMED set -- deliberately not the numbered Sunday/weekday series, a stated, counted scope limit). Both follow the counted-and-allow-listed discipline: 1800/4346 rows compared for grade (1763 match, 37 allow- listed across 5 new entries), 508/4346 for identity (505 match, 3 allow- listed across 3 new entries), zero unexplained either way. Real divergences found and adjudicated, not suppressed: litcal's own grade vocabulary conflates Tabula I.2/I.3 for Trinity/Corpus Christi (verdict colitur); litcal's Mary Magdalene data predates the 2016 CDW decree (verdict litcal); a genuine, unadjudicated Sacred-Heart/Nativity-of-John- the-Baptist tie-break at equal band, found live at the one Easter date in this fixture's window that creates it (verdict open, no citation found either way); a second instance of precedence_of.mli's own documented forward-only transfer_target limitation, on a date shape the mli's own worked example does not cover (verdict colitur, known limitation). test/test_golden_of.ml (new, 7 pins): a year Ordinary Time skips a week (2026) plus Mary Mother of the Church same date; Advent IV on Christmas Eve in two independent years (2028, 2034); the Annunciation transferred out of Holy Week to Easter+8 (2027, both ends of the transfer pinned); All Souls; the Sacred Heart; 17 December's date-keyed reading in two civil years/weekday-cycle letters. Every new layer mutation-proved: reverting the Advent-IV fix reddens two golden pins; corrupting Precedence_of.band's Tabula I.3 value reddens the litcal grade comparator across every Solemnity in the fixture; renaming one temporal slug reddens the litcal identity comparator; dropping Ordinary Time's second season_runs entry reddens both the landmark-years test and the sampled property. Each mutation applied to lib/rites/rite_of/, confirmed red, then reverted -- git diff --stat lib/ is empty. make check (COLITUR_EXHAUSTIVE_SWEEP=1 dune test --force): exit 0, 890 tests, 363.5s. EF byte-identity holds: git diff --stat v1.0.0..HEAD -- lib/rites/rite_ef/ lib/kernel/ data/ef/ is empty. --- data/of/expected-divergences-litcal.sexp | 118 +++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) (limited to 'data/of') diff --git a/data/of/expected-divergences-litcal.sexp b/data/of/expected-divergences-litcal.sexp index c75538a..f4de6f4 100644 --- a/data/of/expected-divergences-litcal.sexp +++ b/data/of/expected-divergences-litcal.sexp @@ -70,3 +70,121 @@ (verdict colitur) (note "Holy Thursday (evening Mass)/Good Friday/Holy Saturday: litcal tags EASTER_TRIDUUM, colitur has no Triduum season value and keeps the whole day Lent -- a cited design decision, not a defect.") (expected_rows 36)) + +; L2, L3 -- task 6 (2026-08-26): the litcal layer extended beyond season/week +; to GRADE and IDENTITY (test_litcal_of.ml's own header). Both fire on the +; SAME date, the SAME already-known, already-PINNED-NOT-FIXED gap +; test_rite_of.ml's own [test_holy_family_fallback_1583_known_wrong_ferial]/ +; [is_known_holy_family_fallback_gap] record: Normae n. 35(a)'s "Dominica +; infra octavam Nativitatis, vel, ea deficiente, die 30 decembris" fallback +; is never reached by {!Rite_of.Temporal_of.temporal} in a year 25 December +; is itself a Sunday (its Holy-Family test lives inside the Sunday-only +; dispatch arm of [sunday_slug], so the 30-December fallback [holy_family] +; itself computes correctly is never actually consulted there). 2033 is this +; fixture's own live witness -- 1583 (test_rite_of.ml's own pin) is outside +; the fixture's 2023-2035 window, 2033 is the only affected year inside it +; (2005, 2011, 2016, 2022, 2039, 2044, 2050 are the gap's other known +; occurrences, all likewise outside this window). VERDICT "colitur": this is +; colitur's own known defect, not litcal's -- litcal correctly names +; "HolyFamily" on 30 December 2033; colitur observes an ordinary +; Nativity-octave feria instead. NOT fixed here, per this task's own brief +; ("do not fix any of them here. Keep them pinned"). +((id L2) + (citation "Normae n. 35(a); test_rite_of.ml's own test_holy_family_fallback_1583_known_wrong_ferial") + (verdict colitur) + (note "30 December 2033 (25 December 2033 is a Sunday, so the 26-31 December window has no Sunday of its own): litcal correctly names HolyFamily (band 50/60 expected); colitur's known Normae n.35(a) fallback gap leaves it an ordinary Nativity-octave feria (band 90) -- the GRADE half of the divergence.") + (expected_rows 1)) +((id L3) + (citation "Normae n. 35(a); test_rite_of.ml's own test_holy_family_fallback_1583_known_wrong_ferial") + (verdict colitur) + (note "30 December 2033: the IDENTITY half of the same divergence L2 records for grade -- colitur's observed slug is an ordinary ferial slug, not of-holy-family.") + (expected_rows 1)) + +; L4 -- litcal's own [grade_lcl] text "celebration with precedence over +; solemnities" (this fixture's own display word for Tabula I.1/I.2) is ALSO +; used for Trinity Sunday and Corpus Christi, every one of the fixture's 12 +; years (24 rows). precedence_of.ml's own Tabula I.2 transcription -- +; "Nativitas Domini, Epiphania, Ascensio et Pentecostes; dominicae Adventus, +; Quadragesimae et Paschae; feria IV Cinerum; hebdomada sancta a feria II ad +; V" -- names neither: both are "Sollemnitates Domini", Tabula I.3 (band +; 30), the SAME entry {!Rite_of.Precedence_of.band} gives ChristKing, a +; structurally identical "Solemnity of the Lord anchored to a Sunday within +; Ordinary Time" -- and litcal ITSELF labels ChristKing "SOLEMNITY", not +; this text, offered as corroborating (not conclusive -- this task did not +; inspect litcal's own source) evidence that litcal's own grade vocabulary +; is coarser/inconsistent here, not a considered different Tabula reading. +((id L4) + (citation "Normae/Tabula I.2's own enumeration (precedence_of.ml); litcal's own inconsistent treatment of ChristKing vs Trinity/CorpusChristi") + (verdict colitur) + (note "Trinity Sunday and Corpus Christi, all 12 fixture years: litcal's grade text implies Tabula I.1/I.2 (band 10/20); colitur (Tabula I.3, band 30) matches the primary text's own I.2 enumeration, which names neither.") + (expected_rows 24)) + +; L5 -- litcal's own data is STALE. St Mary Magdalene (22 July) reads grade +; "Memorial" on every one of the 10 years this fixture witnesses her (2 of +; the 12 years: an ordinary per-annum Sunday there instead, on both sides, +; not a witness). The Congregation for Divine Worship's decree "Sanctae +; Mariae Magdalenae" (3 June 2016, Prot. n. 708/2015, AAS 108 (2016) +; 798-799) raised her to FEAST -- colitur's data/of/amendments/ +; 005-mary-magdalene-rank.sexp applies it (band 70); litcal's grade text +; shows no sign of having done so. +((id L5) + (citation "CDW decree \"Sanctae Mariae Magdalenae\", 3 June 2016, Prot. n. 708/2015, AAS 108 (2016) 798-799; data/of/amendments/005-mary-magdalene-rank.sexp") + (verdict litcal) + (note "St Mary Magdalene, 22 July, 10 witnessed years: litcal's grade text (\"Memorial\") does not reflect the 2016 CDW decree raising her to Feast; colitur's shipped amendment does.") + (expected_rows 10)) + +; L6, L7 -- a genuine, UNADJUDICATED tie-break, found live, not anticipated. +; Easter 2033 is 17 April, putting the movable Solemnity of the Sacred +; Heart (Easter+68) on 24 June, the SAME fixed date as the Nativity of St +; John the Baptist -- an exact Tabula I.3/band-30 tie. +; Colitur_kernel.Precedence.resolve's own tie-break (precedence.ml's +; [compare_by], Slug.compare when bands are equal) hands the day to +; "birth-of-saint-john-the-baptist" alphabetically, and +; Rite_of.Precedence_of.disposition Transfers the loser (Sacred Heart) to +; 25 June. litcal's own answer is the OPPOSITE: Sacred Heart keeps 24 June, +; and John the Baptist is shown a day EARLY, on 23 June. NEITHER answer is +; dictated by any citation this task found -- the Tabula ranks both +; candidates at the identical entry, and nothing in the Normae or IGMR +; extracts a Lord-outranks-Saint rule WITHIN one Tabula entry the way, e.g., +; RG 112(a) does on the EF side for a narrower case. NOT fixed here (a +; kernel-level tie-break policy is out of this task's own scope regardless +; of verdict). +((id L6) + (citation "precedence.ml's compare_by (Slug.compare tie-break); no Tabula/Normae text found ranking Sacred Heart above/below the Nativity of John the Baptist at equal band") + (verdict open) + (note "2033-06-23 (NativityJohnBaptist, grade) and 2033-06-25 (ImmaculateHeart, grade, downstream of the same collision): the Sacred-Heart/John-Baptist tie on 24 June 2033, GRADE axis. See L7 for the identity axis.") + (expected_rows 2)) +((id L7) + (citation "precedence.ml's compare_by (Slug.compare tie-break); no Tabula/Normae text found ranking Sacred Heart above/below the Nativity of John the Baptist at equal band") + (verdict open) + (note "2033-06-23 (NativityJohnBaptist) and 2033-06-24 (SacredHeart): the same tie L6 records for grade, IDENTITY axis.") + (expected_rows 2)) + +; L8, L9 -- a SECOND, newly-found instance of precedence_of.mli's own +; documented "KNOWN UNIMPLEMENTED FOURTH RULE" (Normae n. 60's own "ad +; proximiorem diem" -- the nearest day, not necessarily the nearest +; FOLLOWING one -- constrained to forward-only search by +; Colitur_kernel.Rite.t.transfer_target's own strictly-later contract). +; That section's own worked example is St Joseph falling exactly ON Palm +; Sunday (Normae n. 56(f), anticipated to 18 March); this is a DIFFERENT +; date shape reaching the SAME underlying limitation. Easter 2035 is 25 +; March, putting St Joseph's fixed 19 March on the MONDAY of Holy Week +; (Easter-6, a privileged Tabula I.2 feria, not a Sunday) -- Normae n. 5's +; own "following Monday" rule (keyed to a privileged SUNDAY) does not apply +; here at all, so this falls to n. 60's general rule 3, forward-only on +; colitur's side, landing Joseph on 3 April (Easter+9). litcal's own answer +; anticipates BACKWARD instead, to 17 March -- the Saturday immediately +; before Palm Sunday, a generalisation of n. 56(f)'s own underlying +; principle this task found no primary-source text for -- offered as +; informative evidence of what a fix would need to produce, not as a +; citation substituting for one. NOT fixed here, per this task's own brief. +((id L8) + (citation "precedence_of.mli's own \"KNOWN UNIMPLEMENTED FOURTH RULE\" (Normae n. 60, n. 56(f)); Colitur_kernel.Rite.t.transfer_target's strictly-later contract") + (verdict colitur) + (note "2035-03-17 (StJoseph, grade): a second instance of the documented forward-only transfer_target limitation -- St Joseph impeded by Holy Monday (not Palm Sunday itself) is sent forward to Easter+9 instead of anticipated backward. See L9 for the identity axis.") + (expected_rows 1)) +((id L9) + (citation "precedence_of.mli's own \"KNOWN UNIMPLEMENTED FOURTH RULE\" (Normae n. 60, n. 56(f)); Colitur_kernel.Rite.t.transfer_target's strictly-later contract") + (verdict colitur) + (note "2035-03-17 (StJoseph): the same known limitation L8 records for grade, IDENTITY axis.") + (expected_rows 1)) -- cgit v1.3