fix(exec): clarify node approval recovery#91280
Conversation
|
Small CLI wording patch is up. What changed:
Validation:
This keeps the approval flow untouched and just makes the dead-end error message actionable. |
|
Codex review: needs real behavior proof before merge. Reviewed July 10, 2026, 6:34 PM ET / 22:34 UTC. Summary PR surface: Source +30, Tests +59. Total +89 across 6 files. Reproducibility: yes. from source: current main's shared no-approval-route reply lacks concrete node recovery steps, and exact-head tests exercise the initial and deterministic rendering boundaries. This read-only review did not run a live node failure. Review metrics: none identified. Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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: Keep one canonical shared unavailable-reply renderer that consumes prepared host/node facts and emits truthful, separately labeled UI-access and policy-diagnostic guidance, with live recovery evidence or an explicit proof override before release. Do we have a high-confidence way to reproduce the issue? Yes from source: current main's shared no-approval-route reply lacks concrete node recovery steps, and exact-head tests exercise the initial and deterministic rendering boundaries. This read-only review did not run a live node failure. Is this the best way to solve the issue? Yes: extending the established shared renderer with already-prepared host/node facts is the narrowest maintainable solution and avoids competing CLI-specific or projection-specific recovery wording. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9dee9ebffa58. Label changesLabel justifications:
Evidence reviewedPR surface: Source +30, Tests +59. Total +89 across 6 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 (5 earlier review cycles)
|
|
Follow-up pushed on the existing branch. I replaced the bad |
|
Pushed follow-up commit What changed:
Validation:
|
|
@clawsweeper re-review Current head is now |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Updated the PR body so it no longer mentions the unsupported |
39f13a4 to
cc184b9
Compare
|
Rebased this PR onto current main and replaced the stale node-CLI-only guidance with the shared exec approval unavailable renderer used by the current host=node path. The new head carries host/node metadata into that renderer and adds focused coverage for the node recovery command. Local validation: node scripts/run-vitest.mjs src/infra/exec-approval-reply.test.ts src/agents/bash-tools.exec-host-shared.test.ts src/agents/embedded-agent-subscribe.handlers.tools.test.ts, plus git diff --check. |
|
Reopening this PR: ClawSweeper's automatic close was incorrect. The branch is mergeable (currently Sorry, @deepujain. |
|
ClawSweeper re-closed this PR from a queued stale apply after the correction above. I have reopened it again and placed it under a current-main protected label while the guard fix lands. No contributor action is required. |
Co-authored-by: Deepak Jain <[email protected]>
6dffc69 to
4b8d1f3
Compare
|
@clawsweeper re-review Maintainer repair is now on exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review Exact head is now |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
* fix(exec): clarify node approval recovery Co-authored-by: Deepak Jain <[email protected]> * chore(pr): keep release notes in PR context * fix(exec): describe dashboard URL handoff --------- Co-authored-by: Peter Steinberger <[email protected]>
Fixes #53250.
What Problem This Solves
Fixes an issue where operators running an exec command on a node could receive only
exec denied: approval required (approval UI not available)when no interactive approval route was available. The message did not tell them where to review the pending request or how to inspect the affected node's exec policy.Why This Change Was Made
The shared exec approval-unavailable renderer now owns node-aware recovery guidance, so both the initial tool result and deterministic rerender use the same message. It distinguishes the two supported surfaces:
openclaw dashboard --no-open, open it in a browser, then use the approval inboxopenclaw approvals get --node <id|name|ip>or the resolved node id when availableThe CLI command is intentionally described as policy inspection. Pending approval list/resolve commands proposed in #83440 are not on current
mainand are not claimed here.User Impact
Operators who hit the current
host=nodeapproval-unavailable path get truthful Control UI access steps plus a separately labeled policy diagnostic. The change preserves fail-closed approval behavior and does not alter approval authority, decisions, or policy enforcement.Evidence
Validation on Blacksmith Testbox lease
tbx_01kx70bgej5kn6b8vsz00z2cp2:src/infra/exec-approval-reply.test.ts,src/agents/bash-tools.exec-host-shared.test.ts, andsrc/agents/embedded-agent-subscribe.handlers.tools.test.ts.corepack pnpm check:changedpassed the core, core-tests, and docs lanes, including typecheck, lint, guards, and zero runtime import cycles.oxfmtandgit diff --checkpassed.Focused tests prove that:
buildExecApprovalUnavailableReplyPayload({ reason: "no-approval-route", host: "node", nodeId: "mac-1" })identifiesopenclaw dashboard --no-openas a Control UI URL printer, tells the operator to open that URL and use the approval inbox, and labelsopenclaw approvals get --node mac-1as effective-policy inspection.Live clawmac approval-unavailable/recovery proof was not collected because that machine was reserved for an unrelated exact-head signed restart cycle during this repair. This patch changes only recovery copy and metadata propagation; the focused tests cover each runtime boundary it touches.
AI-assisted maintainer repair: Codex corrected the command contract, rebased the contributor branch, expanded focused coverage, and preserved Deepak Jain's commit credit and PR attribution. Release-note context remains in this body per the repository's normal-PR policy.