You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a08f594
Browse filesBrowse the repository at this point in the historyBrowse files
docs(validation): document the NodeValidator hook as an intentional extension point (not dead code)
Closes the last #52-review loose end. The per-type imperative `NodeValidator` hook on the
TypeDefinition is set by no core type, which reads as dead code — but it is deliberate:
- It is an EXTENSION POINT: a downstream provider registers a new type WITH its own
validator + error codes and it runs via the registry with zero core changes (the ADR-0023
thesis), proven by the widget.gauge test in validation-registry.test.ts.
- It is the documented escape hatch in the config-driven-validation design (#51) for novel
cross-field rules that fit no declarative shape.
- Core's per-type validation lives in reference descriptors (live) + declarative rule-shapes
(#51, planned); a core rule on this imperative hook would contradict that direction — so
core intentionally does not use it, and dogfooding a rule onto it would be make-work.
Decision: keep the hook, document the intent. Clarifying comments added to the hook
declaration in all four ports (TS/Java/C#/Python; Kotlin shares the JVM type) + a status
note in the validation-architecture design doc. No behavior change.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments