summaryrefslogtreecommitdiff
path: root/lib/kernel/precedence.ml
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-12 17:13:06 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-12 17:13:06 +0200
commita2654a1e4d8987a251bcefbad2b0f0b867a6c6e6 (patch)
tree39360eccd3fa8ee5379fc46276d1e0ef0e6ff2b5 /lib/kernel/precedence.ml
parente19adb9c7ea369cafe76e7eff50e9248a4a954d0 (diff)
parente5b368dec8fdc9ab983ee0f1dee69c37883cbe12 (diff)
downloadcolitur-a2654a1e4d8987a251bcefbad2b0f0b867a6c6e6.tar.gz
colitur-a2654a1e4d8987a251bcefbad2b0f0b867a6c6e6.zip
Merge branch 'ef-rg16a': RG 16(a), RG 111(b), RG 113, and commemoration identity
Closes the largest known-wrong-output item on record (RG 16(a): a Feast of the Lord occurring on a II-class Sunday leaves the Sunday uncommemorated -- 5996 wrong days over 1583-9999) together with RG 111(b)'s rank floor on the day it holds, and gives the oracle layer the ability to compare commemoration identity rather than only presence and count. Also corrects a methodological defect that had produced wrong rulings in both this project and its sibling: docs/research/ holds an electronic transcription alongside two photographic scans, and the transcription silently drops commemoration lines -- seven across the year. Reasoning from its silence had convicted the oracle wrongly on 14 August and ruled a genuine 9 August commemoration spurious. The scans are the primary source; the rule is now recorded at the top of the register. RG 113 replaces an alphabetical same-rank tie-break that had no rubrical warrant. A bare Commemoratio has no row in RG 91's table at all, so band no longer hands one the entry of a III-class universal feast: 4451 days, all four reordered pairs verified against a photographic scan, zero observed-day changes.
Diffstat (limited to 'lib/kernel/precedence.ml')
-rw-r--r--lib/kernel/precedence.ml22
1 files changed, 20 insertions, 2 deletions
diff --git a/lib/kernel/precedence.ml b/lib/kernel/precedence.ml
index 05ad69f..2c55817 100644
--- a/lib/kernel/precedence.ml
+++ b/lib/kernel/precedence.ml
@@ -17,8 +17,14 @@ type ('s, 'r) rules = {
disposition : winner:'r candidate -> loser:'r candidate -> disposition;
admit :
observed:'r candidate ->
- ('r candidate * privilege) list ->
+ temporal:'r candidate ->
+ ('r candidate * privilege * int) list ->
('r candidate * privilege) list;
+ (** the trailing [int] on each input triple is that candidate's own
+ [band] value, computed once by {!resolve} below (a rite's [admit]
+ has no [context] of its own to compute it with) -- see [resolve]'s
+ own comment for why this is a KERNEL-level policy, not a rite-
+ specific rule threaded in as data. *)
}
type 'r resolution = {
@@ -55,7 +61,19 @@ let resolve rules ctx ~temporal ~sanctoral =
([], [], []) losers
in
let comms = List.rev comms and deferred = List.rev deferred in
- let admitted = rules.admit ~observed comms in
+ (* RG 113 (EF; docs/research/rules-register.md ยง4 "Commemorations"): "in
+ admittendis et ordinandis aliis commemorationibus, servetur ordo
+ tabellae praecedentiae" -- admitting AND ordering commemorations both
+ run on the rite's own table of precedence, the same [band] already
+ used above to pick [observed]. Computed here, once, generically (a
+ rite's own [admit] has no [ctx] of its own to call [band] with) rather
+ than inside every rite's [admit] separately -- a kernel-level POLICY
+ ("commemorations are ordered by the rite's own band"), not a
+ rite-specific RULE baked into the kernel: the actual [band] function,
+ and whether a rite's [admit] even uses the value it is handed, both
+ stay entirely rite-supplied. *)
+ let comms_by_precedence = List.map (fun (c, p) -> (c, p, rules.band ctx c)) comms in
+ let admitted = rules.admit ~observed ~temporal comms_by_precedence in
let dropped =
List.filter (fun c -> not (List.exists (fun a -> fst a == fst c) admitted)) comms
in