Give every day of Passiontide its own real propers and label
Deploy / deploy (push) Successful in 2m0s
Deploy / deploy (push) Successful in 2m0s
Passion Sunday through Holy Saturday (14 days) all collapsed onto just two ids (passion-sunday/palm-sunday) via resolveTemporalId's coarse governing-Sunday bucketing, so the day-label header showed the same generic "Weekday in Passiontide" phrase for all 14, and Maundy Thursday/Good Friday/Holy Saturday silently rendered Palm Sunday's own collect and antiphons. Fixed via the same movable-feast override architecture already used for Corpus Christi/Ascension (calendar/movable-feasts.ts's anchor-based override), leaving resolveTemporalId itself untouched: each of the 12 non-Sunday days gets its own real winner id, its own authored collect/Benedictus/Magnificat content, and its own temporal-feasts display record, closing both the label bug and the underlying content gap in one mechanism. day-label.ts's temporalLabel and collectCommemorations also now recognize any named temporal identity (not just Ember days), so a saint winning outright on one of these days still surfaces the day's own real name as a commemoration. A broader audit of every ALWAYS_OVERRIDE_TEMPORAL_IDS entry found the same class of gap elsewhere: Corpus Christi and Sacred Heart were completely unauthored across collect/Benedictus/Magnificat/Matins reading, and Ascension/Trinity Sunday/Christ the King were missing pieces too. All authored now, live-verified against the reference engine. Added a general fallback in resolve-common.ts (missing day-specific content degrades to the coarse Sunday's own instead of rendering blank) so this class of gap degrades gracefully if it recurs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lu3sgMFpwud3CerW9r6LYc
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { resolveDay } from '../../src/calendar';
|
||||
import { resolveEveningDay } from '../../src/calendar/vespers';
|
||||
import { getDayLabel, getVespersStatusLabel } from '../../src/calendar/day-label';
|
||||
import { getDayLabel, getVespersStatusLabel, temporalLabel } from '../../src/calendar/day-label';
|
||||
import type { LiturgicalDay } from '../../src/calendar/types';
|
||||
|
||||
describe('getDayLabel — ordinal temporal label', () => {
|
||||
@@ -452,3 +452,54 @@ describe('getDayLabel/getVespersStatusLabel — Vespers evening with a temporal
|
||||
expect(getVespersStatusLabel(day, '2026-08-17').en).toBe('Second Vespers (of today)');
|
||||
});
|
||||
});
|
||||
|
||||
// Every day from Passion Sunday through Holy Saturday used to render the
|
||||
// same generic "Weekday in Passiontide" label (no `passiontide` entry in
|
||||
// ORDINAL_SEASONS) -- fixed 2026-09-06 by giving each of the 14 days its
|
||||
// own real winner id (calendar/movable-feasts.ts's anchor-based override,
|
||||
// same mechanism Corpus Christi/Ascension already use) plus a
|
||||
// temporal-feasts display record. Checked via `getDayLabel` (the actual
|
||||
// on-screen header), not `temporalLabel` (which recomputes the plain
|
||||
// temporal identity straight from `resolveTemporalId`, ignoring any
|
||||
// winner-id override, so it still shows the old generic phrase here on
|
||||
// purpose -- a different, narrower function, not itself part of this
|
||||
// fix). A `startsWith` check (not exact equality) tolerates a real
|
||||
// same-day sanctoral winner/commemoration riding along -- some of these
|
||||
// 2026 dates are won outright by a real Duplex+ saint (St. Gabriel the
|
||||
// Archangel, the Annunciation) or carry a transferred-away saint, which
|
||||
// is expected/correct (see calendar/movable-feasts.ts's Passiontide
|
||||
// override doc comment), not a bug in this labeling fix.
|
||||
describe('getDayLabel — Passiontide (Passion Sunday through Holy Saturday)', () => {
|
||||
it.each([
|
||||
['2026-03-22', 'Passion Sunday'],
|
||||
['2026-03-23', 'Monday of Passion Week'],
|
||||
['2026-03-24', 'Tuesday of Passion Week'],
|
||||
['2026-03-25', 'Wednesday of Passion Week'],
|
||||
['2026-03-26', 'Thursday of Passion Week'],
|
||||
['2026-03-27', 'Friday of Passion Week'],
|
||||
['2026-03-28', 'Saturday of Passion Week'],
|
||||
['2026-03-29', 'Palm Sunday'],
|
||||
['2026-03-30', 'Monday of Holy Week'],
|
||||
['2026-03-31', 'Tuesday of Holy Week'],
|
||||
['2026-04-01', 'Spy Wednesday'],
|
||||
['2026-04-02', 'Maundy Thursday'],
|
||||
['2026-04-03', 'Good Friday'],
|
||||
['2026-04-04', 'Holy Saturday'],
|
||||
])('%s has its own distinct name starting with "%s", not a generic weekday-in-Passiontide phrase', (date, expectedName) => {
|
||||
const day = resolveDay(date);
|
||||
const label = getDayLabel(day);
|
||||
if (day.winner.kind === 'temporal') {
|
||||
expect(label.en?.startsWith(expectedName)).toBe(true);
|
||||
}
|
||||
expect(label.en).not.toMatch(/in Passiontide/);
|
||||
expect(label.la?.length).toBeGreaterThan(0);
|
||||
// The plain temporal identity (independent of who wins) is also
|
||||
// always this day's own real name now, via `temporalLabel` directly.
|
||||
expect(temporalLabel(day).en).toBe(expectedName);
|
||||
});
|
||||
|
||||
it('Passion Sunday and Palm Sunday show their real name via getDayLabel on a real date', () => {
|
||||
expect(getDayLabel(resolveDay('2026-03-22')).en).toBe('Passion Sunday (Semiduplex)');
|
||||
expect(getDayLabel(resolveDay('2026-03-29')).en).toBe('Palm Sunday (Semiduplex)');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -128,8 +128,16 @@ describe('the Easter-octave backlog (Palm Sunday through Low Sunday)', () => {
|
||||
// St. George, Semiduplex; St. Fidelis of Sigmaringen, Duplex) is
|
||||
// below duplex-majus.
|
||||
const holyMonday = resolveDay('2033-04-11');
|
||||
expect(holyMonday.winner).toEqual({ kind: 'temporal', id: 'palm-sunday' });
|
||||
expect(holyMonday.commemorations).toEqual([]);
|
||||
// Monday of Holy Week now has its own real winner id (see
|
||||
// calendar/movable-feasts.ts's Passiontide-day override, 2026-09-06)
|
||||
// rather than inheriting Palm Sunday's own coarse id — the override
|
||||
// mechanism pushes a `{kind:'temporal', id:'palm-sunday'}`
|
||||
// commemoration for the coarse id it replaces, same shape every other
|
||||
// movable feast (Ascension, Corpus Christi) already does; harmless,
|
||||
// since day-label.ts's collectCommemorations deliberately drops any
|
||||
// commemoration whose id equals the plain governing weekday.
|
||||
expect(holyMonday.winner).toEqual({ kind: 'temporal', id: 'monday-holy-week' });
|
||||
expect(holyMonday.commemorations).toEqual([{ kind: 'temporal', id: 'palm-sunday' }]);
|
||||
expect(holyMonday.transferredAway?.candidate.id).toBe('st-leo-i');
|
||||
|
||||
for (const afterLowSunday of ['2033-04-25', '2033-04-26', '2033-04-27', '2033-04-28', '2033-04-29']) {
|
||||
|
||||
@@ -319,8 +319,20 @@ describe('getMagnificatAntiphon — classic weekday-default fallback', () => {
|
||||
// tests/hours/vespers.test.ts's own note where this test used to
|
||||
// live. Tests the mechanism directly instead, the same way this
|
||||
// file's other synthetic-day cases do.
|
||||
//
|
||||
// `date` deliberately isn't Jan 1 any more (2026-09-06): getMagnificatAntiphon
|
||||
// now also falls back to `resolveTemporalId(day.date)`'s own antiphon
|
||||
// (see resolve-common.ts's getTemporalProperWithFallback, added for
|
||||
// the Passiontide/movable-feast content-completeness pass) before the
|
||||
// classic weekday default -- Jan 1 resolves to `christmas-octave-
|
||||
// sunday`, which now has real content, so that fallback tier fired
|
||||
// first and hid the one this test means to exercise. `vigil-of-
|
||||
// christmas` (Dec 24) is one of the few remaining coarse ids with no
|
||||
// magnificat-antiphon file of its own (see saturday-passion-week.yml/
|
||||
// holy-saturday.yml for why: an anticipated First Vespers, not an
|
||||
// oversight), so it still reaches the true weekday-default tier.
|
||||
const day: LiturgicalDay = {
|
||||
date: '2026-01-01',
|
||||
date: '2026-12-24',
|
||||
weekday: 'tuesday',
|
||||
season: 'trinitytide',
|
||||
temporalCategory: 'ordinary-feria',
|
||||
|
||||
Reference in New Issue
Block a user