summaryrefslogtreecommitdiff
path: root/test/test_precedence_ef.ml
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-13 19:23:19 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-13 19:23:19 +0200
commita3afb19dc6390c9e33ed5fa0ecbd6e5895e60e8d (patch)
tree9e6108a58da67fcd94ce057a196f70c47ec49677 /test/test_precedence_ef.ml
parent36eba4eff58162cbe4c7b4ff1b9d049432fc1acc (diff)
parentc63e37b8cbef1480b6f5677420425d22fe7061d9 (diff)
downloadcolitur-a3afb19dc6390c9e33ed5fa0ecbd6e5895e60e8d.tar.gz
colitur-a3afb19dc6390c9e33ed5fa0ecbd6e5895e60e8d.zip
Merge branch 'ef-bvm-saturday': the Office of Our Lady on Saturday
Builds RG 91 entry 27 under RG 78 -- 'In sabbatis, in quibus occurrit Officium de feria IV classis, fit de sancta Maria in sabbato' -- a rank test, not a season list. band had been assigning entry 27 312966 times across the domain while the office was never constructed, so an otherwise-unoccupied Saturday got a bare ferial slug and its season's colour. 75863 days change, in two shapes: colour (green or violet to white) on 74642, and colour plus a dropped commemoration on 1221. The 312966 reconciles to the day across four buckets, 210808 of them impeded by a sanctoral winner. The first version introduced a live RG 112(d) violation on every Saturday falling on 16 July: the Office of Our Lady observed, commemorating Our Lady. Both photographic scans print a rubric at that Mass for exactly this collision -- 'Missa dici potest aut de sancta Maria in sabbato, aut propria' -- absent from the electronic transcription, and cited nowhere. It was missed because the check was a grep for subject = Bvm, and Mt Carmel is tagged Saint: the rubric's criterion is whose intercession the oration implores, not colitur's own tag. The I-V Mass numbering is a propers rotation and stays unbuilt; citations remain empty on all 3073916 days. Recorded rather than glossed: the new rule has no comparison-layer witness at all, and lectio's fixture prints a Mt Carmel commemoration on 8 in-window dates where colitur now prints none -- a real divergence that falls through a gap in what the comparators examine. Time after Epiphany's 5015 office days have zero oracle witnesses and rest on the scan alone.
Diffstat (limited to 'test/test_precedence_ef.ml')
-rw-r--r--test/test_precedence_ef.ml178
1 files changed, 174 insertions, 4 deletions
diff --git a/test/test_precedence_ef.ml b/test/test_precedence_ef.ml
index ed9a933..6f8b5b5 100644
--- a/test/test_precedence_ef.ml
+++ b/test/test_precedence_ef.ml
@@ -291,10 +291,21 @@ let cases =
cand ~origin:P.Sanctoral ~rank:V.Class3 ~layer:PE.universal_layer "vigil-of-st-lawrence",
260 );
(* Entry 27 -- RG 91 entry 27 (§4): an otherwise-unoccupied IV-class
- Saturday. *)
- ( "27 Office of the BVM on Saturday", off 62,
- cand ~rank:V.Class4 "ef-time-after-pentecost-1-sat",
- 270 );
+ Saturday. ef-bvm-saturday task: sourced from [Temporal_ef.temporal]'s
+ own real output (see [of_temporal], the same review-finding-3
+ discipline entry 18's/21's own rows above use), not a hand-typed
+ slug/rank pair -- this row used to be the one place in this whole
+ suite where [band]'s entry-27 branch was exercised by a value nothing
+ in [Temporal_ef.temporal] could actually produce (the office itself
+ was unbuilt): [band] read [rank = Class4 && weekday = Sat]
+ correctly, but nothing proved [temporal] ever handed it a candidate
+ shaped that way for the RIGHT reason. Now it does: [of_temporal (off
+ 62)] is 6 June 2026, a real otherwise-contested Time-after-Pentecost
+ Saturday (Norbert, Class3, wins the DAY outright in the real
+ pipeline -- irrelevant here, since this row tests [band] on the
+ TEMPORAL CANDIDATE alone, which [Temporal_ef.temporal] builds as the
+ BVM Saturday office regardless of what wins). *)
+ ( "27 Office of the BVM on Saturday (from Temporal_ef.temporal)", off 62, of_temporal (off 62), 270 );
(* Entry 28 -- RG 91 entry 28 (§4): the unqualified IV-class catch-all. *)
("28 IV-class feria", off 65, cand ~rank:V.Class4 "ef-time-after-pentecost-1-tue", 280);
(* Not an RG 91 row at all: a I-class candidate marked as a vigil, which
@@ -794,6 +805,52 @@ let disposition_cases =
"conversion-of-st-paul",
cand ~origin:P.Sanctoral ~rank:V.Class2 ~subject:Sub.Lord ~layer:PE.universal_layer
"commemoration-of-the-baptism-of-the-lord",
+ "Commemorate(Ordinary)" );
+ (* RG112(d), fix round 1 (coordinator finding F1) -- PE.marian_slugs's
+ own citation has the full argument (both scans, including the 16
+ July "Missa dici potest aut ... aut ..." rubric). [of_temporal] on a
+ REAL 16-July-Saturday (2033) sources the winner from
+ Temporal_ef.temporal's own real output, the same review-finding-3
+ discipline this file's Ember/vigil rows already use -- not a
+ hand-typed slug/subject pair that could silently drift from what the
+ office actually builds. The loser is the real data/ef/sanctoral.sexp
+ entry, [Commemoration_only], the exact shape that made this branch
+ need to be checked BEFORE the Commemoration_only catch-all. *)
+ ( "RG112(d): the BVM Saturday Office excludes a commemoration invoking \
+ the SAME BVM's intercession -- Omit, not Commemorate (Mt Carmel, \
+ 16 July 2033, a real otherwise-unoccupied Saturday)",
+ of_temporal (mk 2033 7 16),
+ cand ~origin:P.Sanctoral ~rank:V.Class3 ~status:Cel.Commemoration_only ~subject:Sub.Saint
+ ~layer:PE.universal_layer "our-lady-of-mt-carmel",
+ "Omit" );
+ (* Conjunct 1/2, LOSER identity: an ORDINARY Commemoration_only saint
+ NOT on PE.marian_slugs must still reach the ordinary commemorate
+ flow even when the winner is the BVM Saturday Office -- proves
+ RG112(d) excludes a specific same-BVM collision, not every
+ commemoration the office happens to outrank (the real live shape,
+ 1 August, Holy Machabees, PE.marian_slugs's own comment). *)
+ ( "RG112(d) does NOT fire when the LOSER is not a Marian commemoration \
+ -- an ordinary saint stays Commemorate(Ordinary) even under the BVM \
+ Saturday Office (1 August 2026, Holy Machabees)",
+ of_temporal (mk 2026 8 1),
+ cand ~origin:P.Sanctoral ~rank:V.Class3 ~status:Cel.Commemoration_only ~subject:Sub.Saint
+ ~layer:PE.universal_layer "holy-machabees",
+ "Commemorate(Ordinary)" );
+ (* Conjunct 2/2, WINNER identity: an ordinary (non-Bvm, non-Marian-
+ titled) winner must not exclude Mt Carmel either -- RG112(d) is
+ keyed on the WINNER also being "de B. Maria Virg.", not merely on
+ the loser's own identity. SYNTHETIC: no live date has an ordinary
+ Class3 saint winning outright while Mt Carmel also loses that same
+ day (Mt Carmel's own fixed date, 16 July, has no other real
+ sanctoral entry to construct this from) -- proves the conjunct is
+ real, not merely untested, the same "SYNTHETIC" discipline the
+ RG112(a) rows above already use for their own second conjunct. *)
+ ( "SYNTHETIC: RG112(d) does NOT fire when only the LOSER is Marian -- \
+ an ordinary winner leaves Mt Carmel Commemorate(Ordinary)",
+ cand ~origin:P.Sanctoral ~rank:V.Class3 ~subject:Sub.Saint ~layer:PE.universal_layer
+ "ef-synthetic-ordinary-winner",
+ cand ~origin:P.Sanctoral ~rank:V.Class3 ~status:Cel.Commemoration_only ~subject:Sub.Saint
+ ~layer:PE.universal_layer "our-lady-of-mt-carmel",
"Commemorate(Ordinary)" )
]
@@ -1421,6 +1478,107 @@ let test_ii_class_sunday_privileged_witness_admitted_end_to_end () =
[ ("ef-some-saint", "omitted: admission limit reached") ]
(List.map (fun (c, reason) -> (S.to_string c.P.cel.Cel.slug, reason)) resolution.P.omitted)
+(* RG 91 entry 27 / RG 78-79 (Caput IX, "De sancta Maria in sabbato") reached
+ end-to-end through the REAL pipeline -- this is THE hazard this task's own
+ brief names explicitly: {!PE.band}'s entry-27 branch has been reachable
+ only in isolation (the table-driven row above) since it was written, never
+ through a real [Temporal_ef.temporal] candidate winning an actual day, so
+ this test is checked for whether it exercises entry 27 for the RIGHT
+ reason -- proved by the mutation test recorded in the task report
+ (reverting temporal_ef.ml's own [is_bvm_saturday] branches back to the
+ generic ferial fallback reddens THIS test, not merely the [band]-table
+ row, which would still pass unchanged since it is sourced from real
+ [T.temporal] output either way).
+
+ 1 August 2026, matching the task brief's own worked example against the
+ oracle exactly: a Time-after-Pentecost Saturday, otherwise unoccupied but
+ for Holy Machabees (Commemoration_only, Class3, real data/ef/sanctoral.sexp
+ entry, 1 August) -- the office wins outright (band 270, ahead of Holy
+ Machabees's own [unclassified]) and the Commemoration_only loser still
+ rides along as an ordinary commemoration, the SAME shape the oracle's own
+ row for this date shows ("V Mass of the B. V. M. -- Salve, Sancta Parens",
+ commemorating Holy Machabees). *)
+let test_bvm_saturday_wins_and_commemorates_end_to_end () =
+ let date = mk 2026 8 1 in
+ let day_ctx = ctx date in
+ let bvm_saturday = of_temporal date in
+ let holy_machabees =
+ cand ~origin:P.Sanctoral ~rank:V.Class3 ~status:Cel.Commemoration_only ~layer:PE.universal_layer
+ "holy-machabees"
+ in
+ let resolution = P.resolve real_rules day_ctx ~temporal:bvm_saturday ~sanctoral:[ holy_machabees ] in
+ Alcotest.(check string) "the BVM Saturday office is observed, not Holy Machabees"
+ "ef-time-after-pentecost-9-saturday" (S.to_string resolution.P.observed.P.cel.Cel.slug);
+ Alcotest.(check string) "observed rank is class-4, unconditional" "class-4"
+ (V.rank_to_string resolution.P.observed.P.cel.Cel.rank);
+ Alcotest.(check string) "observed colour is white, overriding the season's own green" "white"
+ (Col.to_string resolution.P.observed.P.cel.Cel.colour);
+ Alcotest.(check bool) "observed subject is Bvm" true (resolution.P.observed.P.cel.Cel.subject = Sub.Bvm);
+ Alcotest.(check (list (pair string string))) "Holy Machabees still rides along as an ordinary commemoration"
+ [ ("holy-machabees", "Ordinary") ]
+ (List.map
+ (fun (c, p) -> (S.to_string c.P.cel.Cel.slug, match p with P.Privileged -> "Privileged" | P.Ordinary -> "Ordinary"))
+ resolution.P.commemorations);
+ Alcotest.(check int) "nothing omitted" 0 (List.length resolution.P.omitted)
+
+(* The other half of the SAME hazard: a real Saturday where RG 78's own
+ protasis is FALSE (a genuine sanctoral feast wins the day outright), so
+ the BVM-Saturday-shaped temporal candidate must lose, and be OMITTED under
+ RG 26 (a temporal Class4 non-vigil loser is never commemorated) exactly
+ like the plain ferial candidate it replaces always was -- proving [band]/
+ [disposition] need no special case for this office at all, the design
+ claim the task report makes explicitly. 12 September 2026 is a Saturday
+ where `most-holy-name-of-mary` (data/ef/adjustments.sexp's own [Set_subject
+ Bvm] entry, Class3 Feast) wins outright -- ALSO tagged [subject = Bvm],
+ the one live data witness that could in principle confuse a
+ subject-keyed disposition rule with RG 26's own rank-keyed one: this test
+ proves they do NOT collide (RG 26 fires first, unconditionally, on the
+ loser's own [rank = Class4], never reaching a subject comparison at all). *)
+let test_bvm_saturday_loses_to_a_real_feast_end_to_end () =
+ let date = mk 2026 9 12 in
+ let day_ctx = ctx date in
+ let bvm_saturday = of_temporal date in
+ let name_of_mary =
+ cand ~origin:P.Sanctoral ~rank:V.Class3 ~subject:Sub.Bvm ~layer:PE.universal_layer
+ "most-holy-name-of-mary"
+ in
+ let resolution = P.resolve real_rules day_ctx ~temporal:bvm_saturday ~sanctoral:[ name_of_mary ] in
+ Alcotest.(check string) "Most Holy Name of Mary is observed, not the BVM Saturday office"
+ "most-holy-name-of-mary" (S.to_string resolution.P.observed.P.cel.Cel.slug);
+ Alcotest.(check (list string)) "nothing is commemorated" []
+ (List.map (fun (c, _) -> S.to_string c.P.cel.Cel.slug) resolution.P.commemorations);
+ Alcotest.(check (list (pair string string)))
+ "the BVM-Saturday-shaped temporal candidate is omitted under RG26, not commemorated -- no Bvm-vs-Bvm \
+ confusion with RG112(a)-style subject logic"
+ [ ("ef-time-after-pentecost-15-saturday", "omitted: yielded to a higher day") ]
+ (List.map (fun (c, reason) -> (S.to_string c.P.cel.Cel.slug, reason)) resolution.P.omitted)
+
+(* RG112(d), fix round 1 (coordinator finding F1) -- PE.marian_slugs's own
+ citation has the full argument. End-to-end through the REAL pipeline
+ (PE.band, PE.disposition AND PE.admit together): 16 July 2033, a real
+ otherwise-unoccupied Saturday, with the real data/ef/sanctoral.sexp
+ [our-lady-of-mt-carmel] entry as the day's only competing candidate.
+ Before this fix, [resolution.P.commemorations] held
+ [our-lady-of-mt-carmel:Ordinary] (confirmed live against real 2005/2033
+ `colitur day` output before this fix existed); after, it is empty and
+ Mt Carmel is reported omitted, not silently dropped. *)
+let test_bvm_saturday_excludes_mt_carmel_end_to_end () =
+ let date = mk 2033 7 16 in
+ let day_ctx = ctx date in
+ let bvm_saturday = of_temporal date in
+ let mt_carmel =
+ cand ~origin:P.Sanctoral ~rank:V.Class3 ~status:Cel.Commemoration_only ~subject:Sub.Saint
+ ~layer:PE.universal_layer "our-lady-of-mt-carmel"
+ in
+ let resolution = P.resolve real_rules day_ctx ~temporal:bvm_saturday ~sanctoral:[ mt_carmel ] in
+ Alcotest.(check string) "the BVM Saturday office is observed"
+ "ef-time-after-pentecost-5-saturday" (S.to_string resolution.P.observed.P.cel.Cel.slug);
+ Alcotest.(check (list string)) "Mt Carmel is NOT commemorated (RG112(d))" []
+ (List.map (fun (c, _) -> S.to_string c.P.cel.Cel.slug) resolution.P.commemorations);
+ Alcotest.(check (list (pair string string))) "Mt Carmel is reported omitted, not silently dropped"
+ [ ("our-lady-of-mt-carmel", "omitted: yielded to a higher day") ]
+ (List.map (fun (c, reason) -> (S.to_string c.P.cel.Cel.slug, reason)) resolution.P.omitted)
+
(* RG 16(a) (register §6.0) reached end-to-end through the REAL pipeline
([PE.band], [PE.disposition] AND [PE.admit] together, not any one of
them in isolation as this file's own hand-tagged rows test them
@@ -1895,6 +2053,18 @@ let suite =
"II-class Sunday override: RG109(b) witness admitted over an ordinary saint, end-to-end"
`Quick test_ii_class_sunday_privileged_witness_admitted_end_to_end;
Alcotest.test_case
+ "RG91 e27/RG78: the BVM Saturday office wins and commemorates Holy Machabees, end-to-end \
+ (2026-08-01)"
+ `Quick test_bvm_saturday_wins_and_commemorates_end_to_end;
+ Alcotest.test_case
+ "RG91 e27/RG78/RG26: the BVM Saturday office loses to a real feast and is omitted, end-to-end \
+ (2026-09-12)"
+ `Quick test_bvm_saturday_loses_to_a_real_feast_end_to_end;
+ Alcotest.test_case
+ "RG112(d), fix round 1 (F1): the BVM Saturday office excludes Mt Carmel, end-to-end \
+ (2033-07-16)"
+ `Quick test_bvm_saturday_excludes_mt_carmel_end_to_end;
+ Alcotest.test_case
"RG16(a): a Feast of the Lord suppresses the Sunday's own commemoration entirely, \
end-to-end (2028-08-06)"
`Quick test_rg16a_lord_feast_suppresses_sunday_end_to_end;