Precedence bug: a coincident saint can displace the Sacred Triduum #422
Labels
No labels
area: build
area: ci
area: compare
area: data
area: engine
area: model
area: provenance
area: rite
area: validation
backport
blocked
breaking
confirmed
dependencies
duplicate
epic
github_actions
invalid
needs-info
needs-triage
php
priority: high
priority: low
priority: medium
regression
type: bug
type: chore
type: correction
type: docs
type: enhancement
type: feature
type: fix
type: perf
type: refactor
type: security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Directorium/Core#422
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The validation harness (#45), cross-checking against the missalemeum oracle,
surfaced a precedence bug: on a day of the Sacred Triduum that coincides with
a fixed saint, the engine celebrated the saint and displaced the Triduum feria.
Concrete case — Holy Thursday, 28 March 2024 (which is also St John of
Capistrano, III class in the 1962 calendar):
day()resolved the celebration toS. Ioannis a Capistrano and marked Feria V in Cena Domini (I class) as
displaced/omit. Nothing outranks the Triduum (Table of Liturgical Days, n. 91,line 2 — below only the supreme feasts), and it admits no commemoration (n. 23).
Root cause
Rubrics1962Precedence::tierOf()awarded the apextriduumtier to everyobservance whenever the date was in the Triduum (
$context->isTriduum()), ratherthan only to the Triduum's own feria office. The coincident saint therefore tied
the feria at the apex, and
DayResolver::sortByTier()'s equal-tier tie-break (byobservance id) put
roman:sanctorale:…beforeroman:temporale:…, so the saint won.Fix
Gate the
triduumtier on the office being the day's feria(
$context->isTriduum() && kind === FERIA); a coincident saint keeps its normal(far lower) tier, so the Triduum feria always wins and the saint is omitted.
Regression tests added; the golden fixture was re-frozen (the change is confined to
each affected Triduum day and its eve's First-Vespers concurrence — an improvement).
Notes
The golden fixture proves stability, not correctness, so it had frozen this
wrong output; the independent oracle is what caught it. This is exactly the class
of defect Epic #45 exists to find.