Skip to content

variable terms batch 1: statement variables by node; modality unresolved is a report note - #496

Merged
jesshaley merged 4 commits into
V2from
claude/variable-terms-batch-1
Nov 19, 2026
Merged

jesshaley merged 4 commits into
V2from
claude/variable-terms-batch-1

Conversation

@jesshaley

@jesshaley jesshaley commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Builds the DID-matlab part of [variable terms batch 1] (Decided by Jess Haley, 2026-11-19, did-schema docs/plans/did_v2_go_forward_class_audit.md, recorded on did-schema main at 164854ba, which also adds the BAO:0000625 registry row).

Variables looked up by node instead of by label (did2.convert.registeredTerm):

migrator was now
probe_geometry 'probe model' NCIT:C99285 "Model Number"
electrode_offset_voltage 'electrode offset voltage' EMPTY:0000056 "microelectrode voltage offset"
image_stack 'image intensity' NCIT:C221750 "Imaging Signal Intensity"
ontology_image 'imaged region' NCIT:C13717 "Anatomic Site"
private/jModelFit (fitcurve, vmspikefit) 'model fit' BAO:0000625 "curve fit model" (did-schema adds the registry row)
pyraview its v1 label ('signal' when empty) AFO:AFR_0001916 "voltage"

Pyraview's label. It now goes, exactly as written, into the observation's statement.notes, the same way [image label goes to the observation's notes] keeps image.label. This placement is my choice; the decision text does not name it. +roundtrip/pyraview.m reads the label from notes when the variable has a node. With no node it reads the old spelling: the variable's name, with 'signal' meaning an empty label. One existing loss is unchanged: when resolveEpochProbemap folds a pyraview into a recording observation, the pyraview observation is retired, and its label goes with it, as it did before this change.

The round trips read both spellings: probe_geometry, electrode_offset_voltage and pyraview by node, then by the old label. The image, ontology-image and model-fit round trips do not read the variable at all.

modality unresolved is now a migration-report note, did2.convert.reportNote('modality_unresolved', 'element', id, label), not an assertion. It is listed under "KINDS IN USE" in reportNote.m. +roundtrip/element.m still reads an old assertion.

Not built: 'ndi element class' -> EMPTY:0000401 "software class". NDI-matlab V2 compares that phrase by name: ndi.vintage.elementLabel('class') is used by elementSubjectIds, objectClass, elementFields, pathSPromotion and map. NDI's TestElementLabelMatchesMigrator also asserts the literal 'ndi element class' appears exactly once in this repository's element.m. CLAUDE.md section 3 says a name that code compares changes in code first (compare by node), and only then does the stored name change. So NDI-matlab has to change first.

Dab's element type (patch-I, patch-Vm). Nothing changes here. The unregistered-terms collector counts what did2.build was given when element.m builds each document. resolveEpochProbemap drops all of these statements later: in the Dab summary of V2 run 44458300150, mode_statements_seen is 400 and mode_statements_dropped_recorded is 400. The final-document census from #495 confirms it: on Test code run 44472758945 (Dab, 62124 final documents walked), "element type" (statement.variable) is 400 built and 0 in final documents, "patch-I" is 200 built and 0 final, and "patch-Vm" is 200 built and 0 final.

Tests changed to match the decision: testMigratorsJ (pyraview, image stack, ontology image and probe model now assert nodes) and testMigratorsJRecordingObservation (Guard A now expects the note). New test: testTheVariableIsVoltageAndTheLabelIsKeptInTheNotes.

did-schema main holds the decision line and BAO:0000625.

Part of Waltham-Data-Science/DID-schema#89.

https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf


Generated by Claude Code

claude and others added 4 commits November 19, 2026 05:47
…ved is a report note

[variable terms batch 1] (Jess Haley, 2026-11-19): the generic migrators
look these statement variables up by node instead of by label, through the
term registry (did2.convert.registeredTerm):
  probe_geometry             'probe model'              -> NCIT:C99285 "Model Number"
  electrode_offset_voltage   'electrode offset voltage' -> EMPTY:0000056 "microelectrode voltage offset"
  image_stack                'image intensity'          -> NCIT:C221750 "Imaging Signal Intensity"
  ontology_image             'imaged region'            -> NCIT:C13717 "Anatomic Site"
  jModelFit                  'model fit'                -> BAO:0000625 "curve fit model"
  pyraview                   its label                  -> AFO:AFR_0001916 "voltage"
pyraview's v1 label is kept, exactly as written, in the observation's
`notes`; the round trip reads it from there, and from the variable's name
for an observation migrated before (an empty label was 'signal').
The probe_geometry, electrode_offset_voltage and pyraview round trips read
both spellings.

Guard A's 'modality unresolved' is a migration-report note
(`modality_unresolved`, DETAIL the label), not an assertion; the element
round trip still reads an old assertion.

'ndi element class' -> EMPTY:0000401 is NOT built here: NDI-matlab V2
compares that phrase by name (ndi.vintage.elementLabel and its callers,
TestElementLabelMatchesMigrator), so NDI changes first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
@jesshaley
jesshaley marked this pull request as ready for review November 19, 2026 09:53
@jesshaley
jesshaley merged commit 423b994 into V2 Nov 19, 2026
11 checks passed
@jesshaley
jesshaley deleted the claude/variable-terms-batch-1 branch November 25, 2026 21:53
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.

2 participants