summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-26 13:02:00 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-26 13:02:00 +0200
commit37a3d4ee06717c24ad07db2bc365cad587ad6d5f (patch)
tree346e7294ff3149e0a0c34ccff192d04f68f624aa /test
parente0b99c1672c2663476dc72f6a95ad00bc1a071b8 (diff)
downloadcolitur-37a3d4ee06717c24ad07db2bc365cad587ad6d5f.tar.gz
colitur-37a3d4ee06717c24ad07db2bc365cad587ad6d5f.zip
test(of): pin the Mary Mother of the Church / Anthony of Padua tie
data/of/amendments/006-mary-mother-of-the-church.sexp's own header documented, at length, that Easter+50 can land on 13 June and tie with Anthony of Padua at Tabula III.10 (both universal Memoria_obligatoria) -- the ledger's remedy (F-MEMORIAL-TIE) asked to document the lacuna AND pin the current behaviour so it cannot drift silently. Only the documentation half was done. Add test_mater_ecclesiae_anthony_tie_2011_known_arbitrary, in the same style as the Joseph/Palm Sunday and Holy Family fallback pins already in this file, but labelled KNOWN ARBITRARY rather than KNOWN WRONG: no rubric decides this collision (the 2018 decree is silent on it, and Normae n. 14's third clause resolves only the ad-libitum/ad-libitum case), so colitur's Slug.compare tie-break is a generic kernel fallback, not a colitur-invented rule. Asserts the 2011 Easter/offset arithmetic by hand, the current observed slug, and that the loser is recorded in `omitted` rather than silently dropped.
Diffstat (limited to 'test')
-rw-r--r--test/test_rite_of.ml60
1 files changed, 59 insertions, 1 deletions
diff --git a/test/test_rite_of.ml b/test/test_rite_of.ml
index d16bcf3..a1892ae 100644
--- a/test/test_rite_of.ml
+++ b/test/test_rite_of.ml
@@ -334,6 +334,60 @@ let test_holy_family_fallback_1583_known_wrong_ferial () =
Alcotest.(check bool) "and that really is NOT the Holy Family (confirming this really is the defect)" false
(slug_of dec30.LD.observed = "of-holy-family")
+(* Fix wave I6 (final-review.md, 2026-08-25-colitur-of-phases-3-5): the
+ obligatory-memorial tie data/of/amendments/006-mary-mother-of-the-church
+ .sexp's own header documents at length (its "*** FINDING ***" comment)
+ was documented but never PINNED -- the ledger's own remedy (F-MEMORIAL-TIE)
+ asked for both halves. Mary, Mother of the Church (Easter+50) and Anthony
+ of Padua (13 June, fixed) both band at Tabula III.10 (100, both universal
+ Memoria_obligatoria) in any year Easter+50 lands on 13 June; 2011 is the
+ worked example that amendment header itself names (Easter 24 April 2011,
+ so Easter+50 = 13 June -- re-derived here, not trusted from the comment).
+
+ KNOWN ARBITRARY, not KNOWN WRONG: unlike the two tests above, there is no
+ rubric this contradicts. The 2018 decree (AAS 110, 437-438) is silent on
+ a universal-calendar coincidence with an existing obligatory memorial, and
+ Normae n. 14's own third clause resolves only the AD-LIBITUM/AD-LIBITUM
+ case ("Si eodem die plures inscribuntur in calendario memoriae ad
+ libitum") -- it does not reach two OBLIGATORY memorials. So colitur's
+ Slug.compare tie-break ("anthony-of-padua-priest-and-doctor" sorts before
+ "mary-mother-of-the-church") is not this project inventing a rule; it is
+ the kernel's own generic, rite-agnostic fallback, applied here for lack of
+ a rite-specific one. This test pins that CURRENT behaviour so a future
+ Calendar/kernel change, a slug rename, or a future overlay cannot flip
+ which of the two is observed with no test going red -- the same shape of
+ invisible-drift risk the EF side's RG 113/[band] fidelity work (`ef-rg16a`,
+ register ยง6.1) eliminated on that side. *)
+let test_mater_ecclesiae_anthony_tie_2011_known_arbitrary () =
+ let easter_2011 = Computus.gregorian_easter 2011 in
+ Alcotest.(check string) "2011 Easter is really 24 April (the Easter+50 trigger)" "2011-04-24"
+ (Date.to_iso8601 easter_2011);
+ let tie_date = Date.add_days easter_2011 50 in
+ Alcotest.(check string) "Easter+50 2011 is really 13 June, coinciding with Anthony of Padua's fixed date"
+ "2011-06-13" (Date.to_iso8601 tie_date);
+ (* [Cal.year]'s own [y] labels an Advent-to-Advent LITURGICAL year, not a
+ civil one (year_bounds = [year_start y, year_start (y+1) - 1], and
+ [year_start] is Advent Sunday WITHIN civil year y) -- so 13 June 2011
+ falls inside liturgical year 2010 (Advent 2010 .. the eve of Advent
+ 2011), the same off-by-one every other test in this file that reaches
+ for a spring date already accounts for (the Joseph test above uses
+ 2061 to reach March 2062). *)
+ let days = Cal.year real_of_rite real_of_layer 2010 in
+ let june13 = Array.to_list days |> List.find (fun d -> Date.compare d.LD.date tie_date = 0) in
+ Alcotest.(check string)
+ "KNOWN ARBITRARY (no rubric decides this; see this test's own header): the kernel's generic \
+ alphabetical tie-break observes Anthony of Padua, not Mary Mother of the Church"
+ "anthony-of-padua-priest-and-doctor" (slug_of june13.LD.observed);
+ let mater_ecclesiae_omitted =
+ List.exists (fun (c, _) -> slug_of c = "mary-mother-of-the-church") june13.LD.omitted
+ in
+ Alcotest.(check bool)
+ "and Mary, Mother of the Church is recorded in `omitted`, not silently dropped -- {!Colitur_kernel \
+ .Liturgical_day.t.omitted}'s own contract"
+ true mater_ecclesiae_omitted;
+ Alcotest.(check bool) "she carries no commemoration either (OF's own admit always returns [])" false
+ (List.exists (fun (c, _) -> slug_of c = "mary-mother-of-the-church") june13.LD.commemorations)
+
let suite =
( "Rite_of (real data: assembled Rite.t end-to-end via Calendar/Validate)",
[ Alcotest.test_case "landmark years validate cleanly (modulo two documented gaps)" `Quick
@@ -349,4 +403,8 @@ let suite =
Alcotest.test_case
"NEWLY-FOUND DEFECT pinned, not fixed: Holy Family's Normae n.35(a) 30-December fallback is \
unreached when Christmas Day is a Sunday (1583)" `Quick
- test_holy_family_fallback_1583_known_wrong_ferial ] )
+ test_holy_family_fallback_1583_known_wrong_ferial;
+ Alcotest.test_case
+ "KNOWN ARBITRARY pinned: Mary Mother of the Church vs Anthony of Padua tie, 2011-06-13 \
+ (Easter+50)" `Quick
+ test_mater_ecclesiae_anthony_tie_2011_known_arbitrary ] )