P0-X: Rename proximity graph types from Metroid* to SemanticNeighbor*#67
Merged
P0-X: Rename proximity graph types from Metroid* to SemanticNeighbor*#67
Conversation
Resolves #56 — fixes naming collision where 'Metroid' was applied to the sparse proximity/neighbor graph. In CORTEX, 'Metroid' is reserved exclusively for the dialectical search probe { m1, m2, c }. Changes: - core/types.ts: MetroidNeighbor → SemanticNeighbor, MetroidSubgraph → SemanticNeighborSubgraph; 6 MetadataStore interface methods renamed (putSemanticNeighbors, getSemanticNeighbors, getInducedNeighborSubgraph, needsNeighborRecalc, flagVolumeForNeighborRecalc, clearNeighborRecalcFlag) - storage/IndexedDbMetadataStore.ts: matching implementation renames, DB_VERSION 2→3, STORE key metroid_neighbors→neighbor_graph, v3 upgrade migration (cursor copy + deleteObjectStore) - tests/Persistence.test.ts: all references updated - tests/SalienceEngine.test.ts: all stub method names updated All 211 tests pass. Co-authored-by: devlux76 <86517969+devlux76@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Create subtasks for all P0 issues
P0-X: Rename proximity graph types from Metroid* to SemanticNeighbor*
Mar 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Resolves an architectural naming collision by renaming the proximity/neighbor graph (“Metroid*” misnomer) to “SemanticNeighbor*”, freeing “Metroid” for the { m1, m2, c } dialectical probe concept and aligning storage schema naming accordingly.
Changes:
- Renames proximity graph types and
MetadataStoremethods fromMetroid*toSemanticNeighbor*. - Bumps IndexedDB schema version to v3 and renames the object store
metroid_neighbors→neighbor_graphwith an upgrade-time migration. - Updates unit tests and test stubs to use the new types/method names.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| core/types.ts | Renames exported proximity-graph types and MetadataStore API methods. |
| storage/IndexedDbMetadataStore.ts | Implements renamed APIs; bumps DB_VERSION to 3; adds v2→v3 cursor migration to neighbor_graph. |
| tests/Persistence.test.ts | Updates round-trip tests to use SemanticNeighbor* naming and new APIs. |
| tests/SalienceEngine.test.ts | Updates MetadataStore mock stubs to match renamed method names. |
Remove the cursor-based metroid_neighbors → neighbor_graph migration from the v3 upgrade path. The project has no installed base, so the migration is unnecessary overhead. applyUpgrade simply creates neighbor_graph fresh. Also reverts open() back to the simpler single-argument applyUpgrade(db) call. Co-authored-by: devlux76 <86517969+devlux76@users.noreply.github.com>
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.
"Metroid" was being used for the sparse proximity/neighbor graph, colliding with its correct meaning: the dialectical search probe
{ m1, m2, c }. This blocksMetroidBuilderfrom being implemented cleanly.Renamed symbols
MetroidNeighborSemanticNeighborMetroidSubgraphSemanticNeighborSubgraphputMetroidNeighborsputSemanticNeighborsgetMetroidNeighborsgetSemanticNeighborsgetInducedMetroidSubgraphgetInducedNeighborSubgraphneedsMetroidRecalcneedsNeighborRecalcflagVolumeForMetroidRecalcflagVolumeForNeighborRecalcclearMetroidRecalcFlagclearNeighborRecalcFlagIndexedDB schema (DB_VERSION 2 → 3)
Object store
metroid_neighborsrenamed toneighbor_graph. The v3 upgrade handler createsneighbor_graphas a fresh store — no migration logic, as there is no installed base.Files changed
core/types.ts— interface renamesstorage/IndexedDbMetadataStore.ts— implementation + schema version bumptests/Persistence.test.ts— updated call sites and type annotationstests/SalienceEngine.test.ts— updatedMetadataStorestub methodsOriginal prompt
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.