Give temporal commemorations at Lauds/Vespers a real Ant+V/R+collect bundle

getDayCollects previously rendered a commemorated Sunday/privileged
feria (calendar/commemorations.ts's ordinary-sunday/privileged-sunday/
privileged-feria-minor branches) as a bare, unlabeled collect -- no
antiphon, no versicle, no indication it was even a commemoration. Only
sanctoral commemorations had gotten the fuller bundle treatment
(2026-08-30 pass). Adds temporalCommemorationPart, reusing the temporal
day's own benedictus/magnificat antiphon and weekday-keyed versicle (the
same content it would use had it won outright), falling back to a
labeled bare collect or honest "missing" block when no antiphon is
authored for that id.

Verified live for Nov 1, 2026 (All Saints on a Sunday): both Lauds and
Vespers now show "Commemoration of The 22nd Sunday after Trinity" with
real antiphon and versicle instead of a silent bare prayer.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LGsATZvfnpQ81HQuoF5JuL
This commit is contained in:
2026-09-05 20:07:05 -04:00
parent a095ed8e31
commit 7f97934282
5 changed files with 69 additions and 26 deletions
@@ -27,21 +27,24 @@ describe('Advent 4 Sunday landing on Dec 24 (the Vigil of Christmas)', () => {
expect(day.commemorations).toEqual([{ kind: 'temporal', id: 'advent-4' }]);
});
it("Lauds carries both collects (Vigil's own, then Advent 4's commemorated) and the Vigil's own proper antiphons/Benedictus antiphon", () => {
it("Lauds carries the Vigil's own collect plus Advent 4's commemorated Ant+V/R+collect bundle, and the Vigil's own proper antiphons/Benedictus antiphon", () => {
const lauds = resolveOrdo('lauds', '2023-12-24');
const collects = lauds.parts.filter((p) => p.kind === 'prayer');
expect(collects).toHaveLength(2);
for (const c of collects) {
if (c.kind !== 'prayer') continue;
expect(c.text.status.la).toBe('verified');
expect(c.text.status.en).toBe('verified');
const ownCollect = lauds.parts.find((p) => p.kind === 'prayer');
expect(ownCollect?.kind).toBe('prayer');
if (ownCollect?.kind === 'prayer') {
expect(ownCollect.text.status.la).toBe('verified');
expect(ownCollect.text.status.en).toBe('verified');
expect(ownCollect.text.text.la).toContain('Deus, qui nos redemptiónis nostræ');
}
// Advent 4's own real standing gets the fuller Ant+V/R+collect
// commemoration bundle (see resolve-common.ts's temporalCommemorationPart),
// not a bare collect -- same treatment a sanctoral commemoration gets.
const commemoration = lauds.parts.find((p) => p.kind === 'preces' && p.label?.startsWith('Commemoration of'));
expect(commemoration?.kind).toBe('preces');
if (commemoration?.kind === 'preces') {
expect(commemoration.text.text.la).toContain('Excita, quǽsumus, Dómine');
}
expect(collects[0]!.kind === 'prayer' ? collects[0]!.text.text.la : undefined).toContain(
'Deus, qui nos redemptiónis nostræ',
);
expect(collects[1]!.kind === 'prayer' ? collects[1]!.text.text.la : undefined).toContain(
'Excita, quǽsumus, Dómine',
);
const benedictus = lauds.parts.find((p) => p.kind === 'canticle' && p.canticleId === 'benedictus');
expect(benedictus?.kind).toBe('canticle');