Repository navigation
Apply consented grouped Claw updates - #102982
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Codex review: needs real behavior proof before merge. Reviewed July 20, 2026, 5:49 PM ET / 21:49 UTC. Summary PR surface: Source +1888, Tests +2022, Docs +16. Total +3926 across 31 files. Reproducibility: not applicable. This PR proposes a new experimental lifecycle capability rather than reporting broken current-main behavior. The unresolved question is live validation of the proposed external mutation and recovery paths. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Land the stack only after maintainers accept the Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes a new experimental lifecycle capability rather than reporting broken current-main behavior. The unresolved question is live validation of the proposed external mutation and recovery paths. Is this the best way to solve the issue? Unclear: consent binding, compare-and-swap checks, and partial-state reporting are a plausible design, but the best merge-ready solution depends on maintainer acceptance of the recovery guarantee and proof against real package and Gateway boundaries. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3a9f89e42e94. Label changesLabel justifications:
Evidence reviewedPR surface: Source +1888, Tests +2022, Docs +16. Total +3926 across 31 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (31 earlier review cycles; latest 8 shown)
|
9904dd9 to
b8c182b
Compare
86d6f0a to
0428dab
Compare
b8c182b to
fac569f
Compare
0428dab to
af69df0
Compare
af69df0 to
5f121bf
Compare
416f172 to
792d4b8
Compare
|
Restacked on the corrected #102959 head and pushed at |
|
Exact-head regression follow-up at
Source-harness evidence on Windows with Node 24.14.0:
The plugin case uses a real temporary package root and resolved integrity/install metadata; MCP config writes are exercised through the source harness. A broader local run passed the non-SQLite cases, while SQLite-backed cases are blocked locally by Node 24.14.0 embedding SQLite 3.51.2, which OpenClaw intentionally refuses as unsafe. Exact-head CI is still queued. Its completed PR #111391 has been restacked on this exact head. No merge performed. |
|
@clawsweeper re-review\n\nExact head is 51f0d9a2d24cb8be1407ec8e83664546e7647427. The PR body now has refreshed current-head validation plus the required Real behavior proof section, including the source CLI add/update apply/status proof and secret-marker non-leak check. |
|
🦞👀 I queued a lightweight read-only assist pass. It will post a separate answer comment and will not edit the durable ClawSweeper review comment or trigger close, merge, repair, label, or branch changes. Request: re-review\n\nExact head is 51f0d9a2d24cb8be1407ec8e83664546e7647427. The PR body now has refreshed current-head validation plus the required Real behavior proof section, including the source CLI add/update apply/status proof and secret-marker non-leak check. |
|
ClawSweeper assist: The refreshed proof addresses the local source-CLI path for agent config, workspace files, MCP configuration, status, and secret redaction, but it does not satisfy the earlier external-boundary proof request. It explicitly excludes credentialed live Gateway cron mutation and does not demonstrate package replacement or Evidence:
Suggested next action: Add current-head external package/Gateway recovery proof, then request a full correctness review with Source: #102982 (comment) |
Dependency graph guard clearedThis PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh
|
|
Merged via squash.
|
Summary
Extends experimental
claws updatefrom the read-only plan in #102959 to consented mutation across Claw-owned agent config, managed workspace files, packages, MCP declarations, cron jobs, and root provenance.--yesand the exact--plan-integrityprinted by the latest dry run.update_partialwhen an external package, config, or Gateway mutation cannot be proven fully compensated.agents.entries[...]shape rather than the internalagents.listprojection.This remains behind
OPENCLAW_EXPERIMENTAL_CLAWS=1.Lifecycle contract
The executor binds one exact integrity confirmation to the full plan, including separately disclosed capability records.
requiresDistinctConsentremains available to hosts that present a separate capability dialog or aggregate approval. A changed capability record invalidates consent before any mutation.Recovery contract
Package installers, source-config writers, and Gateway scheduler calls do not share one transaction. The initial experimental contract is fail closed, report
update_partial, preserve uncertain provenance, and require status/Doctor inspection plus a fresh plan. Richer operation-identity reconciliation remains a follow-up.Validation
Current implementation head:
72b11216217def707ef001c648b0c471920727d0.git diff --check origin/main...HEADnode scripts/report-test-temp-creations.mjs --base origin/main --head HEAD --no-merge-basepnpm exec oxlint --deny-warnings <29 changed TypeScript files>node scripts/run-vitest.mjs src/claws/update-apply.test.ts src/claws/package-update.test.ts src/claws/workspace-update.test.ts src/claws/mcp-update.test.ts src/claws/cron-update.test.ts src/cli/claws-cli.test.ts(63 tests)pnpm tsgo:corenode --import tsx src/entry.tsfor v1 install, v2 dry-run, exact-integrity update apply, status, config inspection, workspace file inspection, and secret-marker grep.Real behavior proof
Behavior or issue addressed:
A consented grouped Claw update can apply the exact dry-run plan to an installed Claw, updating the serialized agent entry, managed workspace files, MCP config, and root provenance without leaking secret-bearing MCP details in CLI JSON output.
Real environment tested:
WSL Ubuntu checkout
/root/src/openclaw-workflow/.worktrees/pr-102982at72b11216217def707ef001c648b0c471920727d0, using the source CLI entrypointnode --import tsx src/entry.ts, a temporaryOPENCLAW_STATE_DIR, local package-directory Claw sources, and no external network service.Exact steps or command run after this patch:
@proof/apply-previewClaw package v1 with agentapply-previewand a managedSOUL.mdworkspace file.claws add <v1> --dry-run --workspace <tmp-workspace> --json, capturedplanIntegrity, then ranclaws add <v1> --yes --plan-integrity <captured> --workspace <tmp-workspace> --json.Apply Preview v2, changedSOUL.md, addedNOTES.md, and added a local stdio MCP declaration containing secret-marker command args, env reference, and tool filter.claws update apply-preview --from <v2> --dry-run --json, capturedplanIntegrity, then ranclaws update apply-preview --from <v2> --yes --plan-integrity <captured> --json.claws status apply-preview --json, inspectedopenclaw.json, read both workspace files, and grepped update preview/apply JSON for secret markers.Evidence after fix:
Terminal proof summary:
{ "root": "/tmp/openclaw-claws-update-apply-proof-5qzSJc", "addIntegrity": "sha256:cf70f0b214da518d9651f3d11c2e837baa2415701e6f9b5d4283937c50fe1853", "updateIntegrity": "sha256:9161cdfdaf4cd922123c9aedeb27a5b1bc67f51b87fa4f3c47f2e87ec6b94525", "applyStatus": "complete", "agentName": "Apply Preview v2", "mcpServers": ["private-local"], "statusRecords": 1 }Observed result after fix:
The update apply result completed,
openclaw.jsonstoredagents.entries["apply-preview"].nameasApply Preview v2, no serializedagents.listwas written,SOUL.mdcontained the v2 content,NOTES.mdexisted, MCP serverprivate-localwas present, status returned one Claw record, and the update JSON outputs did not containPRIVATE_ARG_SECRET_789,PRIVATE_ENV_VALUE_123, orPRIVATE_TOOL_SECRET_456.What was not tested:
A credentialed live Gateway cron mutation was not run in this local source proof; cron update behavior and partial Gateway recovery are covered by the focused cron/update unit tests in this PR.
Documentation
Extends
/cli/clawswith exact-plan update consent, mutation ordering, compare-and-swap checks, compensation, andupdate_partialrecovery guidance.Stack note
This is a ready stacked PR after #102959, which has landed. The next Claws stack PR is the CLAW.md/documentation slice.