Repository navigation
fix(update): preserve explicit plugin capability consent - #131301
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 11:24 AM ET / 15:24 UTC. ClawSweeper reviewWhat this changesThe PR adds an invocation-scoped Regression provenancePossible regression — probable (reviewed change; known regression link). No predecessor PR is attributed. Merge readinessKeep this member-authored, maintainer-labeled PR open for normal owner-controlled landing. The introduced flow consistently carries explicit consent to channel migration, npm repair, and post-core convergence while preserving the artifact recheck before commit; no blocking patch defect was found. Priority: P1 Review scores
Verification
How this fits togetherThe update CLI replaces or refreshes OpenClaw, then reconciles configured plugin artifacts before restart. This change carries an operator’s explicit capability approval into those reconciliation paths so widened plugin surfaces are reviewed at the artifact-commit boundary. flowchart LR
A[Operator runs update] --> B[Update CLI]
B --> C[Core package replacement]
C --> D[Plugin convergence]
D --> E{Artifact needs consent}
E -->|accepted and rechecked| F[Commit plugin artifact]
E -->|not accepted| G[Keep prior artifact and report outcome]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +62, Tests +404, Docs +17, Other +366. Total +849 across 18 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the documented invocation-scoped consent path with the artifact-bound recheck intact, preserving interactive consent as the default and the current-process fallback for older installed targets. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source shows no consent handler reaches post-update synchronization or convergence, while the supplied packaged Docker evidence and focused tests describe the failing/repaired update sequence; this read-only review did not rerun it. Is this the best way to solve the issue? Yes. The patch uses the existing CLI consent adapter and canonical staged-artifact consent owner rather than adding a parallel trust store or bypassing capability checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 117078fedbf6. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
|
Reconciled head GitHub rejected the prior e804 landing because of a real conflict in
Consent still acknowledges the exact reviewed artifact surface, never follows from Maintainer review accepts the scoped consent contract and +62 production delta; exact-head review/CI and native artifact validation passed; proceeding with native preparation/merge. Both remaining moves in the latest exact-head ClawSweeper review are addressed by this final maintainer approval. |
85b2ac9 to
6bf4b77
Compare
d928274 to
f1e6156
Compare
Use the canonical artifact consent adapter for channel migrations and preserve explicit consent through the update wizard. Keep prior usable payloads on denial and record the exact accepted surface through the existing install-record owner. Cover parser boundaries, staged artifact changes, and packaged update/repair handoffs without treating --yes as consent or granting future permission. Co-authored-by: Dallin Romney <[email protected]>
Route the packaged consent scenario through the existing plugin-update probe so Knip discovers the implementation through its normal entry graph. Initialize scenario state only when the consent command runs, preserving other probe modes. Co-authored-by: Dallin Romney <[email protected]>
Inspect the installed update command before forwarding explicit consent so older and same-version target CLIs keep finalization in the existing parent path when they lack the option. Preserve the installed compatibility host through plugin convergence and reuse the update step timeout for inspection. Use built-in streaming SHA256 for the packaged proof rather than requiring an undeclared checksum binary. Co-authored-by: Dallin Romney <[email protected]>
Link the mandatory registry repair before the core package swap removes the old updater's chunks. This keeps current-process finalization runnable when the installed target cannot receive explicit capability consent, without retaining old runtime files or changing plugin policy. Co-authored-by: Dallin Romney <[email protected]>
Synchronize the concurrency test at the fourth credential check instead of polling command startup with a wall-clock deadline. Release blocked checks and await Doctor in finally, including early command or assertion failures. Keep the exact concurrency, total-check and sorted-result assertions. Co-authored-by: Dallin Romney <[email protected]>
e804826 to
cc14681
Compare
|
Merged via squash.
|
…1301) * fix(update): preserve explicit plugin capability consent * fix(update): bind plugin consent to staged artifacts Use the canonical artifact consent adapter for channel migrations and preserve explicit consent through the update wizard. Keep prior usable payloads on denial and record the exact accepted surface through the existing install-record owner. Cover parser boundaries, staged artifact changes, and packaged update/repair handoffs without treating --yes as consent or granting future permission. Co-authored-by: Dallin Romney <[email protected]> * test(update): register consent scenario with probe Route the packaged consent scenario through the existing plugin-update probe so Knip discovers the implementation through its normal entry graph. Initialize scenario state only when the consent command runs, preserving other probe modes. Co-authored-by: Dallin Romney <[email protected]> * fix(update): retain consent with compatible finalizers Inspect the installed update command before forwarding explicit consent so older and same-version target CLIs keep finalization in the existing parent path when they lack the option. Preserve the installed compatibility host through plugin convergence and reuse the update step timeout for inspection. Use built-in streaming SHA256 for the packaged proof rather than requiring an undeclared checksum binary. Co-authored-by: Dallin Romney <[email protected]> * fix(update): keep convergence code loaded across replacement Link the mandatory registry repair before the core package swap removes the old updater's chunks. This keeps current-process finalization runnable when the installed target cannot receive explicit capability consent, without retaining old runtime files or changing plugin policy. Co-authored-by: Dallin Romney <[email protected]> * test(cli): await MCP Doctor batch readiness Synchronize the concurrency test at the fourth credential check instead of polling command startup with a wall-clock deadline. Release blocked checks and await Doctor in finally, including early command or assertion failures. Keep the exact concurrency, total-check and sorted-result assertions. Co-authored-by: Dallin Romney <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Dallin Romney <[email protected]>
What Problem This Solves
A core update can replace OpenClaw and then strand plugin convergence when an updated or restored plugin needs capability consent. The updater and
update repairhad no way to carry the operator’s explicit approval through all of those paths.Review also found two concrete gaps beyond the initial flag wiring: channel sync passed a callback that its low-level installers did not consume, and current-process finalization could import a hashed module from the old package after that package had been removed. Both are repaired at their existing owners.
Why This Change Was Made
The channel-sync owner now prepares the canonical managed-artifact consent adapter for each npm, ClawHub, or permitted fallback attempt. It passes the actual pre-commit hook and records only the accepted surface. Three repetitive installer branches become one flow. Rejected or changed-during-review artifacts cannot commit; callback failures retain their identity; denial does not trigger registry fallback.
The explicit option travels through normal update, repair, the private finalizer, wizard, and fresh/current-process finalization. Applicable leaves accept it before or after the subcommand. Successful installed-target help determines whether the new option can be forwarded; equal version strings are not a feature guarantee. Unsupported targets retain the existing current-process route and explicit consent, while a failed help probe propagates. Convergence receives the already-read installed host version.
The real unsupported-target replacement reproduced an old-chunk
ENOENT. The finalization owner now links its mandatory dependency before package replacement, while repair facts are still read at invocation. This is +2/-2 lines, not a preload list, retained runtime copy, or new finalizer.The incoming unconditional fixture flag was superseded by the merged historical-compatible fixture repair and removed from this PR’s scope. The staged onboarding repair and Doctor lease repair are not duplicated.
User Impact
Operators can explicitly approve reviewed plugin capability changes with
openclaw update --accept-capabilitiesor recover withopenclaw update repair --accept-capabilities. The flag is invocation-scoped:--yesremains confirmation only, and acceptance grants no permission for later widening. The canonical owner rechecks the final declared surface after review; artifact integrity is recorded separately.Declining widening can leave a usable prior plugin unchanged and report a warning. A missing active payload can still fail finalization until explicitly repaired. CLI update documentation now explains that distinction and recovery; product exit policy is not changed to match overbroad prose.
No configuration key, environment variable, dependency override, schema, or persisted-format change. Production: +130/-68, net +62; tests: +442/-38; E2E support: +370/-4; docs: +20/-3. Eighteen files, +962/-113 total. Maintainer review accepts the runtime growth for the additive CLI/process contract, actual artifact/record boundary, target-help compatibility and installed-host forwarding. Existing policy, adapter and finalizer owners are reused.
CHANGELOG.mdremains release-generated.Evidence
Current head:
cc1468158a22f1b7d1cec9ba7c53ec80e2b89798, rebased onto frozen mainfae55749085189ed6380891a5945a0e96acc62eeafter GitHub reported an actual test-file merge conflict. Maintainer review complete; approved for native preparation and landing. Fresh independent review has no actionable finding.44573c518d32b66f50ff68b3dd1611f7061db4bc, including unchanged-update assertions and six consent/recovery assertions through 14 real CLI commands and six snapshotsPackage identity and observed behavior
The final canonical candidate tarball SHA-256 is
317b6ae77a0c0ee2ed14f424afc038f63d78dbd6be4a4dc55f4fce5daa512626. Remote source and the 17 then-changed file hashes matched runtime44573. Blacksmith Testboxtbx_01m1476mew2jnhg3tf72erfwyfran both final package legs and is verified completed; all five task-owned leases are stopped.The canonical lane retained and passed its unchanged-update snapshot/config/output assertions. With a local registry exposing fixture versions 1, 2 and 3, the actual installed CLI proved:
The independent older-target leg used the authentic, schema-compatible package from original Package Acceptance run 33099873637, artifact
9658437294, source76feb368b5aa4122af8fb4e2f08b457d3ab8d460, version2026.8.1, state schema 13 / agent schema 17. Its tarball SHA-256 ise1e2b2bea928ac3f628f21aae72f26808b89c10ad6d69246a05c9fc36f9f1a0d; immutable identity was verified independently of that historical run’s failing conclusion.That target’s real help lacks the updater flag. The actual replacement first failed loading the deleted old Doctor registry chunk; after the static-link repair, the same replacement passed. Core build identity and entry bytes changed despite equal package versions. No post-core finalizer child received the unsupported flag. Current-process convergence installed fixture v2; the installed target’s
plugins inspect --runtime --jsonverified its surface, hash, integrity, timestamp, payload and runtime tools without module/API errors. No fabricated target, copied runtime or schema bypass.The accepted MCP test-only head
e804826differed from runtime44573only in that test (34,611 other tracked files matched). The subsequent necessary rebase ontofae557resolves a real server conflict: it keeps the exactexplicit=false/trueconsent table and its acknowledgement/no-handler assertions, while honoring main's deletion of a redundant fresh-doctor test. All six task commits and contributor credit are preserved. Range-diff shows four commits unchanged and two with test-context differences only; the added/removed-line sequence for every one of the 18 PR-owned files is identical before and after rebase.This is PR-patch equivalence, not whole-tree identity across the new main base. Main's service-definition authority/ownership protections and winning-result-only child stop remain intact. Fresh integrated tests exercise those owners with the consent flow. Historical package executions remain attributed to
44573: both complete proof legs used isolated state and--no-restart; the preserved consent, artifact and current-process assertions are reused without claiming execution at the rebased head. No new package run was needed for the mechanical conflict resolution under maintainer direction. The latest ClawSweeper review covers exactcc146815(14:47 UTC), reports no code/security findings, and marks proof sufficient (5/6); it no longer requests a package rerun. Both remaining ClawSweeper moves are addressed: maintainer review accepts the scoped consent contract and +62 production delta, and the final maintainer decision approves native preparation and landing. Exact rebased-head CI is green. The data-model heuristic does not represent a schema or persisted-format change.Exact focused commands
Current conflict-rebase integration:
The actual
node scripts/check-changed.mjs -- <all 18 PR paths>gate passed on the rebased source. The following commands record earlier executed proof and are not new runs after rebase:The authentic artifact leg used
openclaw update --tag <verified-target.tgz> --accept-capabilities --yes --no-restart --jsonin an isolated prefix/state with the existing fixture registry. No operator gateway or state was touched.Failures, limits and follow-up
Earlier CI caught a test entry-point reachability issue and an undeclared shell checksum utility. The scenario now uses the existing canonical probe entry and built-in streaming crypto, not exemptions. Already-landed main repairs removed the old fixture-seed, test-type and ingress-lint blockers during one authorized patch-identical rebase; their fixes were not copied.
Runtime-head CI needed one retry after an MCP concurrency test observed no callbacks within its default one-second poll. The historical cause is not established. Rather than rely on the retry, the final test-only commit uses a producer readiness signal and releases/awaits blocked work in
finally, retaining the four-concurrent/six-total/ordered-result assertions. Negative controls prove it still rejects unbounded work, missing work and rejection. The prior e804 CI passed without retry; the rebased head has its own CI result above.Published
2026.8.1-beta.3was also verified and attempted, but its Doctor refused state schema 13 versus supported 9 after the core swap, before the unsupported-target branch. No guard was bypassed; the compatible immutable same-version target supplied that proof instead. Separate follow-up: assess pre-activation schema checks for explicit artifact targets. No universal historical-downgrade guarantee is claimed.Stale/replaced review tokens are covered by real staged-artifact tests, not injected through the packaged CLI. No live ClawHub service, interactive TTY or live provider/channel proof is claimed. Direct Commander contracts and pinned Codex
rust-v0.150.1source were inspected; Codex files checked werecodex-rs/app-server/src/request_processors/initialize_processor.rs:44–159andcodex-rs/app-server/src/message_processor.rs:835–901at90854393966b21e9ebfd21b122334eb09a20c93d. This changes host installation, not Codex protocol behavior.Original contributor evidence and credit
Dallin’s original contribution reported 465 focused tests plus core types, formatting, syntax and diff checks. Those historical results remain distinct from the expanded maintainer proof above. Vincent’s original release failures were root-managed VPS upgrade, offline plugins, published upgrade survivor, and update restart auth.
Thanks @RomneyDa. Dallin Romney’s original authorship and exact
Co-authored-by: Dallin Romney <[email protected]>trailers are preserved. AI-assisted: yes.