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 real behavior proof before merge. Reviewed October 8, 2026, 6:16 AM ET / 10:16 UTC (Revision 5). ClawSweeper reviewWhat this changesThis PR stabilizes local-service acquisition callbacks across runtime creation and plugin registrations so compatible memory managers can be reused. Example: A user runs native, HTTP, then native memory searches in one process
Review scores
ProductKind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 5 items remain Keep open: the callback-identity defect remains on current main, and this PR contains useful unique work. It needs real behavior proof before merge for retirement safety after integration with the current registry; the earlier successful search trace remains valid evidence for manager reuse. Priority: P2 Decision needed
Before merge
Findings
Tests
Agent review detailsHow this fits togetherMemory Core turns memory-search requests into searches of an indexed workspace using an embedding provider. The plugin runtime supplies host-owned local-service acquisition, whose callback identity also determines whether a memory manager can be reused. flowchart TD
A[Native or HTTP memory search] --> B[Memory Core registration]
B --> C[Plugin scoped acquisition callback]
C --> D[Live registration authority]
D --> E[Host local embedding service]
B --> F[Memory manager compatibility key]
F --> G[Reuse or replace manager]
G --> H[Memory search results]
Technical reviewBest possible solution: Keep resource compatibility identity stable while binding every acquisition and retained-manager operation to the correct live registration and registry. Do we have a high-confidence way to reproduce the issue? Yes: current-main callback allocation and the manager compatibility key establish the identity defect, supported by the supplied isolated reproduction. This review did not execute contributor code or measure current-main provider initialization. Is this the best way to solve the issue? Unclear: stabilizing identity addresses the demonstrated cache mismatch, but the current registry requires a design that separates resource reuse from live registration authority. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 245b7f6fb2ad. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: shipped entry point. Added test files: 3. SecurityNeeds attention: No discrete introduced exploit is established, but callback reuse across registration lifetimes leaves current lifecycle fencing unresolved. EvidenceSecurity concerns:
What I checked:
Likely related people:
PR surfaceSource +28, Tests +48. Total +76 across 6 files. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
This pull request has been automatically marked as stale due to inactivity. |
|
The callback-identity defect still reproduces on current main I ran the real The blocking integration concern is real: current registry acquisition runs through Handing this off for an owner-level design rather than weakening lifecycle fencing. The open question is how to preserve compatible local-provider resource identity across registrations while keeping acquisition, retained managers, and retirement bound to the correct live record/registry. No production changes or pushes were made; this is not landing-ready. |
|
Thanks @artdaal. The repeated-initialization problem is addressed on A process-wide cache keyed by host callback and plugin id would now be unsafe, because the per-registration wrapper closes over the current plugin record's authority, which a replacement must not inherit. Closing as superseded; details are in #142414. |
Closes #142414
What Problem This Solves
Fixes an issue where users of local memory embeddings could pay repeated provider initialization and hit memory-search timeouts when the same memory configuration crossed repeated runtime or plugin registration paths.
Why This Change Was Made
The runtime now exposes one process-stable host acquirer, the plugin registry reuses one scoped acquirer per host callback and plugin ID, and
memory-corereads that reference lazily instead of allocating another forwarding function. Different plugins and genuinely different host callbacks remain isolated. The change does not alter memory configuration, index schema, ranking, or provider fallback behavior.User Impact
Repeated native, HTTP, CLI, or plugin registration paths can reuse a compatible local memory manager instead of replacing it solely because a wrapper function received a new identity. This avoids unnecessary local-provider cold starts while preserving plugin ownership scope.
Evidence
memory-coreregistration boundaries because the callback identity changes.src/plugins/runtime/index.test.ts,src/plugins/registry.runtime-config.test.ts, andextensions/memory-core/index.test.ts.pnpm check:changedpassed for the selected core, core-test, extension, and extension-test lanes.pnpm buildpassed, including CLI bootstrap imports, plugin SDK exports, runtime postbuild checks, and Control UI budgets.scoped-clean, confidence 0.96).Redacted real-runtime proof
Before opening this PR, the equivalent three-boundary identity repair was exercised on an installed OpenClaw 2026.9.2 runtime using a real local GGUF embedding provider and a populated native SQLite memory index. A content-free profiler observed a cold native search, an HTTP search, and a fresh native search in one process:
All three requests reached
search-end; the acquirer and manager tokens stayed identical across the registration/route transitions, and the two warm acquisitions returned immediately. The profiler was then removed byte-for-byte. A separate uninstrumented cold native -> HTTP -> native sequence completed without the prior 15-second timeout (8,886 ms, 839 ms, and 1,051 ms respectively), and every search returned without an error.Queries, result content, paths, hostnames, endpoints, IP addresses, and credentials are omitted. This operational run used the installed 2026.9.2 build with the equivalent guarded fix at the same host-runtime, plugin-scope, and
memory-coreboundaries; the regression suites above validate the source implementation in this PR.