aboutsummaryrefslogtreecommitdiff
path: root/lib/kernel/calendar.mli
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-11 20:07:55 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-11 20:07:55 +0200
commit953427d8d1e3a34994be53b60e18662ec26fef4e (patch)
tree9d4876bbbfd44af738a00e0da9d0ae727542ede3 /lib/kernel/calendar.mli
parent8de560db7fb1b7b7d3ca93285068c6a4214e0bff (diff)
downloadcolitur-953427d8d1e3a34994be53b60e18662ec26fef4e.tar.gz
colitur-953427d8d1e3a34994be53b60e18662ec26fef4e.zip
kernel: carry omitted celebrations on Liturgical_day.t, reason and all
Precedence.resolution already tracked what happened to every losing candidate -- commemorated, deferred, or omitted with a reason -- but Liturgical_day.t had nowhere for the deferred and omitted buckets to land, so Calendar dropped them at the door. Task 12's no-celebration-lost invariant needs to read that accounting off the day result itself, not re-resolve every day to reconstruct it, so a reason recorded nowhere is not recorded. Add Liturgical_day.omitted : ('r Celebration.t * string) list, after transferred_out and before citations. Calendar.resolve_day now folds resolution.omitted (Precedence's own native omissions, reasons intact) and resolution.deferred (mapped to "deferred: transfer placement not yet implemented (Task 6)") into it. Adds a full-day accounting test against the whole Calendar pipeline: four colliding sanctoral entries plus the day's feria, checked as a slug set (matching test_precedence.ml's own nothing-silently-lost test) so a candidate silently dropped or duplicated into two buckets would fail it, plus an identity check that the deferred and admission-limit reasons don't get swapped.
Diffstat (limited to 'lib/kernel/calendar.mli')
-rw-r--r--lib/kernel/calendar.mli13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/kernel/calendar.mli b/lib/kernel/calendar.mli
index 50ff8f8..2469f2a 100644
--- a/lib/kernel/calendar.mli
+++ b/lib/kernel/calendar.mli
@@ -9,10 +9,15 @@
This module resolves each day's temporal-vs-sanctoral contest but does
not yet place deferred transfers (RG 96-98): a losing candidate the
- rite's rules send to [Precedence.Transfer] is absent from the result
- entirely on this pass -- not observed, not commemorated, and
- [transferred_in]/[transferred_out] both stay [None] everywhere. Task 6
- adds the fixed-point placement pass that closes this gap. *)
+ rite's rules send to [Precedence.Transfer] is not observed and not
+ commemorated on the day it lost, and [transferred_in]/[transferred_out]
+ both stay [None] everywhere -- but it is not silently dropped either. It
+ lands in that day's [Liturgical_day.omitted] with the reason ["deferred:
+ transfer placement not yet implemented (Task 6)"], alongside
+ [Precedence]'s own native omissions (yielded to a higher day; admission
+ limit reached), each with its own reason. Task 6 adds the fixed-point
+ placement pass that actually places these; until then, this is the
+ day's complete, honest accounting of what happened to every candidate. *)
(** [year rite layer y] resolves every day of the liturgical year that opens
in civil year [y]: from [rite.year_start y] through the day before