Resolve 15 "unwinnable" stubs' Benedictus antiphons from source directly
Deploy / deploy (push) Successful in 55s
Deploy / deploy (push) Successful in 55s
Direct feedback on the previous commit's framing: "unwinnable" was describing an artifact of Divinum Officium's own single-winner precedence model, not a real content gap -- this app already renders commemorated saints on their own terms and doesn't need a saint to win a live query to have real content. Fixed by reading each of the 15 saints' own already-validated fileref directly (the exact same fileref their collect was already sourced from during the Kalendaria-table pull) for its [Ant 1] section, falling back to whatever Common its own [Rule]/[Rank] "vide"/"ex CXX" reference names when there isn't one -- the same proper-then-Common shape getDayCollect/collectCommon already uses, just applied to the Benedictus antiphon too. 14 of the 15 had no [Ant 1] of their own at all -- clean Common fallback, and every one of their C-numbers falls inside a family already live-query-verified in the previous commit, so minorHoursCommon/benedictusCommon were wired directly with full confidence: St. Marcus, St. Felix (Presbyter), St. Hermes, St. Saturninus, St. Prisca, St. Thecla, St. Catherine of Siena, Ss. Machabees, Ss. Marius/Martha/Audifax/Abachum, Ss. Twelve Brothers, Ss. Alexander/Eventius/Theodulus/Juvenal, Ss. Felix/Simplicius/ Faustinus/Beatrix, Ss. Nabor and Felix. St. Felicitas needed one new category (C7), but it turned out to be a cross-reference resolving to text byte-identical to the already-verified common-of-a-virgin. The 1 remaining (Ss. Euphemia, Lucy, and Geminian) does have her own real [Ant 1] -- but marked draft, not verified, on principle: St. Alexius's own file also has a genuine [Ant 1] that his actual live-rendered Benedictus antiphon doesn't use (common-of-an-abbot's text instead), so a raw [Ant 1] read alone isn't sufficient proof, and for a saint that can never be live-checked at all that uncertainty can't be resolved either way -- used the text anyway, honestly flagged rather than claimed as confirmed. St. Frances of Rome and St. Bibiana (the older, pre-Kalendaria-table 109-saint pass) are good candidates for this same fix but weren't touched here, since their own fileref was never derived by this session's work. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,17 @@ import {
|
||||
} from '../../src/hours/resolve-common';
|
||||
import type { LiturgicalDay } from '../../src/calendar/types';
|
||||
|
||||
function syntheticSanctoralDay(id: string): LiturgicalDay {
|
||||
return {
|
||||
date: '2026-01-01',
|
||||
weekday: 'thursday',
|
||||
season: 'trinitytide',
|
||||
temporalCategory: 'ordinary-feria',
|
||||
winner: { kind: 'sanctoral', id, name: id, rank: 'simplex' },
|
||||
commemorations: [],
|
||||
};
|
||||
}
|
||||
|
||||
describe('getDayCollect', () => {
|
||||
it('resolves a real, verified collect for an ordinary Sunday', () => {
|
||||
const day = resolveDay('2026-08-09'); // post-pentecost-11
|
||||
@@ -30,20 +41,52 @@ describe('getDayCollect', () => {
|
||||
// Kalendaria-table pull, 2026-08) -- so this exercises the "missing"
|
||||
// path with a synthetic winner rather than hunting for a real
|
||||
// example that no longer exists.
|
||||
const day: LiturgicalDay = {
|
||||
date: '2026-01-01',
|
||||
weekday: 'thursday',
|
||||
season: 'trinitytide',
|
||||
temporalCategory: 'ordinary-feria',
|
||||
winner: { kind: 'sanctoral', id: 'example-confessor', name: 'Example Confessor (placeholder)', rank: 'simplex' },
|
||||
commemorations: [],
|
||||
};
|
||||
const collect = getDayCollect(day);
|
||||
const collect = getDayCollect(syntheticSanctoralDay('example-confessor'));
|
||||
expect(collect.status.la).toBe('missing');
|
||||
expect(collect.status.en).toBe('missing');
|
||||
});
|
||||
});
|
||||
|
||||
describe('genuinely unwinnable stubs still get a Benedictus antiphon (2026-08)', () => {
|
||||
// These saints are always commemorated, never the day's own rendered
|
||||
// title (see e.g. st-marcus.yml's own comment) -- so unlike the rest of
|
||||
// this project's content, their own [Ant 1] (or lack of one) had to be
|
||||
// pulled directly from source rather than confirmed against a live
|
||||
// Lauds query, since no such query is ever possible for them. A
|
||||
// synthetic winner is used here for the same reason: resolveDay would
|
||||
// never actually pick one of these as day.winner.
|
||||
it("resolves via its Common category when the saint's own file has no [Ant 1] at all", () => {
|
||||
// St. Marcus -- [Rule] says "vide C4b" with no override; C4b is a
|
||||
// whole-file inherit of C4 (just the title relabeled "of the Popes"),
|
||||
// the same family already live-query-verified for
|
||||
// common-of-a-confessor-bishop.yml.
|
||||
const ben = getBenedictusAntiphon(syntheticSanctoralDay('st-marcus'));
|
||||
expect(ben.status).toEqual({ la: 'verified', en: 'verified' });
|
||||
});
|
||||
|
||||
it('resolves via a cross-referenced Common category (C7 -> Commune/C6:Ant 2)', () => {
|
||||
// St. Felicitas -- [Rule] says "vide C7", a category this project
|
||||
// hadn't touched before; C7's own [Ant 1] is itself a reference to
|
||||
// Commune/C6:Ant 2, which resolves to text byte-identical to
|
||||
// common-of-a-virgin's own already-verified Benedictus antiphon.
|
||||
const ben = getBenedictusAntiphon(syntheticSanctoralDay('st-felicitas'));
|
||||
expect(ben.status).toEqual({ la: 'verified', en: 'verified' });
|
||||
});
|
||||
|
||||
it("resolves its own file's [Ant 1] as draft, not verified, when it can't be checked against a live rendering", () => {
|
||||
// Ss. Euphemia, Lucy, and Geminian -- her own file *does* have an
|
||||
// [Ant 1], but St. Alexius (a winnable saint checked earlier in this
|
||||
// same 2026-08 pass) proved a real [Ant 1] doesn't always end up the
|
||||
// rendered Benedictus antiphon either (his own live Lauds query uses
|
||||
// common-of-an-abbot's text instead) -- so a raw-file [Ant 1] read is
|
||||
// never enough on its own to claim `verified`, and even less so for a
|
||||
// saint no live query can ever confirm.
|
||||
const ben = getBenedictusAntiphon(syntheticSanctoralDay('ss-euphemia-lucia-and-geminianus'));
|
||||
expect(ben.status).toEqual({ la: 'draft', en: 'draft' });
|
||||
expect(ben.text.la).toContain('Gaudent');
|
||||
});
|
||||
});
|
||||
|
||||
describe('minorHoursCommon/benedictusCommon fallback (2026-08, the 94 propers:null saints)', () => {
|
||||
it('a below-duplex-majus saint still gets a real Benedictus antiphon and P/T/S/N content via its Common category', () => {
|
||||
// St. Anacletus, Semiduplex -- below the duplex-majus+ threshold that
|
||||
|
||||
Reference in New Issue
Block a user