feat: select a particular calendar via day()/contract() (#78) #444

Merged
manlycucumber merged 1 commit from feature/78-calendar-selector into develop 2026-07-02 21:13:12 +00:00
manlycucumber commented 2026-07-02 21:11:44 +00:00 (Migrated from github.com)

Wires the particular-calendar overlays (#76/#77) into the public API: day() and contract() take an optional $calendar selector, so a caller can resolve a date under the universal 1962 calendar or a particular calendar (SSPX, and future FSSP/ICKSP). Refs #78.

The selector

  • day($date) / contract($date) — universal 1962, unchanged.
  • day($date, 'sspx') / contract($date, false, 'sspx') — under the SSPX calendar. A selector is accepted as either the slug (sspx) or the full overlay URN (introibo:overlay:roman:sspx); an unknown selector throws InvalidArgumentException naming the available calendars.
  • explain($date, 'sspx') carries the selector through the trace path too.

How

  • CalendarCatalog is the seam: given a selector it builds the DayResolver (layering the overlay onto the base sanctoral via OverlaidSanctoralData from #77) and the CalendarDescriptor the contract stamps. The engine is untouched — selecting a calendar only chooses which SanctoralData the resolver reads.
  • The per-year memo now keys on (year, calendar).

Contract calendar block (additive, shape-stable)

The reserved day-level calendar block gains a particular sub-key naming the selected calendar; it stays null under the universal calendar, so the default output shape and its golden digest are unmoved (the golden-year and stable-identifier tests pass unchanged). The overlay also travels on the corpusVersion axis (base+overlayId) — particular is the structured, human-readable counterpart.

"calendar": { "particular": { "id": "introibo:overlay:roman:sspx", "name": "Society of Saint Pius X" } }

docs/design/output-contract.md documents the now-partly-filled block, with the reserved astronomical/lectionary fields joining particular at v0.4.

Verification

lint + analyse clean · introibo-core 703 green · validation 22 green (1 pre-existing skip). Default (universal) output byte-for-byte unchanged; under SSPX, St Pius X (Sep 3) and the Seven Sorrows (Sep 15) resolve first class. Commit SSH-signed + DCO.

Next: #80 wires this selector into the SSPX oracle as a green conformance gate.

Wires the particular-calendar overlays (#76/#77) into the public API: `day()` and `contract()` take an optional `$calendar` selector, so a caller can resolve a date under the universal 1962 calendar **or** a particular calendar (SSPX, and future FSSP/ICKSP). Refs #78. ## The selector - `day($date)` / `contract($date)` — universal 1962, **unchanged**. - `day($date, 'sspx')` / `contract($date, false, 'sspx')` — under the SSPX calendar. A selector is accepted as either the slug (`sspx`) or the full overlay URN (`introibo:overlay:roman:sspx`); an unknown selector throws `InvalidArgumentException` naming the available calendars. - `explain($date, 'sspx')` carries the selector through the trace path too. ## How - **`CalendarCatalog`** is the seam: given a selector it builds the `DayResolver` (layering the overlay onto the base sanctoral via `OverlaidSanctoralData` from #77) and the `CalendarDescriptor` the contract stamps. **The engine is untouched** — selecting a calendar only chooses which `SanctoralData` the resolver reads. - The per-year memo now keys on `(year, calendar)`. ## Contract `calendar` block (additive, shape-stable) The reserved day-level `calendar` block gains a `particular` sub-key naming the selected calendar; it stays `null` under the universal calendar, so **the default output shape and its golden digest are unmoved** (the golden-year and stable-identifier tests pass unchanged). The overlay also travels on the `corpusVersion` axis (`base+overlayId`) — `particular` is the structured, human-readable counterpart. ```json "calendar": { "particular": { "id": "introibo:overlay:roman:sspx", "name": "Society of Saint Pius X" } } ``` `docs/design/output-contract.md` documents the now-partly-filled block, with the reserved astronomical/lectionary fields joining `particular` at v0.4. ## Verification `lint` + `analyse` clean · `introibo-core` 703 green · `validation` 22 green (1 pre-existing skip). Default (universal) output byte-for-byte unchanged; under SSPX, St Pius X (Sep 3) and the Seven Sorrows (Sep 15) resolve first class. Commit SSH-signed + DCO. Next: #80 wires this selector into the SSPX oracle as a green conformance gate.
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!444
No description provided.