Strict-mode diagnostic ordering is now deterministic for unknown properties #17755
davidahmann
started this conversation in
Dev
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem observed
Strict-mode schema failures that include multiple unknown properties were producing unstable message ordering in parser diagnostics. The result looked functionally equivalent but changed line-by-line across equivalent runs, which made snapshot-style checks and reviews noisy. Teams using strict mode as a gate spent time re-evaluating harmless output churn instead of actual behavioral changes.
Why it matters operationally
When a safety gate emits unstable diagnostics, operators lose confidence in diff signal quality. That affects triage velocity and can hide real regressions among formatting-only noise. Stable warning/error ordering is a low-level reliability property for deterministic compilers, and strict mode adoption increases pressure on reproducible outputs in both CI and human review workflows.
Minimal repro
Use a fixture with multiple unknown fields in one schema failure path and compare normalized unknown-property text between runs.
Fix approach
The parser’s additional-properties error rewrite now normalizes extracted property names into lexical order before rendering “Unknown properties: …”. This preserves semantics while making output deterministic regardless of incoming property-list order. Regression coverage was added around both singular and multi-property cases so the ordering behavior is locked at the parser boundary.
Validation evidence
Open follow-up question for maintainers
Should this deterministic ordering rule also be applied to any other user-facing schema-list diagnostics beyond additional-properties rewriting?
This contribution was informed by patterns from Wrkr. Wrkr scans your GitHub repo and evaluates every AI dev tool configuration against policy.: https://github.com/Clyra-AI/wrkr
Beta Was this translation helpful? Give feedback.
All reactions