summaryrefslogtreecommitdiff
path: root/lib/kernel/liturgical_day.ml
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/liturgical_day.ml
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/liturgical_day.ml')
-rw-r--r--lib/kernel/liturgical_day.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/kernel/liturgical_day.ml b/lib/kernel/liturgical_day.ml
index 65e3ba5..cbaca9c 100644
--- a/lib/kernel/liturgical_day.ml
+++ b/lib/kernel/liturgical_day.ml
@@ -14,6 +14,9 @@ type ('s, 'r) t = {
(** arrived here from an impeded day *)
transferred_out : Date.t option;
(** this day's celebration went there *)
+ omitted : ('r Celebration.t * string) list;
+ (** with the reason, never silent -- Task 12's no-celebration-lost
+ invariant reads this *)
citations : Citation.t list; (** always empty until Plan 4 *)
}
[@@deriving sexp]