test(agent-memory): Phase 11 — integration suite (real valkey-search)#259
Open
jamby77 wants to merge 2 commits into
Open
test(agent-memory): Phase 11 — integration suite (real valkey-search)#259jamby77 wants to merge 2 commits into
jamby77 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 80c4b1c. Configure here.
268b946 to
a409ab0
Compare
80c4b1c to
ae5f44f
Compare
a409ab0 to
aa75783
Compare
ae5f44f to
dea635c
Compare
aa75783 to
7a0812f
Compare
dea635c to
395d192
Compare
7a0812f to
65a592a
Compare
395d192 to
b522a61
Compare
65a592a to
8915dfe
Compare
b522a61 to
29a0788
Compare
- MemoryStore.integration.test.ts, skip-guarded (VALKEY_URL, default redis://localhost:6380): connects to a real Valkey + valkey-search, FT.CREATEs the mem index, and exercises the full stack - Covers: remember->recall round trip at near-zero distance; scope/tag filter isolation; capacity eviction with the eviction counter; ttl expiry; consolidation into a recallable summary - Polls for async HNSW indexing to stay non-flaky; drops the index and cleans keys around the run - Add iovalkey devDependency for the test client Verified green and non-flaky against valkey-bundle 9.1 on port 6384.
…figured cap Assert the scope settles to <= maxItemsPerScope (3), not max+1, so a broken eviction path can't pass.
8915dfe to
a0accf8
Compare
29a0788 to
e517bec
Compare
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.

Stacked on #258 (Phase 10 — AgentMemory facade). Final core phase (0–11).
What
MemoryStore.integration.test.ts— a skip-guarded suite that exercises the full memory stack against a real Valkey +valkey-searchserver.VALKEY_URL(defaultredis://localhost:6380),lazyConnect+ no-retry so it fails fast and skips when no server is present (CI stays green) — same pattern as semantic-cache/agent-cache.FT.CREATEs the{name}:mem:idxindex (FLAT, FLOAT32, COSINE, dim 16; TAG scope/tags/source; NUMERIC importance/created_at/last_accessed_at/access_count; TEXT content) inbeforeAll, since the package has no index-creation code of its own.Coverage
< 0.01(≈ exact match), with the right id and content.maxItemsPerScope: 3, write 5; theevictionscounter in__mem_statsincrements and the scope stays bounded.ttl: 1memory exists, then is gone after expiry.source: 'summary'memory that is itself recallable; sources deleted; counts correct.Robustness
pollUntil) rather than fixed sleeps; drops the index and deletes keys around the run.iovalkeyas a devDependency for the test client (lockfile updated).Verification
Default
vitest run→ 100/100 green (integration skips, no server). Against the livevalkey/valkey-bundle:9.1on port 6384: 5/5 green, non-flaky across 3 consecutive runs.tscclean · prettier clean.This completes the agent-memory core (Phases 0–11). Optional follow-ups remain: Phase 12 (Python parity) and Phase 13 (MCP tools).
Note
Low Risk
Test-only changes with no production runtime impact; integration tests are skipped without a Valkey server.
Overview
Adds
MemoryStore.integration.test.ts, an optional integration suite that runsMemoryStoreagainst a live Valkey instance with valkey-search (connect viaVALKEY_URL, defaultredis://localhost:6380). Tests skip when no server is reachable so default CI stays green, matching other packages’ integration pattern.The suite bootstraps its own
FT.CREATEindex inbeforeAll(the package does not create indexes), then covers remember/recall similarity, namespace and tag filtering, capacity eviction with stats, TTL expiry, and consolidation into a recallable summary.Adds
iovalkeyas a devDependency for the test client; lockfile updated accordingly.Reviewed by Cursor Bugbot for commit e517bec. Bugbot is set up for automated code reviews on this repo. Configure here.