Repository navigation
variable terms batch 1: statement variables by node; modality unresolved is a report note - #496
Merged
Merged
Conversation
…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
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.
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-schemamainat 164854ba, which also adds the BAO:0000625 registry row).Variables looked up by node instead of by label (
did2.convert.registeredTerm):probe_geometry'probe model'electrode_offset_voltage'electrode offset voltage'image_stack'image intensity'ontology_image'imaged region'private/jModelFit(fitcurve, vmspikefit)'model fit'pyraviewlabel('signal'when empty)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]keepsimage.label. This placement is my choice; the decision text does not name it.+roundtrip/pyraview.mreads the label fromnoteswhen 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: whenresolveEpochProbemapfolds 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_voltageandpyraviewby node, then by the old label. The image, ontology-image and model-fit round trips do not read the variable at all.modality unresolvedis now a migration-report note,did2.convert.reportNote('modality_unresolved', 'element', id, label), not an assertion. It is listed under "KINDS IN USE" inreportNote.m.+roundtrip/element.mstill 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 byelementSubjectIds,objectClass,elementFields,pathSPromotionandmap. NDI'sTestElementLabelMatchesMigratoralso asserts the literal'ndi element class'appears exactly once in this repository'selement.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 whatdid2.buildwas given whenelement.mbuilds each document.resolveEpochProbemapdrops all of these statements later: in the Dab summary of V2 run 44458300150,mode_statements_seenis 400 andmode_statements_dropped_recordedis 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) andtestMigratorsJRecordingObservation(Guard A now expects the note). New test:testTheVariableIsVoltageAndTheLabelIsKeptInTheNotes.did-schema
mainholds the decision line and BAO:0000625.Part of Waltham-Data-Science/DID-schema#89.
https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
Generated by Claude Code