aboutsummaryrefslogtreecommitdiff
path: root/lib/rites/rite_ef/precedence_ef.mli
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-11 22:46:30 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-11 22:46:30 +0200
commit07c87370d6a0de687b42a41d967135578f014bdc (patch)
tree841b29952515e9fd662bc46c0b8457303fb2300d /lib/rites/rite_ef/precedence_ef.mli
parent553dc44d2ba0e131e7f2ac79dc755641afcd6a1c (diff)
downloadcolitur-07c87370d6a0de687b42a41d967135578f014bdc.tar.gz
colitur-07c87370d6a0de687b42a41d967135578f014bdc.zip
rite(ef): occurrence dispositions (RG 92-95, 33, 94)
Precedence_ef.disposition decides the loser's fate in an occurrence: a Commemoration_only celebration is always commemorated (it can never win or transfer); a I- or II-class vigil impeded by any Sunday or a I-class feast is entirely omitted (RG 33), checked before the generic rule below or the Nativity/Pentecost Vigil could wrongly transfer; any other I-class loser transfers (RG 95 -- only I class has the right of translation); everything else is commemorated, with the admit-or-omit decision left to RG 108-111's admission count (Task 9). RG 94 needs no code: resolve always compares a loser against the day's actual winner, never against a departed sibling, so no commemoration can ride along with a transferred feast in this design. This is the branch that completes Task 7's carried All Souls fix: once it loses to an occurring Sunday, its untouched Class1 rank routes it to Transfer via the generic rule, not a special case. Landing on 3 November is Rite.transfer_target's job, not wired up yet. Commemorate carries an interim Precedence.Ordinary privilege pending Task 9's RG 109 implementation, exposed as interim_privilege for that task to replace. Table-driven tests cover each rule, including RG 33's boundary from both sides and a Commemoration_only loser that is also Class1 and vigil-shaped to pin the branch ordering. Mutation-tested: disabling RG 33, either direction of RG 95's rank condition, or the Commemoration_only priority check each fail exactly the rows built to catch them.
Diffstat (limited to 'lib/rites/rite_ef/precedence_ef.mli')
-rw-r--r--lib/rites/rite_ef/precedence_ef.mli46
1 files changed, 46 insertions, 0 deletions
diff --git a/lib/rites/rite_ef/precedence_ef.mli b/lib/rites/rite_ef/precedence_ef.mli
index 63fb0a1..9fe8789 100644
--- a/lib/rites/rite_ef/precedence_ef.mli
+++ b/lib/rites/rite_ef/precedence_ef.mli
@@ -56,3 +56,49 @@ val unclassified : int
including shapes the 1962 table itself does not describe (see
{!unclassified}). *)
val band : Vocab_ef.season Precedence.context -> Vocab_ef.rank Precedence.candidate -> int
+
+(** RG 33's marker: every Sunday slug this rite's temporal cycle produces
+ (temporal_ef.ml's [named] and [sunday_slug]) contains this substring;
+ nothing else {!band} classifies does. Also colitur's own convention, not
+ an RG citation -- see {!universal_layer} -- exposed for the same reason
+ as {!vigil_suffix}: a rename of temporal_ef's Sunday-slug format has
+ somewhere to be caught other than a silently-wrong RG 33 disposition. *)
+val sunday_marker : string
+
+(** The placeholder {!Precedence.privilege} every [Commemorate] disposition
+ below carries until Task 9 implements RG 109's closed list of privileged
+ commemorations and RG 108-111's admission counts. Exposed so Task 9 (and
+ any test wanting to assert on it explicitly) does not have to duplicate
+ the literal [Precedence.Ordinary]. *)
+val interim_privilege : Precedence.privilege
+
+(** [disposition ~winner ~loser]: RG 92-95, 33, 94 (docs/research/
+ rules-register.md ยง4, "Occurrence" and "Vigils"). What becomes of a
+ losing candidate, decided by the LOSER's own rank and status (RG 95),
+ except RG 33's vigil omission, which also reads the winner:
+ - a {!Celebration.status} of [Commemoration_only] is always
+ [Commemorate] (checked first: it can never win -- see
+ {!Precedence.resolve} -- and, by that same status's own definition,
+ already denotes an office with nothing left to translate, so it never
+ transfers either; not itself a further RG citation beyond RG 93's
+ general four-mechanism statement above);
+ - a [Class1] or [Class2] loser whose slug marks it a vigil ({!vigil_suffix})
+ is [Omit] when the winner is any Sunday ({!sunday_marker}) or itself
+ [Class1] (RG 33 -- entirely omitted, not merely commemorated);
+ - any other [Class1] loser is [Transfer] (RG 95 -- only I class has the
+ right of translation; this is also what moves All Souls, register
+ line 334, once it loses to an occurring Sunday -- WHERE it lands is
+ {!Rite.t.transfer_target}'s job, not this function's);
+ - everything else is [Commemorate], carrying {!interim_privilege} until
+ Task 9 replaces it with RG 109's real per-day computation.
+
+ Total over every winner/loser pair {!Precedence.resolve} or {!Calendar}
+ can construct: [Vocab_ef.rank] (RG 8) and {!Celebration.status} are both
+ closed variants, so the four cases above exhaust every representable
+ shape -- there is no fifth, "unclassified" case the way {!band} needs
+ one, because this function's own return type has no such slot to fall
+ into by accident. *)
+val disposition :
+ winner:Vocab_ef.rank Precedence.candidate ->
+ loser:Vocab_ef.rank Precedence.candidate ->
+ Precedence.disposition