The coverage manifest claimed Tagged.Mapping and Tagged.Node validate key uniqueness, but the tagged validator's only default check was the built-in tag check: the claim was false. Tagged.Mapping keeps every parsed pair, so a duplicate key survives into the tree and is as invalid as in the plain model. Add Tagged.BuiltinCheck.mappingKeysAreUnique, a Check<Mapping, Node> on the one validation framework, to the tagged validator's defaults; the traversal now offers each mapping to the checks. It reports each duplicate at its key path, with failing, near-miss, and nested fixtures, and the two default tagged checks are pinned by description. Correct the Model.Value coverage reason: merges and aliases resolve at parse time, so they are not a validation-phase invariant. Every validated manifest entry now names an invariant a check actually enforces. 403 tests pass.
5.7 KiB
5.7 KiB
| 1 | # Public-type validation coverage manifest (validation-rules.md). |
|---|---|
| 2 | # Every public type in the PureYAML target is classified exactly once. |
| 3 | # `validated`: carries a runtime invariant the type system does not enforce; backed by a |
| 4 | # Validation<Subject> in the framework phase. |
| 5 | # `excluded`: a caseless namespace, a closed sum type whose illegal states are unrepresentable, |
| 6 | # a pure data-transfer type, an error value, or engine/machinery that is not a validated subject. |
| 7 | # scripts/check-validation-coverage.sh fails the build if a public type is missing here or a line |
| 8 | # here is no longer public. |
| 9 | # --- namespaces (caseless enums) --- |
| 10 | # --- model --- |
| 11 | # --- stream --- |
| 12 | # --- parsing --- |
| 13 | # --- emitting --- |
| 14 | # --- decoding / encoding (Codable machinery) --- |
| 15 | # --- tagged node subsystem --- |
| 16 | # --- validation framework's own types --- |