diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-22 23:24:12 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-22 23:24:12 +0200 |
| commit | 0806fe65e388a9502035bc9d4f551528ac74b26d (patch) | |
| tree | 094d96e0d685c90fbfc8c91e659d185b1141a1c0 /lib/kernel | |
| parent | 761ae859d73660bcfaa59581312989cb942e704d (diff) | |
| download | colitur-0806fe65e388a9502035bc9d4f551528ac74b26d.tar.gz colitur-0806fe65e388a9502035bc9d4f551528ac74b26d.zip | |
feat(ef): the Mass preface, RG 482-499
Item 2 of Phase 3 (celebrant-rubrics-phase1), the bulk of this phase
and the last EF Mass rubric this project scoped: which preface is
said, deferring to seasonal/proper-title rules for the fourteen named
prefaces, then RG 498's Common residual.
RG 482 gives the resolution chain: the Mass's own proper preface,
failing that the seasonal one, failing that Common. Read literally,
RG 484-497 look like fourteen separate rules, but each numbered
rubric's own propria/de-Tempore pair produces the SAME preface
identity either way, so the whole chain collapses into one priority-
ordered decision: title/mystery triggers (Holy Cross, Sacred Heart,
Christ the King, Trinity, St Joseph, BVM, the Nativity octave, the
Apostles, Epiphany), each independent of season, then six seasonal
windows (Nativity, Epiphany, Lent, Holy Cross/Passiontide, Easter,
Ascension, Holy Spirit, Trinity-for-ordinary-Sundays), then Common.
The "one genuinely unproven piece" the design spec worried about --
per-feast proper prefaces extracted from the Missal's propers at scale
-- turned out not to be a large-scale extraction problem at all: every
one of the fourteen propers is a closed, small, subject/slug-keyed
trigger (mirroring Precedence_ef.band's own RG 91 table), not
thousands of individual saints' pages. The one genuine open question
(RG 488, the Chrism Mass) is N/A: this engine resolves one Mass per
civil day and has no separate Chrism-Mass dimension.
Preface is a new kernel type (lib/kernel/preface.ml[i]), not an
EF-specific one, the same placement as Colour/Subject/Mass_formulary:
Liturgical_day.t is parameterised only over season/rank, so any field
it carries generically must live in the kernel even though only EF
constructs a value of it today. Wired exactly as creed/gloria were
(Rite.t.preface, Calendar.ml, Rite_ef.context), but Preface.t option,
not a bare bool: unlike creed/gloria, a preface is said only at a
Mass, and Good Friday (1955-restored Holy Week) resolves an observed
celebration but has no Mass at all -- None is the honest answer there,
and also the neutral value an unimplemented rite returns.
Two priority-order findings only the oracle settled, not derivable
from the Latin text in isolation, both cross-checked against 358
individually classified entries in the FIUV Ordo's own praef column
(test/fixtures/fiuv-ordo-2025-2026.sexp, already captured, wired up
here as a new comparison axis): RG 484(b)'s own "except Masses with a
proper of the divine mysteries or Persons" is narrower than every
other window's implicit exception (an Apostle inside the Nativity
octave is overridden to Nativity; outside it, keeps his own preface
even inside another window); and RG 495's "et votivis" half is live
for the one office this engine models without a votive-Mass dimension
(the Saturday Office of the BVM), which also proved a vigil is not a
"festum" for this purpose (the Assumption's own vigil takes Common,
not BVM, correcting an initial reuse of Precedence_ef.marian_slugs
that had no reason to make that distinction for its own, different
rubric). A third, RG16(a)-shaped fix landed the same way: RG 494(b)'s
own Trinity grant must read the day's TEMPORAL season, not the
celebration that actually won it, or a Class1 feast with no preference
of its own (All Saints) wrongly falls to Common on a Sunday it merely
commemorates.
colitur rubrics gains a sixth TAB-separated column. Domain-wide
1583-9999 exhaustive sweep confirms every Christmastide day resolves
Nativity/Epiphany/Bvm, every Paschaltide day one of its own three
windows or a season-independent title, every Lent day Lent or a
title, and Passiontide legitimately produces Easter exactly once a
year (the Vigil Mass) -- 8416 of the domain's 8417 years, the one
short year being the domain's own upper boundary (the liturgical year
opening in 9999 cannot construct dates in year 10000, a pre-existing
edge this sweep re-confirms rather than a new one).
day/readings verified byte-identical to the branch's own state before
this phase (commit 9c96e0a) across a 455-year sample spanning the
whole domain -- not literally to the v0.10.1 tag, which 22 earlier
commits on this same branch (Phase 1/2, the bissextile shift, the
Rogation colour fix) had already moved past before this phase began.
Diffstat (limited to 'lib/kernel')
| -rw-r--r-- | lib/kernel/calendar.ml | 4 | ||||
| -rw-r--r-- | lib/kernel/liturgical_day.ml | 1 | ||||
| -rw-r--r-- | lib/kernel/liturgical_day.mli | 7 | ||||
| -rw-r--r-- | lib/kernel/preface.ml | 59 | ||||
| -rw-r--r-- | lib/kernel/preface.mli | 50 | ||||
| -rw-r--r-- | lib/kernel/rite.ml | 1 | ||||
| -rw-r--r-- | lib/kernel/rite.mli | 17 |
7 files changed, 139 insertions, 0 deletions
diff --git a/lib/kernel/calendar.ml b/lib/kernel/calendar.ml index 7178780..a1309f9 100644 --- a/lib/kernel/calendar.ml +++ b/lib/kernel/calendar.ml @@ -554,6 +554,9 @@ let build_day (rite : ('s, 'r) Rite.t) (idx : 'r Layer.index) let gloria = rite.Rite.gloria ~temporal ~observed:resolution.Precedence.observed.Precedence.cel ~date in + let preface = + rite.Rite.preface ~temporal ~observed:resolution.Precedence.observed.Precedence.cel ~date + in { Liturgical_day.date; rite = rite.Rite.id; @@ -568,6 +571,7 @@ let build_day (rite : ('s, 'r) Rite.t) (idx : 'r Layer.index) formulary; creed; gloria; + preface; } let year (rite : ('s, 'r) Rite.t) (layer : 'r Layer.t) (y : int) : diff --git a/lib/kernel/liturgical_day.ml b/lib/kernel/liturgical_day.ml index 98c5084..c3ecb37 100644 --- a/lib/kernel/liturgical_day.ml +++ b/lib/kernel/liturgical_day.ml @@ -28,5 +28,6 @@ type ('s, 'r) t = { a rite with no lectionary -- see {!Mass_formulary} *) creed : bool; (** whether the Creed is said at this day's Mass; see {!Rite.t.creed} *) gloria : bool; (** whether the Gloria in excelsis is said; see {!Rite.t.gloria} *) + preface : Preface.t option; (** which preface is said; see {!Rite.t.preface} *) } [@@deriving sexp] diff --git a/lib/kernel/liturgical_day.mli b/lib/kernel/liturgical_day.mli index be17d73..643097b 100644 --- a/lib/kernel/liturgical_day.mli +++ b/lib/kernel/liturgical_day.mli @@ -51,5 +51,12 @@ type ('s, 'r) t = { (** Whether the Gloria in excelsis is said at this day's Mass -- {!Rite.t.gloria}, EF: RG 431-432. Same seam as [creed] in every respect. *) + preface : Preface.t option; + (** Which preface is said at this day's Mass -- {!Rite.t.preface}, + EF: RG 482-499. Same seam as [creed]/[gloria], but [option], not + a bare {!Preface.t}: see {!Rite.t.preface}'s own citation for why + -- [None] both for a rite that has not implemented the rule and + for a real day this engine resolves that has no Mass at all + (Good Friday). *) } [@@deriving sexp] diff --git a/lib/kernel/preface.ml b/lib/kernel/preface.ml new file mode 100644 index 0000000..08d00b4 --- /dev/null +++ b/lib/kernel/preface.ml @@ -0,0 +1,59 @@ +(* RG 482-499 -- see the .mli for the rubric quoted in full and the + placement rationale. Argument-less variants only, so no + [Sexplib0.Sexp_conv] open is needed -- see CLAUDE.md's own gotcha note. *) +type t = + | Nativity + | Epiphany + | Lent + | Holy_cross + | Easter + | Ascension + | Sacred_heart + | Christ_the_king + | Holy_spirit + | Trinity + | Bvm + | St_joseph + | Apostles + | Common + | Requiem +[@@deriving sexp] + +let all = + [ Nativity; Epiphany; Lent; Holy_cross; Easter; Ascension; Sacred_heart; Christ_the_king; + Holy_spirit; Trinity; Bvm; St_joseph; Apostles; Common; Requiem ] + +let to_string = function + | Nativity -> "nativity" + | Epiphany -> "epiphany" + | Lent -> "lent" + | Holy_cross -> "holy-cross" + | Easter -> "easter" + | Ascension -> "ascension" + | Sacred_heart -> "sacred-heart" + | Christ_the_king -> "christ-the-king" + | Holy_spirit -> "holy-spirit" + | Trinity -> "trinity" + | Bvm -> "bvm" + | St_joseph -> "st-joseph" + | Apostles -> "apostles" + | Common -> "common" + | Requiem -> "requiem" + +let of_string = function + | "nativity" -> Some Nativity + | "epiphany" -> Some Epiphany + | "lent" -> Some Lent + | "holy-cross" -> Some Holy_cross + | "easter" -> Some Easter + | "ascension" -> Some Ascension + | "sacred-heart" -> Some Sacred_heart + | "christ-the-king" -> Some Christ_the_king + | "holy-spirit" -> Some Holy_spirit + | "trinity" -> Some Trinity + | "bvm" -> Some Bvm + | "st-joseph" -> Some St_joseph + | "apostles" -> Some Apostles + | "common" -> Some Common + | "requiem" -> Some Requiem + | _ -> None diff --git a/lib/kernel/preface.mli b/lib/kernel/preface.mli new file mode 100644 index 0000000..b43890e --- /dev/null +++ b/lib/kernel/preface.mli @@ -0,0 +1,50 @@ +(** The Mass preface (Missale Romanum, Rubricae Generales, Caput XVII("De + Ritibus servandis in celebratione Missae"), "H) De praefatione", RG + 482-499; docs/research/LT.txt, grep "praefatione dicitur quae cuique"). + + RG 482 gives the resolution chain in full: {i "Praefatio dicitur quae + cuique Missae propria est; qua deficiente, dicitur praefatio de + Tempore, secus communis"} -- the Mass's own PROPER preface; failing + that, the SEASONAL ("de Tempore") one; failing that, the COMMON. RG + 483: {i "Nulla commemoratio, in Missa occurrens, praefationem propriam + inducit"} -- a commemoration never induces its own proper preface, + which is why {!Rite_ef.Rubrics_ef.preface} (the one rite that + implements this so far) reads only the day's OBSERVED celebration, + never its commemorations, the identical discipline {!Rite.t.creed}'s + own RG 476(e) already established. + + RG 484-497 enumerate the fourteen named propers -- Nativity, Epiphany, + Lent, Holy Cross, [the Chrism Mass, out of scope: see the .ml's own + N/A note], Easter, Ascension, the Sacred Heart, Christ the King, the + Holy Spirit, the Trinity, the Blessed Virgin Mary, St Joseph, the + Apostles. RG 498 is the residual Common; RG 499 the Requiem. + + A KERNEL type, not a rite-specific one (the same placement as + {!Colour}, {!Subject}, {!Mass_formulary}): {!Liturgical_day.t} is + parameterised only over a rite's season/rank, so any field it carries + generically must live here, even though only the EF rite constructs a + value of it today -- CLAUDE.md's own "generalise when forced, not + speculatively" stance, already the precedent {!Mass_formulary} + follows. *) + +type t = + | Nativity (** RG 484 *) + | Epiphany (** RG 485 *) + | Lent (** RG 486, "de Quadragesima" *) + | Holy_cross (** RG 487, "de sancta Cruce" *) + | Easter (** RG 489, "paschalis" *) + | Ascension (** RG 490 *) + | Sacred_heart (** RG 491, "de Ss.mo Corde Iesu" *) + | Christ_the_king (** RG 492, "de D. N. Iesu Christo Rege" *) + | Holy_spirit (** RG 493, "de Spiritu Sancto" *) + | Trinity (** RG 494, "de Ss.ma Trinitate" *) + | Bvm (** RG 495, "de beata Maria Virgine" *) + | St_joseph (** RG 496, "de S. Ioseph" *) + | Apostles (** RG 497, "de Apostolis" *) + | Common (** RG 498, "communis" -- the residual when nothing else applies *) + | Requiem (** RG 499, "defunctorum" *) +[@@deriving sexp] + +val all : t list +val to_string : t -> string +val of_string : string -> t option diff --git a/lib/kernel/rite.ml b/lib/kernel/rite.ml index 915941d..e44c2c6 100644 --- a/lib/kernel/rite.ml +++ b/lib/kernel/rite.ml @@ -21,4 +21,5 @@ type ('s, 'r) t = { Mass_formulary.t option * Citation.t list; creed : temporal:('s, 'r) Temporal.t -> observed:'r Celebration.t -> date:Date.t -> bool; gloria : temporal:('s, 'r) Temporal.t -> observed:'r Celebration.t -> date:Date.t -> bool; + preface : temporal:('s, 'r) Temporal.t -> observed:'r Celebration.t -> date:Date.t -> Preface.t option; } diff --git a/lib/kernel/rite.mli b/lib/kernel/rite.mli index b9d1961..d53e4e6 100644 --- a/lib/kernel/rite.mli +++ b/lib/kernel/rite.mli @@ -140,4 +140,21 @@ type ('s, 'r) t = { parameters and the same reasons for each, a [bool] not an [option], and [false] is the answer a rite that has not implemented the rule returns explicitly. *) + preface : temporal:('s, 'r) Temporal.t -> observed:'r Celebration.t -> date:Date.t -> Preface.t option; + (** Which preface is said at this day's Mass (EF: RG 482-499). Same + seam and same three parameters as {!creed}/{!gloria}, for the + same reasons -- {!Preface}'s own citation has the rubric in full. + [Preface.t option], not a bare [Preface.t]: unlike [creed]/ + [gloria], where "not said" is itself a legitimate answer a + [bool] can carry, a preface is said only at a MASS, and this + engine constructs at least one day (Good Friday, the + 1955-restored Holy Week) that resolves an [observed] celebration + but has no Mass at all -- [None] is the honest answer there, not + a manufactured preface. [None] is also the value a rite that has + not implemented this rule returns, the same "the type's own + neutral value" contract {!creed}/{!gloria} give for [false] -- + the two meanings ("this rite does not model the question" and + "this specific day has no Mass to preface") collapse onto the + same representation deliberately: a caller with no rite-specific + context to distinguish them should not need one. *) } |
