From 459d2c74711e6a152fb338f88d2327f12180b61f Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Sat, 15 Aug 2026 02:58:00 +0200 Subject: test(differential): compare reading citations, 16 801 days Layer 3 is NOT blind to the ferial resumption rule, unusually for this project: lectio implements the same rubric independently, so the differential checks colitur's rule against a second implementation rather than against silence. It IS blind to the Commons -- lectio has no such concept -- so chain step 4 rests on layer 4 alone. Divergence triage, 1 532 of 16 801 days differ (15 269 match exactly), 0 unexplained: - A genuine colitur bug found and fixed: data/ef/lectionary.sexp carried lectio's own ini section names verbatim, never translated into the slugs Temporal_ef actually computes for the identical office. Data the bootstrap already held (Passiontide both weeks, the Pentecost Ember days, Holy Name Sunday) was unreachable by chain step 2, silently falling through to a wrong step-3 answer -- invisible until citation content became comparable. tools/bootstrap_lectionary.ml gained colitur_keys (rename/widen), a hand-authored ef-nativity-vigil entry cross-sourced from lectio's own sanctoral calendar and corroborated by colitur's own (overlay-suppressed) sanctoral bootstrap of the same source, and a derived ef-holy-name entry (RG 17(a)'s single Mass heading covers both the Sunday and 2-January shapes). One guess (giving the fixed Nativity-Octave days Holy Name Sunday's own citation uniformly) was tried and reverted once measured against the fixture -- Missal-verified to be right only for the genuine "Sunday within the Octave" case, wrong whenever the true preceding Sunday is Christmas Day or Advent IV instead. - 10 existing/widened Layer C entries (C1/C6/C8/C14/C15/C16/C17/C18 -- C6 and C17 narrowed with the removed population accounted for, not silently re-absorbed) plus two new ones: C19 (the already-adjudicated Time-after-Epiphany week-numbering offset, now visible in citation content), C20 (lectio computes no reading at all for the seven readingless saints Task 6 gave a Common or proper -- colitur is more complete, not wrong). - One entry, C21, is a genuine colitur LOGIC limitation found but not fixed: Lectionary_ef.readings' step 3 is a single hop to the preceding Sunday, insufficient for a run of colitur-only fixed Christmastide slugs whose own preceding Sunday is itself another entry-less fixed slug. Recorded verdict open (data/ef/expected-divergences-missalemeum.sexp's own established precedent for this shape), not left silently failing -- fully diagnosed in task-8-report.md, recommended as a dedicated follow-up task rather than a hasty fix to a shared, multi-round-reviewed kernel-adjacent function. --- test/test_lectionary.ml | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) (limited to 'test/test_lectionary.ml') diff --git a/test/test_lectionary.ml b/test/test_lectionary.ml index c6a1cac..a95c98c 100644 --- a/test/test_lectionary.ml +++ b/test/test_lectionary.ml @@ -81,14 +81,55 @@ let test_ef_data_file_loads () = match Lectionary.load "../data/ef/lectionary.sexp" with | Error e -> Alcotest.fail e | Ok l -> - Alcotest.(check int) "entry count" 119 + (* 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 + already-translated one rather than re-typed ([ef-holy-name], +1). + 119 + 6 + 1 + 1 + 1 = 128. *) + Alcotest.(check int) "entry count" 128 (List.length (Lectionary.entries l)); (match Lectionary.find l (slug "ef-lent-1-monday") with | Some [ a; b ] -> Alcotest.(check string) "epistle" "Ezech 34:11-16" a.Citation.reference; 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") + | 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. *) + let check_entry name first gospel = + match Lectionary.find l (slug name) with + | Some [ a; b ] -> + Alcotest.(check string) (name ^ ": epistle") first a.Citation.reference; + Alcotest.(check string) (name ^ ": gospel") gospel b.Citation.reference + | Some _ -> Alcotest.fail (name ^ ": expected exactly two citations") + | None -> Alcotest.fail (name ^ ": missing") + in + check_entry "ef-holy-name-sunday" "Gal 4:1-7" "Luke 2:33-40"; + check_entry "ef-christmas-sunday-0" "Gal 4:1-7" "Luke 2:33-40"; + check_entry "ef-holy-name" "Gal 4:1-7" "Luke 2:33-40"; + check_entry "ef-nativity-vigil" "Rom 1:1-6" "Matt 1:18-21"; + 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."; + 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") let suite = [ ("find present", `Quick, test_find_present); -- cgit v1.3