Repository navigation
fix(memory): prevent search contention and reindex leaks - #136482
jason-oc-agents wants to merge 2 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR offloads memory-index publication, retries searches across index revisions, batches cache replacement, and expands shadow-database cleanup. Example: A full memory reindex publishes while a semantic search is running.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Blocked before merge - 8 items remain Keep open: current main covers publication offloading, but distinct cleanup work remains and three previously reported defects still block this PR. Priority: P2 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherMemory Core serves agent and CLI searches from the published index while maintenance builds shadow databases and publishes memory-owned tables into the shared agent database. flowchart LR
A[Memory search tool or CLI] --> B[Memory manager]
B --> C[Published index retrieval]
B --> D[Shadow index build]
D --> E[Publication worker]
E --> F[Agent SQLite database]
C --> F
D --> G[Shadow file cleanup]
Technical reviewBest possible solution: Keep current main’s shared publication and generation owners, and narrow the remaining repair to safe shadow cleanup that cannot block ordinary indexing. Do we have a high-confidence way to reproduce the issue? Source establishes all three introduced failure paths, including an added test expecting duplicate embedding calls; no target code was executed during this read-only review. Is this the best way to solve the issue? This is no longer the best complete fix: current main already shares publication across incremental and full-index writes, while this branch adds a separate publisher and weakens retrieval isolation. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1507c89eaa51. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +40, Tests +328, Other +4. Total +372 across 26 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed October 18, 2026, 7:40 AM ET / 11:40 UTC (Revision 5). |
|
This pull request has been automatically marked as stale due to inactivity. |
|
I noticed #136327 while checking this cleanup path. Both PRs touch |
|
This pull request has been automatically marked as stale after 7 days without qualifying human activity. |
|
I ran the Environment: same clone, same lockfile (no lockfile changes between the two refs), Node v26.12.1, pnpm 12.1.0 as pinned by the repo, one
Results,
Failures on the branch point — i.e. exactly the behaviours this PR claims to fix:
The single remaining failure on the PR head looks test-side rather than behavioural, and it is deterministic (3/3 reruns, identical diff each time): In Caveats, to keep the claim scoped: this is unit-level |
|
Is any of the behavior covered by this draft still reproducible on current main? I was looking through the related PRs and found several merged changes that seem relevant: #149901 moved canonical index publication into the SQLite worker/writer queue. One distinction from the earlier cleanup discussion may also be useful to anyone investigating: #136327 is still unmerged and concerns legacy .tmp-UUID families, while this draft concerns current-format .memory-reindex-UUID runtime shadows. That leaves me unsure whether the cleanup/recovery cases here are already covered upstream or remain a separate gap. Sharing these links in case they help someone compare the regression cases with current main. I haven’t run that comparison myself. |
|
This pull request has been automatically marked as stale after 7 days without qualifying human activity. |
|
Closing due to inactivity. |
Summary
Validation
@anthropic-ai/vertex-sdkis unavailableSafety