Fix octave-day office content: use the octave's own feast, not the plain ferial
Deploy / deploy (push) Successful in 52s
Deploy / deploy (push) Successful in 52s
Real, multi-part bug found by looking closely at today's rendering (day 3
of St. Lawrence's octave, St. Clare commemorated): the psalmody
antiphons, hymn, chapter/responsory/versicle, Benedictus antiphon, and
day collect were all keyed off `day.winner` directly, which stays the
plain temporal identity (post-pentecost-11) throughout an octave --
St. Lawrence's own already-authored psalmody override and collect never
engaged on any day but his actual feast day. Live-verified (Tridentine
1910, 2026-08-12) that the whole office on an ordinary octave day
actually comes from the octave's own feast ("{ex Commune aut Festo}" /
"{ex Proprio Sanctorum}"), with a *weaker* commemorated saint (Clare)
getting a separate Ant+V/R+collect block of her own alongside it.
Fixed with a new resolveOfficeWinner(day) in hours/resolve-common.ts,
used everywhere getDayCollect/getDayCollects/getBenedictusAntiphon/
getPsalmodyOverrideFor used to read day.winner directly. Deliberately
gated on temporalCategory === 'ordinary-feria' (the day has no standing
of its own) rather than "any active octave" -- the Christmas Octave's
own stacked octaves are the live-verified counterexample where the
*temporal* day keeps the office instead, each octave becoming its own
separate commemoration block (not yet modeled, flagged in TODO.md).
Also fixes the ferial Preces gate (added in the previous commit) to
exclude active octaves the same way the suffrages already do --
live-verified "Preces Feriales{omittitur}" on the same date.
getDayCollects now renders a sanctoral commemoration as a real
Ant+V/R+collect bundle when authored (${propers}-commemoration.yml),
not just a bare, unlabeled collect -- the old rendering was indeed the
confusing "PRAYER / (translation pending)" block spotted today, which
was St. Clare's placeholder with no indication whose it was or why.
Authored her real commemoration bundle and standalone collect from the
same live query rather than leaving it pending.
One correction to a guess floated mid-session: the Benedictus antiphon
does NOT go to the commemorated saint (Clare) -- live-verified it stays
with the octave's own feast (Lawrence's "In cratícula"), same as
everything else in the primary office; only the separate commemoration
block is Clare's.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -73,13 +73,27 @@ describe('Lauds psalmody override (duplex-majus+ sanctoral, and Marian Saturday)
|
||||
'He hath made us',
|
||||
);
|
||||
|
||||
// Two extra collects: the commemorated Sunday's own, and the Simplex
|
||||
// saint already commemorated under that Sunday before Christ the King
|
||||
// displaced it too -- see tests/calendar/christ-the-king.test.ts.
|
||||
// One extra collect (the commemorated Sunday's own, still an
|
||||
// unlabeled 'prayer' -- a temporal commemoration, not a sanctoral
|
||||
// one) plus the Simplex saint already commemorated under that Sunday
|
||||
// before Christ the King displaced it too, now a labeled 'preces'
|
||||
// block rather than a third bare 'prayer' -- see
|
||||
// tests/calendar/christ-the-king.test.ts.
|
||||
const collects = ordo.parts.filter((p) => p.kind === 'prayer');
|
||||
expect(collects.length).toBe(3);
|
||||
expect(collects.length).toBe(2);
|
||||
const sanctoralCommemoration = ordo.parts.find(
|
||||
(p) => p.kind === 'preces' && p.label?.startsWith('Commemoration of'),
|
||||
);
|
||||
expect(sanctoralCommemoration).toBeDefined();
|
||||
|
||||
const suffrages = ordo.parts.filter((p) => p.kind === 'preces' && p.label && p.label !== 'Salve Regina');
|
||||
const SUFFRAGE_LABELS = new Set([
|
||||
'Of the Holy Cross',
|
||||
'Of the Blessed Virgin Mary',
|
||||
'Of St. Joseph',
|
||||
'Of the Holy Apostles Peter and Paul',
|
||||
'For Peace',
|
||||
]);
|
||||
const suffrages = ordo.parts.filter((p) => p.kind === 'preces' && p.label && SUFFRAGE_LABELS.has(p.label));
|
||||
expect(suffrages).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -194,20 +194,36 @@ describe('resolveOrdo("lauds", ...)', () => {
|
||||
it('resolves both the winners collect and a commemorated saints collect on a day with a real commemoration', () => {
|
||||
// 2025-11-30: Advent I (the winner) with St. Andrew, Duplex II. classis,
|
||||
// commemorated alongside it (see tests/calendar/day-label.test.ts) --
|
||||
// an octave commemoration (like LAWRENCE_OCTAVE_DAY's) never
|
||||
// contributes a collect (none authored yet), so this needs a real
|
||||
// sanctoral/temporal commemoration instead to exercise getDayCollects
|
||||
// pushing a second entry.
|
||||
// he has only a bare collect authored (no st-andrew-commemoration.yml
|
||||
// Ant+V/R bundle yet), so this renders as a labeled 'preces' block
|
||||
// (see resolve-common.ts's sanctoralCommemorationPart), not a second
|
||||
// unlabeled 'prayer' the way it used to.
|
||||
const ordo = resolveOrdo('lauds', '2025-11-30');
|
||||
const collects = ordo.parts.filter((p) => p.kind === 'prayer');
|
||||
expect(collects.length).toBe(2);
|
||||
expect(collects[1]?.kind === 'prayer' ? collects[1].text.text.en : undefined).toContain('Andrew');
|
||||
expect(collects.length).toBe(1);
|
||||
const andrewCommemoration = ordo.parts.find((p) => p.kind === 'preces' && p.label?.includes('Andrew'));
|
||||
expect(andrewCommemoration?.kind === 'preces' ? andrewCommemoration.text.text.en : undefined).toContain(
|
||||
'Andrew',
|
||||
);
|
||||
});
|
||||
|
||||
it("skips a straight octave commemoration for collect purposes (no octave collect authored)", () => {
|
||||
const ordo = resolveOrdo('lauds', LAWRENCE_OCTAVE_DAY);
|
||||
it("gives St. Lawrence's octave day 2 the full Lawrence office (per resolveOfficeWinner), no Clare commemoration since she's only assigned Aug 12 specifically", () => {
|
||||
const ordo = resolveOrdo('lauds', LAWRENCE_OCTAVE_DAY); // 2026-08-11, day 2
|
||||
const collects = ordo.parts.filter((p) => p.kind === 'prayer');
|
||||
expect(collects.length).toBe(1);
|
||||
expect(collects[0]?.kind === 'prayer' ? collects[0].text.text.en : undefined).toContain('Lawrence');
|
||||
expect(ordo.parts.some((p) => p.kind === 'preces' && p.label?.includes('Clare'))).toBe(false);
|
||||
});
|
||||
|
||||
it("gives St. Lawrence's octave day 3 (Aug 12) St. Clare's own commemoration bundle alongside Lawrence's own office", () => {
|
||||
const ordo = resolveOrdo('lauds', '2026-08-12');
|
||||
const collects = ordo.parts.filter((p) => p.kind === 'prayer');
|
||||
expect(collects.length).toBe(1);
|
||||
expect(collects[0]?.kind === 'prayer' ? collects[0].text.text.en : undefined).toContain('Lawrence');
|
||||
const clareCommemoration = ordo.parts.find((p) => p.kind === 'preces' && p.label?.includes('Clare'));
|
||||
expect(clareCommemoration?.kind === 'preces' ? clareCommemoration.text.text.en : undefined).toContain(
|
||||
'kingdom of heaven',
|
||||
);
|
||||
});
|
||||
|
||||
it('includes all five suffrages, in order, on an ordinary ferial day -- Cross from Tridentine 1906/1910, the other four from Monastic 1617', () => {
|
||||
|
||||
Reference in New Issue
Block a user