aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-12 18:25:51 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-12 18:25:51 +0200
commit77f6fa5e3caae878c334d1194b73d3344891d897 (patch)
tree5a102a417a768b51bbf18313d203bb2d13593658 /test
parent9700cd32bc05a96cef0d9a5be3e0e16959afc091 (diff)
downloadcolitur-77f6fa5e3caae878c334d1194b73d3344891d897.tar.gz
colitur-77f6fa5e3caae878c334d1194b73d3344891d897.zip
test(differential): fix round 1 (F2, F5) -- split 13-Jan-Sunday into C13
13 January retagged subject=Lord (previous commit's regeneration) makes RG16(a) fire on the 7 years it falls on a Sunday within 2005-2050 (2008, 2013, 2019, 2030, 2036, 2041, 2047): colitur now observes the Baptism of the Lord itself where it used to observe the generic Sunday slug. The diff signature against lectio's fixture widens from {season;colour} to {season;slug;colour} -- but jan_6_13_slug already pre-authorised this exact slug across the whole 6-13 January window (correctly, for the other 39 non-Sunday years), so layer_c_reason routed the new, wider-shape rows into C1 unchanged, and C1's own expected_rows (a pure row count) did not move. A count proving cardinality where identity was required -- on the one day this branch itself already flags as still wrong under RG 112. Split into its own entry, C13, matched by an exact 7-date literal list checked before C1 in the if/elif chain. C1's own expected_rows corrected 368 -> 361 (independently re-derived: a Python script reading data/ef/sanctoral.sexp's regenerated output and the committed lectio fixture directly, replicating diff_fields/layer_c_reason's own logic outside the OCaml comparator -- not transcribed from the failing comparator's own count). C13's own citation records a refinement over the coordinator's framing, checked directly rather than assumed: lectio's committed fixture is a frozen snapshot that predates lectio's own equivalent fix to this entry's class field (the same staleness shape as C12). Confirmed by building lectio's own cmd/lectio-ef-dump from its current source tree (read-only) and running it fresh for all 7 dates -- lectio's LIVE engine now agrees with colitur's slug/rank/colour exactly, disagreeing only on season (the already-understood C1 divergence). This is not evidence colitur's answer is right against the Missal -- it is not (register's own RG112 item) -- only that this specific divergence from the fixture is a staleness artifact, not a live disagreement between the two engines' current logic. Also fixes F5: C12's own note said "5 of the 15 corrected slugs" while listing and counting 7 -- corrected to 7. Also corrects the module header's stale "13 January ... slug/rank/colour already equal lectio's exactly, in all 46 years" claim (true only for the 39 non-Sunday years now).
Diffstat (limited to 'test')
-rw-r--r--test/test_differential.ml44
1 files changed, 39 insertions, 5 deletions
diff --git a/test/test_differential.ml b/test/test_differential.ml
index cf5b95f..4d6aab0 100644
--- a/test/test_differential.ml
+++ b/test/test_differential.ml
@@ -88,11 +88,25 @@
exact, narrow field-diff SET, not "anything goes").
13 January (register ยง6's long-open "Baptism of the Lord" item) is
- EMPIRICALLY CONFIRMED FIXED, not allow-listed: colitur's slug/rank/colour
- for 13 January already equal lectio's exactly, in all 46 years (the
- sanctoral wiring landed in Task 11's "13 Jan now resolves to the Baptism
- of the Lord" review note). The only residual difference there is season
- (covered by Layer C's C1, the Jan 6-13 boundary) -- see the report. *)
+ EMPIRICALLY CONFIRMED FIXED, not separately allow-listed, ONLY in the 39
+ of 46 years it is NOT a Sunday: colitur's slug/rank/colour equal
+ lectio's fixture exactly there (the sanctoral wiring landed in Task 11's
+ "13 Jan now resolves to the Baptism of the Lord" review note), and the
+ only residual difference on those 39 rows is season (covered by Layer
+ C's C1, the Jan 6-13 boundary).
+
+ CORRECTED (ef-rebootstrap fix round 1, F2): this note previously said
+ "in all 46 years" and "the only residual difference is season" without
+ qualification -- WRONG once `commemoration-of-the-baptism-of-the-lord`
+ became `subject = Lord` (ef-rebootstrap): on the remaining 7 years (13
+ January itself falls on a Sunday: 2008, 2013, 2019, 2030, 2036, 2041,
+ 2047), RG16(a) now makes colitur observe the Baptism itself where it
+ used to observe the Sunday -- the OBSERVED SLUG differs from lectio's
+ fixture too, not merely colour. Allow-listed separately as C13
+ (`data/ef/expected-divergences.sexp`), whose own note has the full
+ account, including a live cross-check against lectio's CURRENT engine
+ (not the committed fixture, which predates lectio's own equivalent
+ fix) -- see the report. *)
module Cal = Colitur_kernel.Calendar
module Layer = Colitur_kernel.Layer
@@ -430,12 +444,32 @@ let fixed_iii_class_reclassified_slugs =
"john-damascene"; "john-of-capistrano"; "john-of-god"; "patrick"; "sts-felicitas-perpetua";
"thomas-aquinas"; "vincent-ferrer" ]
+(* C13 (ef-rebootstrap fix round 1, F2): the 7 years 13 January falls on a
+ Sunday within 2005-2050 -- independently re-derived, not copied from a
+ prior figure: `date -d <year>-01-13 +%A` = Sunday in exactly these 7
+ (2005-2050 is 46 years; 13 January cycles through the 7 weekdays with
+ the usual leap-year irregularity, landing on Sunday this many times).
+ A LITERAL list, not a predicate on [jan_6_13_slug] (which already, and
+ correctly, admits this exact slug for the other 39 non-Sunday years in
+ the window) -- checked BEFORE C1 below in the if/elif chain specifically
+ so it intercepts these 7 dates first; leaving C1's own guard as it was
+ would have let [jan_6_13_slug]'s pre-existing admission of this slug
+ silently absorb them into C1's count instead, the exact gap fix round 1
+ found: C1's own [expected_rows] is a bare row COUNT, blind to WHICH of
+ two different diff shapes produced it, so a real shape change here
+ (colitur's own OBSERVED CELEBRATION on these 7 dates, not merely its
+ colour) could move underneath the pin without the pin ever moving. *)
+let jan13_lord_sunday_dates_2005_2050 =
+ [ "2008-01-13"; "2013-01-13"; "2019-01-13"; "2030-01-13"; "2036-01-13"; "2041-01-13"; "2047-01-13" ]
+
(* [layer_c_reason l c diffs] returns the [data/ef/expected-divergences.sexp]
[id] this row-pair's remaining (post Layer A/B) diff set belongs to, or
[None] if nothing here explains it (a genuine, uncovered failure). *)
let layer_c_reason (l : row) (c : row) diffs =
let m = month_of_date l.date and d = day_of_date l.date in
if diffs = [] then None
+ else if List.mem l.date jan13_lord_sunday_dates_2005_2050 && diffs = [ Season; Slug_f; Colour_f ] then
+ Some "C13"
else if
m = 1 && d >= 6 && d <= 13
&& subset diffs [ Season; Colour_f; Slug_f ]