Skip to content

fix: preserve literal reference fields in MCP schema data - #214

Merged
mikhalchankasm merged 1 commit into
mainfrom
codex/tech-w11-schema-data-refs-20261004
Oct 4, 2026
Merged

mikhalchankasm merged 1 commit into
mainfrom
codex/tech-w11-schema-data-refs-20261004

Conversation

@mikhalchankasm

@mikhalchankasm mikhalchankasm commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

MCP schema normalization previously interpreted every JSON field named $ref as a schema reference, including ordinary default/const/enum/examples and custom annotation values. Valid literal remote/missing references could abort catalog initialization, and matching local values were silently rewritten.

Walk only schema keyword positions when collecting/replacing references. Explicit reference targets are still inspected transitively (with cycle protection) and normalized in definition copies, preserving the source instance data. Existing remote/unresolvable-reference rejection and deterministic recursive reference handling remain intact. Closes #211; child of #210.

Validation: 16 regression cases fail on the original implementation; all 38 focused tests pass after the fix with zero skips/warnings. Coverage includes instance data, scalar/array/map/legacy schema slots, recursive and transitive references, invalid actual references and idempotence. Tool-less Claude advisory review identified a deep $defs data-target bypass; Codex reproduced it with three failing cases and corrected it by also relocating deep definition pointers. Direct definition references retain their existing handling. Release2024/2025/2026/2027 x64 L2 passed on final SHA 111f63c; Both CI runs 37190697123 / 37190661065 passed with 2,393 tests and zero skips. The traversal intentionally shares the existing schema-keyword registry; adding dialect keywords such as contentSchema is outside this task, as are pre-existing dangling direct-definition and true-subschema-in-data-target gaps; all three are tracked for verification/fix in #215. No tool contract changes or Navisworks runtime claim.

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.

TECH-W11.1 — Preserve literal reference fields in schema data

1 participant