calendar: model octaves as a generic, data-driven mechanism
Deploy / deploy (push) Successful in 46s
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:
@@ -9,3 +9,7 @@ name: "The Holy Innocents, Martyrs"
|
||||
rank: duplex-2-classis
|
||||
common: common-of-several-martyrs
|
||||
propers: "holy-innocents"
|
||||
# Has its own real octave, one of the three "Comites Christi" (with St.
|
||||
# Stephen and St. John) -- see st-stephen-protomartyr.yml.
|
||||
octave:
|
||||
enabled: true
|
||||
|
||||
@@ -7,3 +7,7 @@ name: "St. John, Apostle and Evangelist"
|
||||
rank: duplex-2-classis
|
||||
common: common-of-an-evangelist
|
||||
propers: "st-john-apostle"
|
||||
# Has his own real octave, one of the three "Comites Christi" (with St.
|
||||
# Stephen and the Holy Innocents) -- see st-stephen-protomartyr.yml.
|
||||
octave:
|
||||
enabled: true
|
||||
|
||||
@@ -9,3 +9,12 @@ name: "St. Lawrence, Martyr"
|
||||
rank: duplex-2-classis
|
||||
common: common-of-a-martyr
|
||||
propers: "st-lawrence"
|
||||
# Has a real octave (Aug 10-17) -- see calendar/types.ts's OctaveConfig
|
||||
# and calendar/octaves.ts. `wins` left at the default (semiduplex, i.e.
|
||||
# only a Simplex loses to it) pending its own direct verification; this
|
||||
# is also the concrete octave that repeatedly cost real saints their spot
|
||||
# during the August pull (Ss. Tiburtius & Susanna, St. Clare, Ss.
|
||||
# Hippolytus & Cassian) before this mechanism existed to commemorate them
|
||||
# instead of just excluding them outright.
|
||||
octave:
|
||||
enabled: true
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -23,16 +23,21 @@
|
||||
# major tier (Easter Octave directly verified — Holy Week and Ash
|
||||
# Wednesday are strong prior knowledge, not independently re-verified
|
||||
# here). Where this app *doesn't* have direct evidence either way —
|
||||
# Pentecost's own Ember days/Vigil/Octave, the Vigil of Christmas — it
|
||||
# defaults to the major (stricter) tier as the safer guess, pending
|
||||
# verification.
|
||||
# Pentecost's own Ember days, the Vigil of Christmas — it defaults to the
|
||||
# major (stricter) tier as the safer guess, pending verification. Pentecost's
|
||||
# own *Octave* (as opposed to its Ember days) is the one exception: it's
|
||||
# no longer classified via this table at all — see the offsetRanges
|
||||
# section below and calendar/octaves.ts.
|
||||
#
|
||||
# Known gap: Advent Ember days (Wed/Fri/Sat after Dec 13) and September
|
||||
# Ember days (Wed/Fri/Sat near the Exaltation of the Cross, Sept 14) are
|
||||
# NOT modeled here — both are fixed-calendar "nearest such-and-such a date"
|
||||
# rules, not a plain offset, and weren't worth guessing at without a source.
|
||||
# Lent's and Pentecost's Ember days *are* modeled, since those are clean
|
||||
# Easter offsets.
|
||||
# Lent's Ember days *are* modeled (clean Easter offsets, directly
|
||||
# verified). Pentecost's own Ember days share this same offset-based
|
||||
# fixability but currently fall to the plain `ordinary-feria` default
|
||||
# instead (see the offsetRanges comment below) — unverified, a real gap,
|
||||
# not a guess dressed up as one.
|
||||
bySeason:
|
||||
# Advent's ordinary ferias verified `privileged-feria-minor` during the
|
||||
# December sanctoral pull (see calendar/types.ts's TemporalCategory doc
|
||||
@@ -75,10 +80,20 @@ offsets:
|
||||
offsetRanges:
|
||||
- { fromOffset: -6, toOffset: -1, category: privileged-feria-major } # ferias of Holy Week
|
||||
- { fromOffset: 1, toOffset: 6, category: privileged-feria-major } # Easter octave — verified: even Duplex II. classis (St. Mark) only gets commemorated, never wins
|
||||
# Pentecost octave (also covers Pentecost's own Ember days) — unverified,
|
||||
# defaulted to the stricter tier; Lent's Ember days are confirmed
|
||||
# lesser-tier, but that hasn't been checked for Pentecost's specifically.
|
||||
- { fromOffset: 50, toOffset: 55, category: privileged-feria-major }
|
||||
# Pentecost's own Octave (offsets 50-55) is deliberately absent from
|
||||
# this table now -- it used to be classified privileged-feria-major
|
||||
# here, but user-confirmed rule (2026-08) is that a Duplex+ saint wins
|
||||
# outright within it, which the generic octave layer
|
||||
# (calendar/octaves.ts, data/calendar/temporal-feasts/pentecost-
|
||||
# sunday.yml) now handles directly. Leaving these offsets unlisted lets
|
||||
# them fall through to the `pentecost` season default (ordinary-feria,
|
||||
# see bySeason above), so a real sanctoral candidate reaches the octave
|
||||
# layer intact instead of being transferred away by a stricter feria
|
||||
# tier first. Pentecost's own Ember days (within this same range, in
|
||||
# years they land there) get the same ordinary-feria default as a
|
||||
# result -- still unverified for Pentecost specifically, not the
|
||||
# Lent-Ember-day privileged-feria treatment; a real gap, just an
|
||||
# existing one, not introduced by this change.
|
||||
|
||||
fixedDates:
|
||||
"12-24": privileged-feria-major # Vigil of Christmas — unverified, defaulted to the stricter tier
|
||||
|
||||
@@ -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
|
||||
@@ -0,0 +1,15 @@
|
||||
# Pentecost's Octave (Pentecost Sunday + 7 days). Stricter threshold than
|
||||
# the default: user-confirmed rule (2026-08) is that a saint needs to be
|
||||
# Duplex or higher to keep the day for itself here -- Semiduplex and below
|
||||
# are commemorated, with the Octave winning the day instead. This replaces
|
||||
# the previous approximation of folding Pentecost's octave into the
|
||||
# `privileged-feria-major` temporal category (which never let *any* rank
|
||||
# win outright) -- see data/calendar/temporal-categories.yml, where those
|
||||
# offsets were downgraded to `ordinary-feria` so a real sanctoral
|
||||
# candidate reaches this octave layer instead of being transferred away
|
||||
# before it gets the chance.
|
||||
id: pentecost-sunday
|
||||
name: "Pentecost"
|
||||
octave:
|
||||
enabled: true
|
||||
wins: duplex
|
||||
Reference in New Issue
Block a user