V_delta: schema_version moves from base field to document_class key#55
Merged
stevevanhooser merged 1 commit intoMay 22, 2026
Merged
Conversation
Previously V_delta declared schema_version inside base.json's fields
array, so the migrator stamped body.base.schema_version. That made
schema_version look like a payload field belonging to every concrete
class, which collided with NDI-matlab's legacy base validator
(src/ndi/ndi_common/schema_documents/base_schema.json declares only
session_id/id/name/datestamp under base; the unknown 5th field tripped
DID:Database:ValidationFields once #140's superclass fix let
validation get past the chain check).
schema_version names the overarching schema set, not a property of
any one class, so it belongs alongside class-level metadata
(class_name, class_version, superclasses). Move it to
document_class.schema_version. The validator treats it as a
structural key on document_class; enumerated values stay in
schemas/V_delta/index.json (schema_version_value,
legacy_schema_version_values).
Changes:
- schemas/V_delta/stable/base.json: drop the schema_version field
declaration from the fields array.
- V_delta_SPEC.md § 4, _universal_renames.md § 10, V_delta_notes.md,
_TEMPLATE.md, and the per-class conversion notes that mentioned
the planned/inherited base field: rewrite to point at
document_class.schema_version.
Follow-ups in did-matlab (next PR) will:
- have universalRenames write document_class.schema_version (not
body.base.schema_version);
- update the dispatcher's short-circuit gate to read from there;
- update tests asserting doc.get('base.schema_version').
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.
Summary
schema_versionnames the overarching schema set under which a document is interpreted — it's metadata about the schema generation, not a payload field belonging to any particular class. V_delta previously declared it as a field onbase.json, which made the migrator stampbody.base.schema_versionand broke NDI-matlab's legacy base validator (declares onlysession_id/id/name/datestampunder base; the unknown 5th field trippedDID:Database:ValidationFieldsonce #53 + did-matlab #140's superclass fix let validation get past the chain check on NDI-matlab #803).This PR moves
schema_versiontodocument_class.schema_version— a sibling ofclass_name,class_version,superclasses— and rewords the spec/conversion docs accordingly. The enumerated values continue to live inschemas/V_delta/index.json(schema_version_value,legacy_schema_version_values).Changes
schemas/V_delta/stable/base.json— drop theschema_versiondeclaration from thefieldsarray.V_delta_SPEC.md§ 4 — rewrite to describedocument_class.schema_versionas a structural key ondocument_class, not a class-scoped field.V_delta_notes.md— update the summary bullet and turn the resolved follow-up into a "resolved differently" note pointing at the new placement._universal_renames.md§ 10 —body.base.schema_version→body.document_class.schema_version; describe the dispatcher short-circuit reading from there._TEMPLATE.md+ per-class conversion docs (probe_location, orientation_direction_tuning, contrast_tuning, speed_tuning, spatial_frequency_tuning, temporal_frequency_tuning, treatment) — point atdocument_class.schema_versioninstead of "inherited from base".Merge order
universalRenameswritesdocument_class.schema_version, dispatcher short-circuit reads from there, fixture tests assertdocument_class.schema_versionDID:Database:ValidationFieldserrorsTest plan
base.schema_versionreferences in schemas/ (verified locally — only resolved-history notes remain)Generated by Claude Code
Generated by Claude Code