aboutsummaryrefslogtreecommitdiff
path: root/lib/rites/rite_of/rite_of.mli
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-26 09:53:22 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-26 09:53:22 +0200
commit8fa9db25f55f4ae92ad6a28115484dd981593a3c (patch)
tree8cdc9f253cc1f44759fccc1ca25be7eda950a34a /lib/rites/rite_of/rite_of.mli
parent155c2e55948dc179a45458d856808f7105878d1f (diff)
downloadcolitur-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 'lib/rites/rite_of/rite_of.mli')
-rw-r--r--lib/rites/rite_of/rite_of.mli57
1 files changed, 57 insertions, 0 deletions
diff --git a/lib/rites/rite_of/rite_of.mli b/lib/rites/rite_of/rite_of.mli
new file mode 100644
index 0000000..eeb38d5
--- /dev/null
+++ b/lib/rites/rite_of/rite_of.mli
@@ -0,0 +1,57 @@
+(** The OF (post-1970) rite, bundled: this library's top-level module (its
+ filename matches the library's own name "rite_of", so dune uses it as
+ the library's entry point directly rather than generating one -- see the
+ .ml's own comment). Re-exports every sibling module this library
+ defines, so [Rite_of.Vocab_of], [Rite_of.Temporal_of],
+ [Rite_of.Precedence_of], [Rite_of.Rubrics_of] and [Rite_of.Lectionary_of]
+ keep resolving exactly as they did before this module existed.
+
+ Task 5 (2026-08-25-colitur-of-phases-3-5): assembles Tasks 1-4's
+ separately-built pieces into a {!Colitur_kernel.Rite.t}, with NO kernel
+ change -- the spec's own central claim for this module. *)
+
+module Vocab_of = Vocab_of
+module Temporal_of = Temporal_of
+module Precedence_of = Precedence_of
+module Rubrics_of = Rubrics_of
+module Lectionary_of = Lectionary_of
+
+(** The OF rite (design spec's [RITE] signature, realised as a
+ {!Colitur_kernel.Rite.t} value, the same shape {!Rite_ef.Rite_ef.context}
+ already establishes):
+ - [id], [vocab], [year_start], [temporal], [anchors]: {!Temporal_of}
+ unchanged (Normae n. 35-44's seasons and named movable/fixed days).
+ - [easter]: {!Colitur_kernel.Computus.gregorian_easter} -- the Roman
+ rite's own computus, supplied by the rite rather than assumed by the
+ kernel, so a Julian-reckoning rite can differ (see the .ml's own
+ citation).
+ - [fixed_key]: identity. The OF carries no bissextile (kalends-doubling)
+ convention the way the 1962 Missal does -- see the .ml's own citation
+ for the primary-source check this rests on.
+ - [rules]: {!Precedence_of}'s Tabula/Normae n. 60 functions, wrapped as
+ one {!Colitur_kernel.Precedence.rules} record.
+ - [season_runs]: NOT {!Vocab_of.seasons} -- see the .ml's own citation:
+ Ordinary Time runs in two separate blocks over one liturgical year
+ (Normae n. 43-44), so the expected run-length-compressed sequence
+ names it twice.
+ - [transfer_target]: {!Precedence_of.transfer_target}, Normae n. 60/n. 5.
+ Known incomplete on one named date shape (Normae n. 56(f), St
+ Joseph's backward anticipation onto Palm Sunday) -- documented on that
+ value's own .mli, not repeated or silently worked around here.
+ - [readings]: {!Lectionary_of.readings} partially applied to the
+ caller's own [~lectionary] and {!Temporal_of.year_start} (the OF
+ reading-cycle arithmetic's own Advent anchor) -- no [~commons]
+ parameter, unlike EF: the OF lectionary chain has no Commons
+ indirection to thread through.
+ - [creed], [gloria], [preface]: {!Rubrics_of}, IGMR n. 53/67-68/364-365.
+
+ [~lectionary] is a caller-supplied parameter, not a value closed over an
+ internal load -- {!Rite_ef.Rite_ef.context}'s own .ml comment records
+ the exact startup failure this shape avoids (a command touching no
+ lectionary data, like `colitur easter <year>`, dying at load time the
+ moment the data file is merely absent from a bare build). Follow that
+ same seam here: a caller loads data/of/lectionary.sexp however suits it
+ (bin/main.ml's own loader is the one this module ships with), and a
+ future diocesan/proper OF lectionary overlay has the identical seam to
+ attach to. *)
+val context : lectionary:Colitur_kernel.Lectionary.t -> (Vocab_of.season, Vocab_of.rank) Colitur_kernel.Rite.t