Repository navigation
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 maintainer review before merge. Reviewed October 8, 2026, 1:15 PM ET / 17:15 UTC (Revision 2). ClawSweeper reviewWhat this changesThe branch routes memory retrieval workers through lightweight session identity helpers while preserving existing memory-session exports. Review scores
ProductKind: Performance · Worth it: Yes Merge readiness✅ Ready for maintainer review This PR remains useful and has no concrete review blocker. Current main retains the broad imports, the patch preserves existing behavior and compatibility, and the supplied measurements support its scoped memory improvement. Priority: P2 Before mergeNone. FindingsNone. Provenance
Agent review detailsHow this fits togetherMemory retrieval workers search indexed notes and prepare privacy-forget selections outside the Gateway thread. They need session identity helpers, but importing those through the session runtime also retains unrelated configuration and agent modules. flowchart TD
A[Gateway memory requests] --> B[Retrieval worker]
B --> C[Search notes or prepare forget selection]
C --> D[Lightweight session identity helpers]
D --> E[Classify session keys and transcript names]
C --> F[Return results to Gateway]
Technical reviewBest possible solution: Keep pure session identity helpers with their lightweight owner while preserving installed-plugin exports and the existing worker lifecycle. Do we have a high-confidence way to reproduce the issue? Not applicable to a functional bug: source confirms the eager import path, and the supplied before/after measurements demonstrate the retention cost; this review did not execute target code. Is this the best way to solve the issue? Yes: reusing the existing lightweight entry point removes the import cause without duplicating session grammar or changing supported call signatures. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3be885108e5e. Provenance checked
TestingProof path: shipped entry point. Added test files: 0. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +12, Docs +5. Total +17 across 6 files. View PR surface stats
LabelsLabel changes: No label 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 (1 earlier review cycle)
|
|
Thanks @RomneyDa for the import-boundary fix and the original measurements. I opened #172392 as a maintainer replacement because edits to this branch are disabled, with Dallin Romney's co-author credit preserved. It adapts the session-identity move to current main and also removes a newer keyword-expansion import through the same heavy facade. The Mac worker comparison now shows 66.47 → 24.92 MiB settled heap and 2,293 → 738 loaded URLs, with identical search rows and Forget plans. The Ollama embedding-index control shows the same reduction. The final local-model repeat passed, and the replacement is ready for review; it has not been merged. |
* fix(memory): reduce memory retained by retrieval workers Route indexing and Forget identity helpers through session-key-runtime so retrieval workers do not retain the unrelated session-store module graph. Move dreaming identity classification to its session-key owner, preserving the existing memory host facades and installed-plugin exports. Cover the lightweight import boundary with a regression and document the SDK seam. Continues #167327 with its contributor's credit on current main. Co-authored-by: Dallin Romney <[email protected]> * fix(memory): keep query expansion off the session-store facade The current keyword planner added another pure helper import through the session facade after the original worker-retention patch. Mac measurements showed that retaining this edge erased the benefit of moving the two identity consumers. Reuse the existing lightweight retrieval SDK facade and extend the import regression to cover query expansion as well. Query tokenization and installed-plugin exports remain unchanged. * fix(memory): keep transcript identity parsing free of codecs Move transcript filename grammar into an import-free leaf shared by artifact helpers and compression. Keep session-key runtime off the artifact and native codec import graph, with an SDK import regression. * fix(tooling): include transcript names in PR wrapper sources --------- Co-authored-by: Dallin Romney <[email protected]>
|
Thank you @RomneyDa for identifying and fixing the retrieval-worker import boundary, and for the memory measurements. The credited maintainer replacement is now merged in #172392 as 9d8180f. Dallin Romney's Co-authored-by credit is preserved in the merge commit. Closing this original PR now that the replacement has landed. |
…2392) * fix(memory): reduce memory retained by retrieval workers Route indexing and Forget identity helpers through session-key-runtime so retrieval workers do not retain the unrelated session-store module graph. Move dreaming identity classification to its session-key owner, preserving the existing memory host facades and installed-plugin exports. Cover the lightweight import boundary with a regression and document the SDK seam. Continues openclaw#167327 with its contributor's credit on current main. Co-authored-by: Dallin Romney <[email protected]> * fix(memory): keep query expansion off the session-store facade The current keyword planner added another pure helper import through the session facade after the original worker-retention patch. Mac measurements showed that retaining this edge erased the benefit of moving the two identity consumers. Reuse the existing lightweight retrieval SDK facade and extend the import regression to cover query expansion as well. Query tokenization and installed-plugin exports remain unchanged. * fix(memory): keep transcript identity parsing free of codecs Move transcript filename grammar into an import-free leaf shared by artifact helpers and compression. Keep session-key runtime off the artifact and native codec import graph, with an SDK import regression. * fix(tooling): include transcript names in PR wrapper sources --------- Co-authored-by: Dallin Romney <[email protected]>
* fix(memory): reduce memory retained by retrieval workers Route indexing and Forget identity helpers through session-key-runtime so retrieval workers do not retain the unrelated session-store module graph. Move dreaming identity classification to its session-key owner, preserving the existing memory host facades and installed-plugin exports. Cover the lightweight import boundary with a regression and document the SDK seam. Continues #167327 with its contributor's credit on current main. Co-authored-by: Dallin Romney <[email protected]> * fix(memory): keep query expansion off the session-store facade The current keyword planner added another pure helper import through the session facade after the original worker-retention patch. Mac measurements showed that retaining this edge erased the benefit of moving the two identity consumers. Reuse the existing lightweight retrieval SDK facade and extend the import regression to cover query expansion as well. Query tokenization and installed-plugin exports remain unchanged. * fix(memory): keep transcript identity parsing free of codecs Move transcript filename grammar into an import-free leaf shared by artifact helpers and compression. Keep session-key runtime off the artifact and native codec import graph, with an SDK import regression. * fix(tooling): include transcript names in PR wrapper sources --------- Co-authored-by: Dallin Romney <[email protected]> (cherry picked from commit 9d8180f)
* fix(memory): reduce memory retained by retrieval workers Route indexing and Forget identity helpers through session-key-runtime so retrieval workers do not retain the unrelated session-store module graph. Move dreaming identity classification to its session-key owner, preserving the existing memory host facades and installed-plugin exports. Cover the lightweight import boundary with a regression and document the SDK seam. Continues #167327 with its contributor's credit on current main. Co-authored-by: Dallin Romney <[email protected]> * fix(memory): keep query expansion off the session-store facade The current keyword planner added another pure helper import through the session facade after the original worker-retention patch. Mac measurements showed that retaining this edge erased the benefit of moving the two identity consumers. Reuse the existing lightweight retrieval SDK facade and extend the import regression to cover query expansion as well. Query tokenization and installed-plugin exports remain unchanged. * fix(memory): keep transcript identity parsing free of codecs Move transcript filename grammar into an import-free leaf shared by artifact helpers and compression. Keep session-key runtime off the artifact and native codec import graph, with an SDK import regression. * fix(tooling): include transcript names in PR wrapper sources --------- Co-authored-by: Dallin Romney <[email protected]> (cherry picked from commit 9d8180f)
What Problem This Solves
The read-only memory retrieval worker eagerly loads the session-store runtime through two pure helpers: session-key classification and transcript filename parsing. Prewarming consequently retains unrelated session, configuration, and agent module graphs.
User Impact
Memory retrieval retains less unrelated runtime state. Prewarming, privacy-forget selection, session grammar, and installed plugin compatibility remain unchanged; no operator migration or new setting is required.
Why This Change Was Made
session-key-runtimeSDK subpath for these pure identity helpers.Evidence
pnpm build: passed (5m32.2s). Required main changed gate: passed in full.Exact-source strict release performance finished: three cells passed, one CPU interval was inconclusive, and the many-plugin cell failed unchanged RSS budgets (Gateway 1,250.1/1,177 MiB; status CLI 954.9/900 MiB). The retained-worker improvement does not establish a peak-RSS or CPU pass. Publication is not part of this PR.