Skip to content

Fix coordsystem orphan parity + add schema patch layer + electrophys …#2

Merged
neurolabusc merged 1 commit into
mainfrom
electrophys-parity-coordsystem-fix
Jun 22, 2026
Merged

Fix coordsystem orphan parity + add schema patch layer + electrophys …#2
neurolabusc merged 1 commit into
mainfrom
electrophys-parity-coordsystem-fix

Conversation

@neurolabusc

Copy link
Copy Markdown
Contributor

…corpus

Core fixes (two real parity bugs):

  • coordsystem.json orphan handling: replace the hardcoded EMG carve-out in SIDECAR_WITHOUT_DATAFILE with the general mechanism — build_associations now returns the fs-paths it resolved, and the caller marks them "viewed", mirroring Deno's walkBack side-effect. Orphaned coordsystem files are flagged for every modality; ones viewed by a recording's association walk are exempt.
  • SpoilingType: add a parse-time schema patch layer (patches.rs) supplying the missing modality/extension selectors so the warning fires once on a DWI .nii.gz instead of triplicating across .bval/.bvec. Raw schema bytes stay verbatim (build.rs static tables and --schema byte-compare unaffected); a self-test fires when upstream fixes it, and a governance test guards against patches touching statically-emitted subtrees.

Tests/parity:

  • Add electrophysiology parity coverage (eeg_face13, ieeg_epilepsy) fetched into gitignored data/ — the gap that let the coordsystem bug through. CTF-MEG (ds000246) excluded pending .ds-bundle handling.
  • Promote EOG/MISC_CHANNEL_COUNT_MISMATCH into the RUST_CODES contract (Deno emits them too); update ISSUE_COVERAGE.md counts to match.
  • Durable regression guard is the sidecar_without_datafile unit tests.

Docs:

  • Reflow all tracked .md files to one line per paragraph (natural pagination).
  • Fix YAML frontmatter break and a malformed README table cell; refresh stale build.rs/lib.rs/run.rs/test doc comments; bump status dates.
  • audit_response.md: durable rationale store referenced by run.py divergences.

…corpus

Core fixes (two real parity bugs):
- coordsystem.json orphan handling: replace the hardcoded EMG carve-out
  in SIDECAR_WITHOUT_DATAFILE with the general mechanism — build_associations
  now returns the fs-paths it resolved, and the caller marks them "viewed",
  mirroring Deno's walkBack side-effect. Orphaned coordsystem files are
  flagged for every modality; ones viewed by a recording's association walk
  are exempt.
- SpoilingType: add a parse-time schema patch layer (patches.rs) supplying
  the missing modality/extension selectors so the warning fires once on a
  DWI .nii.gz instead of triplicating across .bval/.bvec. Raw schema bytes
  stay verbatim (build.rs static tables and --schema byte-compare unaffected);
  a self-test fires when upstream fixes it, and a governance test guards
  against patches touching statically-emitted subtrees.

Tests/parity:
- Add electrophysiology parity coverage (eeg_face13, ieeg_epilepsy) fetched
  into gitignored data/ — the gap that let the coordsystem bug through.
  CTF-MEG (ds000246) excluded pending .ds-bundle handling.
- Promote EOG/MISC_CHANNEL_COUNT_MISMATCH into the RUST_CODES contract
  (Deno emits them too); update ISSUE_COVERAGE.md counts to match.
- Durable regression guard is the sidecar_without_datafile unit tests.

Docs:
- Reflow all tracked .md files to one line per paragraph (natural pagination).
- Fix YAML frontmatter break and a malformed README table cell; refresh
  stale build.rs/lib.rs/run.rs/test doc comments; bump status dates.
- audit_response.md: durable rationale store referenced by run.py divergences.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@neurolabusc neurolabusc merged commit fe9676a into main Jun 22, 2026
1 check 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