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
@@ -10,3 +10,10 @@ name: "St. Stephen, Protomartyr"
rank: duplex-2-classis
common: common-of-a-martyr
propers: "st-stephen-protomartyr"
# Has his own real octave, stacking within Christmas's (see
# christmas-day.yml and calendar/octaves.ts) -- one of the three
# "Comites Christi" (with St. John and the Holy Innocents) that do; St.
# Thomas of Canterbury, also within the Christmas Octave, deliberately
# does not (user-confirmed, 2026-08).
octave:
enabled: true