diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-12 13:29:41 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-12 13:29:41 +0200 |
| commit | 4a1db8df19425736fc82907c967586a3053a7ad1 (patch) | |
| tree | 821d774eb61428d1e2b6937ef184454dd91ca8ff /internal/calendar/computus.go | |
| parent | 4722236b26d3439ed56893cb2863121bb705c7cf (diff) | |
| download | lectio-4a1db8df19425736fc82907c967586a3053a7ad1.tar.gz lectio-4a1db8df19425736fc82907c967586a3053a7ad1.zip | |
scripts/gen-sanctoral-ef: fix rank inference, dedup, and class tagging (defect 7)
Six root-cause fixes to the generator, all in scripts/gen-sanctoral-ef.go,
then a full regeneration of internal/caldata/tridentine-calendar.ini
(323 -> 325 entries) against live missalemeum data:
1. Rank misinferred as "commemoration". A saint never OBSERVED in any
of the six reference years was unconditionally hardcoded to
RankCommemoration. 15 III-class feasts, all falling 6 March - 5
April, were always demoted by Lent's own privileged ferias in
every reference year -- a sampling artifact, not their true rank.
Fixed properly, not by hardcoding the 15: the commemoration
object's own id names the SAINT's true rank (idParts already
extracted it; only the colour half was kept before). But trusting
that rank unconditionally for every commemoration-only entry
over-corrected: some saints (St Blaise, St Canute, and others)
really are without an independent Mass in the 1960-reformed books,
demoted even on an ordinary, unprivileged day -- live-confirmed
against missalemeum, not inferred. refYearExplainsAbsence
distinguishes the two: the id's rank is trusted only when every
reference year's OWN temporal day (ignoring sanctoral data
entirely) was already strong enough to explain the demotion --
I/II class, an Ember day, or a privileged Lent/Passiontide feria.
A single unprivileged-day counter-example keeps RankCommemoration.
2. Two silent slug collisions. entries (the generator's global map)
is keyed by slug alone; two different fixed dates whose English
titles are identical ("St. Agnes" 21 Jan and 28 Jan; "St.
Boniface" 5 June and 14 May) silently dropped the second one add()
ever saw. Fixed at the dedup itself: a same-slug collision on a
DIFFERENT date is now disambiguated (a small curated slugOverride
for these two -- 28 January is the traditional "secundo"
commemoration of the same saint; 14 May's Boniface is a different
martyr from 5 June's Boniface of Mainz) rather than dropped.
3. Two early-exit bugs in harvestDate, both replaced with `continue`:
returning on the FIRST reference year that showed an observed
office discarded commemorations only visible in a LATER year (St
Theodore, 9 November, missing only from 2025, the first year
tried); the Christ-the-King skip used to abandon the whole date
outright instead of only that one movable year (St Evaristus, 26
October, invisible because 2025 -- tried first -- happens to be
the one reference year Christ the King lands there).
4. A new class of artifact the fix for (2) exposed rather than
caused: a movable-transfer feast displayed on whatever civil date
it actually landed on in one reference year (St Joseph pushed to
20 March by a Sunday of Lent; the Annunciation deferred past Holy
Week; All Souls moved to the Monday; St Matthias shown on the 25th
in a leap year) was being harvested as if it were a genuine
fixed-date office for THAT transferred date. idHomeDate compares
info.id's own embedded date against the mmdd being queried
(live-confirmed: 2023-03-20's id is "sancti:03-19:1:w") and skips
a mismatch.
5. classOf's substring matching, checked against the calendarium's
own verbatim titles: "purification" was never a Lord check at all
(calendarium "IN PURIFICATIONE B. MARIAE VIRG.", a BVM feast) and
is removed; "holy name" alone matched both "Holy Name of Jesus"
and "Most Holy Name of MARY" (calendarium "Sanctissimi Nominis
Mariae") and is now conditioned on the title not also naming Mary;
"baptism" is a new case -- "Commemoration of the Baptism of the
Lord" (13 January) ends "of THE Lord", not "of OUR Lord", the only
suffix classOf checked, so it was missing the marker entirely.
6. One curated exclusion, NOT a generator bug: missalemeum's own "St.
Romanus" commemoration on 9 August has no calendarium support (the
row there reads only "Vigilia, III classis.", no "Com." line) --
an upstream data quirk, recorded in knownSpuriousComm rather than
silently reproduced. "St. Eusebius" on 14 August (already known,
register M6) gets the same treatment for the same reason.
Witnesses (internal/caldata/caldata_test.go): TestTridentineClassOfLord,
TestTridentineLentRankNotCommemoration,
TestTridentineGenuineCommemorationStaysCommemoration,
TestTridentineNoMissingEntries, TestTridentineNoSpuriousRomanus,
TestTridentineNoTransferArtifacts, plus TestTridentineLoads' own
Purification class assertion corrected from its previous (wrong)
"lord" expectation. All fail against the pre-fix ini with messages
such as:
purification-of-the-blessed-virgin-mary: class = "lord", want ""
sts-felicitas-perpetua: rank = "commemoration", want class-3 (not commemoration)
missing "theodore" (11-09)
romanus present: the calendarium's 9 August row has no Com. line to support it
See the report for the full set.
internal/caldata/tridentine-calendar.ini is regenerated output
(go run scripts/gen-sanctoral-ef.go against live missalemeum data),
not hand-edited.
Diffstat (limited to 'internal/calendar/computus.go')
0 files changed, 0 insertions, 0 deletions
