Repository navigation
fix: owner-gated plugin calls fail after the parent yields - #150295
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: blocked before merge. Reviewed September 18, 2026, 12:13 PM ET / 16:13 UTC (Revision 11). ClawSweeper reviewWhat this changesAdds an opt-in plugin tool contract that preserves owner access when the same parent resumes after yielding, with live authority checks before privileged effects. Merge readiness⛔ Blocked before merge - 4 items remain This remains useful work absent from main. Source inspection and the refreshed runtime evidence support the patch without new actionable correctness findings. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw assembles plugin tools for agent turns and authenticated Gateway requests. This change carries the original owner's authority into an explicitly resumed parent and checks its lifetime before plugin writes or requests. flowchart TD
A[Authenticated owner] --> B[Admitted parent turn]
B --> C[Explicit yield and child completion]
C --> D[Same parent resumes]
D --> E[Opted-in plugin tool]
E --> F[Check live owner and invocation]
F -->|Current| G[Privileged effect]
F -->|Revoked or replaced| H[Reject invocation]
Decision needed
Why: The implementation and runtime proof support the boundary, but the PR explicitly preserves focused SDK/security-owner acceptance and no disposition has been recorded. Before merge
Agent review detailsSecurityNone. PR surfaceSource +316, Tests +477, Docs +35. Total +828 across 47 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the bounded V2 opt-in and legacy direct-turn behavior, with explicit SDK/security-owner acceptance of the composed lifetime contract. Do we have a high-confidence way to reproduce the issue? Yes: the concrete path is an owner turn spawning a child, explicitly yielding, then attempting an owner-gated plugin call on the resumed parent. Main lacks the continuation binding; this review inspected source and supplied after-fix evidence without executing target code. Is this the best way to solve the issue? Yes, technically: the patch reuses the exact-parent handoff and existing final-write/request guards, while avoiding automatic privilege promotion for legacy plugins; permanent SDK/security policy acceptance remains human-owned. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 08587bb31543. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
2540e7a to
57e336e
Compare
|
@openclaw/openclaw-secops — refreshed focused request for The rescan preserves main’s method-specific Cron revocation without cancelling independent operational work, authenticated local/channel provenance without manufacturing plugin owner identity, and retained-work/custody plugin lifecycle. Codex policy extraction retains upstream #151728’s live endpoint/config guard and removed legacy environment gates; the invocation assertion composes through that owner. Fresh evidence on this exact head, not September 17 carryover: full P1 autoreview scoped-clean, build/private-QA build and complete changed checks pass; 696 focused tests/26 files and1,132 shared plugin contract tests/47 files pass. All seven real disposable CLI/Gateway cases pass: resumed guarded effect1; actual Please record focused SDK/security disposition on V2-only continuation eligibility, retained legacy direct-turn compatibility, and composed request/MCP/owner lifetime. Existing reviewer requests are preserved. No acceptance or waiver is inferred. Exact-head CI run35363607059 completed successfully at16:02UTC; required openclaw/ci-gate is SUCCESS, all215PRchecks terminal (174success,40skipped,1neutral), no failures or pending checks. Fresh ClawSweeper revision9 reviewed this exact head at15:57UTC: refreshed runtime proof accepted, no actionable code or security findings, bounded V2 contract recommended. The remaining decision is focused SDK/security-owner acceptance, not a code/CI/proof repair. This updates the existing request rather than sending another review command. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
deb7dd9 to
5518729
Compare
|
🦞👀 Re-review progress:
|
…150295) * fix: preserve channel owner identity for plugin calls after yield Co-authored-by: VACInc <[email protected]> * fix: fence continued owner plugin effects before persistence Carry the admitted continuation guard through plugin context into Memory Core write admission and WhatsApp credential persistence. Cover owner revocation during awaited writes and exact-parent handoff; fix formatting and assertion-safety CI. Co-authored-by: VACInc <[email protected]> * fix: preserve owner sender and fence Codex continuation requests Co-authored-by: VACInc <[email protected]> * refactor: extract Codex supervision policy checks Co-authored-by: VACInc <[email protected]> * fix: require opted-in authority for resumed plugin tools Keep legacy direct turns compatible without promoting unaware factories after yield. Bind required final-effect guards to existing run, plugin, HTTP request, and MCP grant owners, with versioned SDK contexts and revocation coverage. Co-authored-by: VACInc <[email protected]> * test: keep catalog fixtures on their legacy registration contract Co-authored-by: VACInc <[email protected]> * fix: compose continuation checks with current Codex policy Keep the upstream live endpoint policy guard, which includes the retained invocation assertion through requireOwnerAccess, instead of a duplicate request option. Co-authored-by: VACInc <[email protected]> --------- Co-authored-by: VACInc <[email protected]> Co-authored-by: roboclaw-bot <[email protected]>
|
Complementary follow-up: #141865 is now merged. This PR repairs separately admitted owner identity for opted-in plugin tools after the exact parent yields. #141865 repairs a different boundary: synthetic Gateway scope narrowing was discarding read/Talk access already implied by |
What Problem This Solves
Fixes owner-gated plugin tools becoming unavailable when the same parent resumes after an explicit
sessions_yield.User Impact
The yielded parent can use explicitly opted-in owner tools without another human message. Legacy plugins retain direct-turn compatibility but do not silently gain continued owner identity. No configuration, stored schema, embedding format, or retention change is introduced.
Focused SDK/security-owner disposition remains outstanding. The existing request is preserved; this refresh does not waive it or claim merge readiness.
Why This Change Was Made
Reuse the existing exact-parent committed-child handoff with separately admitted configured-owner identity.
OpenClawPluginToolFactory<2>explicitly opts into continuation throughcontextVersion: 2;OpenClawPluginToolContext<2>requires the live final-effect assertion. Default legacy types remain source-compatible. Memory Core intent, WhatsApp login, and Codex migrate through the same existing registrar. Metadata-only construction does not grant execution authority; authenticated standalone HTTP/RPC and cached MCP retain their actual request/grant/runtime lifetimes.The September 18 rebase preserves current main’s separate Cron-only revocation and operational authority, authenticated local/channel provenance, and plugin retained-work/custody lifecycle. Codex keeps upstream #151728’s current endpoint/policy guard and removed environment gates; the continuation assertion composes through that existing guard instead of adding a duplicate request field.
Evidence
Current head:
6e4ee34fa2aab84de69c3b0868bc15b83f75ace3. Explicitly requested rebase base:7592a8dd7d61ce8c1ab9efa6791d119b00fd3765. All task commits retain VACInc’s contributor trailer. No second rebase merely for main movement.pnpm build, private-QA build, and complete changed checks passed. Startup JS is 360,181 B gzip, below the 363,282 B limit. No baseline, budget, or test assertion was weakened.chat.abortduring a deliberately cancellation-ignoring wait → real signal observed → release → final guard rejection → reopened SQLite 0; legacy continuation unavailable 0; nonowner unavailable 0; real bundled Memory Core create/list 1 armed intent with original sender; standalone HTTP effect 1; HTTP disconnect → canonicalClientDisconnectErrorbefore final POST → reopened SQLite 0. All seven cleanups reported zero errors.openclaw/ci-gateSUCCESS. Final PR checks: 174 successful, 40 skipped, 1 neutral, no pending or failed checks. GitHub reports the exact head mergeable/clean. September 17’s results are not substituted.Proof used the actual CLI/Gateway, synthetic channel, scripted local provider, production plugin loader and SQLite, in a closed-network disposable container. It does not claim a live external Codex service or WhatsApp account. The guarded-effect fixture proves the composed runtime boundary; separate registered Memory Core tests exercise its actual queued SQLite writer and verify unchanged persisted rows after revocation. Effective cancellation—not a deferred configuration-file reload—is the live revocation oracle. No production Gateway or live credentials were changed.
Sanitized exact-head runtime observations
The held fixture deliberately ignores cancellation while awaiting its loopback gate. The negative oracle waits for the real signal notification, releases the wait, observes the required assertion reject before the effect POST, and reopens SQLite to check zero persisted effects. The positive control uses the identical effect path.
Focused owner review: #150295 (comment)
The generated data-model flag is not a PR-induced schema/embedding change; the scoped source comparison and queued-writer compatibility evidence are clarified in #150295 (comment).
Worked on by: @VACInc