Description
While investigating Epic #9714 (Hybrid GraphRAG Scoring Algorithm), significant regression bugs were identified within the memory-core SQLite testing environments that destabilized neighbor extraction, specifically affecting GraphService operations.
This ticket formalizes the fixes developed:
- Index Eviction Leakage: Fixed RAM cache state leakage by cleanly flushing map structures when
Base.collection.Store execution clear() operates across index instances.
- Missing
storage References for Singleton Connections: Repaired GraphService.mjs initialization. Re-used (Neo.get) singletons failed to hook onto newly declared storage contexts scoped to per-test path variants (leaving them tied down to legacy database bindings).
- Implicit Test Crashing Check: Added explicit imports for
Neo.manager.Instance missing within our test setups, preventing Neo.getId() exceptions during lazy database operations.
- Validation cleanup: Safely eliminated monkey-patched data filtration (
!inRAM) from GraphDatabase as the upstream neo.collection.Base#splice efficiently drops bulk inserts implicitly securely evaluating identities mapping checks in O(1).
Verification Status
The entire ai/mcp/server/memory-core/services/GraphService.spec.mjs suite runs correctly executing npm run test-unit against a locally bound test-.db instance with no duplications.
Description
While investigating Epic #9714 (Hybrid GraphRAG Scoring Algorithm), significant regression bugs were identified within the
memory-coreSQLite testing environments that destabilized neighbor extraction, specifically affectingGraphServiceoperations.This ticket formalizes the fixes developed:
Base.collection.Storeexecutionclear()operates across index instances.storageReferences for Singleton Connections: RepairedGraphService.mjsinitialization. Re-used (Neo.get) singletons failed to hook onto newly declaredstoragecontexts scoped to per-test path variants (leaving them tied down to legacy database bindings).Neo.manager.Instancemissing within our test setups, preventingNeo.getId()exceptions during lazy database operations.!inRAM) fromGraphDatabaseas the upstreamneo.collection.Base#spliceefficiently drops bulk inserts implicitly securely evaluating identities mapping checks inO(1).Verification Status
The entire
ai/mcp/server/memory-core/services/GraphService.spec.mjssuite runs correctly executingnpm run test-unitagainst a locally boundtest-.dbinstance with no duplications.