Fix Matins bible-plan readings stuck on stale "translation pending"

resolveReading() in bible-plan.ts preferred each YAML row's hardcoded
status: { la: missing, en: missing } over computing status from the
actually-resolved text. That field was accurate before the Vulgate/
Douay-Rheims bulk import but was never cleared once real text landed,
so every Matins bible-plan reading kept showing as untranslated
regardless. Strip the stale field from all 368 files so status falls
through to the real compute-from-resolved-text path.

Also alias book abbreviations in scripture/index.ts's lookup: the
bulk-imported store uses Vulgate-numbering codes (sap, jac, joan,
1reg..4reg, 1par/2par, 1esdr/2esdr, ...) matching octave-readings.ts's
existing convention, while bible-plan.ts's TSV import used common
English abbreviations (kgs, sam, chr, john, jas, luke, mark, ...) for
the ~30 books where the two conventions diverge. Alias at the lookup
layer so citations keep their familiar English display form.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Je2mXNHoXmi1DS3xEL67rH
This commit is contained in:
2026-09-03 05:43:07 -04:00
parent 5ebb856de7
commit 63f48d26d2
370 changed files with 44 additions and 802 deletions
+4 -4
View File
@@ -86,9 +86,9 @@ describe('resolveOrdo("matins", ...) ferial (1-nocturn) branch', () => {
expect(lessons).toHaveLength(2);
const citations = lessons.map((l) => (l as { text: { citation?: { en?: string } } }).text.citation?.en);
expect(citations).toEqual(['Isa 6; Isa 7', 'Sap 2']);
// Real content isn't imported yet (Vulgate/Douay-Rheims bulk import is
// a deferred follow-on) — honest `missing`, not fabricated text.
expect((lessons[0] as { text: { status: { en?: string } } }).text.status.en).toBe('missing');
// The Vulgate/Douay-Rheims bulk import (2026-09-03) landed the real
// text for these passages.
expect((lessons[0] as { text: { status: { en?: string } } }).text.status.en).toBe('verified');
});
it("adds a 3rd reading for a commemorated saint, generously surfaced per the 'commemorations get their own reading' design (see hours/matins.ts's own header)", () => {
@@ -106,7 +106,7 @@ describe('resolveOrdo("matins", ...) ferial (1-nocturn) branch', () => {
expect(lessons).toHaveLength(3);
const citations = lessons.map((l) => (l as { text: { citation?: { en?: string } } }).text.citation?.en);
expect(citations).toEqual(['Isa 6; Isa 7', 'Sap 2', undefined]);
expect((lessons[0] as { text: { status: { en?: string } } }).text.status.en).toBe('missing');
expect((lessons[0] as { text: { status: { en?: string } } }).text.status.en).toBe('verified');
});
it("matches the first reading (Isaiah) against the seeded per-book responsory pool", () => {