calendar: model octaves as a generic, data-driven mechanism
Deploy / deploy (push) Successful in 46s

Adds calendar/octaves.ts: a lookback over the past week collecting every
octave (sanctoral or temporal) still active on a date, stacking multiple
at once (Christmas + St. Stephen + St. John + Holy Innocents all
commemorated together within the Christmas Octave). Declared via an
optional `octave` field on a saint's own record or a new small
TemporalFeastRecord (calendar/temporal-feasts.ts) for temporal ids like
Christmas/Pentecost that didn't have a metadata record before -- data-
driven per user design discussion, with `{ enabled: true }` alone using
sensible defaults (8 days, semiduplex threshold) so a minimal declaration
works without authored content.

Wired into resolveDay as a post-processing layer: doesn't change how a
single day's own precedence contest is decided, just adds commemorations
for active octaves and occasionally overrides the winner when the
occurring saint doesn't clear the strictest active octave's threshold.

Populated so far: St. Lawrence's own octave (the one that repeatedly cost
real saints their spot in August), the three Comites Christi octaves
(Stephen/John/Innocents -- Thomas of Canterbury deliberately excluded,
per discussion), and Pentecost's (duplex threshold, user-specified).
Pentecost's octave offsets are also removed from temporal-categories.yml's
privileged-feria-major classification, letting a real candidate reach the
new octave layer instead of being transferred away first -- with the
side effect that Pentecost's own Ember Saturday no longer forces a
transfer (a sub-threshold saint is now commemorated in place instead, see
tests/calendar/transfer.test.ts's updated case). Assumption, Nativity
BVM, Immaculate Conception, and All Saints' own octaves are not yet
populated with octave data -- deliberately deferred to a follow-up pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-11 07:23:43 -04:00
parent c0413a44dc
commit da3b6e893e
17 changed files with 415 additions and 45 deletions
@@ -0,0 +1,16 @@
# Christmas's own Octave (Dec 25 - Jan 1), the one exception this pull's
# other octaves aren't: it already has partial standing via the
# `privileged-feria-minor` temporal category (see
# data/calendar/temporal-categories.yml's christmastide entry), which
# governs *ordinary* days within it. This record adds the generic octave
# layer on top so Christmas itself keeps accumulating as a commemoration
# on the days that belong to someone else within the Octave (Stephen,
# John, Holy Innocents, Thomas of Canterbury, Silvester) — those days
# already resolve correctly without this, this is what makes "Christmas"
# itself keep showing up alongside them. `wins` left at the default
# (semiduplex) deliberately, not yet independently verified for Christmas
# specifically.
id: christmas-day
name: "Christmas"
octave:
enabled: true