LearnNewsExamplesServices
Frontmatter
id9699
titleTest: GraphService SQLite Lazy-Loading Coverage
stateClosed
labels
enhancementai
assigneestobiu
createdAtApr 4, 2026, 6:44 PM
updatedAtApr 4, 2026, 6:54 PM
githubUrlhttps://github.com/neomjs/neo/issues/9699
authortobiu
commentsCount1
parentIssue9680
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtApr 4, 2026, 6:54 PM

Test: GraphService SQLite Lazy-Loading Coverage

tobiu
tobiu commented on Apr 4, 2026, 6:44 PM

Problem

The Native Edge Graph Database distributed caching architecture was recently stabilized (Issue #9697), enabling GraphService to lazily hydrate its in-memory RAM cache from the underlying SQLite datastore. However, there is currently no unit test coverage explicitly verifying that the memory layer successfully rehydrates automatically upon a cache miss.

Expected Behavior

test/playwright/unit/ai/mcp/server/memory-core/services/GraphService.spec.mjs should explicitly clear GraphService.db.nodes and edges, and ensure that requesting getNode(), getNeighbors(), and getContextFrontier() seamlessly restores properties directly from SQLite without data loss.

tobiu
tobiu Apr 4, 2026, 6:54 PM

Completed via 99343e0c7. The integration tests correctly isolate the RAM cache miss simulation by suppressing cascade deletions into the SQLite native layer using autoSave = false. The tests now successfully verify the lazy-loading synchronous data rehydration.