aboutsummaryrefslogtreecommitdiff
path: root/internal/calendar/temporal_ef.go
Commit message (Collapse)AuthorAgeFilesLines
* fix(ef): Christmas Time runs to 13 January (RG 72)Lukasz Kasprzak2026-08-181-6/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RG 72: "Tempus natalicium decurrit a I Vesperis Nativitatis Domini usque ad diem 13 ianuarii INCLUSIVE." 6-13 January is the Epiphany section OF Christmas Time, not the start of Time after Epiphany. RG 119(a) backs the same boundary from the colour side, white "usque ad expletum tempus Epiphaniae". lectio ended Christmas Time on 5 January, so eight days a year came out green that should be white, and Epiphany itself reported the wrong season. NOT a one-line boundary change, which is why an earlier attempt was reverted rather than shipped. efSeason both named the slugs and reported the season, so moving the boundary renamed every slug in the window -- ef-time-after-epiphany-* became ef-christmas-* -- and orphaned the ef-time-after-epiphany-sunday-1 lectionary key. The two are now separate axes: efSlugSeason names slugs and numbers weeks; unchanged behaviour efSeason the liturgical season, which the colour follows; RG 72's The split is not a new idea in this file. The resumed-Sundays branch already does exactly this and says so -- "Season stays time-after-pentecost (calendrical); the Epiphany slug only routes the readings" -- it simply had no name, so the one place that needed it could not reuse it. Result, checked against colitur across all 365 days of 2026: SEASON now agrees on every single day, where it previously differed on eight. Colour differences drop to nine, every one a Saturday and every one the BVM Saturday Office (RG 78, colitur C17) which lectio does not build. Slugs and week numbers are byte-identical to before. The oracle's season axis now consults the allow-list and excludes excused days from its threshold. Neither was true before, because no cited divergence had ever BEEN a season difference -- the January window showed up as a colour one, since the wrong season produced the wrong colour too. With the season right, what is left is a season difference against missalemeum, and an axis whose threshold is a t.Fatalf would have failed regardless of any allow-list. TestTemporalEFChristmastideBoundary pins the boundary AND the split, mutation- tested both ways: reverting the boundary reddens it, and re-merging the two seasons so the slug is built from the liturgical one reddens it differently, naming the orphaned lectionary key.
* fix(ef): Good Friday is black (RG 128(b) + RG 132)Lukasz Kasprzak2026-08-181-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | This file's own comment called RG 132's black "a separate, unmodelled gap". It is modelled now. RG 128(b)'s exception list carries Good Friday in the same sentence as Holy Thursday's -- "Actione liturgica feria VI in Passione et Morte Domini usque ad Communionem exclusive" excepts the day from Passiontide's violet -- and RG 132 assigns black to it. Adopted from colitur, which closed the same gap against the Missal in its v0.4.0. The rubric is per-action and this model carries one colour per day, so black is the day's principal colour, the same acknowledged limit the Palm Sunday blessing already has. missalemeum's own colour set for the day is "bv", black first, so the oracle test accepts this without a new allow-list entry. Found by cross-checking clectio's output against colitur date by date, NOT by the patch tool that produced the earlier eight corrections. That tool compares colitur's sanctoral data against this repo's calendar ini, so a temporal day -- computed in code on both sides, in neither file -- is structurally invisible to it. Its docstring now says so. TestTemporalEFHolyThursdayColour asserted Good Friday was violet "(unchanged)", encoding the gap; renamed to TestTemporalEFTriduumColours and updated. A test asserting the absence of a feature passes for exactly as long as the feature is absent, which is not the same as being correct. Holy Saturday is still pinned violet in the other direction, so a careless "the whole Triduum is black" change fails there.
* temporal_ef: Sunday ranks, Rose Sundays, Holy Thursday whiteLukasz Kasprzak2026-08-121-18/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Four fixes to internal/calendar/temporal_ef.go, all found by the strengthened oracle test (previous commit): 1. Sunday ranks (defect 4). The generic Sunday branch assigned class-2 to every Sunday except Advent I. RG 11-12 / RG 91 entry 6: every Sunday of Advent and every Sunday of Lent is I class (as are Passiontide's own two Sundays and Low Sunday, already correct via their named-feast cases). Fixes St Joseph wrongly taking a Sunday of Lent (defect 3, precedence_ef_repro_test.go's TestJosephYieldsToSundayOfLent) as a direct consequence: once Lent Sundays are I class, Joseph (also I class) no longer wins the tie outright and correctly transfers to the 20th via the existing RG 96 walk -- no separate code change was needed for defect 3. 2. Rose (defect 5). efColour had no Rose case at all; Gaudete (Advent III) and Laetare (Lent IV) now get Rose on that Sunday specifically (RG 131: rose vestments may be used "in Officio et Missa diei dominici tantum", for that Sunday's Office and Mass only), not the surrounding Sundays. 3. Holy Thursday's colour (defect 6). RG 128(b) names the Missa in Cena Domini as a whole-Mass exception to Passiontide's violet; RG 122 states the same fact affirmatively, in the White section itself. Good Friday and Holy Saturday, either side, are unchanged (still violet -- their own black/no-colour treatment is a separate, unmodelled gap, noted in precedence_ef.go's own doc comments). 4. Beyond the seven, found by the same strengthened test and fixed for the same RG 91 entry 18 reason defect 2 (next commit) relies on: the Ember days of Lent had no case in efEmberSlug at all (only September and Advent did), so they fell through to the ordinary III-class Lenten-feria rank instead of the II class RG 91 entry 18 requires. The late-Advent ferias (17-23 Dec, RG 91 entry 18) and the days within the Octave of the Nativity (26-31 Dec, RG 67-68) had no elevation at all, defaulting to III/IV class. All three are one-line, unambiguous, primary-cited additions to the same rank logic already being touched here -- left unfixed, the strengthened oracle test could only reach green by allow-listing them as if they were defensible divergences, which they are not. Witnesses (temporal_ef_test.go): TestTemporalEFSundayRanks, TestTemporalEFRoseSundays, TestTemporalEFHolyThursdayColour, TestTemporalEFEmberDayRanks. All fail before this commit; see the report for the exact pre-fix failure messages.
* fix(EF): resumed Sundays after Pentecost use the Epiphany MassesLukasz Kasprzak2026-07-281-0/+18
| | | | | | | | | | | In early-Easter years there are more than 24 Sundays after Pentecost. Per the 1960 Rubrics the surplus Sundays resume the Sundays after Epiphany that Septuagesima cut short (highest-numbered first) and the last Sunday keeps the 24th (Last) Mass. temporalEF now routes those Sundays to the resumed Epiphany slug for readings while keeping the calendrical time-after-pentecost season; the mis-harvested tail entries (post-Pentecost sundays 24-28) are corrected to the true 24th Mass and the surplus removed. Validated: 88/88 tail/resumed Sunday gospels match missalemeum 2025-2050; EF oracle green.
* fix(calendar): OF precedence/transfer + readings resolution; EF Pentecost octaveLukasz Kasprzak2026-07-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes found by validating the offline engine per-day vs the LiturgicalCalendar API (OF) and missalemeum (EF) across 2005-2050. OF calendar is now 0 real errors in the forward window (season/cycle already perfect). OF precedence/transfer (calendar): - Ash Wednesday and Holy Week Mon-Wed are band-2 privileged, so a coinciding feast (Chair of St Peter on Ash Wednesday) is suppressed, not observed. - Solemnities transfer out of Holy Week / the Easter octave: the Annunciation defers to the Monday after the 2nd Sunday of Easter; St Joseph is anticipated to the Saturday before Palm Sunday; the Nativity of St John the Baptist moves to Jun 23 when a Lord's solemnity (Sacred Heart / Corpus Christi) falls Jun 24. - Within a precedence band, a solemnity of the Lord/BVM outranks a saint's (dignity tiebreak) rather than losing an alphabetical slug tie. - Perpetua & Felicity corrected optional -> obligatory memorial. OF readings resolution (bible.OFRef + lectionary data): - Verse-accurate Hebrew->Vulgate psalm mapping incl. the split psalms (9/10, 114/115, 116, 147); "+" verse joins and abbreviated ranges ("127-28") normalized; single-chapter books (2/3 John, Jude) get chapter 1. - Cleaned harvest artifacts from of-lectionary.ini (descriptive-suffix gospels, "or Year A" alternates, "*"/"[Vulg.]"/bracket markers, slash abbreviations); Joel/Malachi/Zechariah/Esther book-versification citations fixed to Vulgate. - Split a merged Ps 15:10/11 row in vul.tsv. Result: 0 unresolvable OF readings over 2557 rendered days (cycles A/B/C, varied Easters). EF: the Octave of Pentecost (Whit Monday-Saturday) is red, not white.
* feat: complete OF+EF calendar coverage (movable feasts, vigils, ember days, ↵Lukasz Kasprzak2026-07-281-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | transfers) Ordinary Form: - Add the movable Marian memorials that have no fixed date: Mary, Mother of the Church (Monday after Pentecost) and the Immaculate Heart (Saturday after the Sacred Heart), computed in computeOF. - General Norms 60: two coinciding obligatory memorials both become optional and the ferial is observed -- except Mary, Mother of the Church, which keeps precedence per its 2018 decree. Extraordinary Form: - Capture fixed-date vigils in the sanctoral harvest (Christmas, the Nativity of St John the Baptist, Sts Peter & Paul, St Lawrence, the Assumption, All Saints, the Immaculate Conception) -- previously filtered out. - temporalEF: the movable vigils of the Ascension (I class eve) and Pentecost (Whitsun Eve), and the September/Advent Ember days (II class violet ferias). - transferIfImpededEF: the Annunciation transfers past Holy Week/the Easter octave to the Monday after Low Sunday; All Souls moves to Nov 3 when Nov 2 is a Sunday. - genlect harvests proper Masses for the new Ember/vigil days. Adds TestEFCoverage + TestOFMovableMemorials. Bumps to 0.39.0. Verified per-day: OF 0 real errors vs calapi (2026-2028, 100% correct-observed); EF 0 real errors vs missalemeum (2025-2027), residual = deep-tail vigil-occurrence and St Joseph Passiontide-transfer edges (~1-2 days/yr, documented).
* fix(ef): 1962 occurrence precedence for the full sanctoralLukasz Kasprzak2026-07-281-2/+31
| | | | | | | | | | | | | | | - Septuagesima ferias are IV class (per annum), not III class, so a III class saint (e.g. Conversion of St Paul, Jan 25) displaces them. - Holy Week ferias and the privileged octaves of Easter and Pentecost are I class: no saint's feast is admitted (temporal office wins). - Occurrence tie-break is asymmetric by season: an ordinary feria (Advent, per annum) yields to an equal-class feast; Lent/Passiontide ferias keep their privilege and win the tie. - A II class feast of the Lord (Purification, Exaltation of the Cross, Dedication of the Lateran) displaces a II class Sunday it falls on. Validated against missalemeum across 2025-2027: ~97.5% of days observe the liturgically-correct celebration, 100% rank agreement on saint-days.
* feat(ef): complete offline EF readings — proper ferias, deuterocanon, ↵Lukasz Kasprzak2026-07-271-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Latin fallback Finish the Extraordinary Form (1962) offline Mass readings so every day of the year resolves in both English and Polish. Temporal engine (temporal_ef.go): - Unique ferial slugs "ef-<season>-<week>-<weekday>" so penitential-season weekdays (Lent, Advent, Passiontide, Easter octave) can key their own proper Masses; green-season ferias have no entry and fall back to the preceding Sunday (the 1962 rule). - Special "ef-lent-after-ashes-<weekday>" case for the days between Ash Wednesday and Lent I, which have their own propers. Lectionary (tridentine-lectionary.ini, 55 -> 143 entries) via genlect.go: - Generator now fetches proper-season weekdays and stores a feria only when its Mass differs from the preceding Sunday's. - cleanCite() normalises two missalemeum data glitches: a stray comma between book and chapter ("4 Kings, 5:1" -> "4 Kings 5:1") and a period-as-separator ("John 20. 19-31" -> "John 20:19-31"), both guarded so legitimate multi-chapter citations are untouched. Citations & corpora: - books.ini: Douay abbreviations in the [en] dialect (Ex, Ezech, Jonas, and 3/4 Kings -> canonical 1/2 Kings), so the EF Lenten epistles resolve while the display keeps modern sigla. - drb.tsv: +205 rows backfilling the deuterocanonical Daniel 13-14 (Susanna, Bel) and Esther 11-16 (Greek additions) from get.bible douayrheims, which the base corpus omitted; scripts/gen-deutero.py documents the fetch. Rendering (liturgy.go): - readingLine() falls back to the Latin Vulgate (complete) when the vernacular corpus lacks a passage, with a clear note. Covers the Polish Wujek deuterocanon gap (no clean public-domain source exists) and any future vernacular gap; faithful to the EF as a Latin rite. Result: 730/730 days resolve for both EN (native) and PL (native + Latin fallback for 3 deuterocanon days). Version 0.32.0 -> 0.33.0.
* feat: EF temporal Sunday lectionary (offline Sunday Mass readings)Lukasz Kasprzak2026-07-271-2/+10
| | | | | | | | | Unique temporal-day slugs (season-sunday-week); scripts/genlect.go generates tridentine-lectionary.ini from missalemeum keyed by slug (55 entries: the Sundays of the whole EF year). caldata.TemporalReadings(form,slug) lookup; --liturgy resolves proper-of-feast else the temporal cycle and renders the text. bible.ParseRef strips abbreviation dots (1 Cor. -> 1 Cor). 52/53 Sundays fully resolve offline.
* feat(calendar): EF (1962) temporal cycle temporalEF + EF seasonsLukasz Kasprzak2026-07-271-0/+146
8 EF seasons by date boundary (Septuagesima, Passiontide, Time after Epiphany/ Pentecost + shared); major feasts of the Lord; Christ the King = last Sun of October. ParseRank accepts EF ranks.