diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-18 16:02:17 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-18 16:02:17 +0200 |
| commit | 27acee1930dc728b286c655cb66bd5e44804df6f (patch) | |
| tree | 590651b88a173f6e35e2ebfa53d945a12b988425 /internal/calendar/temporal_ef_test.go | |
| parent | 967e911728eefb85dc53065c73c5c5d4cdce6a59 (diff) | |
| download | lectio-27acee1930dc728b286c655cb66bd5e44804df6f.tar.gz lectio-27acee1930dc728b286c655cb66bd5e44804df6f.zip | |
fix(ef): Christmas Time runs to 13 January (RG 72)
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.
Diffstat (limited to 'internal/calendar/temporal_ef_test.go')
| -rw-r--r-- | internal/calendar/temporal_ef_test.go | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/internal/calendar/temporal_ef_test.go b/internal/calendar/temporal_ef_test.go index db6e6aa..7dd7400 100644 --- a/internal/calendar/temporal_ef_test.go +++ b/internal/calendar/temporal_ef_test.go @@ -147,3 +147,60 @@ func TestTemporalEFEmberDayRanks(t *testing.T) { } } } + +// TestTemporalEFChristmastideBoundary pins RG 72's boundary and, just as +// importantly, the SEPARATION it required. +// +// RG 72: "Tempus natalicium decurrit a I Vesperis Nativitatis Domini usque ad +// diem 13 ianuarii INCLUSIVE." Christmas Time runs to 13 January, so 6-13 +// January is the Epiphany section OF Christmas Time, not the beginning of Time +// after Epiphany. RG 119(a) backs it from the colour side, white "usque ad +// expletum tempus Epiphaniae". +// +// lectio ended Christmas Time on 5 January, so those eight days came out +// green. The fix could not be the boundary constant alone: efSeason both named +// the slugs and reported the season, so moving it renamed every slug in the +// window and orphaned the ef-time-after-epiphany-sunday-1 lectionary key. The +// season and the slug are now separate axes -- efSeason and efSlugSeason -- +// and this test pins BOTH, because a future "simplification" that merges them +// again would pass any test that checked only one. +func TestTemporalEFChristmastideBoundary(t *testing.T) { + for _, c := range []struct { + date, season, slug string + }{ + // Epiphany itself is inside Christmas Time, not the start of what + // follows it. Its slug is unchanged. + {"2026-01-06", "christmas", "ef-epiphany"}, + // The window: season christmas, slugs and week numbers still Epiphany's. + {"2026-01-07", "christmas", "ef-time-after-epiphany-1-wednesday"}, + {"2026-01-11", "christmas", "ef-time-after-epiphany-sunday-1"}, + {"2026-01-12", "christmas", "ef-time-after-epiphany-1-monday"}, + // 13 January is INCLUSIVE -- the last day of Christmas Time. It carries + // the Commemoration of the Baptism, so only the season is asserted. + {"2026-01-13", "christmas", ""}, + // 14 January is the first day that is genuinely Time after Epiphany. + {"2026-01-14", "time-after-epiphany", ""}, + // The other end, unchanged: 5 January is Christmas Time by the old + // boundary too, so a regression that moved the boundary the wrong way + // would not show here -- which is why 14 January above is asserted. + {"2026-01-05", "christmas", ""}, + } { + got := temporalEF(d(c.date)) + if string(got.Season) != c.season { + t.Errorf("%s: season = %q, want %q (RG 72: Christmas Time runs to 13 January inclusive)", + c.date, got.Season, c.season) + } + if c.slug != "" && got.Cel.Slug != c.slug { + t.Errorf("%s: slug = %q, want %q -- the SLUG season must stay Epiphany's here; "+ + "if this fails with an ef-christmas-* slug, efSeason and efSlugSeason have been "+ + "merged again and the lectionary keys are orphaned", c.date, got.Cel.Slug, c.slug) + } + } + // The colour follows from the season, and is the reason any of this + // matters: eight days a year were green that should be white. + for _, day := range []string{"2026-01-07", "2026-01-09", "2026-01-12"} { + if got := temporalEF(d(day)).Cel.Colour; got != White { + t.Errorf("%s: colour = %s, want white (RG 119(a), following from the season)", day, got) + } + } +} |
