diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-26 09:53:22 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-26 09:53:22 +0200 |
| commit | 8fa9db25f55f4ae92ad6a28115484dd981593a3c (patch) | |
| tree | 8cdc9f253cc1f44759fccc1ca25be7eda950a34a /test/cli.t | |
| parent | 155c2e55948dc179a45458d856808f7105878d1f (diff) | |
| download | colitur-8fa9db25f55f4ae92ad6a28115484dd981593a3c.tar.gz colitur-8fa9db25f55f4ae92ad6a28115484dd981593a3c.zip | |
feat(of): assemble Rite_of.context and wire --rite of into the CLI
Task 5 of Phases 3-5 (the payoff task): bundles Tasks 1-4's separately
built pieces (Temporal_of, Precedence_of, Rubrics_of, Lectionary_of)
into a (Vocab_of.season, Vocab_of.rank) Colitur_kernel.Rite.t, and
wires colitur day/readings --rite of <year> into the CLI. Default
stays ef; every pre-existing invocation is byte-identical (asserted
directly in test/cli.t and against a real v1.0.0 build for three
years, plus git diff --stat v1.0.0..HEAD over lib/rites/rite_ef/,
lib/kernel/, data/ef/ is empty).
No kernel change was needed, confirming the spec's central claim.
season_runs needed real thought rather than the brief's own suggested
Vocab_of.seasons: Temporal_of.season's own 'first run'/'second run'
comments confirm Ordinary Time is genuinely interrupted by Lent and
Easter over one liturgical year, so the expected run-length-compressed
sequence names it twice, six runs over five seasons -- exactly the
case Rite.t.season_runs's own doc comment already names as its
illustration for why this field is rite-supplied rather than derived.
easter/fixed_key are as specified, each carrying its own citation
(Gregorian computus; the 2002 Missal's one bissextilis occurrence is a
leap-year table entry, not a kalends-doubling rule, so fixed_key is
identity).
Follows rite_ef.ml's template and its lectionary-parameter lesson
exactly: lectionary is caller-supplied, not closed over.
test/test_rite_of.ml resolves the real assembled rite (calendar-2002
.sexp + all 13 amendment overlays + lectionary.sexp) through Calendar
and Validate.run, the same discipline test_validate.ml/test_rite_ef.ml
already apply to EF. This is the first time rite_of has been checked
this way, and it surfaced two new, real, cited gaps outside this
task's own scope to fix: Temporal_of never reaches Normae n.35(a)'s
30-December Holy Family fallback in a year with no Sunday in 26-31
December (first hit 1583, the domain floor), and Temporal_of.anchors
disagrees with temporal on 24 December when that date is itself a
Sunday (Advent IV outranks the Vigil, first hit 2006). Both pinned as
known-wrong, not fixed, the same treatment the brief's own pre-known
St Joseph/Palm Sunday gap (Normae n.56(f)) gets, pinned on 2062. A
third gap was found in data/of/lectionary.sexp's own coverage (audited
against one civil year only, so the other weekday-cycle letter is
unaudited and at least one pairing is asymmetric on shipped data) --
that file is excluded from this task, so the wide 2005-2050 sweep
checks structural invariants only and leaves the citation-chain checks
to the small, individually-audited landmark-year set.
make check (COLITUR_EXHAUSTIVE_SWEEP=1): exit 0, 867 tests, ~316s.
Diffstat (limited to 'test/cli.t')
| -rw-r--r-- | test/cli.t | 50 |
1 files changed, 50 insertions, 0 deletions
@@ -199,6 +199,56 @@ A year outside the supported domain is rejected (exit 2): colitur: year 1000 out of range 1583..9999 [2] +Task 5 (2026-08-25-colitur-of-phases-3-5): `--rite ef|of` on `day`/`readings`. +Default stays ef -- every invocation above, written before this flag existed, +must be byte-identical to what it printed before, so this is asserted +directly rather than assumed: `--rite ef` is a no-op, and omitting the flag +entirely resolves to the exact same thing. + + $ colitur day 2026 > /tmp/rite-day-default.out + $ colitur day --rite ef 2026 > /tmp/rite-day-ef.out + $ cmp /tmp/rite-day-default.out /tmp/rite-day-ef.out && echo identical + identical + $ colitur readings 2026 > /tmp/rite-readings-default.out + $ colitur readings --rite ef 2026 > /tmp/rite-readings-ef.out + $ cmp /tmp/rite-readings-default.out /tmp/rite-readings-ef.out && echo identical + identical + $ colitur day --rite ef 2026 --raw | head -1 + 2026-01-01 thursday christmastide - ef-circumcision class-1 white + +The OF rite resolves too, same two commands, its own vocabulary: + + $ colitur day --rite of 2026 | wc -l + 365 + $ colitur day --rite of 2026 | head -1 + 2026-01-01 thursday christmas - of-mary-mother-of-god sollemnitas white + $ colitur day --rite of 2026 | grep -c '^2026-12-25 ' + 1 + $ colitur day --rite of 2026 | grep '^2026-12-25 ' + 2026-12-25 friday christmas - of-nativity sollemnitas white + + $ colitur readings --rite of 2026 | wc -l + 365 + $ colitur readings --rite of 2026 | head -1 + 2026-01-01 of-mary-mother-of-god | Num 6:22-27 | Luc 2:16-21 + +An unrecognised --rite value is a usage error, not a silent fallback to ef +(exit 2): + + $ colitur day --rite tridentine 2026 + colitur: unknown --rite "tridentine" (expected "ef" or "of") + [2] + +`--rite` is refused, not silently ignored, on every command besides +day/readings (exit 2): + + $ colitur easter --rite of 2026 + colitur: --rite has no effect on `easter`; refusing rather than ignoring it + [2] + $ colitur rubrics --rite of 2026 + colitur: --rite has no effect on `rubrics`; refusing rather than ignoring it + [2] + Rubrics (Task 4, celebrant-rubrics-phase1): the day's own Mass formulary, one row per day: date, the formulary's slug (which Mass is actually said, not always the day's own), and how that was decided |
