diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-12 17:15:03 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-12 17:15:03 +0200 |
| commit | 3b32c002d3eddda5ece9422442717657b9fee63b (patch) | |
| tree | 5dd82811c100de6daa995bebd115a12434296508 /cmd/lectio-ef-dump | |
| parent | 2386a4551aec94252168a8554269ee423d516882 (diff) | |
| parent | c655c525ef07deafb113a291489b396c81d7ce4a (diff) | |
| download | lectio-3b32c002d3eddda5ece9422442717657b9fee63b.tar.gz lectio-3b32c002d3eddda5ece9422442717657b9fee63b.zip | |
Merge branch 'fix/ef-precedence-defects': seven EF calendar defects
Fixes seven defects in the EF calendar, each found by differential and
oracle comparison against an independently-written engine and each
backed by a cited paragraph of the Rubricae Generales verified against
the 1962 Missal:
RG 96 transfers must skip II-class days (the Precious Blood was
landing on the Visitation)
RG 91 a II-class privileged feria yields to an equal-class feast
(St Matthew was losing to the September Ember Wednesday)
RG 11 all Sundays of Advent, Lent and Passiontide are I class
(only Advent I was), which also settles St Joseph on a Lent
Sunday
RG 131 Rose on Gaudete and Laetare, which the EF path never emitted
RG 122 Holy Thursday is white
and the sanctoral generator itself, whose rank inference had tagged 15
III-class feasts as commemorations, dropped four entries to slug
collisions, and mis-tagged three class fields.
The EF oracle test asserted Season only, which is why none of this ever
failed. It now asserts rank and colour, with a cited allow-list.
Two commemorations had been deleted on a primary-source claim the
primary source contradicts: the Archivum Liturgicum transcription
silently drops commemoration lines where the photographic scans carry
them. Six of the seven affected dates are now present; the seventh
(25 December) is blocked by an ingestion limit that reads only the
first of three Christmas Masses, recorded at its cause.
Known gap, recorded in source: RG 95/97/98 chained transfers, where two
I-class feasts translate to the same day.
Diffstat (limited to 'cmd/lectio-ef-dump')
| -rw-r--r-- | cmd/lectio-ef-dump/main.go | 46 |
1 files changed, 38 insertions, 8 deletions
diff --git a/cmd/lectio-ef-dump/main.go b/cmd/lectio-ef-dump/main.go index 08ff547..e7d014a 100644 --- a/cmd/lectio-ef-dump/main.go +++ b/cmd/lectio-ef-dump/main.go @@ -1,10 +1,25 @@ // Command lectio-ef-dump prints lectio's Extraordinary Form (1962) calendar, // one line per day, for use as colitur's differential oracle. // -// Output format matches colitur's `colitur day <year>` line for line (see -// colitur's bin/main.ml, day_line), so the two streams are diffable directly: +// Output format is colitur's `colitur day <year>` line, PLUS two display-name +// columns colitur's own line does not carry (so a straight `diff` against +// colitur's output must ignore trailing fields, not compare them line for +// line): // -// YYYY-MM-DD weekday season week slug rank colour [+other-slug]... +// YYYY-MM-DD weekday season week slug rank colour name_en name_pl [+other-slug]... +// +// name_en and name_pl are the observed celebration's own display name in +// English and Polish (Celebration.Name["en"]/["pl"]), spaces replaced with +// "_" so the line stays whitespace-delimited; "-" where the name is empty +// (a bare feria with no proper name). Added after a regeneration of +// internal/caldata/tridentine-calendar.ini once deleted all 322 Polish +// names (name.pl 322 -> 0) with nothing in this repository's test suite OR +// this dumper noticing: the season/rank/colour columns this tool already +// printed were all still correct, since name is a wholly separate field +// naming.CelebrationName reads independently. This dumper is what the +// task's own before/after diff verification is run against, so it needed +// to be structurally capable of seeing a name regression, not just told to +// look harder next time. // // Every column carries lectio's OWN vocabulary (season names, slugs, rank and // colour spellings) -- this dumper does not translate lectio's values into @@ -79,17 +94,30 @@ func run(args []string, stdout, stderr io.Writer) int { return 0 } -// dumpLine renders one LiturgicalDay as a colitur-format line. Week is -// lectio's own int (0 where no season week applies, e.g. named I class feasts -// and per annum green-season ferias); printed as "-" there so the field count -// stays fixed, matching colitur's own convention for an absent week. +// dumpName renders a display-name field: spaces become "_" so the line stays +// whitespace-delimited (names routinely contain spaces, e.g. "St. Thomas +// Becket", "Wniebowzięcie N. M. P."); "-" for an empty name, matching the +// week column's own convention for "absent". +func dumpName(s string) string { + if s == "" { + return "-" + } + return strings.ReplaceAll(s, " ", "_") +} + +// dumpLine renders one LiturgicalDay as a colitur-format line, plus the +// name_en/name_pl columns colitur's own line does not carry (see this +// package's doc comment). Week is lectio's own int (0 where no season week +// applies, e.g. named I class feasts and per annum green-season ferias); +// printed as "-" there so the field count stays fixed, matching colitur's +// own convention for an absent week. func dumpLine(day calendar.LiturgicalDay) string { week := "-" if day.Week != 0 { week = strconv.Itoa(day.Week) } var b strings.Builder - fmt.Fprintf(&b, "%s %s %s %s %s %s %s", + fmt.Fprintf(&b, "%s %s %s %s %s %s %s %s %s", day.Date.Format("2006-01-02"), strings.ToLower(day.Weekday.String()), string(day.Season), @@ -97,6 +125,8 @@ func dumpLine(day calendar.LiturgicalDay) string { day.Observed.Slug, string(day.Observed.Rank), string(day.Colour), + dumpName(day.Observed.Name["en"]), + dumpName(day.Observed.Name["pl"]), ) for _, o := range day.Others { fmt.Fprintf(&b, " +%s", o.Slug) |
