summaryrefslogtreecommitdiff
path: root/lib/rites/rite_of
Commit message (Collapse)AuthorAgeFilesLines
* fix(of): correct the Annunciation's transfer_target slug, dead Rule 1Lukasz Kasprzak2026-08-271-14/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | precedence_of.ml's transfer_target Rule 1 (Normae n. 60's fixed Easter+8 destination for the Annunciation falling in Holy Week) keyed off "of-annunciation", a placeholder that never matched the real shipped entry's own slug ("annunciation-of-the-lord", data/of/calendar-2002.sexp). Rule 1 was therefore dead code: it could only ever fire against test_precedence_of.ml's own synthetic candidate, which happened to carry the identical placeholder. Output was nonetheless correct on shipped data (latent, not live): Rule 3's general forward search structurally converges on the same Easter+8 target, because the Easter Octave occupies exactly Easter+1..+7 at band 20 and the 3-9 April window carries only memorials on the universal calendar. The exposure is an overlay placing a proper solemnity (band 40) or proper feast (band 80) anywhere in 3-9 April, where Rule 3 would diverge from Rule 1's fixed destination and Rule 1 would silently fail to override it. Fixed the slug, and updated the existing Rule-1 tests' own synthetic candidate to the real slug so they keep exercising Rule 1 rather than Rule 3's coincidental agreement. Added a test that tells the two rules apart rather than only checking the output they happen to agree on: it rigs the occupant callback to occupy Easter+8 with a synthetic Tabula-entry-3 candidate, confirms (via a control case using a different solemnity) that the rig genuinely forces Rule 3's search past that date, then shows the real shipped Annunciation still lands on Easter+8 despite the block -- only explicable by Rule 1 firing, not by Rule 3 happening to agree.
* fix(of): break the movable-BVM-memorial tie per a CDWDS NotificationLukasz Kasprzak2026-08-271-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mary, Mother of the Church (Easter+50) and the Immaculate Heart of Mary (Easter+69) are both movable obligatory memorials that can land on a FIXED obligatory memorial's own date -- e.g. 2011-06-13 and 2015-06-13, both against Anthony of Padua. Both candidates banded identically at Tabula III.10 (100, both universal Memoria_obligatoria), a tie band could not break, so Precedence.resolve's kernel-level alphabetical Slug.compare tie-break silently picked instead -- 892 days for Mater Ecclesiae and 1109 for the Immaculate Heart across 1583-9999, all one shape (measured against the pre-fix alphabetical order directly, zero unexplained). Searched the corpus rather than inventing a rule. colitur's two previously-checked primary sources really are silent: the 2018 decree (AAS 110, 437-438) never addresses universal-calendar coincidence, and Normae n. 14's third clause resolves only two AD-LIBITUM memorials colliding. A third source resolves it: the CDWDS's own "Notification on the Memorial of the Blessed Virgin Mary, Mother of the Church" (24 March 2018 -- same dicastery and signatories as the decree; published only on vatican.va, confirmed absent from the AAS 2018 combined index) states that when this memorial "coincides with another Memorial of a Saint or Blessed... the Memorial of the Blessed Virgin Mary is to prevail," and extends the identical reasoning to the Immaculate Heart of Mary by name. This is a rubric, not colitur's own reasoned choice. Implemented as a sub-rank of 95, strictly between Tabula entries 9 and 10 -- the same "fits between neighbours" technique this module already uses elsewhere -- scoped to the two named slugs rather than [subject = Bvm], since the Notification's own reasoning is specifically about a memorial's link to a movable solemnity of the Lord, not a blanket Marian precedence. Golden pin updated: test_rite_of.ml's 2011-06-13 tie now pins Mary, Mother of the Church as observed (was Anthony of Padua, labelled "known arbitrary"), with the header rewritten to state the outcome now rests on the Notification, not a coin-flip. The litcal oracle allow-list gains L10: litcal's own grade vocabulary has no representation for a 95 sub-rank (everything Memoria_obligatoria reads "Memorial"), a representational gap in litcal, not a computational disagreement -- the identity axis is untouched and needed no new entry.
* fix(of): dispatch Holy Family's Normae n.35(a) fallback (W2)Lukasz Kasprzak2026-08-261-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | temporal_of.ml's temporal only ever reached holy_family's own correct 26-31 December / 30 December fallback logic through sunday_slug, which returns None immediately for a non-Sunday date. In a year 25 December is itself a Sunday (26-31 December then holding no Sunday of its own), the feast vanished entirely and fell through to an ordinary Christmas ferial slug -- confirmed on 2022, 2033, 2039, 2044, 2050 (and roughly 1583..9999 domain-wide, one year in seven). temporal's dispatch now consults holy_family directly, independent of weekday, between the sunday_slug and christmas_feria_slug branches, carrying the identical identity the Sunday case already builds (subject Lord, holy_family_names, rank Festum). holy_family and anchors were already correct and needed no change. Added a direct example-based test for the fallback across five affected years plus a control for the unaffected Sunday case, and a domain-wide property (Holy Family is observed in every liturgical year 1583-9999) folded into both the 200-sample QCheck run and the exhaustive sweep -- the property that would have caught this directly. Un-pinned the now-fixed behaviour everywhere it was recorded as known-wrong: test_rite_of.ml's own 1583 pin (rewritten to assert the fix), test_validate_of.ml's own independent exhaustive-sweep counter and landmark-year filter (found via make check, not the initial survey), and data/of/expected-divergences-litcal.sexp's L2/L3 allow-list entries against the litcal oracle (closed and removed, with a dedicated regression test replacing the allow-list's own silence).
* fix(of): anticipate St Joseph onto 18 March per Normae n. 56(f)Lukasz Kasprzak2026-08-263-61/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | W1: when 19 March (St Joseph) falls on Palm Sunday, colitur sent him forward to Easter+9 instead of anticipating the solemnity backward to 18 March, the one rule in the whole Normae transfer machinery that names an earlier date. Live in 16 of 1583-2100 (1595, 1606, 1617, 1690, 1758, 1769, 1780, 1815, 1826, 1837, 1967, 1978, 1989, 2062, 2073, 2084). Blocked on a kernel contract: Rite.t.transfer_target required its result be strictly later than the impeded date, an obligation argued purely from the EF's RG 96. Traced against Calendar's actual placement pass rather than assumed unsafe: the round loop re-resolves the whole year fresh every round, and its two safety nets (~start/~stop; the round-count guard) both test the target's own value with no comparison against origin, so a bounded backward jump converges the same way a bounded forward one does. The one requirement that stays load-bearing is target <> origin: Precedence.resolve never deduplicates by slug, so a candidate returning its own argument unchanged would collide with itself in the same round's contest. Relaxed the obligation accordingly (rite.mli) and added the fourth transfer_target branch in Precedence_of, ahead of the existing three (Precedence_of.transfer_target, Rule 0). calendar.ml needed no logic change, only two comments that asserted "every genuine transfer moves forward" as a blanket fact. Unpinned the two tests that asserted the old wrong (forward) behaviour and replaced them with assertions of the correct one, plus a new direct unit test of the backward branch across two independent years. EF output is untouched: data/ef/ and lib/rites/rite_ef/ carry no diff, and colitur day/readings for 2026, 1583 and 9999 are byte-identical against a build of the prior commit. OF's own 2005-2050 window carries none of the 16 affected years and shows zero unexpected diffs; the full 1583-9999 domain still reaches a fixed point under the exhaustive sweep.
* fix(citation): make the well-formed reading-part set rite-suppliedLukasz Kasprzak2026-08-262-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I7 (final-review.md, 2026-08-25-colitur-of-phases-3-5): OF Sundays and solemnities shipped without the Second reading, and the lectionary data header called the First reading an "Epistle" -- EF vocabulary. The sole blocker was Validate's own kernel-hardcoded assertion that a well-formed day's sorted citation parts are exactly [First; Gospel]; Citation.part already carried Second. Rite.t gains citation_shapes : Citation.part list list, the fourth EF-shaped kernel misfit (after Preface.t, Mass_formulary.source, transfer_target's strictly-later contract) and the first fixed rather than only documented. EF supplies its one shape unchanged; OF supplies two, [First; Gospel] on a feria/feast/memorial and [First; Second; Gospel] on a Sunday or solemnity (OLM 1981 Praenotanda n. 66.1 vs n. 69.1, n. 84(b)/(c), page-image verified against olm-1981.pdf). Validate's "citations" check now matches against the rite's own declared shapes rather than a single literal pattern, preserving all three invariants it always enforced: zero or one complete shape, never partial; no part outside what the rite declares; no part repeated. bootstrap_lectionary_of.ml's cite now extracts a Second reading from Sunday-cycle ini sections only, correctly excluding the one stray `second` field lectio's snapshot carries on a weekday-cycle section (a content-verified scraping artifact). The hand-authored Christmas Day entry gains its own Second reading from the same OLM passage already cited for its First/Gospel. Regenerated data/of/lectionary.sexp: 771 entries unchanged, citation fields 1542 -> 1725 (+183, all Second readings), SHA-256 re-pinned, header wording fixed and a new coverage bullet added. Responsorial Psalm is deliberately still not emitted -- OLM 1981 Praenotanda n. 71 itself lists it apart from the readings proper as a chant with its own refrain, and the finding driving this change names only the missing Second reading. EF output verified byte-identical to the branch start (empty lib/rites/rite_ef + data/ef diff since v1.0.0, plus a direct binary comparison of `day`/`readings` for 2026, 1583 and 9999 against a worktree build of the pre-change commit). Tests: three new fixtures in test_validate.ml prove the generalisation holds both directions (a multi-shape rite accepts either of its declared shapes; a rite that never declared a shape still rejects it). test_citation_coverage_of.ml's pinned residual grows 41 -> 49, all new entries the same already-understood chapter-crossing shape.
* docs(of): correct stale precedence_of.mli note on St Joseph/Palm SundayLukasz Kasprzak2026-08-261-5/+16
| | | | | | | | | | | | | | | The "KNOWN UNIMPLEMENTED FOURTH RULE" note (Normae n. 56(f)) still said "No sanctoral data exists yet (Phase 3), so nothing is WRONG today" and located the trigger at "25 March co-occurring with Palm Sunday". Both are now false, and the date was already wrong when written: St Joseph is 19 March, not 25 March -- 25 March is the Annunciation, a separate solemnity handled elsewhere in this same module. Phase 3 shipped data/of/calendar-2002.sexp on this branch, so the defect is now live in 16 of the 1583-2100 years (19 March on Palm Sunday); rewrite the note to say so and point at where it is pinned (test_rite_of.ml's known-wrong-forward-transfer test, allow-list entries L8/L9).
* fix(of-temporal): make anchors agree with temporal on the Nativity VigilLukasz Kasprzak2026-08-261-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Temporal_of.named correctly guards the Nativity Vigil: when 24 December falls on a Sunday it is the Fourth Sunday of Advent (Tabula I.2 outranks I.3), not the Vigil, and named returns None so temporal's dispatch falls through to the ordinary Sunday slug. anchors, however, still listed ("of-nativity-vigil", 24 December) unconditionally -- a regression from the earlier R8 fix, which added the guard to named but never updated anchors to match. In 2028 and 2034, anchors claimed the Vigil where temporal actually returns "of-advent-sunday-4". anchors exists precisely as an independent restatement whose stated purpose is to catch an accidental single-site drift rather than leaving it invisible -- it caught exactly this drift, just later than it should have, only once Validate.run was wired for the OF rite for the first time (nothing before that compared anchors against named/temporal, so the two were free to disagree unnoticed). Fixed by restating named's own guard exactly: the Vigil entry is omitted on a Sunday year rather than replaced, since the Fourth Sunday of Advent is an ordinary generic week-numbered Sunday, not one of the named days anchors exists to restate. Audited every other anchors entry the same way, across the full 1584-9997 domain (test_temporal_of.ml's own exhaustive sweep, run under COLITUR_EXHAUSTIVE_SWEEP=1): no further drift found. The sweep does surface one already-known, already-pinned mismatch -- the "of-holy-family" entry, in any year 26-31 December holds no Sunday (Normae n.35(a)'s own 30-December fallback) -- but it is a different shape, not a second instance of this bug: there anchors computes the right date and it is temporal that fails to reach it, which test_rite_of.ml already found, pinned and deferred as out of scope. Corrected that file's own stale comment, which still described the now-fixed Vigil disagreement as an open gap. New tests in test_temporal_of.ml cover both a Sunday-24-December year (2028, 2034) and a non-Sunday one, checking every anchors entry against temporal directly, plus a positive assertion that the Vigil entry is correctly present or absent depending on the year.
* fix(of-lectionary): stop serving drifting readings for O-Antiphon and ↵Lukasz Kasprzak2026-08-262-4/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Christmas-season dates The bootstrap excluded 19 lectio bases as "date-keyed duplicates", but 17 of them were not duplicates at all: the 8 O-Antiphon days (17-24 December) and 8 further Christmas-season dates (29-31 December, 2-5 and 7 January) each carry unique per-date content found nowhere else among the emitted entries, verified against lectio's own ini directly. 17 December is Gen 49:2,8-10 / Matthew 1:1-17, but colitur was falling through to that year's unrelated weekday-keyed "advent-3-mon" content instead. OLM n. 69.3 explains why: those ferias are fixed by civil date, unlike every other Advent/Christmastide/Paschaltide feria, which is merely non-alternating within a weekday slot. Temporal_of's own ferial slugs for these dates are weekday-keyed, so looking one of those up served whichever OTHER date happened to share that year's weekday alignment -- a citation that silently drifted year to year on ~16 real civil dates (6 January stays excluded: Temporal_of fixes Epiphany there unconditionally, so that date can never reach the ferial path at all; two more, easter-6-thu and advent-4-sat, stay excluded for their own, different structural reasons). Fixed with a date-keyed lookup route (Lectionary_of.date_keyed_slug), tried before the weekday-keyed one in readings' own step 3. Temporal_of's slugs are unchanged -- only which lectionary key resolves a day's citations. tools/bootstrap_lectionary_of.ml now maps the 17 bases to synthetic date-keyed slugs instead of excluding them, and its own reachability sweep calls date_keyed_slug directly so the two can never drift apart. Re-emitted data/of/lectionary.sexp (754 -> 770 entries) and corrected its provenance header, which previously described these dates as excluded duplicates. Also states, for the first time, a Minor finding from the same review: 190 of 222 shipped sanctoral slugs have no dedicated lectionary entry and correctly fall through to the ferial per OLM norms -- expected behaviour, not a gap, but never said in the coverage report before. New tests pin 17 December (Gen 49:2,8-10 / Matthew 1:1-17) and 2 January (1 John 2:22-28 / John 1:19-28) in two years with different weekday alignments, proving neither reading drifts, plus direct boundary coverage of date_keyed_slug itself (both windows, the 6 January exclusion, and the Sunday guard).
* feat(of): assemble Rite_of.context and wire --rite of into the CLILukasz Kasprzak2026-08-262-0/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task 5 of Phases 3-5 (the payoff task): bundles Tasks 1-4's separately built pieces (Temporal_of, Precedence_of, Rubrics_of, Lectionary_of) into a (Vocab_of.season, Vocab_of.rank) Colitur_kernel.Rite.t, and wires colitur day/readings --rite of <year> into the CLI. Default stays ef; every pre-existing invocation is byte-identical (asserted directly in test/cli.t and against a real v1.0.0 build for three years, plus git diff --stat v1.0.0..HEAD over lib/rites/rite_ef/, lib/kernel/, data/ef/ is empty). No kernel change was needed, confirming the spec's central claim. season_runs needed real thought rather than the brief's own suggested Vocab_of.seasons: Temporal_of.season's own 'first run'/'second run' comments confirm Ordinary Time is genuinely interrupted by Lent and Easter over one liturgical year, so the expected run-length-compressed sequence names it twice, six runs over five seasons -- exactly the case Rite.t.season_runs's own doc comment already names as its illustration for why this field is rite-supplied rather than derived. easter/fixed_key are as specified, each carrying its own citation (Gregorian computus; the 2002 Missal's one bissextilis occurrence is a leap-year table entry, not a kalends-doubling rule, so fixed_key is identity). Follows rite_ef.ml's template and its lectionary-parameter lesson exactly: lectionary is caller-supplied, not closed over. test/test_rite_of.ml resolves the real assembled rite (calendar-2002 .sexp + all 13 amendment overlays + lectionary.sexp) through Calendar and Validate.run, the same discipline test_validate.ml/test_rite_ef.ml already apply to EF. This is the first time rite_of has been checked this way, and it surfaced two new, real, cited gaps outside this task's own scope to fix: Temporal_of never reaches Normae n.35(a)'s 30-December Holy Family fallback in a year with no Sunday in 26-31 December (first hit 1583, the domain floor), and Temporal_of.anchors disagrees with temporal on 24 December when that date is itself a Sunday (Advent IV outranks the Vigil, first hit 2006). Both pinned as known-wrong, not fixed, the same treatment the brief's own pre-known St Joseph/Palm Sunday gap (Normae n.56(f)) gets, pinned on 2062. A third gap was found in data/of/lectionary.sexp's own coverage (audited against one civil year only, so the other weekday-cycle letter is unaudited and at least one pairing is asymmetric on shipped data) -- that file is excluded from this task, so the wide 2005-2050 sweep checks structural invariants only and leaves the citation-chain checks to the small, individually-audited landmark-year set. make check (COLITUR_EXHAUSTIVE_SWEEP=1): exit 0, 867 tests, ~316s.
* feat(of): Lectionary_of -- reading-cycle arithmetic and the lectionary chainLukasz Kasprzak2026-08-262-0/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task 4 of Phases 3-5: the last Rite.t field OF still needed, `readings`. The cycle rules are CODE, cited to OLM (Ordo Lectionum Missae) 1981 Praenotanda -- verified against the real page image (docs/research/of/olm-1981.pdf pp.32-33/"XXXII-XXXIII"), not the document's own unreliable OCR text layer, per the design spec's own caveat. n. 66 (with its footnote 102's worked example, 1980=C/1981=A/ 1982=B/1983=C) gives the three-year Sunday cycle; n. 69 point 4 gives the two-year weekday cycle, Year I in odd label years, Year II in even. Both derive the "label year" the same way: one more than the civil year Advent I opened in, per n. 66's footnote 102 itself ("nempe a prima hebdomada Adventus, quae cadit in anno civili praecedente") -- so the cycle turns at Advent I, not 1 January, exactly where the task brief said to get it right. The design spec's own citation for the weekday rule, "Praenotanda n. 649", does not survive a direct check against the primary source (search finds "649" only in unrelated index/page-number entries); corrected here to n. 69, the paragraph the rule's own Latin text actually sits under, confirmed by the page image's own printed margin number. The data is bootstrapped from lectio's of-lectionary.ini (988 keys, niedziela.pl, harvest 2020-2025) by tools/bootstrap_lectionary_of.ml -- OCaml, not the brief's own suggested .py: tools/bootstrap_lectionary .ml already established this exact shape for EF, including a real safety net ([assert_reachable], sweeping Rite_of.Temporal_of.temporal AND the real merged sanctoral layer directly) that a second-language reimplementation would either duplicate or lose. Handles two real data anomalies found while building it: one malformed ini line (a Polish Septuagint-numbering annotation for Sirach 3, "Syr 3,2-6.12-14" against OLM/CEI/USA's shared Nova Vulgata, matching the design spec's own sec5 finding); and two Sunday-cycle-labelled bases (Annunciation, Immaculate Conception) where a scraping-year artifact left one of three cycle letters carrying a different day's Mass entirely -- resolved by a general, mechanical 2-of-3 majority rule, not a per-saint hand edit, and logged. Coverage measured in both directions, per the brief's own Step 1: - 1 of 365 days in civil year 2026 (25 December, the Christmas DAY Mass) has no Temporal_of-slug match anywhere in lectio's 988 keys -- only the Vigil is present. Named in the data file's own header. - 0 of 438 distinct lectio bases map to no colitur slug, after 19 are deliberately excluded (late-Advent/Christmas-season DATE-keyed duplicates lectio also carries in a WEEKDAY-keyed form colitur's own slugs actually match -- Lectionary.t has no date-keyed lookup at all, so the date-keyed family is transcription-inert, not silently dropped: named explicitly, not a residual). Lectionary_of.readings is three steps (no Commons indirection, unlike EF -- out of this task's scope): the observed celebration's own embedded citations; else, for a real sanctoral winner, its own slug looked up directly (flat, then both cycle letters); else the day's own temporal slug, same lookup. No preceding-Sunday fallback: OF's own two-year cycle assigns every Ordinary Time weekday its own reading by design, and no OF norm was found instructing otherwise. Tests (test/test_lectionary_of.ml, 12 cases): a cycle-arithmetic table straddling Advent 1980/1981/1982/2025 inside single civil years, reproducing OLM n.66's own worked example directly; SHA-256 pins on both the emitted file and lectio's own source (embedded in the provenance header); a pinned, NAMED 2026 coverage result (364 resolve, exactly {25 December} does not -- never a bare count); two resolution- chain spot checks (a plain ferial, and a saint's day beating the ferial it would otherwise fall on); and a real subprocess test that a missing lectio source file fails the generator loudly, non-zero exit, no output written -- the exact bug Task 1's own generator shipped and needed a review round to fix. dune test: exit 0, 856 tests. make check (COLITUR_EXHAUSTIVE_SWEEP=1, full 1583-9999 sweep): exit 0, 862 tests, ~342s, both run unpiped in the foreground. git diff --stat v1.0.0..HEAD -- lib/rites/rite_ef/ lib/kernel/ data/ef/ still empty.
* fix(of): rename credo to creed, correct three comment inaccuraciesLukasz Kasprzak2026-08-262-43/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix round 1 for Task 3, addressing review findings. Rename the exported creed function from `credo` to `creed` across the .ml, .mli and test call sites, so the OF rite bundle can write `creed = Rubrics_of.creed` with no gratuitous mismatch against Rite.t's own field name, matching Rite_ef.Rubrics_ef.creed's own naming. IGMR n. 67's own heading is "Professio fidei" and its body says "Symbolum", never "Credo" -- documented as a comment on the now-correctly-named function rather than kept as the exported name. Local test helpers (credo_on_temporal, check_credo, test_credo_*) and Alcotest description strings keep the Latin shorthand, since only the call sites against RO.creed needed to change. Corrected two comment inaccuracies: - The Annunciation (25 March) is NOT always inside Lent, unlike St Joseph (19 March): 25 March sits after Easter's own earliest possible date (22 March), so in an early-Easter year (2008, Easter 23 March) it falls inside the Easter Octave instead, or is transferred under Normae n. 60/5. No functional effect (gloria/creed read observed/temporal as actually resolved), but the stated reason was wrong. - The Requiem-silence argument's counts: three All Souls Mass formularies (not two), and roughly 147 Gloria+Credo markers combined elsewhere in the Missal (not "over 150", which conflated Gloria alone with the combined figure) -- recounted directly against a fresh pdftotext -layout extraction rather than estimated. Added: an independent corroborating citation for the Holy Thursday / Easter Vigil Gloria exception, Vigil n. 31 -- the Easter Vigil's own praenotanda ("VIGILIA PASCHALIS IN NOCTE SANCTA"), a THIRD independently-numbered rubric set inside the same Missal PDF, confirming the Vigil's own Gloria directly rather than resting solely on the Holy Thursday rubric's forward-looking "usque ad" clause. dune test: exit 0, 845 tests. make check (COLITUR_EXHAUSTIVE_SWEEP=1, full 1583-9999 sweep): exit 0, 851 tests, 330.3s, both run unpiped in the foreground. git diff --stat v1.0.0..HEAD -- lib/rites/rite_ef/ lib/kernel/ data/ef/ still empty.
* feat(of): Rubrics_of -- Gloria, Credo, and an all-None Preface verdictLukasz Kasprzak2026-08-262-0/+368
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task 3 of OF Phases 3-5: the celebrant-rubrics module for the OF rite, supplying three of Rite.t's four remaining fields. creed/gloria implement IGMR n. 53 (Gloria) and n. 67-68 (Symbolum), both quoted in full in the module header. temporal is read, not observed, for both Sunday clauses: Temporal_of.temporal tags every Sunday of Advent/Lent/Easter Sollemnitas (the privileged-season convention), so an observed.rank test alone would wrongly grant Gloria on an Advent or Lent Sunday, which n. 53's own "extra tempus Adventus et Quadragesimae" explicitly withholds. Credo is deliberately narrower than Gloria: n. 68 has no "et festis" clause, so an ordinary Festum does not get the Creed, unlike EF's RG 475(b)/(c). Two Missale-proper exceptions (Holy Thursday evening Mass, the Easter Vigil Mass) are cited from the Missal's own "Dicitur Gloria in excelsis" rubric, not the IGMR, which is silent on both. The Requiem question is likewise IGMR-silent (nn. 379-385 say nothing about Gloria/Credo); flagged as an inference from the Missal's own consistent marker pattern, applied only to the one Requiem-shaped slug the shipped OF data can construct (all-souls), the same closed-population discipline Rubrics_ef's own Colour.Black proxy uses. preface returns None unconditionally, a measured verdict rather than a stub. The module header transcribes the 2002 Missal's own "INDEX PRAEFATIONUM" in full: nine of Preface.t's 15 EF-cited constructors name an OF occasion with multiple distinct texts (Nativity x3, Lent x4-9, Easter x5, Ascension x2, Holy_spirit x2, Bvm x5, Apostles x2, Common split across two independent 7/8-member families, Requiem x5) -- structurally lossy to collapse into one constructor. The other six (Epiphany, Trinity, Sacred_heart, Christ_the_king, St_joseph, Holy_cross) match cardinality with a single OF text apiece, and were checked and rejected anyway: Preface.t's own constructors are RG-cited by construction, and IGMR n. 364's own "quibus Missale Romanum ditatur" (prefaces the Missal is ENRICHED with) is direct textual evidence the 2002 collection is not a bare carry-over -- corroborated directly for Sacred Heart, whose OF text was read and found to be a different composition from its RG 491 namesake. Reusing any of the six on cardinality and theme alone would be the exact "sounds similar" trap the task brief warns against. test/test_rubrics_of.ml: 26 table-driven cases. Every temporal-origin row builds observed via Temporal_of.temporal on a real date; every sanctoral-origin row (a solemnity in Lent, an ordinary Festum, a weekday obligatory memorial, All Souls) pairs a real Temporal_of.temporal result with an observed record copied verbatim from data/of/calendar-2002.sexp, since no full OF Rite.t/Calendar pipeline exists yet to derive one. Includes same-date Gloria/Credo pairs that prove the two rules genuinely diverge (a Sunday of Advent, an ordinary Festum) rather than one silently mirroring the other. dune test: exit 0, 845 tests. make check (COLITUR_EXHAUSTIVE_SWEEP=1, full 1583-9999 sweep): exit 0, 851 tests, 303.6s, both run unpiped in the foreground. git diff --stat v1.0.0..HEAD -- lib/rites/rite_ef/ lib/kernel/ data/ef/ is empty.
* fix(of): correct subject over-match, provenance truth, and stale hazard commentLukasz Kasprzak2026-08-251-19/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Four fixes from fix round 2 review: classify_subject's "maria"/"b.m.v" substring test over-matched 12 saints who merely carry "Maria" in their own name (Maximilian Mary Kolbe, John Mary Vianney, Mary Magdalene among them) as Bvm. Replaced with an explicit BVM_DATES table of the 13 genuinely Marian entries. Bvm 25 -> 13. The provenance header claimed lectio is "never a source", which omitted that slugs and English names both come from it. Corrected to state exactly what does (slugs, en names) and does not (every substantive field) come from lectio. A missing lectio file used to degrade silently to a different SHA-256 with no en names and no warning; it now fails loudly. lectio's own SHA-256 is now pinned alongside the Missal PDF's. Four more entries carried a second pdftotext artifact distinct from the letter-spacing already handled -- a combining diacritic rendered as a stray spacing character (Kim Taegŏn/Chŏng Ha-sang, Đũng Lạc, Makhlūf, Kęty). Hand-repaired the same way Peter Damian was, each corroborated by the identical corruption recurring in the Missal's own index. precedence_of.ml's PHASE 3 HAZARD comment about All Souls (2 November) was asserting a gap that no longer exists now that OF sanctoral data ships. Added test_all_souls_beats_an_ordinary_sunday, which resolves the shipped All Souls entry against a real per-annum Sunday (2025-11-02) through the actual Precedence.resolve pipeline, and updated the comment to record the resolution instead of demanding it.
* fix(of): Nativity Vigil no longer suppresses a Sunday of AdventLukasz Kasprzak2026-08-252-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Temporal_of.named claimed 24 December unconditionally as of-nativity-vigil (Sollemnitas), and temporal's dispatch matched named before sunday_slug. On a Sunday 24 December, the Fourth Sunday of Advent -- Tabula I.2, Normae n. 5's own privileged Sundays of Advent, Lent and Easter -- was silently replaced by the Vigil. named now returns None for 24 December when that date is itself a Sunday, so temporal's dispatch falls through to sunday_slug and the day resolves as of-advent-sunday-4. The Vigil Mass is an evening Mass of the following solemnity, not an office belonging to 24 December's own civil day -- the same civil-day-granularity reasoning already applied to Holy Thursday (Precedence_of.band's entry-1 comment) and to expected-divergences-litcal.sexp's L1 entry. Every non-Sunday 24 December is unaffected. Audited every other named entry for the same latent shape (see .superpowers/sdd/of-r8-advent-iv-report.md): none of them has it, either because the date can never fall on a Sunday, or because the date IS the definition of that Sunday (Palm Sunday, Easter, Pentecost, Trinity, Christ the King), or because the competing movable-Sunday windows are constructed to exclude that date. Added test_nativity_vigil_yields_to_advent_sunday, covering 2028-12-24 and 2034-12-24 (both inside the litcal fixture window) and the 2026-12-24 non-Sunday control. Re-ran the litcal layer: no allow-list counts moved, since it compares only season and Ordinary-Time week, and both readings of 24 December are "advent" either way. Updated test_precedence_of.ml's "entry 3, not 9" comment, which had carried this as a known, unfixed defect, to describe the fix; its own pinned assertion (a hand-built Thursday candidate) needed no change.
* fix(of): correct season citation, note All Souls gap, guard transfer searchLukasz Kasprzak2026-08-253-21/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix wave from the final whole-branch review of OF Phase 2 (0 Critical, 5 Important, 8 Minor). Applies the five items ruled in-scope and records two more, per the controller's R7/R8/R9 rulings. Fixes: - temporal_of.ml: season-boundary header cited "Normae n. 71-77", a range that does not exist (the Normae end at n. 61) and collides with real IGMR nn. 71-77 (Preparation of the Gifts) in the same PDF -- EF leakage from RG 71-77. Corrected to Normae Titulus II, nn. 17-47, with a note against reintroducing the wrong range. - precedence_of.ml entry 3: added the Tabula's second clause (Commemoratio omnium fidelium defunctorum / All Souls) to the comment, and recorded the Phase 3 hazard -- Vocab_of.rank has no constructor for it yet, and every natural tagging choice gets 2 November's precedence wrong in a different way. No code change; nothing can construct the entity yet. - precedence_of.ml transfer_target's search: added a domain_max_date guard (following Rite_ef.Precedence_ef's existing shape and reasoning) so the walk can no longer probe Computus past 9999-12-31, and it now returns the last date visited on bound exhaustion instead of failwith-ing. .mli updated to drop the @raise Failure clause. - precedence_of.ml is_privileged_sunday: added its own inline Tabula I.2 citation, matching its sibling helpers. - precedence_of.ml entry 10: trimmed the reused "universal or temporal-origin" comment -- Temporal_of never constructs a Memoria_obligatoria candidate, so the temporal-origin half was vacuous there. Recorded without fixing (both comment-only, per explicit scope ruling): - test_precedence_of.ml: corrected the entry-3 Nativity Vigil test's characterisation. The pinned band-30 assertion (2026-12-24, a Thursday) is correct, but is not the value on a 24-December Sunday (e.g. 2028, 2034), where is_privileged_sunday instead bands the same candidate 20. Named the underlying Phase 1 defect this exposes -- named() claims 24 December unconditionally and is matched before sunday_slug, so the Fourth Sunday of Advent gets no office at all in those years, invisible to the litcal layer -- as known and carried to the next task. - precedence_of.mli transfer_target: documented Normae n. 56(f) (St Joseph on Palm Sunday anticipates backward to 18 March) as a known, cited, unimplemented fourth transfer rule, and named the underlying kernel constraint (Rite.t.transfer_target's strictly-later obligation, justified only by the EF's RG 96) as the reason a real fix needs a kernel change. dune test: 799 tests, exit 0. make check (exhaustive sweep): 805 tests, exit 0, 224.7s. No kernel/rite_ef/data changes (git diff empty).
* feat(of): transfer_target per Normae nn. 5 and 60Lukasz Kasprzak2026-08-252-0/+115
| | | | | | | | | | | | | | | | Three rules, in priority order: the Annunciation in Holy Week goes to Easter+8; any other solemnity on a Sunday of Advent, Lent or Easter goes to the following Monday (n. 5, which n. 60 defers to explicitly), except on Palm Sunday or Easter Sunday; otherwise the nearest later day free of Tabula entries 1-8. The n. 5 Monday rule is easy to miss -- n. 60 names it only by cross reference, and reading n. 60 alone yields a single search rule where the sources give three. Shaped to match Rite.t.transfer_target so a later phase wires it unchanged, with its own step bound: Calendar's round guard bounds rounds, not one call's internal search.
* fix(of): correct vigil_feast's justification for of-nativity-vigilLukasz Kasprzak2026-08-252-9/+32
| | | | | | | | | | | | | | | | | | | | The prior comment claimed of-nativity-vigil is 'not a distinct celebration' - wrong: Temporal_of.named (temporal_of.ml:230) constructs it as its own Sollemnitas-rank candidate on 24 December, a genuine contestant in band/Precedence.resolve. The real reason None is safe is structural, not that. The Nativity is Tabula entry 2 (band 20); only entry 1, the Paschal Triduum (band 10), bands lower. The Triduum's Easter-2..Easter window is confined to 20 March-25 April because Gregorian Easter never falls outside [22 March, 25 April] over the whole 1583-9999 domain (measured exhaustively in test_computus.ml, not assumed), so it can never reach 25 December. The Nativity therefore always keeps its own day and its vigil can never be orphaned by a transfer or reduction. Behaviour is unchanged: vigil_feast still returns None unconditionally. RG 33 (EF-only) and Normae nn. 11/13 remain the reason the hook exists at all and returns None for every other candidate.
* feat(of): admit and vigil_feast, both argued degenerateLukasz Kasprzak2026-08-252-0/+60
| | | | | | | | | | admit returns the empty list because disposition never returns Commemorate; vigil_feast returns None because the OF has no vigil office that its feast's movement could orphan -- 'of-nativity-vigil' is a Mass formulary of the solemnity, not a separate celebration. Both are argued from the sources rather than stubbed, and Precedence_of.rules now assembles the four functions the kernel resolver consumes.
* feat(of): disposition per Normae n. 60Lukasz Kasprzak2026-08-252-0/+50
| | | | | | | | | | An impeded solemnity transfers; every other loser is omitted for that year ('Reliquae celebrationes eo anno omittuntur'). Commemorate is never returned, and that is the rule rather than a gap: the OF has no commemoration of a losing celebration in the EF's sense, and an optional memorial is an election rather than a commemoration. A property over every rank pairing asserts it, so a later edit cannot quietly introduce one.
* feat(of): transcribe Tabula part III, completing the tableLukasz Kasprzak2026-08-251-0/+18
| | | | | | | | | | | | | | | | Entries 10-13. Entry 12 is one undivided row -- the Tabula draws no universal/proper split for optional memorials, unlike entries 3/4, 7/8 and 10/11 -- so it deliberately does not read the layer. Entry 13's four clauses need no date arithmetic of their own: every privileged feria is entries 2 and 9, tested earlier in the chain, so what reaches the final branch is exactly the residue those clauses name. Entry 10 uses [not (is_proper layer)], not the brief's original [is_universal layer]: is_universal was deleted as dead code in Task 2, because every temporal-origin candidate carries layer = "temporal", never universal_layer, so a positive is_universal test can never match one -- the same correction entries 3, 5 and 7 already apply.
* feat(of): transcribe Tabula part II into precedence_ofLukasz Kasprzak2026-08-251-4/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Entries 5-9. Entries 5 and 7 differ only by subject -- 'Festa Domini' against 'Festa beatae Mariae Virginis et Sanctorum' -- so they key on Celebration.t.subject, the same field RG 91 entry 14 uses on the EF side, never on the slug. Entry 9's three clauses (late-Advent ferias from 17 December, the Nativity octave, Lenten ferias) are what separates a privileged feria from the ordinary one at entry 13. CORRECTION to the task brief, applied here rather than after: entries 3, 5 and 7 test 'not (is_proper layer)', not 'is_universal layer'. Every temporal-origin candidate Temporal_of.temporal constructs carries layer = "temporal" unconditionally, never universal_layer, so a positive universal-layer test silently excluded every temporal-cycle solemnity and Lord-subject feast from these entries -- Corpus Christi came out unclassified outright, and Trinity/Christ the King/Holy Family/the Baptism of the Lord landed one entry too low. is_universal is now dead and removed; entry 3's branch (written in Task 1) is amended along with the new entries 5 and 7. Only entries 4 and 8 still test is_proper directly, matching the Tabula's own proper-calendar rows. Also fixes a pre-existing typo in the brief's own 'entry 6: a Sunday per annum' test row: rank was Sollemnitas, which -- being tested at entry 3, earlier in the chain -- made the row fail regardless of the is_universal/is_proper question, since no real Sunday per annum is ever Sollemnitas. Changed to Festum, matching the adjacent 'Sunday of Christmas time' row and real Temporal_of output.
* feat(of): transcribe Tabula part I into precedence_ofLukasz Kasprzak2026-08-252-0/+137
| | | | | | | | | | | | The Tabula dierum liturgicorum's entries 1-4, one band branch each, scaled x10 as Precedence_ef's own table is. The Triduum is identified structurally by Easter offset because Temporal_of emits Good Friday and Holy Saturday as ordinary Lent week-6 ferias, leaving no slug to key on. Holy Thursday sits at entry 2, not entry 1: the Tabula's own entry 2 runs 'a feria II ad feriam V inclusive' and the Triduum opens with an evening Mass inside that civil day. Same granularity decision the litcal layer's L1 records on the season axis.
* feat(of): Phase 1 of the OF rite module — vocab_of, temporal_ofLukasz Kasprzak2026-08-255-0/+890
The first code for a second rite. lib/rites/rite_of/vocab_of implements the OF's five-way rank vocabulary (Sollemnitas/Festum/Memoria_obligatoria/ Memoria_ad_libitum/Feria) and five-season vocabulary (Advent/Christmas/ Lent/Easter/Ordinary_time), each constructor cited against the 2002 Missale Romanum's Normae universales and the Tabula dierum liturgicorum. temporal_of implements season boundaries, week numbering — including Ordinary Time's own two-block resumption, derived from the Missale's own "HEBDOMADA I/XXXIV 'per annum'" headings and empirically verified across the whole 1583-9999 domain — named temporal days, and Sunday/ferial slugs. Both satisfy Colitur_kernel.Temporal.RITE with no kernel change. No Rite.t is assembled and no CLI wiring is added (Phase 2's own scope); lib/rites/rite_ef and data/ef are untouched, verified byte-identical against the v1.0.0 tag across a domain-spanning sample. test/test_temporal_of.ml adds unit tests for every boundary and named day plus seven QCheck properties (seasons contiguous, Ordinary Time weeks in 1..34, Advent always four Sundays, slug uniqueness, weekday agreement, determinism, consecutive liturgical years partition civil time), with a committed exhaustive sweep mirroring test_validate.ml's own convention. Full account, including the Ordinary Time derivation's evidence and a list of EF concepts that do not carry over, in .superpowers/sdd/of-phase1-report.md (untracked, gitignored).