397f31f4fc9f0d1ec88fd1abeda7ed6f20209cb2
6 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
397f31f4fc |
Implement octave-vs-octave precedence, and fix a real day-label bug it surfaced
Deploy / deploy (push) Successful in 52s
When more than one octave is active on a day with no temporal standing of
its own (St. Lawrence's and the Assumption's genuinely overlap every Aug
16-17), which one governs the day's content/label is now decided by rank
comparison instead of "whichever started first" (an accident of
insertion order). Per direct instruction:
- Highest effective rank wins outright; every other active octave still
gets commemorated, same as a single octave already outranking a weak
rival saint.
- A rank tie goes to whichever octave started more recently -- day 1 of
a new octave needs to be fully present, the whole point of it
starting. No real tied-rank case exists yet to verify this
empirically, unlike everything else here -- documented in TODO.md as
a stated decision, not a live finding.
New OctaveConfig.closingDayRank (default duplex): an octave's own final
day ("in Octava") is elevated above its ordinary in-between rank --
live-verified as a real, general pattern (both St. Lawrence's Aug 17 and
the Assumption's Aug 22 show as Duplex, above their otherwise-Semiduplex
ordinary days), not a one-off. This elevation is *why* Lawrence's octave
beats the Assumption's on their one real overlap day despite the
Assumption being the far higher-ranked feast overall. Feeds both the
existing rival-saint threshold and the new octave-vs-octave comparison.
calendar/octaves.ts gains resolveActiveOctave (+ pickWinningOctave, the
comparison itself factored out for direct unit testing against synthetic
data, since no real tied-rank overlap exists to test against yet).
hours/resolve-common.ts's resolveOfficeWinner and calendar/day-label.ts
both now call it instead of each keeping their own "activeOctavesFor(...)
[0]" logic.
That consolidation surfaced a real, independent bug: getDayLabel never
checked temporalCategory at all before choosing an octave name, unlike
resolveOfficeWinner -- found while testing the real Aug 16 overlap (a
Sunday that year, where the temporal Sunday has standing and should win
outright). Live-verified counterexample: the Christmas Octave's own
stack (Dec 30) was wrongly labeled "3rd Day within the Octave of The Holy
Innocents" instead of the correct plain temporal label -- the real title
never names any of the four stacked octaves there. Fixed by sharing the
exact same ordinary-feria gate resolveOfficeWinner already had, so the
two can no longer disagree.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
||
|
|
5f32a3751c |
Model St. Clare and surface active octaves in the day label
Deploy / deploy (push) Successful in 52s
Today (Aug 12, within St. Lawrence's octave) was resolving as a plain
ferial day: St. Clare wasn't modeled in the calendar at all, and even
once an octave commemoration exists, getDayLabel only ever looked for a
sanctoral commemoration, never an octave one, so the label fell all the
way through to the generic ordinal week label.
Adds St. Clare (Simplex under Monastic 1617, correctly losing to
Lawrence's octave and only commemorated -- live-verified against three
clean years). Extends getDayLabel to show the active octave itself as
the day's primary identity when nothing else has won outright (e.g.
"3rd Day within the Octave of St. Lawrence, Martyr -- St. Clare,
Virgin"), matching what the live reference engine actually titles these
days, rather than falling back to an anonymous ordinal week label.
Also fixes a regression this surfaced: Trinity Sunday is technically
also day 8 of Pentecost's own octave, and the naive octave-first check
was shadowing its own anchor-day name ("8th Day within the Octave of
Pentecost" instead of "Trinity Sunday"). A season's own named anchor day
now always outranks an active octave label.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
||
|
|
747a078580 |
calendar: model Our Lady's Saturday as a real occurrence outcome
Deploy / deploy (push) Successful in 49s
On a free Saturday (nothing privileged already claims it, no active octave), the day's own identity is now "Our Lady's Saturday" rather than an anonymous ordinary-feria -- mirrors privileged-feria-minor exactly, per direct instruction: Semiduplex-or-higher still wins outright (Marian Saturday doesn't apply at all); below that (Simplex, and Vigil, both under semiduplex on the FeastClass scale) loses and is commemorated instead. Layered additively after decideOccurrence, same shape as applyOctaves -- never touches decideOccurrence's own rules. Needed a real winner identity (not just the plain temporal feria id) so day-label/antiphon/collect sourcing can recognize it -- added a temporal-feasts record purely for that, and taught getDayLabel to check it for any named temporal winner (a small, free improvement for Christmas/Pentecost's own labels too, previously unhandled). hours: build the duplex-majus+ Lauds psalmody override (per-feast) lauds-psalmody no longer unconditionally uses the plain weekday default: a duplex-majus-or-higher sanctoral winner, or Our Lady's Saturday (unconditional, no rank threshold -- it isn't competing with the weekday default the way a saint is), now substitutes its own proper psalm groups/antiphons/canticle. Per-feast, not per-Common, per direct instruction, even though most duplex-majus+ saints across the year don't have one authored yet and fall back to the plain weekday default until they do. Content for the worked example (St. Lawrence's own day) surfaced a real bug while sourcing it: st-lawrence-antiphon.yml had been read from the Roman/secular rite's own [Ant 1], not Monastic 1617's actual Benedictus antiphon for that day -- corrected from a fresh live query. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> |
||
|
|
37ac31c3f2 |
calendar: occurrence engine v2 — real rank thresholds, transfers, collisions
Deploy / deploy (push) Successful in 39s
Corrects and completes the occurrence rules, based on a design discussion plus one concrete data point: St. Anthony Abbot (plain Duplex) was found outright winning against an ordinary Sunday in the real Monastic 1617 engine, which the old duplex-1-classis-only threshold got wrong. - FeastClass gains `vigil`, inserted between `simplex` and `semiduplex` — one ordering that correctly serves both "does this win against a Sunday" (vigil behaves like simplex there) and "which of two saints wins a landing-day collision" (vigil beats simplex, loses to semiduplex). - LiturgicalDay.occurring (a flat OccurringFeast[] that could only ever express a losing *sanctoral* candidate) is replaced by `winner: DayWinner` + `commemorations: Commemoration[]` — a discriminated list that can hold the temporal day itself, one or more sanctoral entries, or (not built yet, but the shape already accommodates it) a future octave kind. - commemorations.ts: ordinary Sundays let Duplex+ win outright (Sunday commemorated in return), Semiduplex/Vigil transfer elsewhere (too substantial a feast to cheapen with a bare commemoration), Simplex stays and is commemorated. Privileged Sundays never displace; Duplex-majus+ commemorated, everything else transfers. - collision.ts (new): resolves two sanctoral candidates wanting the same day (a transfer landing on an already-occupied day, or two native saints sharing a date) — duplex > semiduplex > vigil > simplex, loser always commemorated, ties favor the native occupant. - temporal-id.ts (new): maps any date to one of the 52 real Sunday-collect ids from the previous commit, so a temporal winner/commemoration can actually be looked up, not just labeled "temporal" in the abstract. - index.ts's resolveDay orchestrates all of it, including the actual Monday/Saturday transfer mechanism. Landing on a privileged feria (the concrete case: Holy Week, right after Palm Sunday) is explicitly deferred rather than guessed at — it needs its own Easter-keyed lookup table, the same way the reference engine handles it. Added the Vigil of St. Lawrence (Aug 9) as real content specifically to exercise the backward-transfer rule end-to-end: Aug 9, 2026 is a Sunday, so the vigil transfers cleanly back to Saturday, verified by a new integration test alongside the unit-level rule and collision tests. |
||
|
|
ad87d8dd18 |
calendar: move Sunday-governance arithmetic from day-label.ts into temporal.ts
Deploy / deploy (push) Successful in 37s
sundayOnOrBefore and firstSundayStrictlyAfter are calendar facts ("which
Sunday does this feria belong to"), not presentation logic — day-label.ts
was the only consumer so far, but a future temporal-propers content
resolver (PropersRef's still-unused source: 'temporal' branch) will need
the exact same arithmetic, just keyed for content ids instead of display
strings. Moving it now, while the shape is still small and well
understood, rather than duplicating it later.
day-label.ts keeps the actual display config (which anchor, "Trinity" vs
"Pentecost" wording) — that part stays presentation-only on purpose, since
it's also where a future counting-convention setting would hook in.
No behavior change: 88/88 tests still pass.
|
||
|
|
226fff2ce6 |
ui: show the "day being celebrated" label
Deploy / deploy (push) Successful in 38s
Adds a real label under each hour's heading — "Monday in the 10th week after Trinity", "The 1st Sunday of Advent" — computed from whichever LiturgicalDay the hour actually resolved against, which can differ from the nav date for Compline's evening anticipation. calendar/day-label.ts combines two things: an ordinal week-within-season label (pure date arithmetic on the season anchors from calendar/temporal.ts and calendar/easter.ts — Trinity-counted, not Divinum Officium's own Pentecost-counted convention; meant to become configurable later via the same day->id indirection already used for the sanctoral calendar, not hardcoded forever), and a feast name from calendar/commemorations.ts's occurrence decision — shown alone if the feast displaces the day outright, prefixed onto the temporal label if merely commemorated, or omitted entirely if nothing's occurring. |