aboutsummaryrefslogtreecommitdiff
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
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).
-rw-r--r--data/ef/expected-divergences.sexp11
-rw-r--r--test/test_differential.ml44
2 files changed, 47 insertions, 8 deletions
diff --git a/data/ef/expected-divergences.sexp b/data/ef/expected-divergences.sexp
index 373827a..2d51048 100644
--- a/data/ef/expected-divergences.sexp
+++ b/data/ef/expected-divergences.sexp
@@ -20,8 +20,13 @@
((id C1)
(citation "RG 72-73 (Nativity/Epiphany season boundary, Jan 1-13) + RG 119a (white through \"expletum tempus Epiphaniae\"); register §3c item 1")
(verdict colitur)
- (note "6-13 January is Christmastide in colitur, matching RG 72-73's explicit boundary at 13 January (corroborated independently by RG 119a's colour rule, §3b). lectio's efSeason switches to time-after-epiphany on 6 January. The season disagreement cascades into colour (green vs white) and, on 7-8 January specifically, into the ferial slug family name (colitur's ef-christmas-2-<weekday> vs lectio's ef-time-after-epiphany-1-<weekday> for the same two days).")
- (expected_rows 368))
+ (note "6-13 January is Christmastide in colitur, matching RG 72-73's explicit boundary at 13 January (corroborated independently by RG 119a's colour rule, §3b). lectio's efSeason switches to time-after-epiphany on 6 January. The season disagreement cascades into colour (green vs white) and, on 7-8 January specifically, into the ferial slug family name (colitur's ef-christmas-2-<weekday> vs lectio's ef-time-after-epiphany-1-<weekday> for the same two days). CORRECTED (ef-rebootstrap fix round 1, F2): expected_rows moved 368 -> 361, NOT because this shape changed, but because 7 rows that used to fit it (13 January in the 7 years it falls on a Sunday) now fit a DIFFERENT, wider diff shape and were moved to their own entry, C13, below -- see C13's own note. Re-derived independently (a Python cross-check reading data/ef/sanctoral.sexp's own regenerated civil-day output and the committed lectio fixture directly, replicating diff_fields/layer_c_reason's own logic outside the OCaml comparator, not by running the comparator and copying its count): 361.")
+ (expected_rows 361))
+ ((id C13)
+ (citation "RG 16(a) (§6.0/§4, already implemented) firing on 13 January now that commemoration-of-the-baptism-of-the-lord is (subject Lord) -- ef-rebootstrap (2026-08-12): the source's own class field changed, not a colitur retag")
+ (verdict colitur)
+ (note "On the 7 years 13 January falls on a Sunday within 2005-2050 (2008, 2013, 2019, 2030, 2036, 2041, 2047 -- independently re-derived via `date -d <year>-01-13 +%A`, not copied from any prior figure), colitur now observes the Baptism of the Lord itself (RG16(a): a Feast of the Lord, II class, takes an impeded II-class Sunday's place outright) where it used to observe the generic Sunday slug -- the diff shape widens from {season;colour} (C1's own shape) to {season;slug;colour}, moving these 7 rows out of C1 and into this entry. IMPORTANT, so this is not mistaken for \"lectio disagrees on the merits\": data/ef/fixtures/lectio-ef-2005-2050.txt is a FROZEN snapshot that predates lectio's own equivalent fix to this exact entry's class field (the same staleness shape as C12 above) -- independently confirmed by building lectio's own cmd/lectio-ef-dump from its CURRENT source tree (read-only; ~/git/projects/lectio was not modified) and running it fresh for all 7 years: lectio's LIVE engine now agrees with colitur's slug/rank/colour on every one of the 7 dates exactly (`commemoration-of-the-baptism-of-the-lord class-2 white`, no trailing candidate on any of them), disagreeing only on SEASON -- the same, already-understood C1 divergence. This does NOT mean colitur's own answer is right against the Missal: it is not. docs/research/rules-register.md's own \"RG 112\" item records that missalemeum shows Holy Family observed with the Baptism fully DISPLACED under RG 112(a) (a mystery of the Lord excluding a commemoration of another mystery of the same Divine Person) on this exact collision, and colitur implements neither RG 112 nor a Holy Family office -- both explicitly out of scope for the task that produced this entry. This entry's own job is narrower: it explains a divergence from the COMMITTED FIXTURE, which is stale, not an unresolved disagreement between the two engines' current logic.")
+ (expected_rows 7))
((id C2)
(citation "RG 91 entry 6, §4 (\"Sundays of Advent, Lent, Passiontide, and Low Sunday\" -- I class, unqualified); extends register §3c item 4 (stated there for Advent only) to Lent on the same textual basis")
(verdict colitur)
@@ -75,5 +80,5 @@
((id C12)
(citation "RG 91 entry 24 (\"Festa III classis, in calendario Ecclesiae universae inscripta\") outranks entry 28 (\"feriae IV classis\") -- register §4's own Table of Precedence, unchanged by this task; only the underlying DATA changed, ef-rebootstrap (2026-08-12): 15 entries in data/ef/sanctoral.sexp were wrongly bootstrapped `rank = commemoration` (RG 91 gives a bare commemoration no table row at all, register §6.1) where the 1962 calendarium's own text gives each a class number instead -- primary-source-verified, all 15 falling 6 March-5 April (benedict 21 Mar, cyril-of-jerusalem 18 Mar, forty-holy-martyrs-of-sebaste 10 Mar, frances-rome 9 Mar, francis-of-paola 2 Apr, gabriel-the-archangel 24 Mar, gregory-the-great 12 Mar, isidore-of-seville 4 Apr, john-damascene 27 Mar, john-of-capistrano 28 Mar, john-of-god 8 Mar, patrick 17 Mar, sts-felicitas-perpetua 6 Mar, thomas-aquinas 7 Mar, vincent-ferrer 5 Apr). Corrected upstream in lectio's own generator and re-bootstrapped here (source SHA-256 1b303ef2...); the occurrence/precedence code that resolves entry 24 over entry 28 already existed and needed no change.")
(verdict colitur)
- (note "5 of the 15 corrected slugs fall on a date that lands inside a plain class-4 Paschaltide or Septuagesima feria somewhere in 2005-2050 (frances-rome, francis-of-paola, isidore-of-seville, john-of-god, sts-felicitas-perpetua, thomas-aquinas, vincent-ferrer -- 7 unique slugs, 14 rows total, independently re-derived by grepping data/ef/sanctoral.sexp's own post-regeneration output against the committed lectio fixture directly, not by transcribing the comparator's own count): colitur now correctly observes the FEAST itself (e.g. `vincent-ferrer class-3 white`); lectio's fixture (frozen before lectio's own equivalent generator fix) still shows the class-4 feria observed with the SAME saint only as a trailing commemoration (e.g. `ef-easter-2-tuesday class-4 white +vincent-ferrer`) -- confirming the saint was already the correct candidate on both sides, and only the OCCURRENCE RESOLUTION differs, exactly as RG 91's own numeric table (24 < 28) requires. C12 was previously used, briefly, for an unrelated Purification-retag divergence that was reverted in the RG16(a) task (see test_differential.ml's own layer_c_reason comment) -- reused here since that earlier entry no longer exists.")
+ (note "7 of the 15 corrected slugs fall on a date that lands inside a plain class-4 Paschaltide or Septuagesima feria somewhere in 2005-2050 (frances-rome, francis-of-paola, isidore-of-seville, john-of-god, sts-felicitas-perpetua, thomas-aquinas, vincent-ferrer -- 7 unique slugs, 14 rows total, CORRECTED fix round 1 (F5): this note previously said \"5 of the 15\" while listing all 7 and separately saying \"7 unique slugs\" -- it is 7, independently re-derived by grepping data/ef/sanctoral.sexp's own post-regeneration output against the committed lectio fixture directly, not by transcribing the comparator's own count): colitur now correctly observes the FEAST itself (e.g. `vincent-ferrer class-3 white`); lectio's fixture (frozen before lectio's own equivalent generator fix) still shows the class-4 feria observed with the SAME saint only as a trailing commemoration (e.g. `ef-easter-2-tuesday class-4 white +vincent-ferrer`) -- confirming the saint was already the correct candidate on both sides, and only the OCCURRENCE RESOLUTION differs, exactly as RG 91's own numeric table (24 < 28) requires. C12 was previously used, briefly, for an unrelated Purification-retag divergence that was reverted in the RG16(a) task (see test_differential.ml's own layer_c_reason comment) -- reused here since that earlier entry no longer exists.")
(expected_rows 14))
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 ]