Skip to content

fix(V_delta): correct truncated index.json superclasses (14 classes) + integrity test + all_ancestors map (review — do not merge)#61

Closed
audriB wants to merge 1 commit into
mainfrom
fix/v-delta-index-superclass-integrity
Closed

fix(V_delta): correct truncated index.json superclasses (14 classes) + integrity test + all_ancestors map (review — do not merge)#61
audriB wants to merge 1 commit into
mainfrom
fix/v-delta-index-superclass-integrity

Conversation

@audriB

@audriB audriB commented Jun 14, 2026

Copy link
Copy Markdown

What

schemas/V_delta/index.json carried a per-entry superclasses mirror that had dropped every non-base parent for 14 of 103 classes — e.g. neuron_extracellular missing app, tuningcurve_calc missing stimulus_tuningcurve, image_stack missing image_stack_parameters, the openminds_* missing openminds, stimulus_presentation missing app+epochid (full list in the commit).

Why it matters

Any consumer that resolves isa() / inheritance from index.json — rather than each class file's document_class.superclasses — gets silent false negatives (a neuron_extracellular not recognized as an app, a tuningcurve_calc not as a stimulus_tuningcurve, …). The per-class files are already correct; only the index mirror had drifted (it looks hand-maintained — no generator — and the test suite previously parametrized only V_beta/V_gamma, so nothing caught it).

What's in this PR

  • schemas/V_delta/index.json — re-sync the 14 entries to their class files (only entries whose superclass set differed are touched; 31 insertions / 14 deletions, all inside superclasses arrays).
  • tests/test_index_integrity.py — asserts index.superclasses == file superclasses for all 106 entries, that every referenced parent resolves, and that all_ancestors.json equals the transitive closure. First V_delta-tier test; verified it fails if an entry is re-truncated (213 pass).
  • scripts/build_v_delta_aux.py — reproducible fixer (--fix-index) + builder of all_ancestors.json.
  • schemas/V_delta/all_ancestors.json — a flattened transitive-closure inheritance map {class_name: [ancestors]} so consumers look up the full isa() chain without re-deriving it (e.g. tuningcurve_calc → app, base, calculator, stimulus_tuningcurve).

Review — do not merge.


Found during a downstream audit of the web platform against schema-v2. Separate deferred item (not in this PR): stable/probe_location.json + stable/treatment.json ship the flat v1 shape while conversions/from_did_v1/*.md describe an ontology_term target marked drafted — happy to discuss whether to land that migration or mark the live files as intentionally-flat-pending-§2.4.

…ntegrity test + all_ancestors map

schemas/V_delta/index.json carried a per-entry `superclasses` mirror that had
dropped every non-base parent for 14 classes (neuron_extracellular missing app,
tuningcurve_calc missing stimulus_tuningcurve, image_stack missing
image_stack_parameters, the openminds_* missing openminds, stimulus_presentation
missing app+epochid, etc.). Any consumer resolving isa()/inheritance from the
index rather than each class file's document_class.superclasses got silent
false negatives.

- Re-sync the 14 entries to their class files (only entries whose superclass set
  differed are touched; minimal diff).
- tests/test_index_integrity.py: assert index.superclasses == file superclasses
  for every entry, that every referenced parent resolves, and that
  all_ancestors.json equals the transitive closure. First V_delta-tier test
  (the suite previously parametrized V_beta/V_gamma only).
- scripts/build_v_delta_aux.py: reproducible fixer (--fix-index) + builder of
  schemas/V_delta/all_ancestors.json, the flattened isa() closure map (107
  classes) so consumers stop re-deriving the inheritance chain.
@audriB audriB force-pushed the fix/v-delta-index-superclass-integrity branch from a2e3536 to 178cc54 Compare June 14, 2026 22:57
@audriB

audriB commented Jun 17, 2026

Copy link
Copy Markdown
Author

Closing — superseded by the V_epsilon anchor. This corrected a truncated-superclass defect in the V_delta index.json (14 classes) and added an all_ancestors map + integrity test. The platform is anchoring on V_epsilon, whose index.json is born-clean (0/187 superclass drift), so this V_delta-only fix is not on the critical path. Reopen if V_delta back-compat reads ever need a corrected index — the all_ancestors.json + tests/test_index_integrity.py remain on the branch (fix/v-delta-index-superclass-integrity) for reuse.

@audriB audriB closed this Jun 17, 2026
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