feat: cited overlay data format, generator and loader (#76) #443

Merged
manlycucumber merged 1 commit from feature/76-overlay-data-format into develop 2026-07-02 21:02:36 +00:00
manlycucumber commented 2026-07-02 21:00:17 +00:00 (Migrated from github.com)

Builds the cited data pipeline for particular-calendar overlays (epic #75), so an overlay is authored as cited YAML, compiled to reproducible NDJSON, and read back into the engine — the same born-cited, byte-stable path the base corpus uses. Refs #76.

Generator

  • facts/overlays/<slug>.yaml describes an overlay declaratively: a list of add / suppress / rerank operations over the universal sanctoral (mirrors the PHP OverlayOperation value objects from #77).
  • build.mjs discovers every overlay, validates and provenance-gates it, and emits data/corpus/overlays/<slug>/operations.ndjson (sorted by target) + overlay.json, listed in MANIFEST.overlays. The corpus-verify reproducibility gate now covers 14 files.
  • Born-cited, reused as-is: a rerank/suppress cites the particular calendar's authority (new sspx-ordo reference source); an added feast's title still must cite a public-domain text source. No new provenance rules — the overlay records flow through the existing gate.
  • overlay-operation + overlay JSON Schemas (draft 2020-12), exercised by SchemaValidationTest with valid/invalid fixtures.

Engine

  • CorpusOverlayData rebuilds a CalendarOverlay from the corpus, the overlay counterpart of CorpusSanctoralData. The shared typed row readers are extracted to Corpus\CorpusRecord so both loaders parse corpus rows in one place (the sanctoral loader is refactored to delegate; behaviour unchanged).
  • Corpus gains overlaySlugs() / overlayMeta() / overlayOperations().

What it ships

The SSPX overlay's two fixed-date elevations — St Pius X (Sep 3) and the Seven Sorrows (Sep 15) to first class — cited to the SSPX ordo. Layered through OverlaidSanctoralData, the engine resolves both first class with precedence/commemoration logic untouched:

2026-09-03 St Pius X:      base = pius-x (cls 3)              sspx = pius-x (cls 1)
2026-09-15 Seven Sorrows:  base = septem-dolorum-bmv (cls 2)  sspx = septem-dolorum-bmv (cls 1)

Deliberately deferred, documented not dropped (see facts/overlays/sspx.yaml and the SSPX oracle notes): the movable Seven Sorrows (Friday after Passion Sunday) is Easter-relative, beyond a SanctoralData overlay; and the Vigil of the Assumption reads third class in the SSPX feed against a second-class vigil under the 1960 Code of Rubrics (n. 91) — treated as a feed artifact, not conformed to. Both remain in the conformance baseline for #80, which wires the day() selector (#78) into the SSPX oracle as a green gate.

Verification

corpus verify OK (14 files, reproducible + matches committed) · lint + analyse clean · test 693 green (1 pre-existing skip). Commit SSH-signed + DCO.

Builds the **cited data pipeline** for particular-calendar overlays (epic #75), so an overlay is authored as cited YAML, compiled to reproducible NDJSON, and read back into the engine — the same born-cited, byte-stable path the base corpus uses. Refs #76. ## Generator - `facts/overlays/<slug>.yaml` describes an overlay declaratively: a list of `add` / `suppress` / `rerank` operations over the universal sanctoral (mirrors the PHP `OverlayOperation` value objects from #77). - `build.mjs` discovers every overlay, validates and provenance-gates it, and emits `data/corpus/overlays/<slug>/operations.ndjson` (sorted by target) + `overlay.json`, listed in `MANIFEST.overlays`. The `corpus-verify` reproducibility gate now covers 14 files. - **Born-cited, reused as-is:** a `rerank`/`suppress` cites the particular calendar's authority (new `sspx-ordo` reference source); an `add`ed feast's title still must cite a public-domain text source. No new provenance rules — the overlay records flow through the existing gate. - `overlay-operation` + `overlay` JSON Schemas (draft 2020-12), exercised by `SchemaValidationTest` with valid/invalid fixtures. ## Engine - `CorpusOverlayData` rebuilds a `CalendarOverlay` from the corpus, the overlay counterpart of `CorpusSanctoralData`. The shared typed row readers are extracted to `Corpus\CorpusRecord` so both loaders parse corpus rows in one place (the sanctoral loader is refactored to delegate; behaviour unchanged). - `Corpus` gains `overlaySlugs()` / `overlayMeta()` / `overlayOperations()`. ## What it ships The **SSPX overlay's two fixed-date elevations** — St Pius X (Sep 3) and the Seven Sorrows (Sep 15) to first class — cited to the SSPX ordo. Layered through `OverlaidSanctoralData`, the engine resolves both first class with precedence/commemoration logic untouched: ``` 2026-09-03 St Pius X: base = pius-x (cls 3) sspx = pius-x (cls 1) 2026-09-15 Seven Sorrows: base = septem-dolorum-bmv (cls 2) sspx = septem-dolorum-bmv (cls 1) ``` **Deliberately deferred, documented not dropped** (see `facts/overlays/sspx.yaml` and the SSPX oracle notes): the movable Seven Sorrows (Friday after Passion Sunday) is Easter-relative, beyond a `SanctoralData` overlay; and the Vigil of the Assumption reads third class in the SSPX feed against a second-class vigil under the 1960 Code of Rubrics (n. 91) — treated as a feed artifact, not conformed to. Both remain in the conformance baseline for #80, which wires the `day()` selector (#78) into the SSPX oracle as a green gate. ## Verification `corpus verify` OK (14 files, reproducible + matches committed) · `lint` + `analyse` clean · `test` 693 green (1 pre-existing skip). Commit SSH-signed + DCO.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Directorium/Core!443
No description provided.