Repository navigation
fix(memory): make persistence promises receipt-backed - #120989
fuller-stack-dev merged 21 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 16, 2026, 2:39 AM ET / 06:39 UTC. ClawSweeper reviewWhat this changesAdds private side-effect ownership metadata for durable memory tools across embedded, Codex, and Copilot runtimes, so failed writes or deletes trigger the existing corrective reply instead of leaving a false persistence claim. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open for maintainer review. The repair is coherent and no new line-level defect was found, but it expands the documented plugin manifest and agent-harness SDK contract; required direct Codex and LanceDB contract checks could not be completed locally. Priority: P1 Review scores
Verification
How this fits togetherMemory plugin tools run through agent-specific bridges that report terminal outcomes before reply payloads are built. The new manifest metadata identifies a concrete side-effecting plugin tool so the terminal observer can preserve a failed persistence action without exposing ownership data to the model. flowchart LR
A[Plugin manifest] --> B[Concrete memory tool]
B --> C[Embedded or bridge runtime]
C --> D[Terminal outcome observer]
D --> E[Reply payload builder]
B --> F[LanceDB receipt]
F --> D
E --> G[Corrective user reply]
Decision needed
Why: This PR changes a public plugin-facing decision surface, while the required upstream dependency source checks were unavailable locally. Before merge
Agent review detailsSecurityNone. PR surfaceSource +206, Tests +832, Docs 0, Other +2. Total +1040 across 40 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Accept one generic, documented plugin-side-effect contract only after SDK ownership and direct Codex/LanceDB contract checks confirm that this is the intended long-term boundary. Do we have a high-confidence way to reproduce the issue? No live reproduction was run in this read-only review, but the source path is clear and the PR supplies red/green runtime evidence for failed receipts reaching the terminal observer. Is this the best way to solve the issue? Unclear: the repair follows the producer and terminal-owner boundaries well, but maintainers must choose whether its new plugin contract is the intended durable API. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a4407f638af0. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (11 earlier review cycles; latest 8 shown)
|
|
Addressed the five rank-up moves on exact head
The branch now contains current @clawsweeper re-review |
|
Exact-head disposition for
There are zero review threads. The generic @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Maintainer disposition on the retained zero-row P1 for exact head The pinned dependency is Therefore zero rows is an authoritative committed no-op receipt: the scoped memory is absent at that committed version. It is not a failed durable mutation, retrying cannot improve the postcondition, and turning it into A later assistant sentence that contradicts a successful, model-visible not-found result is not evidence that the storage operation failed. Catching arbitrary semantic contradictions after successful tool outcomes would require the downstream wording inference/filter explicitly excluded from this repair. The durable invariant here is state/postcondition plus truthful tool receipt, both of which are satisfied. The generic owner boundary is also maintainer-approved and was directly verified against the pinned Codex protocol/runtime. No head change is warranted for either retained merge-risk note. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Exact-head disposition for
There are no review threads. The PR body now contains the exact-head evidence. This PR is intentionally not being landed in this lane; native prepare/merge remains with the root landing gate after exact CI and review are clean. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer merge-conflict refresh is published at exact head
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Merged via squash.
|
* fix: require memory persistence receipts * fix(memory): bind persistence failures to tool owners * fix(memory): preserve Codex persistence ownership * test(plugin-sdk): account for owner metadata export * test(codex): split owner timeout regression * fix(memory): cover durable deletes across runtimes * test(codex): type dynamic mutation fixtures * fix(agents): fail closed ambiguous side-effect owners * fix(memory): fail zero-row delete receipts
sideEffecting declares durable-mutation ownership (PR openclaw#120989) and must not imply an invocation cap; the previous conversion silently capped memory-lancedb memory_store/memory_forget repeats. Add an explicit manifest toolMetadata field `sideEffectBudget` (true | number >= 1), thread it through manifest normalisation, runtime plugin metadata, the worker tool-surface schema, and catalog budget resolution. Lobster enrols with sideEffectBudget: true; memory-lancedb keeps ownership-only metadata as before. Refs openclaw#204076
What problem this solves
A durable memory mutation can fail while the assistant still says the fact was saved or forgotten. That leaves the user with a false persistence promise even though storage did not change.
Repair
sideEffectingmanifest opt-in and carries it only through private canonical plugin/tool metadata.This does not fix #111985. That issue concerns OAuth credentials at the embeddings endpoint; #115733 is the focused open repair for that separate path.
User impact
After a failed persistent memory write or delete, the false assistant claim remains visible and OpenClaw appends a corrective failure message. Successful exact duplicates, completed database writes, and positive delete receipts do not receive a correction.
Evidence
715e32448e2danddb0d133ec952: an incognitomemory_storerejection followed by a persistence claim delivered only the false claim and wrote no row.2a40bd4ca078: a rejected canonical owner-backed store reached the terminal observer as non-mutating, so the final reply contained no correction. Blacksmith Testbox:tbx_01m03z5dyfm8zj8e3yxdh3tftr, https://github.com/openclaw/openclaw/actions/runs/31917059361.memory_forgetlacked side-effect ownership, and client-tool shadowing could assign a plugin owner to the wrong concrete tool.bcc6f214e072f72260d61bf4aa42757bda13bd0eadditionally fixes the retained zero-row finding at the canonical plugin result boundary. Direct-ID and high-confidence-query deletes now return{ action: "not_found", status: "error", error, id }when LanceDB reportsnumDeletedRows: 0; positive counts still returnaction: "deleted", and unrelated statuslessnot_foundresults remain successful.run_e0981462513d/cbx_da2fb8a98dccfailed 1/1 at the missing failure status on1d972997; greenrun_6bf6d575e2cb/cbx_328479d8ff24passed 1/1 on the patched tree with exit 0 and the lease stopped. The fixture covers both zero-row delete paths through terminal-to-payload correction, the positive delete guard, the generic statusless-not-found control, and metadata non-leakage.3f8d76817e6020ea344fba8a66c5de9ad8c82234:DeleteResultexposes the actualnumDeletedRowsplus committed version; no-match returns zero and a no-op may still advance version. The row count therefore owns the action receipt.blacksmith-testbox: leasetbx_01m046cs5hs38heq6xv286mk1s, https://github.com/openclaw/openclaw/actions/runs/31921978500. The client receipt succeeded with exit 0 and the lease completed; its backing Actions lifecycle concludedcancelledonly after the external one-shot stop.tbx_01m03ws5bfdcn72e62s3fepxph): https://github.com/openclaw/openclaw/actions/runs/31915350125. Earlier full changed gate passed its selected type, lint, boundary, manifest, database-first, and import-cycle gates (tbx_01m03vdn9ffa3rc859b0w4zhfq): https://github.com/openclaw/openclaw/actions/runs/31914327935.1d972997; newer unrelated canonical-main movement was deliberately not merged under the frozen-head gate.Scope
40 files, currently +1105/-65. No public receipt SDK, memory-core rewrite, model-visible receipt payload, Codex protocol extension, wording filter, or proof asset is included.