diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-12 01:16:22 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-12 01:16:22 +0200 |
| commit | 94fc488cc9c6b4a050d90c4250f6e166b40088e7 (patch) | |
| tree | 18f68c393a704c225c0124f6c9a30bdd96e444ae /test/dune | |
| parent | 9725195fc4a1050ded151854f6653459dacc35b0 (diff) | |
| download | colitur-94fc488cc9c6b4a050d90c4250f6e166b40088e7.tar.gz colitur-94fc488cc9c6b4a050d90c4250f6e166b40088e7.zip | |
rite(ef): clamp the RG96 search at the domain ceiling
search_from could walk up to 400 days past origin before Calendar's own
~start ~stop clamp is ever consulted, and nothing stopped it probing
occupant on a date past 31 December 9999 -- occupant chains through the
real EF rite's temporal, which calls Computus.gregorian_easter, not
total outside 1583..9999 (it Date.makes and failwiths on Error).
Not reachable with the shipped sanctoral data alone, but reachable
through the project's own primary extension path: an overlay adding an
I-class feast on 25 December leaves nothing but Class2 Nativity-octave
days for the rest of civil year 9999, so the unguarded search reached 1
January of year 10000 and crashed there with 'computus: year 10000 out
of range 1583..9999'. 9999 is an in-range year and the kernel's contract
is 'never raises on in-range input'.
search_from now also stops, without probing occupant again, once it
passes Date's own domain ceiling -- the same 'return a finite date, let
Calendar's own out-of-range handling record it, never pretend to have
found something admissible' contract the existing step-count guard
already follows.
Two new tests, both mutation-verified to actually reproduce the crash
when the guard is removed (see the task report): a precedence_ef.ml unit
test using the real Temporal_ef.temporal as occupant (a synthetic
occupant can never discriminate this, since it never calls Computus
itself), and a Calendar-level integration test reproducing the exact
overlay-based scenario the review found.
Diffstat (limited to 'test/dune')
| -rw-r--r-- | test/dune | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1,7 +1,7 @@ (test (name test_colitur) (libraries colitur_kernel rite_ef alcotest qcheck qcheck-alcotest sexplib) - (deps ../data/ef/sanctoral.sexp) + (deps ../data/ef/sanctoral.sexp ../data/ef/adjustments.sexp) (preprocess (pps ppx_sexp_conv))) |
