Repository navigation
memory: synthetic state-change regression test, and pin graphSearch project isolation - #429
Merged
currentbits merged 3 commits intoAug 18, 2026
Conversation
added 3 commits
August 18, 2026 08:23
Inject a Postgres→MySQL supersede and assert the successor wins on search/recent/bootstrap, history is pointer-only, a three-step chain walks A→B→C, and re-superseding a dead id throws.
search() fusion re-applies liveSql but not projectScopeSql, so a missing filter on graphSearch would leak a sibling that shares an entity. The existing narwhal cases never seed entities and would not catch that.
…into coder/memory-synthetic-state-change-regression-a73cec
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
currentbits
deleted the
coder/memory-synthetic-state-change-regression-a73cec
branch
October 3, 2026 16:07
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.
Closes #312.
Public memory-system benchmarks are vendor-run and LLM-judge-noisy, so #312 asked for a cheap deterministic synthetic test instead. This adds it, plus one gap found while auditing the scenarios the issue wanted it extended to.
New:
memory-server/test/state-change.test.js(3 tests)The state change the issue describes: store "Project X uses Postgres", supersede it with "migrated from Postgres to MySQL on 2026-03-04", then assert the new fact wins and the old one survives only as history.
search,recent,bootstrapandgraphSearch; the predecessor appears on none of them, and the old claim text never surfaces in a live excerpt.get(oldId)returns only{superseded_by, hint}—titleandbodyareundefined. The predecessor is reachable only by following the pointer.memory.test.jspreviously only covered a single hop.supersedeon an already-superseded id throws.Changed:
memory-server/test/project-key.test.js(+1 test)The issue also asked to extend to near-dup rejection, invalidation tombstoning, scope isolation (#179) and bootstrap budget. All four were already covered — by
dedup.test.js,resolve.test.js,project-key.test.jsandmemory.test.jsrespectively — so rather than duplicate them this audits them for holes. One was real:search()fuses graph, vector and FTS candidates and re-scores them atmemory-server/src/memory.js:913withliveSql('e')and noprojectScopeSql. Project isolation on the graph and vector paths therefore rests entirely on the filters insidegraphSearch(:645) andvectorSearch(:701). The existing #179 tests never seed entities, so nothing exercised the graph path at all — deleting the:645filter would leak a sibling project's entries through fusion with the whole suite still green.This is not a live bug; both filters are present and correct today. The new test seeds one entity mentioned by entries in two different projects and asserts
graphSearch(..., 'coder')returns only the coder row. It was mutation-checked: with the:645filter removed it fails withgraphSearch leaked out of project: ["Other hidden graph target","Coder hidden graph target"].Notes
Tests only, no production code touched.
cd memory-server && node --test test/*.test.js→ 164 pass, 0 fail.No CI change needed; the root
npm testalready globsmemory-server/test/*.test.js.PR created by the Claude Code agent