diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-12 22:46:36 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-12 22:46:36 +0200 |
| commit | 0f6454c123f1514c1cf255faed8d9b8c752c6347 (patch) | |
| tree | a14a1e43e95d5bb3b03cd9832776461ea9440605 | |
| parent | a4ffb0234d198ef295554e3202db15403346fbed (diff) | |
| download | colitur-0f6454c123f1514c1cf255faed8d9b8c752c6347.tar.gz colitur-0f6454c123f1514c1cf255faed8d9b8c752c6347.zip | |
test(differential): two Layer C predicates that counted rows, not identities
Both are the "cardinality where identity was required" flavour, and both
were demonstrated passing a real defect by the fixture-refresh review
rather than argued.
C6 accepted `subset diffs [ Slug_f; Rank ]` while its own note said the
shape had narrowed to slug-only after lectio's Christmas-octave rank was
corrected. That did not merely over-permit: every one of the 138 rows
already carries a Slug_f diff, so an added Rank diff changed neither the
diff-set membership nor the count, and the entry was blind. Dropping the
RG 91 entry 17 elevation in temporal_ef (Class2 -> Class4 on octave days
5-7) left both differential tests green with C6 still reporting 138.
Narrowed to `diffs = [ Slug_f ]`; the same mutation now reddens both.
C14 gated on lectio's date alone, with no colitur-slug guard, though fix
round 1's finding 1 had established that a predicate must pin which
celebration its citation is about -- C1, C6 and C8 all carry that guard.
With compare_deferred switched to RG 98 origin order the observed
celebration flips to the Annunciation on all three dates, and C14 still
matched exactly 3 rows with its count pin green; the suite reddened only
because the sibling dates fell outside every predicate. Guard added.
No behaviour change: 277 tests green, and the allow-list counts are
unmoved (C6 138, C14 3).
| -rw-r--r-- | test/test_differential.ml | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/test/test_differential.ml b/test/test_differential.ml index 62c7a48..89e6873 100644 --- a/test/test_differential.ml +++ b/test/test_differential.ml @@ -485,15 +485,37 @@ let layer_c_reason (l : row) (c : row) diffs = else if m = 12 && (d = 29 || d = 30 || d = 31) - && subset diffs [ Slug_f; Rank ] - && (not (List.mem Slug_f diffs) || List.mem c.slug nativity_octave_day_slugs) + (* NARROWED, fixture-refresh review: this was [subset diffs [ Slug_f; Rank ]]. + Since lectio's own Christmas-octave rank was corrected (3b32c00) all 138 + rows diff on [Slug_f] ALONE, and the note below says so -- but leaving + [Rank] in the accepted set did not merely over-permit, it made the entry + BLIND: every row already carries a Slug_f diff, so an added Rank diff + changed neither the diff-set membership nor the count. Demonstrated by + the reviewer: dropping the RG 91 entry 17 elevation in temporal_ef + (Class2 -> Class4 on octave days 5-7) left BOTH differential tests green + with C6 still reporting 138. The slug guard below already pins identity; + [Rank] only removed the ability to notice a rank regression. *) + && diffs = [ Slug_f ] + && List.mem c.slug nativity_octave_day_slugs then Some "C6" else if (String.equal c.slug "ef-rogation-monday" || String.equal c.slug "ef-rogation-tuesday") && subset diffs [ Season; Slug_f; Colour_f ] then Some "C8" - else if List.mem l.date joseph_annunciation_collision_dates_2005_2050 && subset diffs [ Slug_f; Rank ] then - Some "C14" + else if + List.mem l.date joseph_annunciation_collision_dates_2005_2050 + && subset diffs [ Slug_f; Rank ] + (* Colitur-slug guard, added by the fixture-refresh review. Fix round 1's + own finding 1 established that a Layer C predicate must pin WHICH + celebration the citation is about, not merely the date -- C1, C6 and C8 + all carry that guard; C14 was written after that ruling and omitted it. + Demonstrated live: with [Calendar.compare_deferred] switched to RG 98 + origin order, the observed celebration on all three dates flips to the + Annunciation, and C14 still matched exactly 3 rows with its count pin + green. The suite only reddened because the SIBLING dates fell outside + every predicate -- geometry, not this pin. *) + && String.equal c.slug "joseph-spouse-of-the-bl-virgin-mary" + then Some "C14" else None (* ---------------------------------------------------------------------- *) |
