Skip to content

P0-X: Rename proximity graph types from Metroid* to SemanticNeighbor*#67

Merged
devlux76 merged 3 commits intomainfrom
copilot/p0-task-subtask-creation
Mar 13, 2026
Merged

P0-X: Rename proximity graph types from Metroid* to SemanticNeighbor*#67
devlux76 merged 3 commits intomainfrom
copilot/p0-task-subtask-creation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 13, 2026

"Metroid" was being used for the sparse proximity/neighbor graph, colliding with its correct meaning: the dialectical search probe { m1, m2, c }. This blocks MetroidBuilder from being implemented cleanly.

Renamed symbols

Before After
MetroidNeighbor SemanticNeighbor
MetroidSubgraph SemanticNeighborSubgraph
putMetroidNeighbors putSemanticNeighbors
getMetroidNeighbors getSemanticNeighbors
getInducedMetroidSubgraph getInducedNeighborSubgraph
needsMetroidRecalc needsNeighborRecalc
flagVolumeForMetroidRecalc flagVolumeForNeighborRecalc
clearMetroidRecalcFlag clearNeighborRecalcFlag

IndexedDB schema (DB_VERSION 2 → 3)

Object store metroid_neighbors renamed to neighbor_graph. The v3 upgrade handler creates neighbor_graph as a fresh store — no migration logic, as there is no installed base.

Files changed

  • core/types.ts — interface renames
  • storage/IndexedDbMetadataStore.ts — implementation + schema version bump
  • tests/Persistence.test.ts — updated call sites and type annotations
  • tests/SalienceEngine.test.ts — updated MetadataStore stub methods
Original prompt

This section details on the original issue you should resolve

<issue_title>P0</issue_title>
<issue_description>All P0 tasks, issues and sub issues belong here, either directly or by reference. Please subtask every issue with P0 in its name for ease of tracking.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 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.

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>
@github-actions github-actions Bot added layer: foundation Core types, model profiles, crypto layer: storage OPFS vector store and IndexedDB metadata store layer: testing Test coverage and integration tests labels Mar 13, 2026
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
Copilot AI requested a review from devlux76 March 13, 2026 22:24
@devlux76 devlux76 marked this pull request as ready for review March 13, 2026 22:28
Copilot AI review requested due to automatic review settings March 13, 2026 22:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 MetadataStore methods from Metroid* to SemanticNeighbor*.
  • Bumps IndexedDB schema version to v3 and renames the object store metroid_neighborsneighbor_graph with 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.

Comment thread storage/IndexedDbMetadataStore.ts Outdated
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>
@devlux76 devlux76 merged commit 5d5a91f into main Mar 13, 2026
3 checks passed
@devlux76 devlux76 deleted the copilot/p0-task-subtask-creation branch March 13, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

layer: foundation Core types, model profiles, crypto layer: storage OPFS vector store and IndexedDB metadata store layer: testing Test coverage and integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

P0

3 participants