Full precedence sweep of temporal-categories.yml, two more real bugs
Deploy / deploy (push) Successful in 1m27s

Following the Ascensiontide fix, swept every remaining unverified Sunday/
feria precedence tier against the live reference engine:

- commemorations.ts's privileged-sunday rule was itself wrong: a
  duplex-majus+ candidate was given a bare commemoration instead of
  transferring, never actually verified. Live-checked the Immaculate
  Conception (transfers off Advent II) and the Annunciation (transfers
  off Palm/Easter Sunday) - confirmed correct by direct instruction.
  privileged-sunday now transfers every rank unconditionally.

- eastertide's own Sunday tier was backwards (privileged-sunday instead
  of ordinary-sunday) for the ordinary Sundays after Easter - live-
  verified twice (Finding of the Holy Cross, St. Mark both win outright).
  Easter Day itself still needs the stronger tier, now special-cased
  directly since Sundays never consult the offset table.

Six existing tests updated to reflect real, live-verified behavior - each
had the old wrong "commemorated in place" assumption baked into its
expected value. Remaining unverified entries (Vigil of Pentecost/
Christmas, Corpus Christi/Sacred Heart) documented as such rather than
silently assumed correct.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017XMSokiTD2Qc5vPP2YQu3Q
This commit is contained in:
2026-09-01 11:45:04 -04:00
parent 6b66999908
commit 4adbb71ddf
10 changed files with 190 additions and 63 deletions
+16 -7
View File
@@ -188,13 +188,22 @@ export function decideOccurrence(
};
case 'privileged-sunday':
if (isAtLeast(sanctoral.rank, 'duplex-majus')) {
// Never displaced, but a sufficiently high feast still gets a nod.
return { winner: temporalWinner, commemorations: [sanctoralCommemoration(sanctoral)] };
}
// Below duplex-majus, a privileged Sunday wants nothing at all —
// not even the bare commemoration an ordinary Sunday would allow a
// Simplex — so everything here transfers.
// A privileged Sunday wants nothing at all, no matter how high the
// candidate ranks — not even the bare commemoration an ordinary
// Sunday would allow a Simplex, and no exception for duplex-majus+ —
// everything transfers. Live-verified 2026-09-01, three independent
// dates: the Immaculate Conception (Duplex I. classis) transfers off
// Advent II with no commemoration at all (real dates 2024/2030/2041),
// and the Annunciation (also Duplex I. classis) transfers off both
// Palm Sunday and Easter Sunday itself the same way (2029/2035/2040/
// 2046) — confirmed by direct instruction as the correct behavior,
// correcting an earlier, never-actually-verified "duplex-majus+
// still gets a nod" guess. (Where a transferred candidate actually
// lands is a separate, still-generic `transferDirectionOf`/next-
// open-day mechanism — the Annunciation's own real rule of jumping
// *past* the whole Easter Octave rather than landing inside it is a
// known follow-on, blocked on the not-yet-built Easter-octave
// mechanism; see TODO.md.)
return {
winner: temporalWinner,
commemorations: [],
+12 -1
View File
@@ -202,12 +202,23 @@ export function adventEmberDayOffset(isoDate: string): number | undefined {
* the Christmas vigil (Dec 24 can land on a Sunday) — and a Sunday's own
* privileged/ordinary status should win in that case regardless, so
* Sundays are resolved straight from `bySeason` without consulting the
* overrides at all.
* overrides at all. The one deliberate exception is Easter Sunday itself
* (offset 0): `eastertide`'s own `bySeason` default is `ordinary-sunday`
* (live-verified for the *ordinary* Sundays that follow it — see that
* entry's own comment), but Easter Day needs the stronger
* `privileged-sunday` tier instead (live-verified 2026-09-01: the
* Annunciation, Duplex I. classis, transfers off Easter Day itself in
* years they coincide, the same "transfers, no exception" behavior as
* every other privileged-sunday case) — checked directly here rather
* than via `offsets`, since offsets are never consulted for a Sunday.
*/
export function resolveTemporalCategory(isoDate: string, season: Season, weekday: Weekday): TemporalCategory {
const bySeasonEntry = temporalCategories.bySeason[season];
const base = bySeasonEntry ? (weekday === 'sunday' ? bySeasonEntry.sunday : bySeasonEntry.feria) : 'ordinary-feria';
if (weekday === 'sunday') {
if (season === 'eastertide' && easterOffsetOf(isoDate) === 0) {
return 'privileged-sunday';
}
return base;
}
+42 -4
View File
@@ -48,6 +48,19 @@
# 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.
#
# 2026-09-01 full sweep: every `bySeason` entry now live-verified or
# explicitly noted as not (see each entry's own comment below) — found
# and fixed two real bugs in the process (`eastertide`'s and
# `ascensiontide`'s own `sunday` tiers were each backwards), and a third,
# deeper one in `commemorations.ts` itself (`privileged-sunday`'s
# duplex-majus+ candidates were wrongly given a bare commemoration
# instead of transferring like every other rank there). Every `feria`
# entry in `bySeason` besides the ones with their own verification
# comment is the trivial `ordinary-feria` default (no rank threshold at
# all — any real content wins outright) — not worth a dedicated live
# collision test on top of the hundreds of ordinary weekdays already
# exercising it correctly across this app's whole test suite.
bySeason:
# Advent's ordinary ferias verified `privileged-feria-minor` during the
# December sanctoral pull (see calendar/types.ts's TemporalCategory doc
@@ -81,7 +94,20 @@ bySeason:
septuagesima: { sunday: privileged-sunday, feria: ordinary-feria }
lent: { sunday: privileged-sunday, feria: ordinary-feria }
passiontide: { sunday: privileged-sunday, feria: ordinary-feria }
eastertide: { sunday: privileged-sunday, feria: ordinary-feria }
# The ordinary Sundays after Easter (i.e. not Easter Day itself, not
# within its Octave — both handled elsewhere) are `ordinary-sunday`,
# NOT `privileged-sunday` — originally miscoded, live-verified
# 2026-09-01, two independent Duplex-II-classis collisions on "Dominica
# IV Post Pascha" (the Finding of the Holy Cross, 2026-05-03; St. Mark,
# 2027-04-25): both win outright, with the Sunday itself only noted as
# a `Tempora` commemoration underneath — exactly `ordinary-sunday`'s
# Duplex+ rule, the reverse of `privileged-sunday`'s (which would keep
# the Sunday primary and transfer the feast entirely, per the
# Ascensiontide/Advent/Palm-Sunday/Easter-Day evidence above and
# below). Easter Day itself (offset 0) and its Octave (offsets 1-6,
# `privileged-feria-major` via offsetRanges below) are unaffected by
# this — only the ordinary Sundays past the Octave use this default.
eastertide: { sunday: ordinary-sunday, feria: ordinary-feria }
# The Sunday within the Octave of Ascension is `privileged-sunday`, not
# `ordinary-sunday` — live-verified 2026-09-01: the reference engine
# titles it "Dominica infra Octavam Ascensionis ~ Semiduplex Dominica
@@ -92,6 +118,11 @@ bySeason:
# Matches the same "great octave" pattern as eastertide/pentecost above,
# both already `privileged-sunday`.
ascensiontide: { sunday: privileged-sunday, feria: ordinary-feria }
# Pentecost Sunday itself — no fixed-date saint collision found/
# attempted to independently verify this specific entry, but consistent
# with the confirmed "great octave Sundays are privileged-sunday"
# pattern (Easter Day, Ascension's own octave Sunday) — Pentecost
# outranks both.
pentecost: { sunday: privileged-sunday, feria: ordinary-feria }
trinitytide: { sunday: ordinary-sunday, feria: ordinary-feria }
# Corpus Christi/Sacred Heart are themselves "feasts of the Lord" that
@@ -99,7 +130,14 @@ bySeason:
# privileged-feria-major (rather than injecting a separate synthetic
# FeastClass) since with the small sanctoral calendar this app has, a
# real clash is unlikely and the practical effect (temporal wins) is the
# same either way.
# same either way. Not independently live-verified (no fixed-date saint
# collision found/attempted), but same "feast of the Lord" reasoning
# already confirmed for Ash Wednesday/Holy Week/the Easter Octave.
# `sunday` is checked here for shape-consistency with every other
# season entry, but genuinely unreachable in practice — per
# data/calendar/easter-offsets.yml's `days:` table, both are single
# fixed weekdays (Corpus Christi always a Thursday, Sacred Heart always
# the following Friday), never a Sunday.
corpus-christi: { sunday: ordinary-sunday, feria: privileged-feria-major }
sacred-heart: { sunday: ordinary-sunday, feria: privileged-feria-major }
@@ -108,7 +146,7 @@ offsets:
-39: privileged-feria # Lent Ember Wednesday (Wed after 1st Sunday of Lent) — verified: Duplex wins outright here
-37: privileged-feria # Lent Ember Friday
-36: privileged-feria # Lent Ember Saturday — verified: Duplex wins outright here (St. Gregory the Great)
48: privileged-feria-major # Vigil of Pentecost — unverified, defaulted to the stricter tier
48: privileged-feria-major # Vigil of Pentecost — no live saint-collision test found/attempted (rare by construction), but corroborated 2026-09-01 by its own formal rank in the reference source (Sancti/Pentecost Vigil file's own [Rank]: "Semiduplex I classis" — a genuinely first-class day, consistent with the stricter tier)
offsetRanges:
- { fromOffset: -6, toOffset: -1, category: privileged-feria-major } # ferias of Holy Week
@@ -129,4 +167,4 @@ offsetRanges:
# existing one, not introduced by this change.
fixedDates:
"12-24": privileged-feria-major # Vigil of Christmas — unverified, defaulted to the stricter tier
"12-24": privileged-feria-major # Vigil of Christmas — no live saint-collision test found/attempted, but corroborated 2026-09-01 by its own formal rank in the reference source (Sancti/12-24.txt's own [Rank]: "Duplex I classis", consistent with the stricter tier)