[Repo Assist] fix(setup): surface actionable error when gateway device-pair plugin is not loaded#747
Conversation
…is not loaded When the gateway CLI lacks the device-pair plugin (versions prior to 2026.6.0), 'openclaw nodes list --json' and 'openclaw nodes approve' exit non-zero with output containing 'plugin not found: device-pair'. Previously, AutoApproveNodePairing and AutoApprovePairing returned StepResult.Fail with the raw CLI output and then retried 3 times before reporting a vague failure. After retries the error surfaced as: 'Could not list pending node pairing requests (exit 1): ...' This change: - Adds ApprovalRequestHelper.IsPluginNotFoundError to detect this pattern - Returns StepResult.Terminal (non-retriable) with an actionable message pointing the user to upgrade their gateway to 2026.6.0+ - Covers both the 'list pending' and 'approve' command paths in AutoApproveNodePairing, and the 'approve' command path in AutoApprovePairing - Adds tests for IsPluginNotFoundError in ApprovalRequestHelperTests Relates to #677. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Codex review: needs changes before merge. Reviewed June 11, 2026, 10:08 AM ET / 14:08 UTC. Summary Reproducibility: yes. at source level: the current pairing paths return retriable failures for the reported non-zero CLI result, and the linked report supplies the exact diagnostic and affected gateway version. The PR does not include a live after-fix run. Review metrics: 3 noteworthy metrics.
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:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Match the explicit Do we have a high-confidence way to reproduce the issue? Yes at source level: the current pairing paths return retriable failures for the reported non-zero CLI result, and the linked report supplies the exact diagnostic and affected gateway version. The PR does not include a live after-fix run. Is this the best way to solve the issue? No, not in its current generalized form; terminal handling is suitable for the known compatibility error, but the classifier must specifically identify Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 913ba4e8f504. Label changesLabel changes:
Label justifications:
Evidence reviewedAcceptance criteria:
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
|
🤖 This is an automated pull request from Repo Assist.
Relates to #677.
Problem
When a user's gateway CLI is older than 2026.6.0, the
device-pairplugin is not loaded, andopenclaw nodes list --json/openclaw nodes approveexit non-zero with:Previously
AutoApproveNodePairingandAutoApprovePairingreturnedStepResult.Failwith the raw CLI output and then retried three times before ultimately surfacing a vague failure message:The user had no clear indication that the root cause was their gateway version.
Fix
ApprovalRequestHelper.IsPluginNotFoundError(string output)— a lightweight string check for the"plugin not found"substring (case-insensitive).ApprovalRequestHelper.PluginNotFoundMessage— a shared, actionable message text directing users to upgrade to 2026.6.0+.AutoApproveNodePairing→ listing pending requests failsAutoApproveNodePairing→ approval command failsAutoApprovePairing→ approval command failsStepResult.Terminal(non-retriable) so the setup engine stops immediately with a clear message instead of retrying.Trade-offs
The detection is a simple substring match. If a future gateway release changes the error wording, it will fall through to the existing
Failpath (no regression, just loses the improvement). No new dependencies.Test Status
The 1 failure (
Constructor_SetsLocalDataDirFromLocalAppDataRootEnvironment) is pre-existing onmainand unrelated to this change (confirmed by running the same test againstmainwith identical infrastructure). AllApprovalRequestHelpertests, including the 7 newIsPluginNotFoundErrortests, pass.Add this agentic workflows to your repo
To install this agentic workflow, run