Full mdschema conformance validator — schema-driven warn tier in status --validate#363
Merged
Merged
Conversation
Drive per-field type/pattern/enum checks (mod-block, verdict, score, ISO-8601 dates) from the embedded entity.mdschema.yml so editing the schema changes what the binary enforces, closing the documented enforce-what-you-document drift gap. - Embed docs/schema/entity.mdschema.yml at module root (go:embed cannot reach above the embedding package; embed the canonical SSOT, no copy). - validateWorkflow returns (errs, warns); warns are opt-in (explicit --validate only), printed to stderr, never flip the exit code or gate the read path. Exit 1 stays reserved for structural errors. - Warn lines use a Warning: prefix (vs structural Error:) via a shared entityEvidenceLine; entityEvidence keeps its oracle-parity Error: shape. AC-1..AC-4 covered by internal/status/field_conformance_test.go; full internal/status package and whole module green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The warn-only tests asserted only the field NAME, so flipping warns to emit Error: (the FO's gating-vs-advisory signal) left the package green. Bind the assertion to the Warning: prefix and reject an Error: line for the same field, so a non-gating advisory misreported as a structural Error: now reds. Proven to bite: edit (d) (Warning -> Error) reds all four subtests; restored green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
clkao
added a commit
that referenced
this pull request
Jun 13, 2026
clkao
added a commit
that referenced
this pull request
Jun 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extend
spacedock status --validateto enforce per-field mdschema conformance, closing the gap where the schema could drift from what the binary checks.What changed
entity.mdschema.ymlWarning:prefix on field-conformance lines so anError:-misreport reds the suiteEvidence
stdout==VALIDgolden; fullgo test ./...greentd