Commit Graph

6 Commits

Author SHA1 Message Date
d195dd3fa1 refactor(validation): retire the legacy Rule for one check type
A Rule was exactly a Check<Model.Value, Model.Value>: it fired on every
node, switched on the value itself, and carried the root. It was therefore a
second copy of the one check machinery, the duplication the validation idiom
exists to prevent (principle 10), now also resolved for the tagged layer.

Remove Rule and its Context. The model validator holds only checks; its
default is the type-directed BuiltinCheck.mappingKeysAreUnique; validating
takes a Check. Custom whole-tree rules become Check<Model.Value, Model.Value>
with the former context.root now context.document.

Behaviour is byte-identical: the mapping-key builtin reports the same issues
at the same paths in the same DFS order, so the public validate/collect/blank
surface is unchanged. All 399 tests pass; the coverage gate reconciles to 60
public types.
2026-06-28 16:43:31 +02:00
66de760ff2 feat(validation): add predicate-gated rules 2026-06-05 11:21:23 +02:00
e127cc1f1e test(validation): harden diagnostics corpus 2026-06-05 10:46:28 +02:00
bc04c4815e feat(parsing): compose events into values 2026-06-05 10:07:28 +02:00
11e7382ab1 feat(parsing): add reader scanner core 2026-06-05 07:40:23 +02:00
9c718e3303 feat(package): bootstrap pure swift yaml package 2026-06-05 06:34:20 +02:00