Skip to content

Full mdschema conformance validator — schema-driven warn tier in status --validate#363

Merged
clkao merged 2 commits into
mainfrom
spacedock-ensign/mdschema-conformance-validator
Jun 13, 2026
Merged

Full mdschema conformance validator — schema-driven warn tier in status --validate#363
clkao merged 2 commits into
mainfrom
spacedock-ensign/mdschema-conformance-validator

Conversation

@clkao

@clkao clkao commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Extend spacedock status --validate to enforce per-field mdschema conformance, closing the gap where the schema could drift from what the binary checks.

What changed

  • Drive per-field checks (mod-block pattern, verdict enum, score, ISO-8601 dates) from the embedded entity.mdschema.yml
  • Add a warn tier: field-conformance findings print to stderr but never flip the exit code or gate the read path
  • Pin the Warning: prefix on field-conformance lines so an Error:-misreport reds the suite

Evidence

  • internal/status 461/461 passed incl. the STAFF P3 stdout==VALID golden; full go test ./... green
  • Detached audit: all 4 adversarial edits red their guard; no material findings

td

clkao and others added 2 commits June 13, 2026 14:16
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 clkao merged commit b1cbcca into main Jun 13, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant