From b0ff86ae552b90613be21c52433f4180deba7758 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Sat, 15 Aug 2026 03:40:19 +0200 Subject: test(differential): fix round 1 -- Holy Week, Lent Ember, RG 69 Two Critical findings, both real: Holy Week (including the entire Sacred Triduum) was reading Passion Week's Masses -- the original colitur_keys widened lectio's single, conflated ini section into both weeks instead of Passion week alone. Narrowed to Passion week only; Holy Week's own four cleanest days (Monday, Tuesday, Thursday, Saturday) are hand-authored directly from the Missal, verified twice against both scans (C23); Holy Wednesday and Good Friday are genuinely multi-lesson liturgies with no single Epistle slot and are deliberately left unanswered, not guessed (C24). The Lenten Ember days were still dead keys: Temporal_ef computes ef-lent-ember-{wed,fri,sat}, lectio's ini names the same data ef-lent-1-{wednesday,friday,saturday}, and colitur_keys never translated it -- both engines independently fell through to the same wrong ferial answer, so even the differential stayed green (C22, a genuine lectio bug recorded for upstream). Fixed the instance and the class: colitur_keys gained the rename, and tools/bootstrap_lectionary.ml gained assert_reachable, sweeping Rite_ef.Temporal_ef.temporal at generation time so a translation table entry naming a slug colitur never computes dies loudly instead of shipping silently, plus an informational log of every real slug with no entry at all. C21 ("colitur's step 3 cannot reach a correct answer for the fixed Christmastide slugs") is retired, superseded rather than merely patched: the Nativity-Octave days now have their own direct Missal formulary (Tit. 3,4-7/Luc. 2,15-20, "Diebus infra octavam Nativitatis Domini"), resolved at step 2, not step 3 at all. That surfaced a real RG 69 gap underneath it: a Sunday landing 26-31 December should keep its own Office, not the fixed weekday placeholder, which Temporal_ef does not currently distinguish. C6's verdict is re-opened (open, not colitur) for the 19 of its 138 rows where this applies directly, and a new entry C25 (57 rows) records the same gap propagating one hop further through step 3 into Holy Name week. Both are out of this task's own scope -- a behaviour change to a shared, multi-round-reviewed kernel-adjacent function -- and recorded, not fixed, per the coordinator's own instruction. C6's own note is rewritten in full rather than layered with another correction; C18's stale trailing count is fixed to match its own pin; the Vigil-misapplication risk flagged as a Minor closed itself once the Nativity-Octave fix landed, confirmed by inspection rather than assumed. dune test: 358/358. COLITUR_EXHAUSTIVE_SWEEP=1 dune test --force: 359/359. --- test/test_lectionary.ml | 81 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 56 insertions(+), 25 deletions(-) (limited to 'test/test_lectionary.ml') diff --git a/test/test_lectionary.ml b/test/test_lectionary.ml index a95c98c..8fcf8e9 100644 --- a/test/test_lectionary.ml +++ b/test/test_lectionary.ml @@ -81,19 +81,24 @@ let test_ef_data_file_loads () = match Lectionary.load "../data/ef/lectionary.sexp" with | Error e -> Alcotest.fail e | Ok l -> - (* 119 lectio ini sections, translated/widened into colitur's own - Temporal_ef vocabulary (tools/bootstrap_lectionary.ml's own - [colitur_keys]/[vigil_entries]/[derived_entries] comments have the - full account, task 8, branch ef-lectionary): Passiontide's 6 - shared sections each widen into 2 colitur keys (+6); "ef-christmas- - sunday-0" widens into itself PLUS "ef-holy-name-sunday" (+1, a fix - round after the first version replaced rather than widened it and - broke a pre-existing test); one hand-authored entry sourced from - lectio's SANCTORAL calendar, not this lectionary ini - ([ef-nativity-vigil], +1); one entry derived from an + (* 119 lectio ini sections, translated/widened/renamed into colitur's + own Temporal_ef vocabulary, PLUS hand-authored/derived entries + (tools/bootstrap_lectionary.ml's own [colitur_keys]/ + [vigil_entries]/[holy_week_entries]/[nativity_octave_entries]/ + [derived_entries] comments have the full account, task 8, branch + ef-lectionary, fix round 1): "ef-christmas-sunday-0" widens into + itself PLUS "ef-holy-name-sunday" (+1); the six Passiontide/Lent- + Ember sections translate/rename 1:1 (no count change: Passiontide + no longer widens into two colitur keys since fix round 1's + Critical 1 correction, and the three Lent Ember sections rename + rather than widen); one hand-authored entry sourced from lectio's + SANCTORAL calendar, not this lectionary ini ([ef-nativity-vigil], + +1); four hand-authored directly from the Missal, Holy Week + (+4); three hand-authored directly from the Missal, the fixed + Nativity-Octave days (+3); one entry derived from an already-translated one rather than re-typed ([ef-holy-name], +1). - 119 + 6 + 1 + 1 + 1 = 128. *) - Alcotest.(check int) "entry count" 128 + 119 + 1 + 1 + 4 + 3 + 1 = 129. *) + Alcotest.(check int) "entry count" 129 (List.length (Lectionary.entries l)); (match Lectionary.find l (slug "ef-lent-1-monday") with | Some [ a; b ] -> @@ -101,9 +106,10 @@ let test_ef_data_file_loads () = Alcotest.(check string) "gospel" "Matt 25:31-46" b.Citation.reference | Some _ -> Alcotest.fail "expected exactly two citations" | None -> Alcotest.fail "ef-lent-1-monday missing"); - (* Task 8's own renamed/derived keys, spot-checked here so a future - regeneration that silently drops one of them fails loudly and - locally, not only via the much bigger differential suite. *) + (* Task 8's own renamed/derived/hand-authored keys, spot-checked here + so a future regeneration that silently drops one of them fails + loudly and locally, not only via the much bigger differential + suite. *) let check_entry name first gospel = match Lectionary.find l (slug name) with | Some [ a; b ] -> @@ -119,17 +125,42 @@ let test_ef_data_file_loads () = check_entry "ef-pentecost-ember-wed" "Acts 5:12-16" "John 6:44-52."; check_entry "ef-pentecost-ember-fri" "Joel 2:23-24; 26-27" "Luke 5:17-26"; check_entry "ef-pentecost-ember-sat" "Rom 5:1-5." "Luke 4:38-44."; + (* Critical 2 fix (coordinator review round 1): the Lenten Ember days, + previously dead keys under lectio's own "ef-lent-1-" + naming -- now reachable under colitur's own slugs. *) + check_entry "ef-lent-ember-wed" "3 Kgs. 19:3-8" "Matt 12:38-50"; + (* Passiontide widens into Passion week ONLY now (Critical 1 fix) -- + "ef-passiontide-1-monday" keeps lectio's own citation; + "ef-passiontide-2-monday" (Holy Monday) is Missal-sourced, + DIFFERENT text, hand-authored in [holy_week_entries]. *) check_entry "ef-passiontide-1-monday" "Jonas 3:1-10" "John 7:32-39"; - check_entry "ef-passiontide-2-monday" "Jonas 3:1-10" "John 7:32-39"; - (* This one MUST be absent: rejected and reverted in the generator's - own [derived_entries] comment -- a regression-net for that - decision, not merely documentation of it. *) - (match Lectionary.find l (slug "ef-nativity-octave-day-6") with - | None -> () - | Some _ -> - Alcotest.fail - "ef-nativity-octave-day-6: must stay absent -- see bootstrap_lectionary.ml's own \ - derived_entries comment for why a direct entry here was tried and reverted") + check_entry "ef-passiontide-2-monday" "Isai. 50, 5-10" "Io. 12, 1-9"; + check_entry "ef-passiontide-2-tuesday" "Ier. 11, 18-20" "Mark 14, 32-72; 15, 1-46"; + check_entry "ef-passiontide-2-thursday" "1 Cor. 11, 20-32" "Io. 13, 1-15"; + check_entry "ef-passiontide-2-saturday" "Col. 3, 1-4" "Matt. 28, 1-7"; + (* Important 3(a) fix (coordinator review round 1): the fixed + Nativity-Octave days now carry their own direct Missal formulary + ("Diebus infra octavam Nativitatis Domini"), not Holy Name + Sunday's (a first guess, measured wrong, reverted -- see + [nativity_octave_entries]'s own comment). *) + check_entry "ef-nativity-octave-day-5" "Tit. 3, 4-7" "Luc. 2, 15-20"; + check_entry "ef-nativity-octave-day-6" "Tit. 3, 4-7" "Luc. 2, 15-20"; + check_entry "ef-nativity-octave-day-7" "Tit. 3, 4-7" "Luc. 2, 15-20"; + (* These three MUST stay absent -- Holy Wednesday and Good Friday are + deliberately not hand-authored (multi-lesson liturgies, no single + Epistle slot; see [holy_week_entries]'s own comment for why), and + Lent's OWN "ef-lent-1-wednesday/friday/saturday" keys must not + reappear once renamed away (colitur never computes them as its + own slug at all). A regression net for those decisions, not + merely documentation of them. *) + let check_absent name = + match Lectionary.find l (slug name) with + | None -> () + | Some _ -> Alcotest.fail (name ^ ": must stay absent -- see bootstrap_lectionary.ml") + in + check_absent "ef-passiontide-2-wednesday"; + check_absent "ef-passiontide-2-friday"; + check_absent "ef-lent-1-wednesday" let suite = [ ("find present", `Quick, test_find_present); -- cgit v1.3