PureYAML/Sources/Validation
Mihaela M fc1a6db1dc refactor(validation): fold the tagged validator onto one framework
The tagged-node validator carried its own copy of the validation machinery:
a Tagged.Rule cloning Validation's check type and a Tagged.Context cloning
its context, differing only in subject type. That is the per-layer
duplication the validation idiom exists to prevent (principle 10).

Generalise the type-directed framework over both the subject and the
document: SubjectContext, Check, and AnyCheck now take a Document type
parameter for the validated tree's root. The model layer validates with a
Model.Value document, the tagged layer with a Tagged.Node document, each
truthful rather than forcing one root type to stand in for the other.

The tagged layer keeps only what is genuinely its own: the Node document
type, its built-in check (now Tagged.BuiltinCheck, a Check<Node, Node>), and
its traversal. Tagged.Rule and the tagged Context are removed. The validator
surface is unchanged but validating now takes a Check<Node, Node>.

All 399 tests pass; the coverage gate reconciles to 62 public types.
2026-06-28 10:41:10 +02:00
..
AnyCheck.swift refactor(validation): fold the tagged validator onto one framework 2026-06-28 10:41:10 +02:00
Check.Builtins.swift refactor(validation): fold the tagged validator onto one framework 2026-06-28 10:41:10 +02:00
Check.Combinators.swift refactor(validation): fold the tagged validator onto one framework 2026-06-28 10:41:10 +02:00
Check.swift refactor(validation): fold the tagged validator onto one framework 2026-06-28 10:41:10 +02:00
Context.swift feat(package): bootstrap pure swift yaml package 2026-06-05 06:34:20 +02:00
DiagnosticValidation.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
Issue.Collection.swift feat(package): bootstrap pure swift yaml package 2026-06-05 06:34:20 +02:00
Issue.swift feat(package): bootstrap pure swift yaml package 2026-06-05 06:34:20 +02:00
Path.Component.swift feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
Path.swift feat(package): bootstrap pure swift yaml package 2026-06-05 06:34:20 +02:00
PreflightScanner.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
Result.swift feat(package): bootstrap pure swift yaml package 2026-06-05 06:34:20 +02:00
Rule.Builtins.swift feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
Rule.swift critic-fix(validation): make rules immutable 2026-06-05 11:27:06 +02:00
Severity.swift feat(package): bootstrap pure swift yaml package 2026-06-05 06:34:20 +02:00
SubjectContext.swift refactor(validation): fold the tagged validator onto one framework 2026-06-28 10:41:10 +02:00
Validatable.swift refactor(validation): fold the tagged validator onto one framework 2026-06-28 10:41:10 +02:00
Validation.BatchReport.swift refactor(code-style): one top-level type per source file 2026-06-26 06:14:21 +02:00
Validation.Diagnostic.swift refactor(code-style): one top-level type per source file 2026-06-26 06:14:21 +02:00
Validation.DiagnosticKind.swift refactor(code-style): one top-level type per source file 2026-06-26 06:14:21 +02:00
Validation.Report.swift refactor(code-style): one top-level type per source file 2026-06-26 06:14:21 +02:00
Validation.ReportError.swift feat(validation): add diagnostic report errors 2026-06-05 21:06:42 +02:00
Validation.Source.swift refactor(code-style): one top-level type per source file 2026-06-26 06:14:21 +02:00
Validation.SourceReport.swift refactor(code-style): one top-level type per source file 2026-06-26 06:14:21 +02:00
Validator.swift refactor(validation): fold the tagged validator onto one framework 2026-06-28 10:41:10 +02:00