chore: add an optional Divinum Officium Perl oracle adapter (#50) #430

Merged
manlycucumber merged 1 commit from chore/50-divinum-officium-oracle into develop 2026-07-02 18:28:44 +00:00
manlycucumber commented 2026-07-02 18:26:40 +00:00 (Migrated from github.com)

Closes #50.

Adds Divinum Officium (DO) as an optional tertiary oracle in the validation harness (#45), after Computus (#46), missalemeum (#47/#48), and SSPX (#49).

Why optional

DO is an independent Perl implementation of the traditional office/calendar — a strong cross-check, but Perl + a DO checkout are heavyweight. Per the issue, the core suite must have no Perl requirement, so this oracle runs only when a checkout is configured and skips gracefully otherwise. (The live site is Cloudflare-gated, confirming DO is a local oracle, not an HTTP one.)

What's verified where — honest split

Behaviour Where
extractClass() parser (DO office → 1960 class 1..4) CI — unit-tested against representative DO N. classis output (10 cases)
Graceful skip + actionable reason when DO absent CI
Live engine ↔ DO comparison over a contested sample Maintainer — runs only where DO is installed

The live end-to-end path can't run in CI (no Perl/DO; DO isn't meant for automated network access), so it's maintainer-verified. To prevent silent rot, the parser is covered directly, and the live test fails loudly ("no class was parsed") if DO is present but its output no longer matches — never a silent pass.

What's here

  • tools/oracles/divinum-officium-bridge.pl — thin wrapper invoking DO's own headless entry point exactly as DO's regress/scripts/generate-diff.sh does: perl officium.pl "version=Rubrics 1960 - 1960" "command=prayMatutinum" "date=MM-DD-YYYY". (Perl syntax-checked; error paths smoke-tested.)
  • tests/Validation/DivinumOfficiumOracle.php — availability gate (DIVINUM_OFFICIUM_PATH + perl), proc_open bridge invocation, and the pure extractClass() parser.
  • tests/Validation/DivinumOfficiumOracleTest.php — parser data-provider tests + skip-path test (both CI) + the maintainer-gated live comparison.
  • tools/oracles/README-divinum-officium.md — setup (git clone …, DIVINUM_OFFICIUM_PATH=… phpunit --filter DivinumOfficiumOracleTest).

Sample

The contested sample is deliberately unambiguous (Epiphany, Maundy Thursday, Easter, Pentecost, Assumption, All Saints, Nativity, St Pius X III-class, plus a commemoration-grade feria) — great feasts any correct 1960 engine agrees on, plus guard days for the two bugs the harness already caught (#422 Triduum, #424 commemoration-grade). Kept away from the corpus-rank grey area so a maintainer's DO run is a clean pass/fail.

Gate: lint clean, analyse [OK], test 641 passing (1 skipped: the maintainer-gated live test).

Closes #50. Adds **Divinum Officium** (DO) as an **optional** tertiary oracle in the validation harness (#45), after Computus (#46), missalemeum (#47/#48), and SSPX (#49). ## Why optional [DO](https://github.com/DivinumOfficium/divinum-officium) is an independent Perl implementation of the traditional office/calendar — a strong cross-check, but Perl + a DO checkout are heavyweight. Per the issue, the core suite must have **no Perl requirement**, so this oracle runs only when a checkout is configured and **skips gracefully** otherwise. (The live site is Cloudflare-gated, confirming DO is a *local* oracle, not an HTTP one.) ## What's verified where — honest split | Behaviour | Where | |---|---| | `extractClass()` parser (DO office → 1960 class `1..4`) | **CI** — unit-tested against representative DO `N. classis` output (10 cases) | | Graceful skip + actionable reason when DO absent | **CI** | | Live engine ↔ DO comparison over a contested sample | **Maintainer** — runs only where DO is installed | The live end-to-end path can't run in CI (no Perl/DO; DO isn't meant for automated network access), so it's **maintainer-verified**. To prevent silent rot, the parser is covered directly, and the live test **fails loudly** ("no class was parsed") if DO is present but its output no longer matches — never a silent pass. ## What's here - `tools/oracles/divinum-officium-bridge.pl` — thin wrapper invoking DO's own headless entry point exactly as DO's `regress/scripts/generate-diff.sh` does: `perl officium.pl "version=Rubrics 1960 - 1960" "command=prayMatutinum" "date=MM-DD-YYYY"`. (Perl syntax-checked; error paths smoke-tested.) - `tests/Validation/DivinumOfficiumOracle.php` — availability gate (`DIVINUM_OFFICIUM_PATH` + `perl`), `proc_open` bridge invocation, and the pure `extractClass()` parser. - `tests/Validation/DivinumOfficiumOracleTest.php` — parser data-provider tests + skip-path test (both CI) + the maintainer-gated live comparison. - `tools/oracles/README-divinum-officium.md` — setup (`git clone …`, `DIVINUM_OFFICIUM_PATH=… phpunit --filter DivinumOfficiumOracleTest`). ## Sample The contested sample is deliberately unambiguous (Epiphany, Maundy Thursday, Easter, Pentecost, Assumption, All Saints, Nativity, St Pius X III-class, plus a commemoration-grade feria) — great feasts any correct 1960 engine agrees on, plus **guard days for the two bugs the harness already caught** (#422 Triduum, #424 commemoration-grade). Kept away from the corpus-rank grey area so a maintainer's DO run is a clean pass/fail. Gate: `lint` clean, `analyse` [OK], `test` 641 passing (1 skipped: the maintainer-gated live test).
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!430
No description provided.