From a2fba71d8cccc765c4a987df99fa780f5467514d Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Tue, 25 Aug 2026 22:38:31 +0200 Subject: fix(of): Nativity Vigil no longer suppresses a Sunday of Advent Temporal_of.named claimed 24 December unconditionally as of-nativity-vigil (Sollemnitas), and temporal's dispatch matched named before sunday_slug. On a Sunday 24 December, the Fourth Sunday of Advent -- Tabula I.2, Normae n. 5's own privileged Sundays of Advent, Lent and Easter -- was silently replaced by the Vigil. named now returns None for 24 December when that date is itself a Sunday, so temporal's dispatch falls through to sunday_slug and the day resolves as of-advent-sunday-4. The Vigil Mass is an evening Mass of the following solemnity, not an office belonging to 24 December's own civil day -- the same civil-day-granularity reasoning already applied to Holy Thursday (Precedence_of.band's entry-1 comment) and to expected-divergences-litcal.sexp's L1 entry. Every non-Sunday 24 December is unaffected. Audited every other named entry for the same latent shape (see .superpowers/sdd/of-r8-advent-iv-report.md): none of them has it, either because the date can never fall on a Sunday, or because the date IS the definition of that Sunday (Palm Sunday, Easter, Pentecost, Trinity, Christ the King), or because the competing movable-Sunday windows are constructed to exclude that date. Added test_nativity_vigil_yields_to_advent_sunday, covering 2028-12-24 and 2034-12-24 (both inside the litcal fixture window) and the 2026-12-24 non-Sunday control. Re-ran the litcal layer: no allow-list counts moved, since it compares only season and Ordinary-Time week, and both readings of 24 December are "advent" either way. Updated test_precedence_of.ml's "entry 3, not 9" comment, which had carried this as a known, unfixed defect, to describe the fix; its own pinned assertion (a hand-built Thursday candidate) needed no change. --- test/test_temporal_of.ml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'test/test_temporal_of.ml') diff --git a/test/test_temporal_of.ml b/test/test_temporal_of.ml index 7560413..1ccd098 100644 --- a/test/test_temporal_of.ml +++ b/test/test_temporal_of.ml @@ -230,6 +230,28 @@ let test_ferial_slugs () = Alcotest.(check string) "ordinary weekday" "of-ordinary-time-2-monday" (slug_of (d 2026 1 19)); Alcotest.(check string) "lent weekday" "of-lent-6-monday" (slug_of (d 2026 3 30)) +(* R8 fix: a Sunday 24 December must yield the Fourth Sunday of Advent, not + the Vigil -- Tabula I.2/Normae n. 5, and temporal_of.ml's own [named] + comment for the full argument (the same civil-day-granularity reasoning + already applied to Holy Thursday). 2028-12-24 and 2034-12-24 are the two + such Sundays inside the litcal fixture window (2023-12-03..2035-12-01); + 2026-12-24, a Thursday, is the non-Sunday control. *) +let test_nativity_vigil_yields_to_advent_sunday () = + List.iter + (fun (y, label) -> + let dt = d y 12 24 in + Alcotest.(check bool) (label ^ ": 24 Dec is a Sunday") true (D.weekday dt = D.Sun); + Alcotest.(check string) (label ^ ": named claims nothing") "" (named_slug dt); + Alcotest.(check string) (label ^ ": temporal resolves to Advent IV") "of-advent-sunday-4" (slug_of dt); + Alcotest.(check string) (label ^ ": season is still advent") "advent" (season_str dt); + Alcotest.(check (option int)) (label ^ ": week 4") (Some 4) (T.week dt)) + [ (2028, "2028"); (2034, "2034") ]; + (* Non-Sunday 24 December: unaffected, the Vigil still wins. *) + let thu = d 2026 12 24 in + Alcotest.(check bool) "2026: 24 Dec is a Thursday, not a Sunday" true (D.weekday thu <> D.Sun); + Alcotest.(check string) "2026: named still claims the vigil" "of-nativity-vigil" (named_slug thu); + Alcotest.(check string) "2026: temporal still resolves to the vigil" "of-nativity-vigil" (slug_of thu) + let test_colours () = let colour_of dt = (T.temporal dt).Colitur_kernel.Temporal.office.Colitur_kernel.Celebration.colour in Alcotest.(check string) "Good Friday is red" "red" (Colitur_kernel.Colour.to_string (colour_of (d 2026 4 3))); @@ -387,6 +409,7 @@ let suite = Alcotest.test_case "ordinary time resumption" `Quick test_ordinary_time_resumption; Alcotest.test_case "sunday slugs" `Quick test_sunday_slugs; Alcotest.test_case "ferial slugs" `Quick test_ferial_slugs; + Alcotest.test_case "nativity vigil yields to Advent Sunday IV" `Quick test_nativity_vigil_yields_to_advent_sunday; Alcotest.test_case "colours" `Quick test_colours; Alcotest.test_case "domain edges do not raise" `Quick test_domain_edges_do_not_raise; Alcotest.test_case "exhaustive domain sweep" `Slow test_exhaustive_domain_sweep ] -- cgit v1.3