summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-22 17:56:42 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-22 17:56:42 +0200
commitf4cc032d7e812d716ff6b5df8192f79a2560e8f0 (patch)
tree65c8c20456ebe66fd1ff2253428357b5b027ec0a
parent60e87914718dd2c8e69bb89d8cc48d6bef9bfc74 (diff)
downloadcolitur-f4cc032d7e812d716ff6b5df8192f79a2560e8f0.tar.gz
colitur-f4cc032d7e812d716ff6b5df8192f79a2560e8f0.zip
feat(ef): the Gloria in excelsis, RG 431-432, deferring to Breviary 237-238
Phase 2 of celebrant-rubrics-phase1: colitur rubrics gains a fifth column, whether the Gloria is said. Follows the Creed's own seam exactly -- Rite.t.gloria, Liturgical_day.t.gloria, wired through calendar.ml the same way. RG 431(a)/432(a) defer the Gloria to the Breviary's own Te Deum rule (nn. 237-238), so te_deum is implemented as its own named predicate, cited clause by clause, not collapsed into a colour heuristic. 431(c) (Holy Thursday, the Easter Vigil Mass) and 432(b)/(d) (violet; a Requiem) are independent overrides checked ahead of the Te Deum-derived answer. Every clause this engine has no dimension to model (votive Mass classes, the wider n.302 "Missa festiva" categories) is stated as N/A with its own reasoning, not silently dropped. Validated against the FIUV universal Ordo (Gloria and Te Deum) and all three LMS editions (Gloria). A first pass over-trusted a clean-looking 15-for-15 FIUV contradiction of 237(b)'s own Septuagesima exception and replaced it with a blanket "every Sunday" rule; the evidence was itself corrupted -- the FIUV extractor recognised only one of the source's two Te Deum negations ("non dicitur", not "sine"), so every "sine Te Deum" Sunday read wrongly true. Fixed in tools/extract_fiuv_ordo.ml, fixture re-extracted, and the literal 237(b) reading restored once the corrected data confirmed it. A second bug surfaced alongside it (Palm/ Passion Sunday wrongly reading true via Temporal_ef.named's own table membership, then Christ the King wrongly reading false from an over-broad fix) is closed with an explicit two-slug exclusion. Domain-wide 1583-9999: every violet or Rose day is gloria=false except the Easter Vigil (RG 431(c) lex specialis), every Requiem is gloria=false, both measured exhaustively, zero exceptions. Mutation- proved: disabling 431(c) reddens 8 tests including all four oracle comparisons; disabling 238(c)'s feria-I-classis exclusion reddens exactly the dedicated Ash Wednesday unit test, a genuine blind spot in both oracle layers, reported rather than hidden. Two open, cited findings, neither fixed here (out of this task's "follow creed's exact seam" scope): a privileged Lenten/Passiontide feria carrying one commemoration reads Gloria=true in the LMS Ordo but Te-Deum=true/Gloria=false in FIUV -- the two oracles disagree with each other, not merely with colitur (data/ef/expected-divergences-lms.sexp L5, expected-divergences-fiuv.sexp F3); and a pre-existing, uncited Colour.Violet bug on Rogation Monday/Tuesday in Temporal_ef.temporal, surfaced by this comparison but root-caused as a separate defect (L6). day/readings verified byte-identical against a build from the branch tip before this task (v0.10.1's own tag predates an already-landed bissextile fix that legitimately changed both, so it is not the right baseline). 671 tests green (dune test); 678 with the exhaustive sweep (COLITUR_EXHAUSTIVE_SWEEP=1 dune test --force, ~104s).
-rw-r--r--bin/main.ml26
-rw-r--r--data/ef/expected-divergences-fiuv.sexp108
-rw-r--r--data/ef/expected-divergences-lms.sexp112
-rw-r--r--lib/kernel/calendar.ml4
-rw-r--r--lib/kernel/liturgical_day.ml1
-rw-r--r--lib/kernel/liturgical_day.mli4
-rw-r--r--lib/kernel/rite.ml1
-rw-r--r--lib/kernel/rite.mli6
-rw-r--r--lib/rites/rite_ef/rite_ef.ml3
-rw-r--r--lib/rites/rite_ef/rite_ef.mli3
-rw-r--r--lib/rites/rite_ef/rubrics_ef.ml378
-rw-r--r--lib/rites/rite_ef/rubrics_ef.mli30
-rw-r--r--man/colitur.124
-rw-r--r--test/cli.t40
-rw-r--r--test/fixtures/fiuv-ordo-2025-2026.sexp79
-rw-r--r--test/test_calendar.ml9
-rw-r--r--test/test_fiuv_ordo.ml169
-rw-r--r--test/test_lms_ordo.ml112
-rw-r--r--test/test_rubrics_ef.ml324
-rw-r--r--test/test_validate.ml16
-rw-r--r--tools/extract_fiuv_ordo.ml21
21 files changed, 1378 insertions, 92 deletions
diff --git a/bin/main.ml b/bin/main.ml
index 01410f2..cf8cae2 100644
--- a/bin/main.ml
+++ b/bin/main.ml
@@ -408,7 +408,12 @@ let readings_line ~lang ~sigla (d : (Rite_ef.Vocab_ef.season, Rite_ef.Vocab_ef.r
for a [Votive] day before [said] became honest, and it is a value this
function already has in scope regardless of [via]. So this is not
"print a placeholder for the missing case", it is "the value was
- already available from a different field, and still is". *)
+ already available from a different field, and still is".
+
+ Task (celebrant-rubrics-phase1, Phase 2): a FIFTH column, whether the
+ Gloria in excelsis is said (EF: RG 431-432, {!Rite_ef.Rubrics_ef.gloria})
+ -- same [string_of_bool] convention as [creed], same plain [bool] with
+ no [option] to guard, same reasoning throughout. *)
let rubrics_line (d : (Rite_ef.Vocab_ef.season, Rite_ef.Vocab_ef.rank) Colitur_kernel.Liturgical_day.t)
=
let said, via =
@@ -421,8 +426,9 @@ let rubrics_line (d : (Rite_ef.Vocab_ef.season, Rite_ef.Vocab_ef.rank) Colitur_k
Colitur_kernel.Mass_formulary.source_to_string f.Colitur_kernel.Mass_formulary.via )
| None -> ("-", "-")
in
- Printf.printf "%s\t%s\t%s\t%s\n" (D.to_iso8601 d.Colitur_kernel.Liturgical_day.date) said via
+ Printf.printf "%s\t%s\t%s\t%s\t%s\n" (D.to_iso8601 d.Colitur_kernel.Liturgical_day.date) said via
(string_of_bool d.Colitur_kernel.Liturgical_day.creed)
+ (string_of_bool d.Colitur_kernel.Liturgical_day.gloria)
(* One civil year, Jan 1 - Dec 31, matching [temporal_report]'s own scan --
NOT one liturgical year: [Colitur_kernel.Calendar.year] resolves a single
@@ -1281,8 +1287,8 @@ output formats:
2026-04-05 sunday paschaltide 1 ef-easter-sunday class-1 white
readings date slug | Epistle | Gospel [| name]
2026-12-25 ef-nativity | Heb 1:1-12 | John 1:1-14
- rubrics date, formulary slug, source, creed -- TAB-separated
- 2026-01-01[TAB]ef-circumcision[TAB]own[TAB]true
+ rubrics date, formulary slug, source, creed, gloria -- TAB-separated
+ 2026-01-01[TAB]ef-circumcision[TAB]own[TAB]true[TAB]true
A citation contains spaces, so readings uses " | " between its fields while
day stays space-separated; that is why they are separate commands rather
@@ -1299,14 +1305,16 @@ output formats:
(source: proper/own/preceding-sunday/common/votive) -- not always the
day's own: a weekday with no proper resumes the preceding Sunday's, a
saint with no proper says his assigned Common -- followed by whether the
- Creed is said (RG 475-476: "true"/"false", OCaml's own literal, not
- "yes"/"no" or "1"/"0"). TAB-separated rather than space or " | ": a
+ Creed is said (RG 475-476) and whether the Gloria in excelsis is said
+ (RG 431-432, deferring to the Breviary's own Te Deum rule, nn. 237-238,
+ for RG 431(a)) -- both "true"/"false", OCaml's own literal, not
+ "yes"/"no" or "1"/"0". TAB-separated rather than space or " | ": a
resolved formulary NAME is a column a later version may add, and it can
carry both spaces and punctuation a citation never does, which rules out
either alternative already in use above. --overlay is accepted (the
- observed celebration it changes decides the formulary and the Creed);
- --lang/--raw/--sigla-* are refused -- this row resolves no display name
- and no citation for any of them to affect.
+ observed celebration it changes decides the formulary, the Creed and the
+ Gloria); --lang/--raw/--sigla-* are refused -- this row resolves no
+ display name and no citation for any of them to affect.
emit one schema (season, week, slug, rank, colour, subject, names,
citations, commemorations), rendered five ways: csv (RFC 4180,
diff --git a/data/ef/expected-divergences-fiuv.sexp b/data/ef/expected-divergences-fiuv.sexp
index 5506e46..6ed9a04 100644
--- a/data/ef/expected-divergences-fiuv.sexp
+++ b/data/ef/expected-divergences-fiuv.sexp
@@ -15,12 +15,106 @@
; backs, the SAME convention every other allow-list file in this project
; uses: not always "colitur".
;
-; Empty as of this task: the Creed comparison found no unexplained
+; The Creed comparison (Task 6/Witnesses task) found no unexplained
; divergence anywhere in the 400-day window (399 comparable days, Holy
; Saturday excluded per test_creed_coverage -- see that test's own
-; citation). Kept as a file, not deleted, on the same footing as
-; expected-divergences-lms.sexp's own empty-but-live state after L1's
-; closure: the machinery that would explain a FUTURE divergence needs
-; somewhere to live, and an empty allow-list with a live "every entry
-; must be used" check is a real invariant worth keeping, not a
-; formality.
+; citation) and still does not. Phase 2 (celebrant-rubrics-phase1,
+; 2026-08-22) extended this file to two more axes, Gloria and Te Deum --
+; F1 below (Gloria) and F3 (Te Deum). Both prose-only, the same L2/L5/L6
+; convention data/ef/expected-divergences-lms.sexp's own header explains:
+; the real enforcement is test_fiuv_ordo.ml's own predicates and count
+; assertions, not a machine-loaded [id] record.
+;
+; F2 and F4 (Te Deum: every vigil; the three September Ember days) were
+; found, then CLOSED within the same task: tools/extract_fiuv_ordo.ml's
+; own Te Deum parser recognised only ONE of the source's two negative
+; phrasings ("non dicitur Te Deum"), so "sine Te Deum" -- how the source
+; actually negates a Sunday's/vigil's/Ember-day's own Te Deum -- fell
+; through to a bare "Te Deum" substring match and was wrongly read
+; [true]. Fixed in the extractor (its own citation has the full account);
+; the fixture was re-extracted from the SAME pdftotext dump; 24 of 400
+; rows flipped true->false, and colitur's own answer already matched the
+; corrected value on every one of them -- no code change needed for F2/
+; F4 specifically. See test/fixtures/fiuv-ordo-2025-2026.sexp's own
+; "RE-EXTRACTED" note and lib/rites/rite_ef/rubrics_ef.ml's own [te_deum]
+; header (237(a)'s comment) for the fuller account, including a real,
+; separate regression this same fix round found and reverted (a first
+; attempt at "every Sunday says Te Deum" wrongly excluded Christ the
+; King, caught by the LMS Ordo's own Gloria axis, 2024-10-27).
+
+; F1 -- OPEN, adjudicated FOR colitur. Fired once: 2026-04-03, Good
+; Friday.
+;
+; The raw source (docs/research/ordo/fiuv-ordo-2025-2026.pdf, page 46,
+; verified directly against the PDF, not merely the extracted fixture):
+; "3. Nig in Actione liturgica usque ad 4am partem, Viol. in S.
+; Communione. FERIA VI IN PASSIONE ET MORTE DOMINI, De ea, I cl. ...
+; Missa pr., (omittuntur ps. Iudica me et Gloria Patri), Gloria, sine
+; Credo, praef. comm." -- read LITERALLY, this states the Gloria IS said
+; on Good Friday. colitur says [false] (RG 432(d)'s own {!Colour.Black}
+; proxy this Mass shares with the Requiem population, {!Rite_ef.Rubrics_
+; ef.gloria}'s own header).
+;
+; ADJUDICATED FOR COLITUR: Good Friday's own liturgical action has no
+; Mass at all in the 1955-restored Holy Week (RG 28's own "non sit dies
+; liturgicus" framing for the Paschal Vigil is the closest parallel this
+; project already cites, {!Rite_ef.Rubrics_ef.creed}'s own RG 28-34
+; comment) -- no Consecration, no Communion under both species by the
+; celebrant, only Communion from the reserved Sacrament. That the Gloria
+; is NOT said on Good Friday is among the most widely and consistently
+; attested facts in the whole of 1962-rite literature (O'Connell,
+; Fortescue, every published Ordo this project has touched, and this
+; author's own independent knowledge of the rite) -- essentially
+; undisputed. The printed "Missa pr., ..., Gloria, ..." block, structured
+; identically to a REAL Mass's own rubric line elsewhere in this same
+; Ordo (compare Easter Day's "Missa pr., Gloria, sequentia, Credo, praef.
+; Pasch."), most plausibly describes the liturgical action's own
+; STRUCTURE using the book's standard notation for bookkeeping
+; consistency, or is a genuine single-word compiler error -- neither
+; resolvable without contacting the compiler, out of this task's own
+; scope. NOT the same failure mode as the Te Deum extractor bug above
+; (F2/F4): this is the RAW pdftotext TEXT itself making the claim, not a
+; downstream parsing artefact of test_fiuv_ordo.ml's own extraction --
+; re-run directly against a fresh -layout dump for this task, not merely
+; trusted from the fixture. The PDF's own page IMAGE was not separately
+; inspected (out of this task's own tool access), so a pdftotext-layer
+; misread (a stray line from an adjacent block folded into this one) is
+; not fully ruled out either -- named as a real possibility, not
+; silently excluded.
+
+; F3 -- OPEN, single-witnessed, colitur's own possible gap (Te Deum
+; axis). Fires 6 times, every one of the six dates
+; data/ef/expected-divergences-lms.sexp's own L5 already found for
+; Gloria: 2026-03-06/07/09/12/21/24, a privileged Lenten or Passiontide
+; feria (Class3, RG25) whose own office is impeded and carries exactly
+; one commemoration of a Class3 saint. colitur's [te_deum] reads [false]
+; (a plain ferial office by every branch {!Rite_ef.Rubrics_ef.te_deum}
+; checks); FIUV reads [true] in all six -- confirmed directly against
+; the raw pdftotext dump, not merely the fixture: e.g. 12 March, "Ll. 1a
+; et 2a (= 2a+3a) de Scr. occ., 3a de festo, Te Deum." -- a genuine,
+; unnegated "Te Deum" (neither of the two negative phrasings the
+; extractor now checks for), so this is NOT the same failure mode F2/F4
+; were.
+;
+; CITATION: the same n.302(b)/RG431(b) text L5 already cites (LT.txt --
+; a MISSAL rubric, not a Breviary one, so its literal text governs the
+; MASS's own Gloria, not Matins' Te Deum) does not directly license this
+; finding at all -- 237/238 (the BREVIARY rubric {!Rite_ef.Rubrics_ef.
+; te_deum} actually implements) has no clause naming a commemoration as
+; grounds for Te Deum. What this finding suggests, not yet established:
+; the DIVINE OFFICE may treat a commemorated day more generously than the
+; MASS does for exactly this shape (a commemorated saint's own lessons
+; are read at Matins even on an impeded day, which could plausibly extend
+; to Te Deum by an unwritten or unlocated convention) -- genuinely
+; speculative, offered as a research lead for a follow-on task, not a
+; citation this entry treats as settled.
+;
+; WHY NOT FIXED HERE: SINGLE-WITNESSED (the LMS fixtures never captured
+; Te Deum at all, so there is no second Ordo to corroborate this shape
+; the way the Sacred-Triduum/BVM-Saturday/vigil findings elsewhere in
+; this task were cross-checked). Fixing it would need the SAME kernel
+; signature widening L5 already declines for the identical reason
+; (`~commemorations` on {!Colitur_kernel.Rite.t.gloria}, and by extension
+; a parallel widening of [te_deum] if the two were ever to diverge in
+; their own inputs) -- out of a task briefed to follow creed's existing
+; seam exactly. Left OPEN for the same follow-on task L5 recommends.
diff --git a/data/ef/expected-divergences-lms.sexp b/data/ef/expected-divergences-lms.sexp
index 4cb5d2a..df813f9 100644
--- a/data/ef/expected-divergences-lms.sexp
+++ b/data/ef/expected-divergences-lms.sexp
@@ -6,6 +6,10 @@
; (2025-11-28..2026-12-31) joined it. L3/L4 below fired only in the
; 2023-2024 window -- neither recurs in the other two, a fact worth
; keeping visible rather than merging away (see [expected_rows] on each).
+; L5/L6 (Phase 2, 2026-08-22) extended the comparison to a second axis,
+; Gloria (RG431-432) -- both fire in more than one window, at DIFFERENT
+; counts per window, so both are prose-only (L2's own precedent), not
+; machine-checked [id] records; see each for the real enforcement site.
;
; A SEPARATE file from data/ef/expected-divergences.sexp (the lectio
; allow-list) and data/ef/expected-divergences-missalemeum.sexp (the
@@ -228,3 +232,111 @@
(verdict open)
(note "2023-12-24 (the 4th Sunday of Advent AND Christmas Eve, a genuinely rare coincidence -- roughly 1 year in 7 -- absent from both the 2024-2025 and 2025-2026 windows, where Christmas Eve falls on a Tuesday and a Wednesday respectively). colitur says the Creed IS said (true), reading [temporal]'s own weekday (Sunday) per RG475(a)'s clause, positioned ahead of the vigil-exclusion check in {!Rite_ef.Rubrics_ef.creed} -- unconditionally, the same way it already does for RG16(a)'s Feast-of-the-Lord case. The Ordo says \"No Gl No Cr\" for this date. ADJUDICATED FOR COLITUR, not merely left open by default: RG30(a)'s own \"locum tenet ... nulla fit commemoratio\" language is textually closer to RG16(a) (which colitur already treats as Creed-preserving) than to an ordinary vigil superseding a Sunday -- the Vigil does not merely WIN THE DAY, it takes the SUNDAY'S OWN IDENTITY, the same shape RG475(a) was written to reach. The COUNTER-reading is real and not dismissed here: RG475(a)'s own text says \"locum cedat ... festo\" (gives way to a FEAST), and RG35 (Caput VI) classifies feria/vigilia/festum as three distinct liturgical-day categories -- a strict textual reading could confine 475(a)'s override to FEAST-displacement only, leaving a VIGIL-displaced Sunday to fall through to the general vigil exclusion (476, via RG33's own \"a vigil is a distinct category\" reasoning already coded elsewhere in {!Rite_ef.Rubrics_ef.creed}). Left OPEN rather than closed on this task's own authority: adjudicating scripture-grade primary-source questions is out of scope for a witness-wiring task, and the two readings are both defensible. Not fixable inside this task's own no-lib-changes constraint regardless of which reading eventually wins.")
(expected_rows 1))
+
+; L5 -- OPEN, colitur's own gap, found extending this suite to the Gloria
+; axis (celebrant-rubrics-phase1 Phase 2, 2026-08-22). NOT an active
+; machine-checked [id] entry -- same reasoning L2 above gives: the count
+; varies window to window (5 in 2023-2024, 5 in 2024-2025, 6 in
+; 2025-2026), so a single static [expected_rows] cannot check it. The REAL
+; enforcement is test_lms_ordo.ml's own [is_l5_lenten_commemoration]
+; predicate plus [make_suite]'s own ~expected_gloria_l5 parameter,
+; asserted per window directly.
+;
+; SHAPE, identical in all 16 instances found (5+5+6, zero exceptions):
+; a privileged Lenten or Passiontide feria (Class3, violet -- RG25,
+; {!Rite_ef.Temporal_ef.ferial_rank}) whose own office is impeded and
+; carries EXACTLY ONE commemoration, of a Class3 saint colitur's own
+; precedence engine (independently validated, layers 3-5) correctly
+; reduces to a mere commemoration. colitur's [gloria] reads [false] (the
+; day is a plain ferial office by every test [Rite_ef.Rubrics_ef.te_deum]
+; runs -- no Sunday, no vigil, no octave, [named] = [None], [subject] =
+; [Temporal]); the Ordo reads [true] in every one of the 16 instances.
+;
+; CITATION (docs/research/LT.txt:2359-2361, "V - De Missis festivis",
+; quoted in rubrics_ef.ml's own [gloria] header in full): "302. Sensu
+; autem latiore, dicuntur quoque Missae de festo: ... b) Missa de
+; commemoratione in Officio diei occurrente" -- in the WIDER sense, a Mass
+; "of a commemoration occurring in the day's own Office" is ALSO called a
+; "Missa festiva" -- and RG431(b): "Hymnus Gloria in excelsis dicitur ...
+; in Missis festivis de quibus n. 302" -- such a Mass says the Gloria.
+; Textually, this appears to be EXACTLY the shape found: the day's own
+; ferial Office, carrying a commemoration, is elevated to "festive" status
+; for the Gloria specifically.
+;
+; WHY NOT FIXED HERE: n.303(b), the very next paragraph (LT.txt:2359-2367,
+; same quote in rubrics_ef.ml), qualifies n.302(b)'s own Masses: "dici
+; potest tantum si occurrit dies liturgicus IV classis" -- CAN ONLY BE
+; SAID if the liturgical day occurring is IV class. Every instance found
+; here is a Class3 PRIVILEGED FERIA (RG25), not IV class, which reads as a
+; textual CONTRADICTION of the empirical finding rather than a
+; confirmation of it -- unresolved without n.304 onward (not in this
+; project's sources), which may clarify that 301-303 govern which Mass a
+; priest may freely CHOOSE among several options in one church on one day
+; (a dimension colitur does not model -- see [gloria]'s own SCOPE NOTE),
+; a different question from \"does THE Mass actually said, once
+; determined, say the Gloria\" (431(b)'s own question). Implementing this
+; also has a real architectural cost this task's own instructions
+; explicitly avoided: [Rite_ef.Rubrics_ef.gloria] would need a FOURTH
+; parameter, the day's own {!Colitur_kernel.Liturgical_day.t.commemorations}
+; -- a kernel [Rite.t.gloria] signature change, the same shape RG16(a)'s
+; own [admit] fix needed a [~temporal] parameter for, and squarely out of
+; a task briefed to \"follow exactly how creed was wired -- same seam\".
+; Left OPEN, not guessed into a possibly-wrong rule. Recommended for a
+; follow-on task, ideally alongside Phase 3's Preface work (RG483 governs
+; a DIFFERENT, but textually adjacent, commemoration-vs-Mass-part
+; question, so the two may share the same kernel signature widening).
+;
+; UPDATE (same task, after wiring the FIUV Ordo's own Gloria and Te Deum
+; axes, test_fiuv_ordo.ml): this paragraph previously said FIUV's own
+; [gloria] axis was not compared at all. It now is, and the result
+; WEAKENS this entry's own case rather than strengthening it: FIUV's own
+; [gloria] is [false] on all six of these exact dates in its window --
+; AGREEING WITH COLITUR, DIRECTLY CONTRADICTING the LMS Ordo's [true]
+; above. So this is not \"colitur has a corroborated gap\", it is \"two
+; independent Ordos disagree with EACH OTHER on Gloria for this shape,
+; and colitur happens to agree with the universal one, not the diocesan
+; one\". What FIUV's OWN Te Deum axis DOES show for the identical six
+; dates: [true] -- Te Deum, unlike Gloria, genuinely IS said at Matins on
+; these days (data/ef/expected-divergences-fiuv.sexp's own F3), a real,
+; single-witness finding that this entry's own n.302(b)/431(b) citation
+; may in fact belong to the DIVINE OFFICE, not the MASS -- which would
+; mean L5 itself is answering the wrong question, not merely open.
+; Genuinely uncertain which of the two Mass-Gloria witnesses (LMS or
+; FIUV) is right for this shape; left OPEN, not adjudicated either way,
+; for a follow-on task with more primary-source access than this one
+; had.
+
+; L6 -- OPEN, root-caused to a DIFFERENT, PRE-EXISTING bug this Gloria
+; comparison merely surfaced, not a Gloria defect itself. Fired once,
+; 2023-2024 only (2024-05-06, Rogation Monday) -- absent from the other
+; two windows because Rogation Monday/Tuesday is impeded by a real
+; sanctoral feast in both of them, so the office's own colour never
+; reaches [observed] there. Same non-machine-checked-count reasoning as L5
+; above (count 1/0/0); enforced by test_lms_ordo.ml's own
+; [is_l6_rogation_colour] predicate and [make_suite]'s own
+; ~expected_gloria_l6 parameter.
+;
+; {!Rite_ef.Temporal_ef.temporal}'s own Rogation Monday/Tuesday branch
+; hardcodes [~colour:Colour.Violet] with NO RG citation at all (verified
+; by reading the branch directly, temporal_ef.ml, the Rogation comment
+; block). The Ordo shows 2024-05-06 as \"FERIA IV Cl W †\" (white),
+; borrowing \"Mass of 5th Sunday after Easter\" (matching colitur's own
+; [Mass_formulary.Preceding_sunday] resolution for the identical date) --
+; consistent with RG88 (Caput X, \"De Litaniis maioribus et minoribus\"):
+; \"De Litaniis minoribus nihil fit in Officio, sed tantum in Missa\" --
+; nothing changes in the OFFICE for the Minor Litanies, only the Mass
+; TEXT is proper, which reads as the Office's own colour (Paschaltide,
+; white) staying unchanged, the violet belonging only to the PROCESSION
+; that precedes the Mass -- the same PER-ACTION colour nuance this
+; project already documents as unmodelled for Palm Sunday's palm
+; procession and Good Friday's Communion rite (temporal_ef.ml's own RG126/
+; RG128 citations), not a new kind of gap.
+;
+; NOT FIXED HERE: out of this task's own scope (Gloria/Te Deum, not the
+; temporal cycle's colour assignment), and a real fix needs its own
+; measured blast radius across 1583-9999 (every Rogation Monday/Tuesday
+; not impeded by a stronger feast) plus a re-check against the
+; differential/oracle layers, which already treat Rogation days as
+; correctly violet on whatever data they compare against -- a
+; cross-layer question, not a one-line patch. Recommended as a follow-on
+; task's own first item.")
diff --git a/lib/kernel/calendar.ml b/lib/kernel/calendar.ml
index db6c58e..7178780 100644
--- a/lib/kernel/calendar.ml
+++ b/lib/kernel/calendar.ml
@@ -551,6 +551,9 @@ let build_day (rite : ('s, 'r) Rite.t) (idx : 'r Layer.index)
let creed =
rite.Rite.creed ~temporal ~observed:resolution.Precedence.observed.Precedence.cel ~date
in
+ let gloria =
+ rite.Rite.gloria ~temporal ~observed:resolution.Precedence.observed.Precedence.cel ~date
+ in
{
Liturgical_day.date;
rite = rite.Rite.id;
@@ -564,6 +567,7 @@ let build_day (rite : ('s, 'r) Rite.t) (idx : 'r Layer.index)
citations;
formulary;
creed;
+ gloria;
}
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 09ac0a1..98c5084 100644
--- a/lib/kernel/liturgical_day.ml
+++ b/lib/kernel/liturgical_day.ml
@@ -27,5 +27,6 @@ type ('s, 'r) t = {
(** which Mass the day says, and how that was decided; [None] only for
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} *)
}
[@@deriving sexp]
diff --git a/lib/kernel/liturgical_day.mli b/lib/kernel/liturgical_day.mli
index eb45e61..939f8f5 100644
--- a/lib/kernel/liturgical_day.mli
+++ b/lib/kernel/liturgical_day.mli
@@ -37,5 +37,9 @@ type ('s, 'r) t = {
(** Whether the Creed is said at this day's Mass -- {!Rite.t.creed},
EF: RG 475-476. A decision, not an [option]: [false] for a rite
that has not implemented the rule, same as [creed] itself. *)
+ gloria : bool;
+ (** 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. *)
}
[@@deriving sexp]
diff --git a/lib/kernel/rite.ml b/lib/kernel/rite.ml
index 738785a..915941d 100644
--- a/lib/kernel/rite.ml
+++ b/lib/kernel/rite.ml
@@ -20,4 +20,5 @@ type ('s, 'r) t = {
temporal_at:(Date.t -> ('s, 'r) Temporal.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;
}
diff --git a/lib/kernel/rite.mli b/lib/kernel/rite.mli
index 0dcf17e..b9d1961 100644
--- a/lib/kernel/rite.mli
+++ b/lib/kernel/rite.mli
@@ -134,4 +134,10 @@ type ('s, 'r) t = {
Easter-relative window (e.g. "within the octave of Easter") needs
the civil date and the rite's own Easter to test it, and neither
[temporal] nor [observed] alone carries that arithmetic. *)
+ gloria : temporal:('s, 'r) Temporal.t -> observed:'r Celebration.t -> date:Date.t -> bool;
+ (** Whether the Gloria in excelsis is said at this day's Mass (EF: RG
+ 431-432). Same seam as {!creed} in every respect: same three
+ 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. *)
}
diff --git a/lib/rites/rite_ef/rite_ef.ml b/lib/rites/rite_ef/rite_ef.ml
index ba1274b..d7b3d83 100644
--- a/lib/rites/rite_ef/rite_ef.ml
+++ b/lib/rites/rite_ef/rite_ef.ml
@@ -51,4 +51,5 @@ let context ~lectionary ~commons : (Vocab_ef.season, Vocab_ef.rank) Rite.t =
season_runs = Vocab_ef.seasons;
transfer_target = Precedence_ef.transfer_target;
readings = Lectionary_ef.readings ~lectionary ~commons;
- creed = Rubrics_ef.creed }
+ creed = Rubrics_ef.creed;
+ gloria = Rubrics_ef.gloria }
diff --git a/lib/rites/rite_ef/rite_ef.mli b/lib/rites/rite_ef/rite_ef.mli
index a4b5d87..7025143 100644
--- a/lib/rites/rite_ef/rite_ef.mli
+++ b/lib/rites/rite_ef/rite_ef.mli
@@ -36,6 +36,9 @@ module Rubrics_ef = Rubrics_ef
- [creed]: {!Rubrics_ef.creed}, RG 475-476 -- whether the Creed is said.
The first rubric in this phase governing a part of Mass rather than
occurrence/precedence.
+ - [gloria]: {!Rubrics_ef.gloria}, RG 431-432 -- whether the Gloria in
+ excelsis is said. Reads {!Rubrics_ef.te_deum} (Breviary nn. 237-238)
+ for RG 431(a)/432(a)'s own deferral.
Deliberately carries no [sanctoral]/[lectionary] fields the way the
original design-doc sketch of [RITE] does: {!Colitur_kernel.Rite.t} (the
diff --git a/lib/rites/rite_ef/rubrics_ef.ml b/lib/rites/rite_ef/rubrics_ef.ml
index ab9da32..a497b57 100644
--- a/lib/rites/rite_ef/rubrics_ef.ml
+++ b/lib/rites/rite_ef/rubrics_ef.ml
@@ -319,3 +319,381 @@ let creed ~(temporal : (Vocab_ef.season, Vocab_ef.rank) Temporal.t)
entry on the list (Sts Peter & Paul) is already [true] via 475(b),
so this branch is redundant, never wrong, for those. *)
List.mem slug creed_apostle_slugs
+
+(* Breviarium Romanum, 1961 Codex Rubricarum, "N) De hymno Te Deum"
+ (docs/research/breviary/rubricae-breviarii-1961.txt; docs/research/
+ breviary/PROVENANCE.md has this source's own provenance and weakness in
+ full), quoted here in full so every branch below can cite its own
+ letter without re-quoting the whole rubric:
+
+ "237. Hymnus Te Deum dicitur ad Matutinum, post ultimam lectionem, loco
+ noni vel tertii responsorii:
+ a) in dominica in albis, in dominica Pentecostes, et in Matutino
+ dominicae Resurrectionis, quod recitatur ab iis qui Vigiliae paschali
+ non interfuerunt;
+ b) in dominicis II classis, exceptis dominicis in Septuagesima, in
+ Sexagesima et in Quinquagesima;
+ c) in omnibus festis;
+ d) per octavas Nativitatis Domini, Paschatis et Pentecostes;
+ e) in Officio feriali temporis natalicii et temporis paschalis;
+ f) in vigiliis Ascensionis et Pentecostes;
+ g) in Officio sanctae Mariae in sabbato.
+
+ 238. Omittitur vero hymnus Te Deum:
+ a) in Officiis de Tempore a dominica I Adventus usque ad vigiliam
+ Nativitatis Domini inclusive; et a dominica in Septuagesima usque ad
+ Sabbatum sanctum inclusive;
+ b) in vigiliis II et III classis, excepta vigilia Ascensionis
+ Domini;
+ c) in omnibus feriis per annum;
+ d) in Officio defunctorum."
+
+ THE WEAKNESS, restated (PROVENANCE.md has the full account): this is a
+ SINGLE WEB TRANSCRIPTION (ceremoniaire.net), not yet checked against a
+ photographic scan -- the weakest-sourced rule in this project. Mitigated,
+ not resolved, by the FIUV universal Ordo's own Te Deum column
+ (test/fixtures/fiuv-ordo-2025-2026.sexp, 262 "Te Deum" rows out of 400 --
+ an independent day-level witness, never itself derived from this
+ transcription) -- see test_fiuv_ordo.ml, which compares [te_deum]'s own
+ output against it. A mismatch there may indict this transcription rather
+ than [te_deum]; adjudicated per that file's own allow-list, not assumed
+ either way.
+
+ SCOPE: this predicate exists ONLY because RG 431(a) below defers a MASS
+ question to it. Building it is not the Divine Office arriving in scope --
+ CLAUDE.md's own "Divine Office remains out of scope" line, and the
+ 2026-08-21 design spec's own SS1, are both unchanged: this borrows ONE
+ Breviary FACT per day (whether Te Deum was said at Matins), never models
+ Matins/Vespers/the psalter/concurrence. *)
+let te_deum ~(temporal : (Vocab_ef.season, Vocab_ef.rank) Temporal.t)
+ ~(observed : Vocab_ef.rank Celebration.t) ~(date : Date.t) : bool =
+ let easter = Computus.gregorian_easter (Date.year date) in
+ let n = Date.to_rata date - Date.to_rata easter in
+ let m = Date.month date and dd = Date.day date in
+ let slug = Slug.to_string observed.Celebration.slug in
+ if
+ (* 238(d): "in Officio defunctorum" -- checked first, the same position
+ and the same {!Colour.Black} proxy [creed]'s own 476(f) branch uses
+ (this file's own header has the full argument for why colour is a
+ sound proxy for "this is a Requiem" on the shipped data, and
+ {!test_colour_black_population_is_exactly_two} in test_rubrics_ef.ml
+ is the SAME two-member population this predicate also depends on --
+ no separate test needed). *)
+ observed.Celebration.colour = Colour.Black
+ then false
+ else if
+ (* 237(a): the three explicitly named Paschaltide days -- Easter
+ Sunday's own Matins (n=0), Low Sunday (n=7), Pentecost Sunday
+ (n=49). Pure Easter-offset arithmetic, the same style [creed]'s own
+ 475(d) uses and for the identical reason: season/rank alone cannot
+ express "this exact day", and nothing else in 237/238 names these
+ three individually.
+
+ HISTORY WORTH KEEPING: this task's own FIRST pass REPLACED this
+ branch (and 237(b) below) with a blanket "every Sunday" rule,
+ having found what looked like a clean 15-for-15 FIUV Ordo
+ contradiction of 237(b)'s own Septuagesima/Sexagesima/Quinquagesima
+ exception. That evidence was ITSELF corrupted: tools/extract_fiuv_
+ ordo.ml's own Te Deum parser recognised only ONE of the source's two
+ negative phrasings ("non dicitur Te Deum"), so every "sine Te Deum"
+ occurrence -- which is how the source actually negates a SUNDAY's
+ own Te Deum, found only by reading the raw pdftotext dump by hand,
+ not by trusting the fixture's own coverage counts -- fell through to
+ a bare "Te Deum" substring match and was wrongly recorded [true].
+ Fixed in the extractor (see its own citation, tools/extract_fiuv_
+ ordo.ml); the fixture was regenerated; 24 of the fixture's 400 rows
+ flipped, EVERY ONE true->false, EVERY ONE a day this branch or
+ 237(b) below governs. The blanket rule was reverted the moment the
+ corrected data confirmed the ORIGINAL literal reading instead:
+ 238(a)'s own window DOES silence Advent/Septuagesima/Lent/
+ Passiontide Sundays after all. Left as a worked example, not
+ scrubbed from history: the failure mode was believing a clean-
+ looking oracle correlation over re-deriving the primary text,
+ exactly backwards from what "adjudicate, don't assume" should have
+ produced -- caught only by cross-checking the raw source directly
+ once the shape looked suspiciously total. *)
+ n = 0 || n = 7 || n = 49
+ then true
+ else if
+ (* 237(f): the vigils of Ascension (n=38) and Pentecost (n=48), checked
+ BEFORE 238(b)'s general vigil omission below -- both are otherwise
+ reachable by it (Ascension's vigil is [Class2], squarely inside
+ 238(b)'s own "II et III classis"; Pentecost's is [Class1], RG 91
+ entry 9, so 238(b) could never have reached it regardless, but is
+ named here anyway rather than left to fall through to 237(c), the
+ same "cite the specific clause, not a catch-all" discipline this
+ whole module holds to). *)
+ n = 38 || n = 48
+ then true
+ else if
+ (* 237(d): the three privileged octaves -- reuses [creed]'s own three
+ windows verbatim (that function's own 475(d) comment has the full
+ citation and the argument for why a season- or rank-based test
+ would wrongly include the Ascension/Pentecost-Vigil days this
+ window must exclude). Overlaps 237(a) at n=0/7/49 -- redundant, not
+ wrong, the same "never the FIRST branch to grant those [true]"
+ pattern 475(b) documents for I-class Sundays. *)
+ (m = 12 && dd >= 25 && dd <= 31)
+ || (m = 1 && dd = 1)
+ || (n >= 0 && n <= 7)
+ || (n >= 49 && n <= 56)
+ then true
+ else if
+ (* 238(b): "vigiliis II et III classis" -- {!Precedence_ef.is_omissible_vigil}
+ is exactly this rank test (Class2 or Class3), reused rather than
+ re-derived, paired with {!Precedence_ef.is_vigil} the same way
+ [creed]'s own RG 28-34 branch already pairs them. The Ascension
+ vigil (237(f) above, already [true]) can never reach this branch;
+ the four sanctoral vigils (StJohnBaptist, SsPeter&Paul, StLawrence,
+ the Assumption -- {!Precedence_ef.vigil_feast_table}'s own
+ population) are exactly what this branch excludes. *)
+ Precedence_ef.is_omissible_vigil observed.Celebration.rank && Precedence_ef.is_vigil slug
+ then false
+ else if
+ (* NOT 238(b)'s own text (which names only "II et III classis"): the
+ Nativity Vigil ([Class1], RG 91 entry 5) is excluded here on the
+ SAME RG 21/35 taxonomy argument [creed]'s own RG 28-34 comment
+ already makes for the Paschal Vigil -- "vigilia" is its own
+ liturgical-day category, distinct from "festum", regardless of
+ class; RG 30's "beyond losing" is a PRECEDENCE exemption (nothing
+ lesser can displace it), not a claim that a vigil IS a festum for
+ Breviary purposes. Flagged honestly as an INFERENCE, not a literal
+ 238(b) citation -- checked against the FIUV Ordo's own Te Deum
+ marker for 24 December in test_fiuv_ordo.ml, since this is exactly
+ the shape a transcription gap could get wrong either direction. *)
+ Precedence_ef.is_vigil slug
+ then false
+ else if
+ (* 238(c)/RG 23: Ash Wednesday and every feria of Holy Week, the Sacred
+ Triduum included -- reuses [creed]'s own RG 23 test verbatim (that
+ function's own comment has the full citation and the argument for
+ why this excludes feria I classis specifically, not ferias in
+ general). *)
+ n = -46 || (n >= -6 && n <= -1)
+ then false
+ else if
+ (* 237(b): "in dominicis II classis, exceptis dominicis in Septuagesima,
+ in Sexagesima et in Quinquagesima" -- colitur's own single
+ [Septuagesima] season covers exactly those three Sundays (see
+ [season_colour]'s own grouping, temporal_ef.ml), so the exception is
+ one season-equality test. RE-VERIFIED, not merely restored: the
+ corrected FIUV extraction (237(a)'s own comment above has the full
+ account) shows all three Septuagesima-season Sundays [false], and
+ every OTHER, ordinary Class2 Sunday the fixture's window reaches
+ [true] -- exactly this clause's own literal text, no correction
+ needed here after all. Reads [temporal.weekday]/[.season], not
+ [observed]'s slug: unlike [creed]'s own 475(a), the Breviary's text
+ carries NO "even when a feast displaces the Sunday's own Office"
+ exception -- when a feast genuinely takes the Sunday's place (RG
+ 16(a)), Matins says the FEAST's own Office, and 237(c) below decides
+ it on the feast's own terms, not this clause. Advent/Lent/
+ Passiontide Sundays are [Class1], never [Class2] ([creed]'s own RG
+ 11-12 citation, temporal_ef.ml), so this guard correctly excludes
+ them without a separate season check; [observed.rank], not
+ [temporal]'s own season-derived rank, is read here on purpose, for
+ the same RG 16(a) reason [Precedence.rules.admit]'s own
+ [~temporal] parameter exists: a feast that wins the day can carry a
+ DIFFERENT rank than the Sunday it displaced. *)
+ temporal.Temporal.weekday = Date.Sun
+ && observed.Celebration.rank = Vocab_ef.Class2
+ && temporal.Temporal.season <> Vocab_ef.Septuagesima
+ then true
+ else if
+ (* 237(g): the votive Office of the BVM on Saturday, RG 78/91 entry 27
+ -- {!Temporal_ef}'s own [subject = Bvm]/[Class4] pairing, the same
+ shape [creed]'s own 476(d) comment and the register's RG 112(d) fix
+ already establish as unique to this office (every OTHER
+ [subject = Bvm] candidate in the shipped data is [Commemoration_only]
+ and can therefore never be [observed]). *)
+ observed.Celebration.subject = Subject.Bvm && observed.Celebration.rank = Vocab_ef.Class4
+ then true
+ else if
+ (* 237(e): "Officio feriali temporis natalicii et temporis paschalis" --
+ every remaining (non-octave, non-vigil, non-BVM-Saturday) FERIA of
+ Christmastide or Paschaltide: the 2-5 January ferias, and the
+ ordinary weeks of Paschaltide (Rogation Monday/Tuesday included).
+ [temporal.weekday <> Sun] keeps this to FERIAS only, matching the
+ clause's own "Officio FERIALI" text; a Sunday in either season is
+ already [true] via the Sunday rule above regardless, so this guard
+ changes no OUTCOME, only which clause gets credit for it. *)
+ (temporal.Temporal.season = Vocab_ef.Christmastide
+ || temporal.Temporal.season = Vocab_ef.Paschaltide)
+ && temporal.Temporal.weekday <> Date.Sun
+ then true
+ else
+ (* 237(c): "in omnibus festis" -- every remaining genuine festum. By
+ this point every named Paschaltide day, every ordinary Sunday
+ (Class2, outside Septuagesima), every vigil, every feria I classis,
+ every Christmastide/Paschaltide feria and every BVM Saturday Office
+ has already been excluded or granted above, so what reaches here is
+ exactly: {!Temporal_ef.named}'s remaining population
+ (Epiphany, Ascension, Corpus Christi, the Sacred Heart, Christ the
+ King -- tested by PRESENCE in that table, since every [named] entry
+ carries [subject = Temporal] like any other, see [creed]'s own
+ 475(c) comment); and every genuine sanctoral feast actually observed
+ ([subject = Saint], or one of the handful of [subject = Lord]/[Bvm]
+ entries -- Holy Family, Holy Name of Jesus, the six [Lord]-tagged
+ sanctoral feasts, [most-holy-name-of-mary] -- [creed]'s own 475(c)
+ comment has the full census). The two ferial exceptions that ALSO
+ carry [Lord]/[Bvm] (the Sacred Triduum, the BVM Saturday Office) are
+ unreachable here: both were already excluded above (feria I
+ classis; 237(g)).
+
+ [Temporal_ef.named]'s FIRST disjunct EXCLUDES Passion Sunday and
+ Palm Sunday BY THEIR OWN SLUG -- not by [temporal.weekday <> Sun],
+ which a first pass of this fix tried and had to REVERT: Christ the
+ King is ALSO always a Sunday (its own [christ_the_king] anchor
+ IS "the last Sunday of October"), [Class1] like Passion/Palm
+ Sunday, so a blanket weekday guard wrongly excluded it too --
+ caught immediately by the LMS Ordo's own Gloria axis
+ (2024-10-27, "colitur gloria=false, Ordo gloria=true"), a
+ regression a same-session review round found before this task
+ closed. Passion Sunday and Palm Sunday are excluded because
+ neither is a genuine "festum" (RG 35's own taxonomy makes
+ "dominica" its own category, distinct from "festum") -- {!Temporal_
+ ef.named} carries them anyway (RG 91 entry 6, for its own
+ occurrence-table reasons), so without SOME exclusion both would
+ wrongly reach [true] here BY ACCIDENT of table membership --
+ confirmed wrong directly against the corrected FIUV extraction
+ (237(a)'s own comment above has the full account of the extractor
+ bug this was found alongside): both dates are [false] in the
+ source. Epiphany, Ascension, Corpus Christi, the Sacred Heart and
+ Christ the King -- {!Temporal_ef.named}'s only OTHER population --
+ are genuine festa and must NOT be excluded, which is exactly why
+ the exclusion is two named slugs, not a day-of-week predicate. The
+ SECOND disjunct (subject) carries no such guard: a genuine feast
+ that has fully displaced a Sunday's own Office (RG16(a)) still
+ deserves 237(c)'s grant on the FEAST's own terms, regardless of
+ what day of the week it falls on.
+
+ A plain, unnamed weekday feria (no Sunday, no vigil, no octave,
+ [named] = [None], [subject = Temporal]) correctly falls through to
+ [false] here -- 238(c)'s own "in omnibus feriis". *)
+ (Temporal_ef.named date <> None && slug <> "ef-passion-sunday" && slug <> "ef-palm-sunday")
+ || observed.Celebration.subject = Subject.Saint
+ || observed.Celebration.subject = Subject.Lord
+ || observed.Celebration.subject = Subject.Bvm
+
+(* Missale Romanum, Rubricae Generales, Caput XVII("De Ritibus servandis in
+ celebratione Missae"), "C) De hymno Glória in excélsis" (docs/research/
+ LT.txt, grep "Hymnus Glória"), quoted here in full:
+
+ "431. Hymnus Gloria in excelsis dicitur:
+ a) in Missis quae respondent Officio diei, quotiescumque ad
+ Matutinum dictus est hymnus Te Deum;
+ b) in Missis festivis de quibus n. 302;
+ c) in Missis feriae V in Cena Domini, et in Missa Vigiliae
+ paschalis;
+ d) in Missis votivis I, II et III classis, nisi adhibeatur color
+ violaceus paramentorum;
+ e) in Missis votivis IV classis de Angelis, quocumque die, et de B.
+ Maria Virg. quae in sabbato celebrantur.
+
+ 432. Hymnus Gloria in excelsis omittitur:
+ a) in Missis quae respondent Officio diei, quando ad Matutinum
+ omittitur hymnus Te Deum;
+ b) in omnibus Missis in quibus adhibetur color violaceus
+ paramentorum;
+ c) in Missis votivis IV classis, iis exceptis de quibus n. 431 e;
+ d) in Missis defunctorum."
+
+ SCOPE NOTE, checked once here rather than at every clause, the same
+ discipline [creed]'s own header uses: this engine resolves ONE Mass per
+ civil day (Rite.t.readings' own doc comment) -- it has no separate
+ "which votive Mass is said" dimension. n. 301-303 (LT.txt, immediately
+ above 431), quoted in substance: 301 defines "Missa de festo" in the
+ NARROW sense as the Mass of the day's own Office -- exactly what
+ [Rite_ef.Lectionary_ef.readings] already resolves for every day,
+ including a BORROWED formulary (a weekday resuming the preceding
+ Sunday's Mass, a saint using his assigned Common): still "the Mass which
+ corresponds to the day's own Office" in 431(a)/432(a)'s own sense, so
+ 431(a)/432(a) alone already cover it. 302's WIDER sense -- (a) a
+ III-class feast's own Mass said despite being impeded by another
+ III-class feast, (b) a commemoration's own Mass said in place of the
+ day's Office, (c) a saint's Mass said on his Martyrology elogium day --
+ are all cases of a DIFFERENT Mass than the day's own resolved Office
+ being said, which this engine does not model; 431(b) is therefore
+ genuinely N/A, not merely unread. 431(d)/(e) and 432(c) are about VOTIVE
+ MASS CLASSES (I-IV), a dimension this engine has no field for at all --
+ also N/A, EXCEPT 431(e)'s own "de B. Maria Virg. quae in sabbato
+ celebrantur" half: colitur does not model that Office as a votive Mass
+ (it has no votive-Mass dimension to model it AS), it models it as an
+ ORDINARY Office (RG 78's own text, [te_deum]'s own 237(g) branch above),
+ so its Gloria is produced as a side effect of 431(a) reading [te_deum],
+ not by a dedicated 431(e) branch -- checked directly: [te_deum]'s 237(g)
+ branch is unconditional (not colour-gated), and this Office's own colour
+ is white (never violet), so 432(b) below can never suppress it either.
+ 431(e)'s "de Angelis" half (the votive Mass of the Angels) has no data
+ in this engine at all and stays N/A. *)
+let gloria ~(temporal : (Vocab_ef.season, Vocab_ef.rank) Temporal.t)
+ ~(observed : Vocab_ef.rank Celebration.t) ~(date : Date.t) : bool =
+ let easter = Computus.gregorian_easter (Date.year date) in
+ let n = Date.to_rata date - Date.to_rata easter in
+ if
+ (* 432(d): "in Missis defunctorum" -- checked first, the same
+ {!Colour.Black} proxy [creed]'s own 476(f) and [te_deum]'s own
+ 238(d) branch both use. Correctly also excludes Good Friday
+ (n=-2, [Colour.Black], temporal_ef.ml's own RG 132 citation) --
+ which has no Mass at all in the 1955-restored Holy Week, so the
+ question is moot there regardless; the same "belt and braces"
+ stance [creed]'s own 476(f) comment takes for the identical day. *)
+ observed.Celebration.colour = Colour.Black
+ then false
+ else if
+ (* 431(c): "in Missis feriae V in Cena Domini, et in Missa Vigiliae
+ paschalis" -- Holy Thursday (n=-3) and the Easter Vigil Mass (n=-1,
+ Holy Saturday's own date). Checked BEFORE 432(b)'s general violet
+ exclusion below and before [te_deum] is ever read: this clause is
+ lex specialis over both. It must outrank 432(b) specifically
+ because colitur's own per-day colour model gives Holy Saturday
+ [Colour.Violet] (Passiontide's [season_colour], temporal_ef.ml --
+ the historical vestment change from violet to white happens AT the
+ Gloria itself, a per-action nuance this whole day/colour model
+ already cannot express, the same acknowledged gap RG 126's palm
+ procession and RG 128's Good Friday Communion carry, temporal_ef.ml's
+ own citations) -- without this clause checked first, 432(b) would
+ wrongly silence the one Mass whose own Gloria is historically
+ unmistakable (the bells and organ restored at the Vigil). It must
+ also outrank [te_deum]: neither day's own Matins says Te Deum
+ (both are governed by [te_deum]'s own feria-I-classis exclusion,
+ n=-46/[-6,-1], the Sacred Triduum included), so without this
+ explicit override the Gloria would be wrongly silenced there too. *)
+ n = -3 || n = -1
+ then true
+ else if
+ (* 432(b): "in omnibus Missis in quibus adhibetur color violaceus
+ paramentorum" -- independent and colour-keyed, exactly as the task
+ brief states; NOT a substitute for [te_deum] below, which still
+ decides every Mass this clause does not itself silence. Genuinely
+ unconditional ("in omnibus Missis") -- checked directly against
+ every violet day in the domain-wide sweep (see the module's own
+ test file), never merely assumed.
+
+ [Colour.Rose] found and DELIBERATELY NOT added here, a real
+ "checked, then reverted" episode kept for the record: a first pass
+ of this task, WHILE the (since-reverted) blanket "every Sunday
+ says Te Deum" mutation to [te_deum] was in place, found Gaudete
+ and Laetare ([is_rose_sunday]) wrongly getting [gloria]=true and
+ fixed it by unioning [Colour.Rose] into this branch. Once
+ [te_deum] reverted to 237(b)'s own literal [Class2] guard, the
+ fix became REDUNDANT, not merely coincidentally silent: Rose can
+ ONLY ever colour a Sunday of Advent or Lent
+ ({!Temporal_ef.is_rose_sunday}'s own two cases), and EVERY Sunday
+ of Advent or Lent is [Class1] BY CONSTRUCTION
+ ({!Temporal_ef.temporal}'s own [match s with Advent | Lent ->
+ Class1 | _ -> Class2]) -- a structural guarantee, not a
+ coincidence of the shipped data, so [te_deum]'s own [Class2] guard
+ ALREADY excludes every Rose day before this branch is ever
+ reached. Verified, not assumed: removing this branch's own Rose
+ arm and re-running the full suite (including the two LMS dates,
+ 2023-12-17 and 2024-03-10, this finding was originally pinned
+ against) left every test green. Left out rather than kept as
+ dead code that would misleadingly read as load-bearing. *)
+ observed.Celebration.colour = Colour.Violet
+ then false
+ else
+ (* 431(a)/432(a): "in Missis quae respondent Officio diei,
+ quotiescumque/quando... Te Deum [dictus est/omittitur]" -- the
+ Gloria mirrors [te_deum] exactly for every Mass not already decided
+ above. This is the ONE call site [te_deum] exists to serve. *)
+ te_deum ~temporal ~observed ~date
diff --git a/lib/rites/rite_ef/rubrics_ef.mli b/lib/rites/rite_ef/rubrics_ef.mli
index 7a1284b..618af65 100644
--- a/lib/rites/rite_ef/rubrics_ef.mli
+++ b/lib/rites/rite_ef/rubrics_ef.mli
@@ -38,3 +38,33 @@ val creed :
observed:Vocab_ef.rank Celebration.t ->
date:Date.t ->
bool
+
+(** Whether the Te Deum was said at Matins (Breviary 1961 Codex Rubricarum
+ nn. 237-238) -- NOT the Divine Office arriving in scope, but a single
+ Breviary fact {!gloria}'s own RG 431(a) defers a Mass question to. See
+ the .ml's own header for the rubric quoted in full, every branch's own
+ citation, and this source's own stated weakness (a single, not yet
+ scan-verified, web transcription -- docs/research/breviary/PROVENANCE.md).
+ Same three parameters as {!creed}, for the same reasons: [temporal] for
+ the day's own weekday/season, [observed] for the celebration whose
+ Office is actually kept, [date] for the Easter-relative window
+ questions. *)
+val te_deum :
+ temporal:(Vocab_ef.season, Vocab_ef.rank) Temporal.t ->
+ observed:Vocab_ef.rank Celebration.t ->
+ date:Date.t ->
+ bool
+
+(** Whether the Gloria in excelsis is said at this day's Mass (RG 431-432).
+ 431(a)/432(a) defer to {!te_deum}; 431(c) (Holy Thursday, the Easter
+ Vigil Mass) and 432(b)/(d) (violet vestments; a Requiem) are
+ independent overrides, checked ahead of the Te Deum-derived answer --
+ see the .ml's own header for the full account, including which of
+ 431/432's own clauses this engine has no votive-Mass-class dimension to
+ implement and are therefore marked not-applicable rather than silently
+ skipped. *)
+val gloria :
+ temporal:(Vocab_ef.season, Vocab_ef.rank) Temporal.t ->
+ observed:Vocab_ef.rank Celebration.t ->
+ date:Date.t ->
+ bool
diff --git a/man/colitur.1 b/man/colitur.1
index 09414ea..88c5fab 100644
--- a/man/colitur.1
+++ b/man/colitur.1
@@ -122,12 +122,13 @@ occurrence, commemoration and transfer.
The Mass reading citations, one line per day.
.TP
.BI rubrics " YEAR"
-Two rubrics of the Mass, one line per day: which formulary is actually
+Three rubrics of the Mass, one line per day: which formulary is actually
said \(em not always the day's own: a weekday with no proper resumes the
preceding Sunday's, a saint with no proper says his assigned Common, and
RG 78/309(a)'s votive Saturday Mass of Our Lady is said in place of an
-unoccupied office's own \(em and whether the Creed is said (RG 475\-476).
-See
+unoccupied office's own \(em whether the Creed is said (RG 475\-476), and
+whether the Gloria in excelsis is said (RG 431\-432, deferring to the
+Breviary's own Te Deum rule, nn. 237\-238, for RG 431(a)). See
.B OUTPUT FORMAT
below.
.TP
@@ -460,12 +461,13 @@ own trailing field, above.
.SS rubrics
.RS
.nf
-date [TAB] formulary\-slug [TAB] source [TAB] creed
+date [TAB] formulary\-slug [TAB] source [TAB] creed [TAB] gloria
.fi
.RE
.PP
The day's own Mass formulary (which slug's Mass is actually said, and how
-that was decided), followed by whether the Creed is said (RG 475\-476).
+that was decided), followed by whether the Creed is said (RG 475\-476) and
+whether the Gloria in excelsis is said (RG 431\-432).
.B rubrics
separates its fields with a literal TAB \(em not a plain space like
.B day
@@ -489,7 +491,9 @@ leave it unsplittable by field number.
is one of
.BR proper ", " own ", " preceding\-sunday ", " common " or " votive .
.I creed
-is
+and
+.I gloria
+are each
.B true
or
.B false
@@ -498,15 +502,15 @@ or
or
.RB \(lq 1/0 \(rq :
this row has no other boolean field to be consistent with). A day with no
-Mass at all for a rite that has not implemented the rule reads
+Mass at all for a rite that has not implemented a rule reads
.B false
outright \(em it is a decision, never a third \(lqunknown\(rq state.
.RS
.nf
-2026\-01\-01 [TAB] ef\-circumcision [TAB] own [TAB] true
-2038\-03\-08 [TAB] john\-of\-god [TAB] proper [TAB] false
-2025\-12\-01 [TAB] ef\-advent\-sunday\-1 [TAB] preceding\-sunday [TAB] false
+2026\-01\-01 [TAB] ef\-circumcision [TAB] own [TAB] true [TAB] true
+2038\-03\-08 [TAB] john\-of\-god [TAB] proper [TAB] false [TAB] true
+2025\-12\-01 [TAB] ef\-advent\-sunday\-1 [TAB] preceding\-sunday [TAB] false [TAB] false
.fi
.RE
.PP
diff --git a/test/cli.t b/test/cli.t
index 5bf8d83..8bd5b9f 100644
--- a/test/cli.t
+++ b/test/cli.t
@@ -210,9 +210,9 @@ separate command for the same mechanical reason `readings` is: `day`'s row
is fixed-width space-separated with a variable-length "+slug" tail.
$ colitur rubrics 2026 | head -3
- 2026-01-01 ef-circumcision own true
- 2026-01-02 ef-christmas-1-friday own false
- 2026-01-03 ef-christmas-1-saturday votive false
+ 2026-01-01 ef-circumcision own true true
+ 2026-01-02 ef-christmas-1-friday own false true
+ 2026-01-03 ef-christmas-1-saturday votive false true
$ colitur rubrics 2026 | wc -l
365
@@ -224,19 +224,19 @@ apply to it -- step 2 does (the day's own temporal slug in the lectionary),
tagged `own`. Contrast a real sanctoral saint with his own proper:
$ colitur rubrics 2038 | grep '^2038-03-08'
- 2038-03-08 john-of-god proper false
+ 2038-03-08 john-of-god proper false true
A saint with no proper of his own says his assigned Common (step 4):
$ colitur rubrics 2038 | grep '^2038-03-06'
- 2038-03-06 common-of-non-virgins-1 common false
+ 2038-03-06 common-of-non-virgins-1 common false true
A weekday with no proper of its own resumes the preceding Sunday's, never
its own observed slug -- 1 December 2025 is the Monday after Advent I, and
Advent's ferias have no Mass of their own (step 3):
$ colitur rubrics 2025 | grep '^2025-12-01'
- 2025-12-01 ef-advent-sunday-1 preceding-sunday false
+ 2025-12-01 ef-advent-sunday-1 preceding-sunday false false
3 January 2026 above ("votive") is the RG 78/309(a) Saturday Mass of Our
Lady, said IN PLACE of the day's own office's Mass while the office (an
@@ -257,9 +257,9 @@ diocesan overlay's local patron observed instead (no proper or Common of his
own in the fixture), the chain falls all the way back to step 3:
$ colitur rubrics 2026 --overlay fixtures/overlay-example-diocesan.sexp | grep '^2026-07-11'
- 2026-07-11 ef-time-after-pentecost-sunday-6 preceding-sunday false
+ 2026-07-11 ef-time-after-pentecost-sunday-6 preceding-sunday false true
$ colitur rubrics 2026 | grep '^2026-07-11'
- 2026-07-11 ef-time-after-pentecost-6-saturday votive false
+ 2026-07-11 ef-time-after-pentecost-6-saturday votive false true
`--lang`/`--raw`/`--sigla-*` are refused rather than silently ignored, unlike
`readings`: this row resolves no display name and no citation for any of
@@ -343,13 +343,13 @@ prints for the identical day, so the two cannot silently drift apart
again in either direction:
$ colitur --help | grep '^ rubrics date'
- rubrics date, formulary slug, source, creed -- TAB-separated
+ rubrics date, formulary slug, source, creed, gloria -- TAB-separated
$ colitur --help | sed -n '/^ rubrics date/{n;p}'
- 2026-01-01[TAB]ef-circumcision[TAB]own[TAB]true
+ 2026-01-01[TAB]ef-circumcision[TAB]own[TAB]true[TAB]true
$ colitur rubrics 2026 | grep '^2026-01-01' | sed $'s/\t/[TAB]/g'
- 2026-01-01[TAB]ef-circumcision[TAB]own[TAB]true
+ 2026-01-01[TAB]ef-circumcision[TAB]own[TAB]true[TAB]true
--version prints the version alone, to standard output, exit 0. Deliberately
not embedded in the help text above: this pin would then have to be edited
@@ -573,10 +573,24 @@ across many lines' own wrap points, not just the days whose DATA changed
-- confirmed directly (diffed the full sexp output line by line): every
difference is exactly this [said] shape change or a consequent wrap
shift, nothing else. Not a claim that [emit]'s FORMAT changed, only that
-individual records' pretty-printed SHAPE did:
+individual records' pretty-printed SHAPE did.
+
+9025 -> 9197 (Gloria, celebrant-rubrics-phase1 Phase 2): {!Liturgical_day.t}
+gained a [gloria] field, the same seam [creed] already used -- [emit
+--format sexp] dumps the whole record ({!Sexplib.Sexp.to_string_hum} over
+[Liturgical_day.sexp_of_t]) unlike [csv]/[json]/[xml] (a curated
+[View]/[Record] projection that has never included [creed] either, hence
+their own line counts above are UNCHANGED by this task -- confirmed by
+this cram file's own diff touching only the [sexp] count). All 365 of
+2027's records print a new [(gloria <bool>)] token (checked directly,
+[grep -c gloria]), but the wrap-point mechanics are the same cosmetic
+reflow the two entries above describe, not a fixed one-line-per-record
+addition: 2027-01-01's own record wraps [gloria] onto its own new line,
+while 2027-01-02's fits it on the same line as [creed] and [formulary] --
+172 of 365 records happened to cross a wrap boundary, the rest did not.
$ colitur emit --format sexp --from 2027 --to 2027 | wc -l
- 9025
+ 9197
$ colitur emit --format xml --from 2027 --to 2027 | head -2
<?xml version="1.0" encoding="UTF-8"?>
diff --git a/test/fixtures/fiuv-ordo-2025-2026.sexp b/test/fixtures/fiuv-ordo-2025-2026.sexp
index 7b72ca3..d31c5d5 100644
--- a/test/fixtures/fiuv-ordo-2025-2026.sexp
+++ b/test/fixtures/fiuv-ordo-2025-2026.sexp
@@ -97,7 +97,24 @@
;
; MEASURED DISTRIBUTION (this extraction, not the brief's figures): Gloria
; true=269 false=130 unresolved=1; Credo true=116 false=283 unresolved=1;
-; Te Deum true=231 false=42 unresolved=127.
+; Te Deum true=207 false=66 unresolved=127.
+;
+; RE-EXTRACTED (celebrant-rubrics-phase1 Phase 2, 2026-08-22): the FIRST
+; extraction's own Te Deum parser recognised only ONE of the source's two
+; negative phrasings ("non dicitur Te Deum") -- "sine Te Deum" (how the
+; source actually negates a SUNDAY's own Te Deum, among others) fell
+; through to a bare "Te Deum" substring match and was wrongly read
+; [true]. Found by hand, comparing the raw pdftotext dump against this
+; fixture's own values directly, not by any coverage check (both counted
+; the same 127 unresolved rows before and after). Fixed in
+; tools/extract_fiuv_ordo.ml's own [extract_te_deum] (see its own
+; citation); this fixture re-extracted from the SAME pdftotext dump
+; (SHA-256 of the source PDF unchanged, above). 24 of 400 rows changed,
+; every one Te Deum true->false, every one independently confirmed
+; against the raw text: true 231->207, false 42->66, unresolved 127
+; unchanged. See lib/rites/rite_ef/rubrics_ef.ml's own [te_deum] header
+; (237(a)'s comment) for the full account of what this corrected, and
+; the .superpowers task report for the complete before/after date list.
(((date 2025-11-27) (class_ ("IV cl."))
(title "Vir Feria V post Dom. XXIV & Ultima post Pentecosten, De ea,")
(te_deum (false)) (gloria (false)) (credo (false))
@@ -109,7 +126,7 @@
(title "Alb Sabb. S. Maria in Sabbato,") (te_deum (true)) (gloria (true))
(credo (false)) (praef ("BMV Et te in Veneratione \226\128\147")))
((date 2025-11-30) (class_ ("I cl."))
- (title "Viol DOM. I ADVENTUS, De ea,") (te_deum (true)) (gloria (false))
+ (title "Viol DOM. I ADVENTUS, De ea,") (te_deum (false)) (gloria (false))
(credo (true)) (praef ("Trinit. Ad II")))
((date 2025-12-01) (class_ ("III cl."))
(title "Viol Feria II post Dom. I Adventus, De ea,") (te_deum ())
@@ -134,8 +151,8 @@
(gloria (true)) (credo (false))
(praef ("comm. Sabbatum primum in mense. I")))
((date 2025-12-07) (class_ ("I cl."))
- (title "Viol DOM. II ADVENTUS, De ea,") (te_deum (true)) (gloria (false))
- (credo (true)) (praef ("Trinit. Ad II")))
+ (title "Viol DOM. II ADVENTUS, De ea,") (te_deum (false))
+ (gloria (false)) (credo (true)) (praef ("Trinit. Ad II")))
((date 2025-12-08) (class_ ("I cl."))
(title "Alb Feria II. IN CONCEPTIONE IMMACULATA B. MARIAE VIRGINIS,")
(te_deum ()) (gloria (true)) (credo (true))
@@ -156,7 +173,7 @@
(title "Rub Sabb. S Luciae Virg. et Mart.,") (te_deum (true))
(gloria (true)) (credo (false)) (praef ("comm. vel de Martyribus. I")))
((date 2025-12-14) (class_ ("I cl."))
- (title "Viol/ DOM. III ADVENTUS (GAUDETE), De ea,") (te_deum (true))
+ (title "Viol/ DOM. III ADVENTUS (GAUDETE), De ea,") (te_deum (false))
(gloria (false)) (credo (true)) (praef ("Trinit. Ad II")))
((date 2025-12-15) (class_ ("III cl."))
(title "Viol Feria II post Dom. III Adventus (Gaudete), De ea,")
@@ -180,8 +197,8 @@
(praef
("comm. \226\128\147 Quoad Flectamus genua vide RM 440. Quoad lectiones vide RM 468. I")))
((date 2025-12-21) (class_ ("I cl."))
- (title "Viol DOM. IV ADVENTUS, De ea,") (te_deum (true)) (gloria (false))
- (credo (true)) (praef ("Trinit. Ad II")))
+ (title "Viol DOM. IV ADVENTUS, De ea,") (te_deum (false))
+ (gloria (false)) (credo (true)) (praef ("Trinit. Ad II")))
((date 2025-12-22) (class_ ("II cl."))
(title "Viol FERIA II POST DOM. IV ADVENTUS, De ea,") (te_deum ())
(gloria (false)) (credo (false)) (praef (comm.)))
@@ -189,7 +206,7 @@
(title "Viol FERIA III POST DOM. IV ADVENTUS, De ea,") (te_deum ())
(gloria (false)) (credo (false)) (praef (comm.)))
((date 2025-12-24) (class_ ("I cl."))
- (title "Viol Feria IV. VIGILIA NATIVITATIS DOMINI,") (te_deum (true))
+ (title "Viol Feria IV. VIGILIA NATIVITATIS DOMINI,") (te_deum (false))
(gloria (false)) (credo (false)) (praef ("comm. I")))
((date 2025-12-25) (class_ ("I cl."))
(title "Alb Feria V. IN NATIVITATE DOMINI,") (te_deum ()) (gloria (true))
@@ -331,7 +348,7 @@
(title "Alb Sabb. S Ioannis Bosco Conf.,") (te_deum (true))
(gloria (true)) (credo (false)) (praef ("comm. I")))
((date 2026-02-01) (class_ ("II cl."))
- (title "Viol DOM. SEPTUAGESIMAE, De ea,") (te_deum (true))
+ (title "Viol DOM. SEPTUAGESIMAE, De ea,") (te_deum (false))
(gloria (false)) (credo (true)) (praef ("Trinit. II")))
((date 2026-02-02) (class_ ("II cl."))
(title "Alb Feria II. IN PURIFICATIONE B. MARIAE VIRG.,") (te_deum ())
@@ -354,8 +371,8 @@
(title "Alb Sabb. S Romualdi Abb.,") (te_deum (true)) (gloria (true))
(credo (false)) (praef ("comm. Sabbatum primum in mense. I")))
((date 2026-02-08) (class_ ("II cl."))
- (title "Viol DOM. SEXAGESIMAE, De ea,") (te_deum (true)) (gloria (false))
- (credo (true)) (praef ("Trinit. II")))
+ (title "Viol DOM. SEXAGESIMAE, De ea,") (te_deum (false))
+ (gloria (false)) (credo (true)) (praef ("Trinit. II")))
((date 2026-02-09) (class_ ("III cl."))
(title "Alb Feria II. S Cyrilli Ep. Alexandrini, Conf. et Eccl. Doct.,")
(te_deum (true)) (gloria (true)) (credo (false))
@@ -379,7 +396,7 @@
(title "Alb Sancta Maria in Sabbato,") (te_deum (true)) (gloria (true))
(credo (false)) (praef ("BMV Et te in Veneratione \226\128\147")))
((date 2026-02-15) (class_ ("II cl."))
- (title "Viol DOM. QUINQUAGESIMAE, De ea,") (te_deum (true))
+ (title "Viol DOM. QUINQUAGESIMAE, De ea,") (te_deum (false))
(gloria (false)) (credo (true)) (praef ("Trinit. II")))
((date 2026-02-16) (class_ ("IV cl."))
(title "Viol Feria II Dom. Quinquagesimae, De ea,") (te_deum ())
@@ -403,7 +420,7 @@
(gloria (false)) (credo (false))
(praef ("Quadr., or. super populum. I")))
((date 2026-02-22) (class_ ("I cl."))
- (title "Viol DOM. I QUADRAGESIMAE, De ea,") (te_deum (true))
+ (title "Viol DOM. I QUADRAGESIMAE, De ea,") (te_deum (false))
(gloria (false)) (credo (true)) (praef ("Quadr. II")))
((date 2026-02-23) (class_ ("III cl."))
(title "Viol Feria II post Dom. I Quadragesimae, De ea,") (te_deum ())
@@ -428,7 +445,7 @@
(praef
("Quadr., or. super populum. \226\128\147 Quoad Flectamus genua vide RM 440. Quoad lectiones vide RM 468. I")))
((date 2026-03-01) (class_ ("I cl."))
- (title "Viol DOM. II QUADRAGESIMAE, De ea,") (te_deum (true))
+ (title "Viol DOM. II QUADRAGESIMAE, De ea,") (te_deum (false))
(gloria (false)) (credo (true)) (praef ("Quadr. II")))
((date 2026-03-02) (class_ ("III cl."))
(title "Viol Feria II post Dom. II Quadragesimae, De ea,") (te_deum ())
@@ -451,7 +468,7 @@
(gloria (false)) (credo (false))
(praef ("Quadr., or. super populum. Sabbatum primum in mense. I")))
((date 2026-03-08) (class_ ("I cl."))
- (title "Viol DOM. III QUADRAGESIMAE, De ea,") (te_deum (true))
+ (title "Viol DOM. III QUADRAGESIMAE, De ea,") (te_deum (false))
(gloria (false)) (credo (true)) (praef ("Quadr. II")))
((date 2026-03-09) (class_ ("III cl."))
(title "Viol Feria II post Dom. III Quadragesimae, De ea,")
@@ -475,7 +492,7 @@
(gloria (false)) (credo (false))
(praef ("Quadr., or. super populum. I")))
((date 2026-03-15) (class_ ("I cl."))
- (title "Viol/ DOM. IV QUADRAGESIMAE (LAETARE), De ea,") (te_deum (true))
+ (title "Viol/ DOM. IV QUADRAGESIMAE (LAETARE), De ea,") (te_deum (false))
(gloria (false)) (credo (true)) (praef ("Quadr. II")))
((date 2026-03-16) (class_ ("III cl."))
(title "Viol Feria II post Dom. IV Quadragesimae (Laetare), De ea,")
@@ -503,8 +520,8 @@
(te_deum (true)) (gloria (false)) (credo (false))
(praef ("Quadr., or. super populum. I")))
((date 2026-03-22) (class_ ("I cl."))
- (title "Viol DOM. I PASSIONIS, De ea,") (te_deum (true)) (gloria (false))
- (credo (true)) (praef ("de Sancta Cruce. II")))
+ (title "Viol DOM. I PASSIONIS, De ea,") (te_deum (false))
+ (gloria (false)) (credo (true)) (praef ("de Sancta Cruce. II")))
((date 2026-03-23) (class_ ("III cl."))
(title "Viol Feria II post Dom. I Passionis, De ea,") (te_deum ())
(gloria (false)) (credo (false))
@@ -533,7 +550,7 @@
((date 2026-03-29) (class_ ("I cl."))
(title
"Rub in Officio, Rub. ad Bened. ramorum et in Processione, Viol. in Missa. DOM. IN PALMIS, De ea,")
- (te_deum (true)) (gloria (false)) (credo (true))
+ (te_deum (false)) (gloria (false)) (credo (true))
(praef
("de Sancta Cruce. \194\171Asperges\194\187 omittitur. \226\128\147 Benedictio palmorum et processio ante missam principalem celebrandae sunt. \226\128\147 Orationes praeparatoriae omittuntur. \226\128\147 Evangelium de passione secundum S Matthiam 26, 36-75; 27,1-60 legitur. Munda cor dicitur, celebrans autem (vel diaconus chronista) signum crucis nec super libro nec super se facit, necque librum osculatur, necque Laus tibi Domine dicit. \226\128\147 Evangelium finale omittitur. \226\128\147 In Missis sine processione, legitur in fine Evangelium Cum appropinquasset de benedictione ramorum. Sacerdotibus plures quam unam missam dicentibus licet Evangelium S Matthi\195\166 27, 45-52 legere potius quam Evangelium Passionis. II")))
((date 2026-03-30) (class_ ("I cl."))
@@ -858,7 +875,7 @@
(gloria (true)) (credo (false)) (praef (comm.)))
((date 2026-06-23) (class_ ("II cl."))
(title "Viol Feria III. VIGILIA NATIVITATIS S IOANNIS * BAPTISTAE,")
- (te_deum (true)) (gloria (false)) (credo (false)) (praef ("comm. I")))
+ (te_deum (false)) (gloria (false)) (credo (false)) (praef ("comm. I")))
((date 2026-06-24) (class_ ("I cl."))
(title "Alb Feria IV. IN NATIVITATE S IOANNIS * BAPTISTAE,") (te_deum ())
(gloria (true)) (credo (true))
@@ -1041,7 +1058,7 @@
(praef ("comm. \226\128\147")))
((date 2026-08-14) (class_ ("II cl."))
(title "Viol Feria VI. VIGILIA ASSUMPTIONIS B. MARIAE VIRG.,")
- (te_deum (true)) (gloria (false)) (credo (false)) (praef ("comm. I")))
+ (te_deum (false)) (gloria (false)) (credo (false)) (praef ("comm. I")))
((date 2026-08-15) (class_ ("I cl."))
(title "Alb Sabb. IN ASSUMPTIONE B. MARIAE VIRG.,") (te_deum ())
(gloria (true)) (credo (true)) (praef ("BMV Et te in Assumptione. Ad")))
@@ -1176,7 +1193,7 @@
(praef
("comm. \226\128\147 Vel (sec. decretum \194\171Cum sanct.\194\187) Missa SS Mauritii et Sociorum Mm. (rub.) Intret in conspectu tuo, Gloria, ors. et Evangelium pr., comm. S Thomae de Villanova Ep. et Conf., praef. comm. vel de Martyribus.")))
((date 2026-09-23) (class_ ("II cl."))
- (title "Viol FERIA IV QUATTUOR TEMP., De ea,") (te_deum (true))
+ (title "Viol FERIA IV QUATTUOR TEMP., De ea,") (te_deum (false))
(gloria (false)) (credo (false))
(praef ("comm. \226\128\147 Quoad Flectamus genua vide RM 440.")))
((date 2026-09-24) (class_ ("IV cl."))
@@ -1184,10 +1201,10 @@
(te_deum (false)) (gloria (false)) (credo (false))
(praef ("comm. \226\128\147")))
((date 2026-09-25) (class_ ("II cl."))
- (title "Viol FERIA VI QUATTUOR TEMP., De ea,") (te_deum (true))
+ (title "Viol FERIA VI QUATTUOR TEMP., De ea,") (te_deum (false))
(gloria (false)) (credo (false)) (praef (comm.)))
((date 2026-09-26) (class_ ("II cl."))
- (title "Viol SABB. QUATTUOR TEMP., De eo,") (te_deum (true))
+ (title "Viol SABB. QUATTUOR TEMP., De eo,") (te_deum (false))
(gloria (false)) (credo (false))
(praef
("comm. \226\128\147 Quoad Flectamus genua vide RM 440. Quoad lectiones vide RM 468. I")))
@@ -1441,7 +1458,7 @@
(title "Alb Sancta Maria in Sabbato,") (te_deum (true)) (gloria (true))
(credo (false)) (praef ("BMV Et te in Veneratione. I")))
((date 2026-11-29) (class_ ("I cl."))
- (title "Viol DOM. I ADVENTUS, De ea,") (te_deum (true)) (gloria (false))
+ (title "Viol DOM. I ADVENTUS, De ea,") (te_deum (false)) (gloria (false))
(credo (true)) (praef ("Trinit. Ad II")))
((date 2026-11-30) (class_ ("II cl."))
(title "Rub Feria II. S ANDREAE * APOSTOLI,") (te_deum ())
@@ -1465,8 +1482,8 @@
(gloria (false)) (credo (false))
(praef ("comm. Sabbatum primum in mense. I")))
((date 2026-12-06) (class_ ("I cl."))
- (title "Viol DOM. II ADVENTUS, De ea,") (te_deum (true)) (gloria (false))
- (credo (true)) (praef ("Trinit. Ad II")))
+ (title "Viol DOM. II ADVENTUS, De ea,") (te_deum (false))
+ (gloria (false)) (credo (true)) (praef ("Trinit. Ad II")))
((date 2026-12-07) (class_ ("III cl. (Priv.)"))
(title "Alb Feria II. S Ambrosii Ep., Conf. et Eccl. Doct.,")
(te_deum (true)) (gloria (true)) (credo (false))
@@ -1488,7 +1505,7 @@
(title "Viol Sabb. post Dom. II Adventus, De eo,") (te_deum ())
(gloria (false)) (credo (false)) (praef ("comm. I")))
((date 2026-12-13) (class_ ("I cl."))
- (title "DOM. III ADVENTUS (GAUDETE), De ea,") (te_deum (true))
+ (title "DOM. III ADVENTUS (GAUDETE), De ea,") (te_deum (false))
(gloria (false)) (credo (true)) (praef ("Trinit. Ad II")))
((date 2026-12-14) (class_ ("III cl."))
(title "Viol Feria II post Dom. III Adventus (Gaudete), De ea,")
@@ -1512,8 +1529,8 @@
(praef
("comm. \226\128\147 Quoad Flectamus genua vide RM 440. Quoad lectiones vide RM 468. I")))
((date 2026-12-20) (class_ ("I cl."))
- (title "Viol DOM. IV ADVENTUS, De ea,") (te_deum (true)) (gloria (false))
- (credo (true)) (praef ("Trinit. Ad II")))
+ (title "Viol DOM. IV ADVENTUS, De ea,") (te_deum (false))
+ (gloria (false)) (credo (true)) (praef ("Trinit. Ad II")))
((date 2026-12-21) (class_ ("II cl."))
(title "Rub Feria II. S THOM\195\134 * APOSTOLI,") (te_deum ())
(gloria (true)) (credo (true)) (praef ("App. Ad")))
@@ -1524,7 +1541,7 @@
(title "Viol FERIA IV POST DOM. IV ADVENTUS, De ea,") (te_deum ())
(gloria (false)) (credo (false)) (praef (comm.)))
((date 2026-12-24) (class_ ("I cl."))
- (title "Viol Feria V. VIGILIA NATIVITATIS DOMINI,") (te_deum (true))
+ (title "Viol Feria V. VIGILIA NATIVITATIS DOMINI,") (te_deum (false))
(gloria (false)) (credo (false)) (praef ("comm. I")))
((date 2026-12-25) (class_ ("I cl."))
(title "Alb Feria VI. IN NATIVITATE DOMINI,") (te_deum ())
diff --git a/test/test_calendar.ml b/test/test_calendar.ml
index 0d402e6..157841b 100644
--- a/test/test_calendar.ml
+++ b/test/test_calendar.ml
@@ -104,10 +104,11 @@ module Fixture = struct
the sanctoral side. *)
let readings ~observed:_ ~temporal:_ ~date:_ ~temporal_at:_ = (None, [])
- (* No fixture here exercises the Creed rubric either -- a rite that has
- not implemented it returns [false] explicitly, {!Rite.t.creed}'s own
- documented default. *)
+ (* No fixture here exercises the Creed or Gloria rubrics either -- a rite
+ that has not implemented them returns [false] explicitly,
+ {!Rite.t.creed}/{!Rite.t.gloria}'s own documented default. *)
let creed ~temporal:_ ~observed:_ ~date:_ = false
+ let gloria ~temporal:_ ~observed:_ ~date:_ = false
let rite : (season, rank) Rite.t =
{ Rite.id = "synthetic-calendar"; vocab; year_start; temporal; anchors = (fun _ -> []);
@@ -119,7 +120,7 @@ module Fixture = struct
(* Not a Roman rite either, so no bissextile-doubling convention:
identity, {!Rite.t.fixed_key}'s own documented default. *)
fixed_key = (fun d -> Some (D.month d, D.day d));
- rules; season_runs = [ A; B ]; transfer_target; readings; creed }
+ rules; season_runs = [ A; B ]; transfer_target; readings; creed; gloria }
let entry ~month ~day ~slug ~rank =
{ Layer.date = (match Date_spec.fixed ~month ~day with Ok d -> d | Error e -> failwith e);
diff --git a/test/test_fiuv_ordo.ml b/test/test_fiuv_ordo.ml
index 8b3e942..24eeed0 100644
--- a/test/test_fiuv_ordo.ml
+++ b/test/test_fiuv_ordo.ml
@@ -68,7 +68,7 @@ let sha256_of_file path =
| Some i -> String.sub line 0 i
| None -> Alcotest.failf "unexpected sha256sum output for %s: %S" path line)
-let fixture_sha256 = "becadaad43b3a42c4eb820cb4e93d68f9b1c07a2c8e5273167cd599758af5c67"
+let fixture_sha256 = "a52cc4dae32ce4d07446c9daa86287cb99796f6584b3d571e3a3cbdc93fca396"
let real_layer () =
let layer =
@@ -132,7 +132,7 @@ let window_last = "2026-12-31"
(* late). *)
(* ---------------------------------------------------------------------- *)
-type colitur_row = { c_date : string; c_creed : bool }
+type colitur_row = { c_date : string; c_creed : bool; c_gloria : bool }
let colitur_rows () =
let layer = real_layer () in
@@ -148,7 +148,50 @@ let colitur_rows () =
let stop = mk window_last in
while Date.compare !d stop <= 0 do
(match Hashtbl.find_opt by_rata (Date.to_rata !d) with
- | Some day -> rows := { c_date = Date.to_iso8601 day.LD.date; c_creed = day.LD.creed } :: !rows
+ | Some day ->
+ rows :=
+ { c_date = Date.to_iso8601 day.LD.date; c_creed = day.LD.creed; c_gloria = day.LD.gloria } :: !rows
+ | None -> Alcotest.failf "no colitur day resolved for %s" (Date.to_iso8601 !d));
+ d := Date.add_days !d 1
+ done;
+ List.rev !rows
+
+(* Te Deum has no colitur-side [Liturgical_day.t] field of its own -- it is
+ a Breviary fact {!Rite_ef.Rubrics_ef.gloria} reads internally, not a Mass
+ part {!Colitur_kernel.Rite.t} exposes. Resolved separately, straight from
+ {!Rite_ef.Rubrics_ef.te_deum}, over the identical window/day set. *)
+type colitur_te_deum_row = {
+ t_date : string;
+ t_te_deum : bool;
+ t_rank : V.rank;
+ t_slug : string;
+ t_has_commemoration : bool;
+}
+
+let colitur_te_deum_rows () =
+ let layer = real_layer () in
+ let rite = Rite_ef.context ~lectionary:(real_lectionary ()) ~commons:(real_commons ()) in
+ let by_rata : (int, (V.season, V.rank) LD.t) Hashtbl.t = Hashtbl.create 800 in
+ for y = 2024 to 2027 do
+ let days = Cal.year rite layer y in
+ Array.iter (fun (d : (V.season, V.rank) LD.t) -> Hashtbl.replace by_rata (Date.to_rata d.LD.date) d) days
+ done;
+ let mk s = match Date.of_iso8601 s with Ok d -> d | Error e -> Alcotest.failf "%s: %s" s e in
+ let rows = ref [] in
+ let d = ref (mk window_first) in
+ let stop = mk window_last in
+ while Date.compare !d stop <= 0 do
+ (match Hashtbl.find_opt by_rata (Date.to_rata !d) with
+ | Some day ->
+ let te_deum =
+ Rite_ef.Rubrics_ef.te_deum ~temporal:day.LD.temporal ~observed:day.LD.observed ~date:day.LD.date
+ in
+ rows :=
+ { t_date = Date.to_iso8601 day.LD.date; t_te_deum = te_deum;
+ t_rank = day.LD.observed.Colitur_kernel.Celebration.rank;
+ t_slug = Colitur_kernel.Slug.to_string day.LD.observed.Colitur_kernel.Celebration.slug;
+ t_has_commemoration = day.LD.commemorations <> [] }
+ :: !rows
| None -> Alcotest.failf "no colitur day resolved for %s" (Date.to_iso8601 !d));
d := Date.add_days !d 1
done;
@@ -258,11 +301,129 @@ let test_creed_matches_or_is_explained () =
Alcotest.failf "allow-list entry %s is declared but never matched a real divergence" e.id)
allow_list
+(* ---------------------------------------------------------------------- *)
+(* Gloria (RG 431-432, {!Rite_ef.Rubrics_ef.gloria}) -- Phase 2. Same shape *)
+(* as the Creed comparison above, over the identical 400-row window. *)
+(* ---------------------------------------------------------------------- *)
+
+let test_gloria_coverage () =
+ let ordo = ordo_rows () in
+ let no_gloria = List.filter (fun o -> o.gloria = None) ordo in
+ Alcotest.(check int) "exactly one day has no Ordo Gloria marker" 1 (List.length no_gloria)
+
+let describe_gloria_mismatch (o : ordo_row) (c : colitur_row) =
+ Printf.sprintf "%s %S: colitur gloria=%b, Ordo gloria=%b" o.date o.title c.c_gloria (Option.get o.gloria)
+
+(* F1 -- OPEN, adjudicated FOR colitur. The single Gloria mismatch found:
+ Good Friday (2026-04-03). See data/ef/expected-divergences-fiuv.sexp's
+ own F1 for the full citation and the raw source text this was checked
+ against directly (docs/research/ordo/fiuv-ordo-2025-2026.pdf, page 46). *)
+let is_f1_good_friday (o : ordo_row) = String.equal o.date "2026-04-03"
+
+let test_gloria_matches_or_is_explained () =
+ let ordo = ordo_rows () in
+ let colitur = colitur_rows () in
+ let unexplained = ref [] in
+ let f1_count = ref 0 in
+ List.iter2
+ (fun (o : ordo_row) (c : colitur_row) ->
+ if not (String.equal o.date c.c_date) then Alcotest.failf "misaligned: ordo %s vs colitur %s" o.date c.c_date;
+ match o.gloria with
+ | None -> ()
+ | Some ogloria ->
+ if Bool.equal ogloria c.c_gloria then ()
+ else if is_f1_good_friday o then incr f1_count
+ else unexplained := describe_gloria_mismatch o c :: !unexplained)
+ ordo colitur;
+ Alcotest.(check (list string)) "every Gloria mismatch is named in the allow-list -- none unexplained" []
+ (List.rev !unexplained);
+ Alcotest.(check int) "F1 (Good Friday) count" 1 !f1_count
+
+(* ---------------------------------------------------------------------- *)
+(* Te Deum (Breviary 237-238, {!Rite_ef.Rubrics_ef.te_deum}) -- Phase 2, *)
+(* the mitigation the task brief names for this source's own stated *)
+(* weakness (a single, not yet scan-verified, web transcription). A *)
+(* SEPARATE colitur-side resolution ({!colitur_te_deum_rows}), since Te *)
+(* Deum has no {!Colitur_kernel.Liturgical_day.t} field of its own. *)
+(* *)
+(* The SUNDAY shape this same comparison originally found (237(b)'s own *)
+(* literal Septuagesima/Sexagesima/Quinquagesima exception, contradicted *)
+(* 15/15) is FIXED at the source ({!Rite_ef.Rubrics_ef.te_deum}'s own *)
+(* header has the correction and its full citation) -- not allow-listed, *)
+(* because it no longer diverges. Three OTHER shapes remain OPEN, *)
+(* single-witnessed (never captured by the LMS fixtures, which do not *)
+(* record Te Deum at all) -- see data/ef/expected-divergences-fiuv.sexp's *)
+(* own F2/F3/F4 for the full citations. Matched by PREDICATE, the same *)
+(* "varies by shape, not by a fixed date list" reasoning L5/L6 already *)
+(* establish for the LMS suite. *)
+(* ---------------------------------------------------------------------- *)
+
+let test_te_deum_coverage () =
+ let ordo = ordo_rows () in
+ let no_te_deum = List.filter (fun o -> o.te_deum = None) ordo in
+ Alcotest.(check int) "the unresolved-Te-Deum population matches this fixture's own measured figure" 127
+ (List.length no_te_deum)
+
+let describe_te_deum_mismatch (o : ordo_row) (t : colitur_te_deum_row) =
+ Printf.sprintf "%s %S: colitur te_deum=%b, Ordo te_deum=%b (rank=%s commemoration=%b)" o.date o.title t.t_te_deum
+ (Option.get o.te_deum) (V.rank_to_string t.t_rank) t.t_has_commemoration
+
+(* F2 (every I-class and omissible vigil) and F4 (the three September
+ Ember days) were BOTH found against the FIRST, buggy extraction (see
+ the fixture's own provenance header, "RE-EXTRACTED" note, and
+ {!Rite_ef.Rubrics_ef.te_deum}'s own 237(a) comment for the full
+ account of the extractor bug and its fix) -- re-run against the
+ corrected data, NEITHER fires any more: colitur's own answer already
+ matched the CORRECTED Ordo on every one of those 7 dates, all along.
+ Removed rather than kept as dead code with an [expected 0] pin, the
+ same "an entry that stops firing is a real change, not silently
+ absorbed" discipline data/ef/expected-divergences-lms.sexp's own L1/L3
+ closures already establish -- see that file's own history for the
+ precedent this follows.
+
+ F3, the privileged-Lenten/Passiontide-feria-plus-commemoration shape
+ L5 (data/ef/expected-divergences-lms.sexp) already found for Gloria,
+ REMAINS: 6 instances, unaffected by the extractor fix (none of the six
+ raw source lines used "sine Te Deum" at all -- confirmed directly
+ against the pdftotext dump, see F3's own citation). CONTRADICTS L5,
+ not corroborates it: FIUV's own [gloria] is [false] on all six dates
+ (agreeing with colitur), while its [te_deum] is [true] on the same six
+ -- see F3's own citation in data/ef/expected-divergences-fiuv.sexp for
+ the full account of why Gloria and Te Deum diverge on the identical
+ day. *)
+let is_f3_lenten_commemoration (_ : ordo_row) (t : colitur_te_deum_row) =
+ t.t_has_commemoration && t.t_rank = V.Class3
+
+let test_te_deum_matches_or_is_explained () =
+ let ordo = ordo_rows () in
+ let colitur = colitur_te_deum_rows () in
+ let unexplained = ref [] in
+ let f3_count = ref 0 in
+ List.iter2
+ (fun (o : ordo_row) (t : colitur_te_deum_row) ->
+ if not (String.equal o.date t.t_date) then Alcotest.failf "misaligned: ordo %s vs colitur %s" o.date t.t_date;
+ match o.te_deum with
+ | None -> ()
+ | Some otd ->
+ if Bool.equal otd t.t_te_deum then ()
+ else if is_f3_lenten_commemoration o t then incr f3_count
+ else unexplained := describe_te_deum_mismatch o t :: !unexplained)
+ ordo colitur;
+ Alcotest.(check (list string)) "every Te Deum mismatch is named in the allow-list -- none unexplained" []
+ (List.rev !unexplained);
+ Alcotest.(check int) "F3 (Lenten privileged feria + commemoration) count" 6 !f3_count
+
let suite =
( "fiuv-ordo",
[ Alcotest.test_case "fixture SHA-256 matches its provenance note" `Quick test_fixture_checksum;
Alcotest.test_case "streams are 400 rows each, dates aligned 1:1" `Quick test_dates_align;
Alcotest.test_case "only Holy Saturday has no Ordo Creed marker" `Quick test_creed_coverage;
Alcotest.test_case "every Creed difference is named in the cited allow-list -- none unexplained" `Quick
- test_creed_matches_or_is_explained
+ test_creed_matches_or_is_explained;
+ Alcotest.test_case "Ordo Gloria coverage matches the measured figure" `Quick test_gloria_coverage;
+ Alcotest.test_case "every Gloria difference is named in the cited allow-list -- none unexplained" `Quick
+ test_gloria_matches_or_is_explained;
+ Alcotest.test_case "Ordo Te Deum coverage matches the measured figure" `Quick test_te_deum_coverage;
+ Alcotest.test_case "every Te Deum difference is named in the cited allow-list -- none unexplained" `Quick
+ test_te_deum_matches_or_is_explained
] )
diff --git a/test/test_lms_ordo.ml b/test/test_lms_ordo.ml
index 219e51f..42dc31d 100644
--- a/test/test_lms_ordo.ml
+++ b/test/test_lms_ordo.ml
@@ -173,6 +173,13 @@ type colitur_row = {
c_season : V.season;
c_formulary : MF.t option;
c_creed : bool;
+ c_gloria : bool;
+ c_rank : V.rank;
+ c_slug : string;
+ c_has_commemoration : bool;
+ (** whether {!Colitur_kernel.Liturgical_day.t.commemorations} is
+ non-empty -- needed by the Gloria comparison's own L5 shape
+ (RG 431(b)/n.302(b)), not by anything Task 6 built. *)
}
let colitur_rows ~year_lo ~year_hi ~window_first ~window_last =
@@ -194,7 +201,10 @@ let colitur_rows ~year_lo ~year_hi ~window_first ~window_last =
| Some day ->
rows :=
{ c_date = Date.to_iso8601 day.LD.date; c_season = day.LD.temporal.Colitur_kernel.Temporal.season;
- c_formulary = day.LD.formulary; c_creed = day.LD.creed }
+ c_formulary = day.LD.formulary; c_creed = day.LD.creed; c_gloria = day.LD.gloria;
+ c_rank = day.LD.observed.Colitur_kernel.Celebration.rank;
+ c_slug = Colitur_kernel.Slug.to_string day.LD.observed.Colitur_kernel.Celebration.slug;
+ c_has_commemoration = day.LD.commemorations <> [] }
:: !rows
| None -> Alcotest.failf "no colitur day resolved for %s" (Date.to_iso8601 !d));
d := Date.add_days !d 1
@@ -434,9 +444,19 @@ let check_formulary_overrides ordo colitur =
(* not noise to silence. *)
(* ---------------------------------------------------------------------- *)
+(* No Str/regex (frozen deps) -- the same hand-rolled substring test every
+ other file in this codebase reaches for (rubrics_ef.ml's own
+ [contains_substring], precedence_ef.ml's [contains_substring]). Local to
+ this file, not shared, on the same "no common .mli to hang it from"
+ footing those other copies already document. *)
+let contains_substring s ~needle =
+ let ls = String.length s and ln = String.length needle in
+ let rec at i = i + ln <= ls && (String.sub s i ln = needle || at (i + 1)) in
+ ln = 0 || at 0
+
let make_suite ~label ~fixture_path ~fixture_sha256 ~window_first ~window_last ~year_lo ~year_hi ~allow_list_path
~expected_rows ~expected_bvm_votive ~expected_proper ~expected_common ~expected_preceding_sunday
- ~expected_ascension_week =
+ ~expected_ascension_week ~expected_gloria_l5 ~expected_gloria_l6 =
let test_fixture_checksum () =
Alcotest.(check string) "fixture SHA-256 matches its provenance note" fixture_sha256
(sha256_of_file fixture_path)
@@ -540,6 +560,84 @@ let make_suite ~label ~fixture_path ~fixture_sha256 ~window_first ~window_last ~
Alcotest.(check int) (Printf.sprintf "%s: expected_rows matches the actual count" id) e.expected_rows n)
explained_counts
in
+ (* ---- Gloria (RG 431-432, {!Rite_ef.Rubrics_ef.gloria}) -- Phase 2 of
+ this task. Same shape as the Creed comparison immediately above:
+ coverage (which dates carry no Ordo "Gl"/"No Gl" marker at all) is
+ checked separately from the value comparison, and both are
+ date-keyed against their own allow-list ids, never a loose "some
+ divergence is fine" check. *)
+ let test_gloria_coverage () =
+ let ordo = ordo_rows fixture_path in
+ let no_gloria = List.filter (fun o -> o.gloria = None) ordo in
+ let expected = window_good_fridays () in
+ Alcotest.(check (list string)) "only this window's own Good Friday has no Ordo Gloria marker" expected
+ (List.map (fun o -> o.date) no_gloria)
+ in
+ let describe_gloria_mismatch (o : ordo_row) (c : colitur_row) =
+ Printf.sprintf "%s %S: colitur gloria=%b, Ordo gloria=%b (rank=%s commemoration=%b formulary=%s)" o.date o.title
+ c.c_gloria (Option.get o.gloria) (V.rank_to_string c.c_rank) c.c_has_commemoration
+ (match c.c_formulary with
+ | Some { MF.said = Some s; _ } -> Colitur_kernel.Slug.to_string s
+ | Some { MF.said = None; via = MF.Votive } -> "votive (said unnamed in the data)"
+ | Some { MF.said = None; _ } -> "NONE (said, unexpectedly outside Votive)"
+ | None -> "NONE")
+ in
+ (* Two REAL, STRUCTURAL shapes found running this comparison (see
+ data/ef/expected-divergences-lms.sexp's own L5/L6 for the full
+ citations) -- neither is a fixed date list, both a property of the
+ day itself, because both recur every year the underlying condition
+ holds, not on a fixed calendar date the way L4 above does. Matched
+ by PREDICATE, not by date, for the same reason L2's own note gives
+ for why it is prose-only rather than wired through the shared
+ [expected_rows] mechanism: the count varies window to window (L5:
+ 6/5/6; L6: 1/0/0), so a single static count cannot check it, and
+ [make_suite] threads the per-window expected totals directly
+ (~expected_gloria_l5/~expected_gloria_l6 below) instead. *)
+ let is_l5_lenten_commemoration (o : ordo_row) (c : colitur_row) =
+ (* RG 431(b)/n.302(b): "Missa de commemoratione in Officio diei
+ occurrente" says the Gloria. Every instance found is a privileged
+ Lenten/Passiontide feria (Class3, violet -- {!TE}'s own
+ [ferial_rank], RG25) carrying exactly one commemoration of an
+ impeded Class3 saint, colitur reading [gloria]=false (the ferial
+ Mass on its own) where the Ordo reads [true]. *)
+ (not c.c_gloria) && Option.value o.gloria ~default:false && c.c_has_commemoration && c.c_rank = V.Class3
+ in
+ let is_l6_rogation_colour (o : ordo_row) (c : colitur_row) =
+ (* Root-caused to a DIFFERENT, pre-existing bug this comparison merely
+ surfaced -- {!Rite_ef.Temporal_ef.temporal}'s own Rogation Monday/
+ Tuesday branch hardcodes [Colour.Violet] with no RG citation at
+ all, but the Ordo shows this exact date "FERIA IV Cl W" (white,
+ matching Paschaltide's own [season_colour] and RG88's "nihil fit in
+ Officio" -- the Office, hence its colour, is unchanged by the
+ Rogation, only the Mass TEXT is proper) -- so [gloria]'s own 432(b)
+ violet guard wrongly fires. NOT a Gloria defect and NOT fixed here
+ (out of this task's own scope; see the task report). *)
+ (not c.c_gloria) && Option.value o.gloria ~default:false
+ && (contains_substring c.c_slug ~needle:"rogation-monday" || contains_substring c.c_slug ~needle:"rogation-tuesday")
+ in
+ let test_gloria_matches_or_is_explained ~expected_gloria_l5 ~expected_gloria_l6 () =
+ let ordo = ordo_rows fixture_path in
+ let colitur = colitur_rows ~year_lo ~year_hi ~window_first ~window_last in
+ let unexplained = ref [] in
+ let l5_count = ref 0 and l6_count = ref 0 in
+ List.iter2
+ (fun (o : ordo_row) (c : colitur_row) ->
+ if not (String.equal o.date c.c_date) then Alcotest.failf "misaligned: ordo %s vs colitur %s" o.date c.c_date;
+ match o.gloria with
+ | None -> ()
+ | Some ogloria ->
+ if Bool.equal ogloria c.c_gloria then ()
+ else if is_l5_lenten_commemoration o c then incr l5_count
+ else if is_l6_rogation_colour o c then incr l6_count
+ else unexplained := describe_gloria_mismatch o c :: !unexplained)
+ ordo colitur;
+ Alcotest.(check (list string)) (Printf.sprintf "[%s] every Gloria mismatch is named in the allow-list -- none unexplained" label)
+ [] (List.rev !unexplained);
+ Alcotest.(check int) (Printf.sprintf "[%s] L5 (Lenten privileged feria + commemoration) count" label)
+ expected_gloria_l5 !l5_count;
+ Alcotest.(check int) (Printf.sprintf "[%s] L6 (Rogation Monday/Tuesday colour bug) count" label) expected_gloria_l6
+ !l6_count
+ in
let test_bvm_seasonal_selection () =
let ordo = ordo_rows fixture_path in
let colitur = colitur_rows ~year_lo ~year_hi ~window_first ~window_last in
@@ -635,6 +733,10 @@ let make_suite ~label ~fixture_path ~fixture_sha256 ~window_first ~window_last ~
Alcotest.test_case "only this window's own Good Friday has no Ordo Creed marker" `Quick test_creed_coverage;
Alcotest.test_case "every Creed difference is named in the cited allow-list -- none unexplained" `Quick
test_creed_matches_or_is_explained;
+ Alcotest.test_case "only this window's own Good Friday has no Ordo Gloria marker" `Quick
+ test_gloria_coverage;
+ Alcotest.test_case "every Gloria difference is named in the cited allow-list -- none unexplained" `Quick
+ (test_gloria_matches_or_is_explained ~expected_gloria_l5 ~expected_gloria_l6);
Alcotest.test_case "every BVM-Saturday numeral matches its season" `Quick test_bvm_seasonal_selection;
Alcotest.test_case "every Ordo BVM numeral day is a colitur Votive day" `Quick
test_bvm_numeral_implies_votive;
@@ -676,18 +778,18 @@ let suite_2023_2024 =
I-class Sunday that admits him not even as a commemoration (RG16(a)),
so his own Mass is not said anywhere in this window any more. *)
~expected_bvm_votive:12 ~expected_proper:181 ~expected_common:2 ~expected_preceding_sunday:61
- ~expected_ascension_week:1
+ ~expected_ascension_week:1 ~expected_gloria_l5:5 ~expected_gloria_l6:1
let suite_2024_2025 =
make_suite ~label:"lms-ordo-2024-2025" ~fixture_path:"fixtures/lms-ordo-2024-2025.sexp"
~fixture_sha256:"da817b75c5bf40ed3be1d5f6890b199705e02ce4d42111253ab8547bccabc3f7" ~window_first:"2024-11-27"
~window_last:"2025-12-31" ~year_lo:2023 ~year_hi:2026 ~allow_list_path ~expected_rows:400
~expected_bvm_votive:14 ~expected_proper:179 ~expected_common:2 ~expected_preceding_sunday:66
- ~expected_ascension_week:3
+ ~expected_ascension_week:3 ~expected_gloria_l5:5 ~expected_gloria_l6:0
let suite_2025_2026 =
make_suite ~label:"lms-ordo-2025-2026" ~fixture_path:"fixtures/lms-ordo-2025-2026.sexp"
~fixture_sha256:"8839a61e0c7d1e6c8326114f4f45a5c183551287a88f4ed01127154add6ae5a5" ~window_first:"2025-11-28"
~window_last:"2026-12-31" ~year_lo:2024 ~year_hi:2027 ~allow_list_path ~expected_rows:399
~expected_bvm_votive:13 ~expected_proper:174 ~expected_common:2 ~expected_preceding_sunday:68
- ~expected_ascension_week:2
+ ~expected_ascension_week:2 ~expected_gloria_l5:6 ~expected_gloria_l6:0
diff --git a/test/test_rubrics_ef.ml b/test/test_rubrics_ef.ml
index a778a5a..71f180d 100644
--- a/test/test_rubrics_ef.ml
+++ b/test/test_rubrics_ef.ml
@@ -46,6 +46,23 @@ let creed_on y m d = (Cal.day ctx layer (mk y m d)).LD.creed
let check name y m d expected = Alcotest.(check bool) name expected (creed_on y m d)
+(* ------------------------------------------------------------------------ *)
+(* Breviary 237-238 (Te Deum) and RG 431-432 (Gloria) -- Phase 2 of the *)
+(* celebrant-rubrics-phase1 design. See lib/rites/rite_ef/rubrics_ef.ml for *)
+(* both rubrics quoted in full and every branch's own citation. One *)
+(* end-to-end test per clause, resolved against REAL calendar dates through *)
+(* the shipped data -- every expected value below was read off *)
+(* `colitur rubrics <year>`'s real output BEFORE being pinned here, the *)
+(* same discipline the Creed tests above already establish. *)
+
+let day_on y m d = Cal.day ctx layer (mk y m d)
+let gloria_on y m d = (day_on y m d).LD.gloria
+let te_deum_on y m d = RE.te_deum ~temporal:(day_on y m d).LD.temporal ~observed:(day_on y m d).LD.observed
+ ~date:(mk y m d)
+
+let check_gloria name y m d expected = Alcotest.(check bool) name expected (gloria_on y m d)
+let check_te_deum name y m d expected = Alcotest.(check bool) name expected (te_deum_on y m d)
+
(* ---- RG 475(a): "in qualibet dominica, etsi eius Officium alicui festo
locum cedat" ---- *)
@@ -440,6 +457,277 @@ let test_ferial_origin_never_carries_lord_bvm_or_apostle_slug () =
Alcotest.(check bool) "span reached Lenten/Passiontide III-class ferias" true
(!lenten_passiontide_class3 > 0)
+(* ---- 237(a): the three named Paschaltide days ---- *)
+
+let test_237a_easter_sunday () = check_te_deum "237(a): Easter Sunday" 2026 4 5 true
+let test_237a_low_sunday () = check_te_deum "237(a): Low Sunday" 2026 4 12 true
+let test_237a_pentecost () = check_te_deum "237(a): Pentecost Sunday" 2026 5 24 true
+
+(* ---- 237(f): the vigils of Ascension and Pentecost, both otherwise
+ reachable by 238(b) (the Ascension vigil is Class2) or moot to it
+ (the Pentecost vigil is Class1) ---- *)
+
+let test_237f_ascension_vigil () = check_te_deum "237(f): Vigil of the Ascension" 2026 5 13 true
+let test_237f_pentecost_vigil () = check_te_deum "237(f): Vigil of Pentecost" 2026 5 23 true
+
+(* ---- 237(d): the three privileged octaves, reusing [creed]'s own windows
+ -- a day within the Nativity octave whose OWN office is a real saint
+ (RG 67's "Com. octavae Nativitatis"), and an Easter-week feria outside
+ the narrower 237(a) list ---- *)
+
+let test_237d_nativity_octave_saint () =
+ check_te_deum "237(d): St John within the Nativity octave" 2026 12 27 true
+
+let test_237d_easter_week_feria () = check_te_deum "237(d): Easter Tuesday" 2026 4 7 true
+
+(* ---- 238(b): the omissible (Class2/Class3) vigils -- St Lawrence's own,
+ picked in a year where nothing displaces it, confirmed via
+ `colitur day 2026` first the same way the Creed tests were derived ---- *)
+
+let test_238b_omissible_vigil () =
+ (* 9 August 2026 is itself a Sunday (the vigil impeded, see 237(b)'s own
+ test below, which reuses that exact date) -- 2027 is picked instead,
+ confirmed via `colitur day 2027` first, the same discipline every
+ other date in this file follows. *)
+ check_te_deum "238(b): Vigil of St Lawrence" 2027 8 9 false
+
+(* ---- The Nativity Vigil (I class): NOT literally named by 238(b)'s own
+ "II et III classis" text -- excluded here on the structural RG 21/35
+ taxonomy inference [te_deum]'s own comment states explicitly as an
+ inference, not a citation. Flagged the same way in the task report;
+ checked against the FIUV Ordo's own Te Deum marker for 24 December in
+ test_fiuv_ordo.ml, which is this inference's real corroboration. ---- *)
+
+let test_nativity_vigil_excluded_by_inference () =
+ check_te_deum "Nativity Vigil (I class): excluded, inference not literal 238(b)" 2026 12 24 false
+
+(* ---- 238(c)/RG23: Ash Wednesday and Good Friday (moot -- no Mass, but the
+ RG23 feria-I-classis exclusion still answers [false] regardless of
+ colour) ---- *)
+
+let test_238c_ash_wednesday () = check_te_deum "238(c)/RG23: Ash Wednesday" 2026 2 18 false
+let test_238c_good_friday () = check_te_deum "238(c)/RG23: Good Friday" 2026 4 3 false
+
+(* ---- 237(g): the votive Office of the BVM on Saturday -- reused directly
+ from test/cli.t's own pinned example ---- *)
+
+let test_237g_bvm_saturday () = check_te_deum "237(g): BVM Saturday Office" 2026 7 11 true
+
+(* ---- 237(e): a plain, non-octave, non-Sunday feria of Christmastide (2-5
+ January) ---- *)
+
+let test_237e_christmastide_feria () =
+ check_te_deum "237(e): 2 January, a Christmastide feria" 2026 1 2 true
+
+(* ---- 237(b): an ordinary II-class Sunday outside Septuagesima, and its
+ own explicit exception (a Septuagesima/Sexagesima Sunday, [Class2],
+ excepted by name) ---- *)
+
+let test_237b_ordinary_class2_sunday () =
+ check_te_deum "237(b): an ordinary Time-after-Pentecost Sunday" 2026 8 9 true
+
+(* RE-VERIFIED against the CORRECTED FIUV extraction ([te_deum]'s own
+ 237(a) comment has the full account of the extractor bug an earlier
+ pass of this task found and fixed): 237(b)'s own literal "exceptis
+ dominicis in Septuagesima, in Sexagesima et in Quinquagesima" holds
+ after all -- these two Sundays do NOT say the Te Deum, confirmed
+ against the corrected data, not merely the original transcription
+ alone. *)
+let test_237b_septuagesima_exception () =
+ check_te_deum "237(b)'s own exception: Septuagesima Sunday" 2027 1 24 false
+
+let test_237b_sexagesima_exception () =
+ check_te_deum "237(b)'s own exception: Sexagesima Sunday" 2027 1 31 false
+
+(* ---- 237(c): a genuine sanctoral feast kept during a penitential season
+ (St Paul of the Cross, Class3, outside any privileged window) and one in
+ Ordinary Time (Lawrence, Class2) ---- *)
+
+let test_237c_sanctoral_feast () = check_te_deum "237(c): a sanctoral feast (Lawrence)" 2026 8 10 true
+
+(* Found alongside the FIUV extractor-bug fix ([te_deum]'s own 237(c)
+ comment has the full account): Passion Sunday and Palm Sunday are BOTH
+ entries in {!Temporal_ef.named} (named individually for RG 91 entry 6),
+ which without the [temporal.weekday <> Sun] guard on 237(c)'s own
+ [named<>None] disjunct would wrongly grant them [true] by ACCIDENT of
+ table membership -- neither is a genuine "festum" (RG 35's own "dies
+ dominica" is its own category), and both are [Class1] Sundays 237(b)'s
+ own [Class2] guard already excludes. Confirmed [false] directly against
+ the corrected FIUV extraction. *)
+let test_passion_sunday_not_a_festum () = check_te_deum "Passion Sunday is not a festum for 237(c)" 2026 3 22 false
+let test_palm_sunday_not_a_festum () = check_te_deum "Palm Sunday is not a festum for 237(c)" 2026 3 29 false
+
+(* ---- 238(d): the Requiem proxy, shared with [creed]'s own 476(f) and the
+ SAME two-member {!Colour.Black} population
+ {!test_colour_black_population_is_exactly_two} already asserts ---- *)
+
+let test_238d_all_souls () = check_te_deum "238(d): All Souls' Day (transferred)" 2025 11 3 false
+
+(* ---- RG 431(c): Holy Thursday and the Easter Vigil Mass say the Gloria
+ even though neither day's own Matins says the Te Deum (both are
+ feria-I-classis, [te_deum]'s own 238(c) branch) -- the one place [gloria]
+ and [te_deum] genuinely disagree on real data. Holy Saturday also proves
+ 431(c) outranks 432(b): its own colour is [Violet]
+ (Passiontide's [season_colour]), yet the Gloria is still said. ---- *)
+
+let test_431c_holy_thursday () = check_gloria "431(c): Holy Thursday" 2026 4 2 true
+let test_431c_easter_vigil () = check_gloria "431(c): the Easter Vigil Mass (Holy Saturday)" 2026 4 4 true
+
+(* ---- RG 432(b): violet vestments -- independent of [te_deum], checked
+ against an Advent Sunday (I class, so [te_deum] would ALSO answer
+ [false] here via its own 237(b) rank guard: this is a same-answer
+ witness, not proof of independent teeth -- see the task report for why
+ no fully independent (te_deum=true, violet) witness exists anywhere in
+ the shipped 1583-9999 domain: every real [Colour.Violet] [Feast] entry
+ is one of the five sanctoral vigils, already excluded by [te_deum]'s
+ own [is_vigil] branch either way). ---- *)
+
+let test_432b_violet_sunday () = check_gloria "432(b): Advent I Sunday, violet" 2026 11 29 false
+
+(* ---- RG 432(d): the Requiem proxy, same population as 238(d) above ---- *)
+
+let test_432d_all_souls () = check_gloria "432(d): All Souls' Day (transferred)" 2025 11 3 false
+
+(* ---- RG 431(a)/432(a): mirrors [te_deum] for everything not already
+ decided above -- one true, one false, neither reachable via 431(c)/432(b)/
+ 432(d) ---- *)
+
+let test_431a_mirrors_te_deum_true () =
+ check_gloria "431(a): mirrors [te_deum]=true (a sanctoral feast, Lawrence)" 2026 8 10 true
+
+let test_432a_mirrors_te_deum_false () =
+ check_gloria "432(a): mirrors [te_deum]=false (an ordinary Advent feria)" 2025 12 1 false
+
+(* ---- Domain-wide sanity, task requirement 5: "every violet day must be
+ false (RG 432 b), and every Requiem must be false (432 d)". Two
+ invariants, checked over every day {!Cal.year} resolves -- [Cal.year],
+ not [Cal.day] in a loop, for the same cost reason
+ {!test_every_sunday_in_2026_says_the_creed} above already gives.
+
+ FAST (default suite): a fixed 200-year span, 1583-1782 -- large enough
+ to cross multiple Easter cycles and every season repeatedly, cheap
+ enough to stay in `dune test`'s own budget. EXHAUSTIVE (gated the same
+ way {!test_validate.test_exhaustive_domain_sweep} already is, via
+ COLITUR_EXHAUSTIVE_SWEEP): the full 1583-9999 domain, also tallying and
+ printing the true/false distribution so the measurement this task asks
+ for is not merely "did the invariant hold" but has a number attached --
+ see the task report for the printed figures. *)
+(* NOT a blanket "every violet day is [gloria]=false" (the task brief's own
+ phrasing, taken literally, is one exception too strong): RG 431(c) is a
+ NAMED, lex-specialis override for the Easter Vigil Mass, and colitur's
+ own per-day colour model gives Holy Saturday [Colour.Violet]
+ ([gloria]'s own header has the full argument for why -- the historical
+ violet-to-white vestment change happens AT the Gloria itself, a
+ per-action nuance this whole day/colour model already cannot express).
+ So the real invariant, checked here, is "every violet day is
+ [gloria]=false EXCEPT the Easter Vigil (Easter offset -1), which is
+ [gloria]=true BY DESIGN" -- and the exception is asserted to be EXACTLY
+ that one shape, every year, nothing else: [n = -1] is checked directly
+ rather than merely excluded, so a second, unexpected (violet,
+ gloria=true) day anywhere in the domain still fails loudly. Pushed back
+ on the task brief's own simplified phrasing rather than silently
+ special-cased -- see the task report. *)
+let check_gloria_invariants_for_year y (counts : (int * int * int * int) ref) =
+ let days = Cal.year ctx layer y in
+ (* Per-date, NOT once per loop iteration off [y]: a liturgical year
+ "opening in civil year y" ({!Rite.t.year_start}'s own doc comment)
+ runs from that year's Advent into MOST of civil year y+1 -- so
+ [Cal.year ctx layer y]'s own array holds dates whose civil year is
+ y+1 for the whole Christmas-to-Pentecost span, governed by EASTER OF
+ y+1, not y. A single [Computus.gregorian_easter y] computed once here
+ wrongly used year y's own Easter for those dates -- found live: it
+ misidentified 1584-03-31 (Holy Saturday, governed by 1584's Easter,
+ surfaced while processing loop iteration y=1583) as an ordinary
+ violet day instead of the Vigil's own 431(c) exception, because
+ Easter 1583 (not 1584) was subtracted. Fixed by keying off
+ [Date.year d.LD.date] instead, which is always safe here: Holy
+ Saturday and Easter Sunday are never more than a few days apart and
+ never cross a civil-year boundary. *)
+ let violet, black, gloria_true, gloria_false = !counts in
+ let violet = ref violet
+ and black = ref black
+ and gloria_true = ref gloria_true
+ and gloria_false = ref gloria_false in
+ Array.iter
+ (fun (d : (V.season, V.rank) LD.t) ->
+ (if d.LD.gloria then incr gloria_true else incr gloria_false);
+ if d.LD.observed.Cel.colour = Colour.Violet then begin
+ incr violet;
+ let easter = Computus.gregorian_easter (Date.year d.LD.date) in
+ let n = Date.to_rata d.LD.date - Date.to_rata easter in
+ if n = -1 then
+ Alcotest.(check bool)
+ (Printf.sprintf "%s: the Easter Vigil's own 431(c) override, [gloria]=true despite violet"
+ (Date.to_iso8601 d.LD.date))
+ true d.LD.gloria
+ else
+ Alcotest.(check bool)
+ (Printf.sprintf "%s: violet -> [gloria]=false (RG 432(b))" (Date.to_iso8601 d.LD.date))
+ false d.LD.gloria
+ end;
+ if d.LD.observed.Cel.colour = Colour.Rose then
+ (* Gaudete/Laetare -- [gloria] reads [false] here via [te_deum]'s
+ own [Class2] guard on 237(b) (both Rose Sundays are [Class1] BY
+ CONSTRUCTION -- {!Rite_ef.Rubrics_ef.gloria}'s own 432(b)
+ citation has the full "checked, then found redundant, then
+ removed" account of why 432(b) itself does NOT need its own
+ Rose branch). Not folded into the [violet] counter above:
+ keeping the two colours separately tallied is what let this
+ invariant catch the Gaudete/Laetare gap live in the first place
+ (found via the LMS Ordo, 2023-12-17 and 2024-03-10) rather than
+ silently averaging it away inside one shared bucket. *)
+ Alcotest.(check bool)
+ (Printf.sprintf "%s: Rose (Gaudete/Laetare) -> [gloria]=false" (Date.to_iso8601 d.LD.date))
+ false d.LD.gloria;
+ if d.LD.observed.Cel.colour = Colour.Black then begin
+ incr black;
+ Alcotest.(check bool)
+ (Printf.sprintf "%s: Requiem (black) -> [gloria]=false (RG 432(d))" (Date.to_iso8601 d.LD.date))
+ false d.LD.gloria
+ end)
+ days;
+ counts := (!violet, !black, !gloria_true, !gloria_false)
+
+let test_domain_violet_implies_no_gloria_sample () =
+ let counts = ref (0, 0, 0, 0) in
+ for y = 1583 to 1782 do
+ check_gloria_invariants_for_year y counts
+ done;
+ let violet, _, _, _ = !counts in
+ Alcotest.(check bool) "the 200-year sample reached a real number of violet days" true (violet > 1000)
+
+let test_domain_requiem_implies_no_gloria_sample () =
+ (* Separate test name, same underlying sweep as the one immediately above
+ -- {!Cal.year} is only computed once per year regardless (module-level
+ [ctx]/[layer], no per-test reload), so this is not a second pass over
+ the domain, only a second, independently-named assertion on the same
+ tally, matching how {!test_colour_black_population_is_exactly_two}
+ above separates its own DATA and CODE checks into one function while
+ this pair keeps violet and black as two named outcomes. *)
+ let counts = ref (0, 0, 0, 0) in
+ for y = 1583 to 1782 do
+ check_gloria_invariants_for_year y counts
+ done;
+ let _, black, _, _ = !counts in
+ Alcotest.(check bool) "the 200-year sample reached at least one Requiem day" true (black > 0)
+
+let colitur_exhaustive_sweep_env = "COLITUR_EXHAUSTIVE_SWEEP"
+
+let test_exhaustive_gloria_domain_sweep () =
+ if Sys.getenv_opt colitur_exhaustive_sweep_env = None then Alcotest.skip ()
+ else begin
+ let counts = ref (0, 0, 0, 0) in
+ for y = 1583 to 9999 do
+ check_gloria_invariants_for_year y counts
+ done;
+ let violet, black, gloria_true, gloria_false = !counts in
+ Printf.printf
+ "gloria domain sweep 1583..9999: violet=%d black=%d gloria_true=%d gloria_false=%d total=%d\n%!"
+ violet black gloria_true gloria_false (gloria_true + gloria_false);
+ Alcotest.(check bool) "the full domain reached a real number of violet days" true (violet > 100_000);
+ Alcotest.(check bool) "the full domain reached a real number of Requiem days" true (black > 1_000)
+ end
+
let suite =
( "Rubrics_ef",
[ Alcotest.test_case "475(a): ordinary Sunday" `Quick test_475a_ordinary_sunday;
@@ -477,4 +765,38 @@ let suite =
Alcotest.test_case "every Sunday in 2026 says the Creed" `Quick
test_every_sunday_in_2026_says_the_creed;
Alcotest.test_case "RG 24/25: no ferial-origin office carries Lord/Bvm or an apostle slug" `Quick
- test_ferial_origin_never_carries_lord_bvm_or_apostle_slug ] )
+ test_ferial_origin_never_carries_lord_bvm_or_apostle_slug;
+ Alcotest.test_case "237(a): Easter Sunday" `Quick test_237a_easter_sunday;
+ Alcotest.test_case "237(a): Low Sunday" `Quick test_237a_low_sunday;
+ Alcotest.test_case "237(a): Pentecost Sunday" `Quick test_237a_pentecost;
+ Alcotest.test_case "237(f): Vigil of the Ascension" `Quick test_237f_ascension_vigil;
+ Alcotest.test_case "237(f): Vigil of Pentecost" `Quick test_237f_pentecost_vigil;
+ Alcotest.test_case "237(d): St John within the Nativity octave" `Quick
+ test_237d_nativity_octave_saint;
+ Alcotest.test_case "237(d): Easter Tuesday" `Quick test_237d_easter_week_feria;
+ Alcotest.test_case "238(b): Vigil of St Lawrence" `Quick test_238b_omissible_vigil;
+ Alcotest.test_case "Nativity Vigil excluded by structural inference, not literal 238(b)" `Quick
+ test_nativity_vigil_excluded_by_inference;
+ Alcotest.test_case "238(c)/RG23: Ash Wednesday" `Quick test_238c_ash_wednesday;
+ Alcotest.test_case "238(c)/RG23: Good Friday" `Quick test_238c_good_friday;
+ Alcotest.test_case "237(g): BVM Saturday Office" `Quick test_237g_bvm_saturday;
+ Alcotest.test_case "237(e): 2 January, a Christmastide feria" `Quick test_237e_christmastide_feria;
+ Alcotest.test_case "237(b): an ordinary Class2 Sunday" `Quick test_237b_ordinary_class2_sunday;
+ Alcotest.test_case "237(b)'s own exception: Septuagesima Sunday" `Quick test_237b_septuagesima_exception;
+ Alcotest.test_case "237(b)'s own exception: Sexagesima Sunday" `Quick test_237b_sexagesima_exception;
+ Alcotest.test_case "237(c): a sanctoral feast (Lawrence)" `Quick test_237c_sanctoral_feast;
+ Alcotest.test_case "Passion Sunday is not a festum for 237(c)" `Quick test_passion_sunday_not_a_festum;
+ Alcotest.test_case "Palm Sunday is not a festum for 237(c)" `Quick test_palm_sunday_not_a_festum;
+ Alcotest.test_case "238(d): All Souls' Day (transferred)" `Quick test_238d_all_souls;
+ Alcotest.test_case "431(c): Holy Thursday" `Quick test_431c_holy_thursday;
+ Alcotest.test_case "431(c): the Easter Vigil Mass" `Quick test_431c_easter_vigil;
+ Alcotest.test_case "432(b): Advent I Sunday, violet" `Quick test_432b_violet_sunday;
+ Alcotest.test_case "432(d): All Souls' Day (transferred)" `Quick test_432d_all_souls;
+ Alcotest.test_case "431(a): mirrors [te_deum]=true" `Quick test_431a_mirrors_te_deum_true;
+ Alcotest.test_case "432(a): mirrors [te_deum]=false" `Quick test_432a_mirrors_te_deum_false;
+ Alcotest.test_case "domain sanity: every violet day has [gloria]=false (sample)" `Quick
+ test_domain_violet_implies_no_gloria_sample;
+ Alcotest.test_case "domain sanity: every Requiem day has [gloria]=false (sample)" `Quick
+ test_domain_requiem_implies_no_gloria_sample;
+ Alcotest.test_case "domain sweep 1583..9999: violet/Requiem invariants, committed not sampled"
+ `Slow test_exhaustive_gloria_domain_sweep ] )
diff --git a/test/test_validate.ml b/test/test_validate.ml
index 671c706..b53f915 100644
--- a/test/test_validate.ml
+++ b/test/test_validate.ml
@@ -324,15 +324,17 @@ module Synthetic = struct
{ Colitur_kernel.Mass_formulary.said = Some (Slug.of_string_exn "syn-formulary");
via = Colitur_kernel.Mass_formulary.Own_slug }
- (* No fixture here exercises the Creed rubric -- a rite that has not
- implemented it returns [false] explicitly, {!Rite.t.creed}'s own
- documented default. Made overridable ([?creed] below) on the same
- footing as [?readings] just above, for Task 6's own fixtures. *)
+ (* No fixture here exercises the Creed or Gloria rubrics -- a rite that
+ has not implemented them returns [false] explicitly,
+ {!Rite.t.creed}/{!Rite.t.gloria}'s own documented default. Made
+ overridable ([?creed]/[?gloria] below) on the same footing as
+ [?readings] just above, for Task 6's own fixtures. *)
let creed ~temporal:_ ~observed:_ ~date:_ = false
+ let gloria ~temporal:_ ~observed:_ ~date:_ = false
let rite ?(vocab = vocab) ?(anchors = fun _ -> []) ?(season_runs = [ A; B ]) ?(rules = rules)
- ?(transfer_target = fun _ origin _ -> origin) ?(readings = readings) ?(creed = creed) temporal
- : (season, rank) Rite.t =
+ ?(transfer_target = fun _ origin _ -> origin) ?(readings = readings) ?(creed = creed)
+ ?(gloria = gloria) temporal : (season, rank) Rite.t =
{ Rite.id = "synthetic"; vocab; year_start; temporal; anchors; rules; season_runs;
(* Not a Roman rite, but a Rite.t must supply SOME Easter now that
movable Date_spec variants exist. The Gregorian one is as good as
@@ -342,7 +344,7 @@ module Synthetic = struct
(* Not a Roman rite either, so no bissextile-doubling convention:
identity, {!Rite.t.fixed_key}'s own documented default. *)
fixed_key = (fun d -> Some (D.month d, D.day d));
- transfer_target; readings; creed }
+ transfer_target; readings; creed; gloria }
(* Empty by default: every check built before Task 12 exercises the
TEMPORAL-only pass, where an empty layer is exactly the fixture that
diff --git a/tools/extract_fiuv_ordo.ml b/tools/extract_fiuv_ordo.ml
index 42d3b96..c9688a7 100644
--- a/tools/extract_fiuv_ordo.ml
+++ b/tools/extract_fiuv_ordo.ml
@@ -292,7 +292,28 @@ let extract_te_deum full_text =
| None -> String.length full_text
in
let span = String.sub full_text mat_start (laudes_start - mat_start) in
+ (* TWO negative phrasings the source actually uses, found live
+ (celebrant-rubrics-phase1 Phase 2, 2026-08-22): "non dicitur Te
+ Deum" (e.g. ordinary Time-after-Pentecost ferias, 27/28 November)
+ AND, separately, "sine Te Deum" (e.g. every Sunday, every Ember
+ day, every privileged Lenten/Passiontide feria carrying a
+ commemoration -- Advent I, 30 November: "...3a de homilia (cum
+ suo R), sine Te Deum."). The ORIGINAL version of this function
+ checked only the first phrasing, so "sine Te Deum" fell through
+ to the bare "Te Deum" substring test and was wrongly read as a
+ POSITIVE hit -- confirmed by grepping the raw pdftotext dump
+ directly against a first, uncorrected run's own output: EVERY
+ date this bug affected showed "sine Te Deum" in the source and
+ [Some true] in the fixture, a 100% correlation, not a handful of
+ coincidences. This is the SAME "does the source negate the
+ hymn's own name with a DIFFERENT word than the one this parser
+ already checks for" shape [find_word]'s own "Gloria Patri"
+ substring trap already documents for Gloria -- this trap simply
+ went unnoticed until Phase 2 actually compared the extracted
+ values against colitur's own output and against the raw text by
+ hand, rather than only checking coverage counts. *)
if contains span ~sub:"non dicitur Te Deum" then Some false
+ else if contains span ~sub:"sine Te Deum" then Some false
else if contains span ~sub:"Te Deum" then Some true
else None)