Fix Vespers concurrentia to compare today's rank against tomorrow's directly
Deploy / deploy (push) Successful in 1m27s

keepsOwnSecondVespers used a fixed duplex-2-classis floor on today's rank
alone, so a lower-ranked but still-real sanctoral winner (e.g. Simplex)
tomorrow could still steal First Vespers from a higher-ranked-but-below-the-
floor winner today (semiduplex St. Raymond Nonnatus losing to simplex St.
Giles on 2026-08-31). The real "De Concurrentia Officii" rubric compares the
two days' ranks directly, with ties going to tomorrow — replace the floor
with that comparison when both sides have a real sanctoral winner, keeping
the floor only as a fallback against a plain Sunday.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014QEe9oTbn1UjQVAYcCoW1a
This commit is contained in:
2026-08-31 22:01:33 -04:00
parent 06fc8ef0ec
commit e0156c1512
2 changed files with 70 additions and 10 deletions
+25
View File
@@ -90,4 +90,29 @@ describe('resolveEveningDay', () => {
expect(day.date).toBe('2026-08-24');
expect(day.commemorations).toContainEqual(expect.objectContaining({ kind: 'sanctoral', id: 'st-louis' }));
});
it('a higher-ranked today keeps its own Second Vespers against a lower-ranked tomorrow, even below the old duplex-2-classis floor', () => {
// Aug 31, 2026: St. Raymond Nonnatus (Semiduplex) vs. Sep 1's St. Giles
// (Simplex). Raymond outranks Giles, so Raymond should keep his own
// evening even though Semiduplex never cleared the old fixed
// duplex-2-classis floor -- the real "De Concurrentia Officii" rule is a
// direct comparison against tomorrow's rank, not a fixed threshold on
// today alone. Reported by the user 2026-08-31.
const day = resolveEveningDay('2026-08-31');
expect(day.date).toBe('2026-08-31');
expect(day.winner).toMatchObject({ kind: 'sanctoral', id: 'st-raymond-nonnatus' });
expect(day.commemorations).toContainEqual(expect.objectContaining({ kind: 'sanctoral', id: 'st-giles', vespersNote: 'tomorrow' }));
});
it('an exact rank tie goes to tomorrow, per the rubric\'s tie-break', () => {
// Aug 25, 2026: St. Louis (Simplex) vs. Aug 26's St. Zephyrinus (also
// Simplex) -- live-verified (see hasFirstVespers's own doc comment):
// "Vespera de sequenti; nihil de præcedenti." Tomorrow wins on the tie,
// and Louis (Simplex) is excluded from commemoration, same as any other
// Simplex predecessor.
const day = resolveEveningDay('2026-08-25');
expect(day.date).toBe('2026-08-26');
expect(day.winner).toMatchObject({ kind: 'sanctoral', id: 'st-zephyrinus' });
expect(day.commemorations.some((c) => c.kind === 'sanctoral' && c.id === 'st-louis')).toBe(false);
});
});