aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-11 15:14:10 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-11 15:14:10 +0200
commit39c8684646f7bad7161b9eeae166b121cc580a3c (patch)
tree5fc87f818e8d61dfa89185ea2b91438a37268e38 /README.md
parente15fe4952a569f08900f9d602f7bc98afd298542 (diff)
downloadcolitur-39c8684646f7bad7161b9eeae166b121cc580a3c.tar.gz
colitur-39c8684646f7bad7161b9eeae166b121cc580a3c.zip
kernel(validate): synthetic negative-path fixture; drop vacuous slug check
Task 14 review, findings 1 and 2. Finding 1: the only tests against Validate exercised the clean path against real EF data, so the evidence that each check can actually fire lived in a scratch mutation probe that was never committed. A future edit that quietly weakened a check would leave the suite green, since a weaker check only makes more inputs pass. Added a small synthetic two-season, two-rank rite fixture in test_validate.ml -- not EF -- letting each test violate exactly one invariant directly: a temporal that raises (coverage), a season that recurs (seasons), a week that decreases mid-run (week), a weekday that disagrees with Date.weekday (weekday), a rank absent from the declared vocab (rank), and a colour outside Colour.all (colour, via a same-representation Obj.magic value, safe here because the check compares by structural equality rather than pattern match). A clean-baseline test confirms the fixture itself reports zero failures before any mutation is applied. Each new test was verified non-vacuous by temporarily weakening its corresponding check in validate.ml, confirming the matching test fails, then reverting -- the same trap one level up, checked explicitly rather than assumed. Finding 2: removed the slug well-formedness check. Slug.t is a private string validated on every construction path, and to_string is the identity, so round-tripping an existing Slug.t can never fail -- the check was structurally incapable of firing. Folded the explanation into the comment block that already covers why slug uniqueness isn't checked, since it's the same kind of fact: a property the type system delivers, not one Validate needs to assert. The colour check stays: unlike slug, Colour.all is a hand-maintained list that can drift from the type, so it is only practically (not structurally) tautological, the same class as the rank closure check.
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions