calendar: model Our Lady's Saturday as a real occurrence outcome
Deploy / deploy (push) Successful in 49s
Deploy / deploy (push) Successful in 49s
On a free Saturday (nothing privileged already claims it, no active octave), the day's own identity is now "Our Lady's Saturday" rather than an anonymous ordinary-feria -- mirrors privileged-feria-minor exactly, per direct instruction: Semiduplex-or-higher still wins outright (Marian Saturday doesn't apply at all); below that (Simplex, and Vigil, both under semiduplex on the FeastClass scale) loses and is commemorated instead. Layered additively after decideOccurrence, same shape as applyOctaves -- never touches decideOccurrence's own rules. Needed a real winner identity (not just the plain temporal feria id) so day-label/antiphon/collect sourcing can recognize it -- added a temporal-feasts record purely for that, and taught getDayLabel to check it for any named temporal winner (a small, free improvement for Christmas/Pentecost's own labels too, previously unhandled). hours: build the duplex-majus+ Lauds psalmody override (per-feast) lauds-psalmody no longer unconditionally uses the plain weekday default: a duplex-majus-or-higher sanctoral winner, or Our Lady's Saturday (unconditional, no rank threshold -- it isn't competing with the weekday default the way a saint is), now substitutes its own proper psalm groups/antiphons/canticle. Per-feast, not per-Common, per direct instruction, even though most duplex-majus+ saints across the year don't have one authored yet and fall back to the plain weekday default until they do. Content for the worked example (St. Lawrence's own day) surfaced a real bug while sourcing it: st-lawrence-antiphon.yml had been read from the Roman/secular rite's own [Ant 1], not Monastic 1617's actual Benedictus antiphon for that day -- corrected from a fresh live query. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
/** Same shape as data/hours/lauds-antiphons.yml's per-weekday entries
|
||||
* (see hours/lauds.ts) — a whole-block substitute for the plain ferial
|
||||
* weekday psalmody, keyed by id: either a saint's own id (gated at
|
||||
* duplex-majus+, see hours/lauds.ts's getPsalmodyOverrideFor) or the
|
||||
* literal 'marian-saturday' (applies unconditionally whenever it wins).
|
||||
* Deliberately per-feast, not per-Common — explicit choice, even though
|
||||
* it means most duplex-majus+ saints across the year don't have one of
|
||||
* these authored yet and fall back to the plain weekday default until
|
||||
* they do (same "mechanism first, content incrementally" pattern as
|
||||
* everywhere else — not a bug, an expected, honest gap). */
|
||||
export interface LaudsPsalmodyOverride {
|
||||
id: string;
|
||||
groups: { psalms: number[]; antiphon: Partial<Record<string, string>> }[];
|
||||
canticle: { id: string; antiphon: Partial<Record<string, string>> };
|
||||
laudate: { antiphon: Partial<Record<string, string>> };
|
||||
}
|
||||
|
||||
const modules = import.meta.glob<{ default: LaudsPsalmodyOverride }>(
|
||||
'../data/hours/lauds-psalmody-overrides/*.yml',
|
||||
{ eager: true },
|
||||
);
|
||||
|
||||
const overrides = new Map<string, LaudsPsalmodyOverride>();
|
||||
for (const mod of Object.values(modules)) {
|
||||
overrides.set(mod.default.id, mod.default);
|
||||
}
|
||||
|
||||
export function getLaudsPsalmodyOverride(id: string): LaudsPsalmodyOverride | undefined {
|
||||
return overrides.get(id);
|
||||
}
|
||||
Reference in New Issue
Block a user