Repository navigation
fix #94040: [Bug]: nodes approve failed: GatewayClientRequestError: unknown requestId - #94452
Conversation
51f82cf to
d2cb7ff
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Codex review: needs real behavior proof before merge. Reviewed June 26, 2026, 7:36 PM ET / 23:36 UTC. Summary PR surface: Source +56, Tests +76. Total +132 across 5 files. Reproducibility: yes. at source level: current main and Review metrics: none identified. 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
Security Review detailsBest possible solution: Land the focused nodes CLI rendering/preflight fix after refreshed current-head terminal proof or an explicit maintainer proof override, and keep broader gateway idempotency semantics in separate review. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main and Is this the best way to solve the issue? Yes for the immediate operator-facing bug: the CLI rendering/preflight boundary is narrower than changing gateway approval semantics. The broader idempotent approval idea in #94532 should stay separate unless maintainers choose that contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6883c6c070f6. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +56, Tests +76. Total +132 across 5 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
|
|
/clownfish automerge |
|
Clownfish is on the reef for this PR. 🐠 I tagged A maintainer can call |
252c719 to
a49f8a8
Compare
|
Land-ready verification complete after maintainer repair.
No known proof gaps. |
|
Merged via squash.
|
…Error: unknown requestId (openclaw#94452) * fix(nodes): explain unknown approval request ids * fix(nodes): keep stale request handling CI-clean * fix(nodes): point stale approve hint at pending command * fix(nodes): explain stale approval request ids * fix(nodes): make stale approval guidance reliable * fix(nodes): preserve stale approval error context --------- Co-authored-by: openclaw-clownfish[bot] <280122609+openclaw-clownfish[bot]@users.noreply.github.com> Co-authored-by: Peter Steinberger <[email protected]>
…Error: unknown requestId (openclaw#94452) * fix(nodes): explain unknown approval request ids * fix(nodes): keep stale request handling CI-clean * fix(nodes): point stale approve hint at pending command * fix(nodes): explain stale approval request ids * fix(nodes): make stale approval guidance reliable * fix(nodes): preserve stale approval error context --------- Co-authored-by: openclaw-clownfish[bot] <280122609+openclaw-clownfish[bot]@users.noreply.github.com> Co-authored-by: Peter Steinberger <[email protected]>
…Error: unknown requestId (openclaw#94452) * fix(nodes): explain unknown approval request ids * fix(nodes): keep stale request handling CI-clean * fix(nodes): point stale approve hint at pending command * fix(nodes): explain stale approval request ids * fix(nodes): make stale approval guidance reliable * fix(nodes): preserve stale approval error context --------- Co-authored-by: openclaw-clownfish[bot] <280122609+openclaw-clownfish[bot]@users.noreply.github.com> Co-authored-by: Peter Steinberger <[email protected]>
…Error: unknown requestId (openclaw#94452) * fix(nodes): explain unknown approval request ids * fix(nodes): keep stale request handling CI-clean * fix(nodes): point stale approve hint at pending command * fix(nodes): explain stale approval request ids * fix(nodes): make stale approval guidance reliable * fix(nodes): preserve stale approval error context --------- Co-authored-by: openclaw-clownfish[bot] <280122609+openclaw-clownfish[bot]@users.noreply.github.com> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit deb0ffd)
Status
Summary
openclaw nodes approve <requestId>surfaced a rawGatewayClientRequestError: unknown requestIdwhen the request id was stale or no longer pending, leaving operators without a clear recovery path during companion/node onboarding.node.pair.approvereturns the specific unknown requestId error, the nodes CLI now fetches current pending node pairing requests and prints a user-actionable message.nodes approvenow reports the stale request id, shows currently pending request ids when visible, and points users toopenclaw nodes pending. This update also keeps the existing regression test type-safe and fixes the lint failure from the first PR head.Why it matters / User impact
Scope boundary
openclaw nodes approve <requestId>CLI rendering for the specific gatewayINVALID_REQUEST/ stale requestId response. It does not change gatewaynode.pair.approve, node pairing persistence, request id expiration rules, node/device auth, pairing scopes, companion app behavior, Kubernetes port-forwarding, provider routing, session state, channel delivery, oropenclaw devices approve.GatewayClientRequestErrorwithgatewayCode === "INVALID_REQUEST"and message containingunknown requestIdis converted into the actionable CLI message. Other approval errors still flow through the existingnodes approve failed: ...path.Source-of-truth boundary
src/cli/nodes-cli/register.pairing.ts. The gateway protocol result is valid; the CLI was the layer leaking raw protocol wording to users instead of rendering the canonical operator recovery path. This keeps compatibility with the existing gateway contract because it performs only a read-onlynode.pair.listlookup after the stale approval response and does not alter request/response shape, defaults, schema, migration, or wire behavior.Competition / linked PR analysis
fix(cli): improve error message for unknown requestId in devices approve).openclaw nodes approve 57511973-c922-444a-b5a6-d689fc6ea364, but fix(cli): improve error message for unknown requestId in devices approve #94055's visible CLI change targetssrc/cli/devices-cli.runtime.ts(openclaw devices approve) and does not update the nodes approval command path. Its diff also contains unrelated Matrix changes, which broadens review scope beyond this issue.nodes approve) with a local real CLI proof, rather than improving a siblingdevices approveerror path.Origin / follow-up
N/A — independent root-cause PR for #94040. #94055 is an external competing open PR for the same issue, not a merged origin/follow-up anchor.
Closes #94040
Review findings addressed
status: ⏳ waiting on author): this update supplies the author-side correction and fresh verification; no label was manually changed outside the contributor flow.src/cli/nodes-cli/register.pairing.tsto point to the registeredopenclaw nodes pendingcommand, and updated the regression expectation.node scripts/run-vitest.mjs run --config test/vitest/vitest.cli.config.ts src/cli/nodes-cli.coverage.test.ts --reporter=verbose): ran exactly this command after the fix; 1 file passed, 20 tests passed.git diff --check origin/main...HEAD): ran after the fix; it completed with no output.Patch quality notes
GatewayClientRequestErrorwithgatewayCode === "INVALID_REQUEST"and stale requestId wording, then performs a read-only pending-list lookup for the recovery message. It is not a broad guard or fallback masking gateway failures; unrelated approval errors are rethrown through the existing command wrapper. The output avoids rawGatewayClientRequestErrorand avoids adding an extraError:prefix for the user-facing stale request message.Real behavior proof
openclaw nodes approve <stale requestId>should explain that the request id is unknown and show current pending request ids instead of surfacing raw gateway protocol text.d5fa10201c60a9fd94a1e426d6137b085855004b, withorigin/mainfetched at2ff1dfdebece970cb0fa579d2fc51e64c0bdc10c, Nodev22.22.0, and pnpm dependencies installed from the lockfile. The proof drives the real source CLI entrypoint against a local WebSocket gateway stub implementingconnect,node.pair.list, andnode.pair.approve.node.pair.list, attemptednode.pair.approvewith the stale id, then listed pending requests again to build the message.{ "scenario": "nodes approve stale requestId against gateway with current pending request", "cli": { "exitCode": 1, "stdout": "", "stderr": "nodes approve failed: Unknown node pairing requestId: stale-request\nPending requestIds: current-request\nRun openclaw nodes pending to inspect current requests." } }The full nodes CLI coverage test passed:
The targeted lint, core test typecheck, and
diff --check origin/main...HEADalso passed after this update.GatewayClientRequestError: unknown requestIdfor this stale nodes approval path. They see the stale request id, current pending request ids when available, and the command to inspect pending node pairing requests.nodes approveand the stale/unknown requestId error branch.Regression Test Plan
src/cli/nodes-cli.coverage.test.tsnodes approve stale-requestreceivesGatewayClientRequestErrorwithgatewayCode: "INVALID_REQUEST"andunknown requestId; the CLI then lists pending requests and printsUnknown node pairing requestId,Pending requestIds, andopenclaw nodes pendingwithout rawGatewayClientRequestErrortext.GatewayClientRequestErrorandnodes approve failed: Error:are absent).src/cli/nodes-cli.coverage.test.tsfile was run with the CLI Vitest shard to ensure adjacent nodes CLI coverage still passes.Merge risk
GatewayClientRequestError,INVALID_REQUEST, andunknown requestId; unrelated errors are rethrown unchanged. The proof shows the exact WebSocket command sequence and the test checks that raw protocol text is removed only for this path.Root Cause