Repository navigation
fix(cli): validate node options before contacting the Gateway - #130352
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 4:15 PM ET / 20:15 UTC. ClawSweeper reviewWhat this changesReorders node-command option validation before Gateway node lookup, simplifies push-environment normalization, and adds regression coverage. Merge readinessNo blocking correctness findings. Current main resolves nodes through the Gateway before several pure local validators; this PR moves those validators ahead of resolution while retaining platform-dependent camera decisions afterward. Keep it open for normal maintainer handling and exact-head CI. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherThe flowchart LR
A[Operator flags] --> B[Nodes CLI command]
B --> C[Local option validation]
C --> D[Gateway node lookup]
D --> E[Node operation]
E --> F[CLI output or diagnostic]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -19, Tests +55. Total +36 across 8 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Land the command-owner ordering change after exact-head CI: validate every pure local option before Do we have a high-confidence way to reproduce the issue? Yes, from source: current main calls the resolver’s Is this the best way to solve the issue? Yes. Command-owned pure validation belongs before Gateway resolution, and this patch correctly leaves platform-dependent camera checks after the resolved node is available. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 67a9b34e91e3. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Exact-head landing verification: existing pure argument validation now runs before Gateway discovery across invoke, notify, push, location, screen, and camera. Platform-dependent camera checks remain after resolution. This removes the one-use push translator and duplicated fields: production −19 lines; tests +55. The original parser repro failed 21 cases on unwanted Latest available review comments contain no actionable ClawSweeper rank-up list. The separately reviewed camera batch change will receive combined CLI/camera proof after this lands; neither validation ordering nor platform checks may be lost during integration. |
|
Merged via squash.
|
Reject an explicitly supplied blank push environment before node lookup while preserving omitted and normalized valid environments, request shaping, and complete failed-push output. Related: #130352 Co-authored-by: Ayaan Zaidi <[email protected]>
…144687) Reject an explicitly supplied blank push environment before node lookup while preserving omitted and normalized valid environments, request shaping, and complete failed-push output. Related: openclaw#130352 Co-authored-by: Ayaan Zaidi <[email protected]>
Related: #116652
What Problem This Solves
Fixes an issue where malformed
openclaw nodesoptions contacted the Gateway before reporting their local validation error. An offline Gateway or unknown node could hide the useful error for invoke, notify, push, location, screen, and camera commands.Why This Change Was Made
Run the existing pure option validators before resolving a node. Checks requiring a node's platform still happen after lookup. The push command directly uses the canonical normalized environment value, removing a one-use wrapper and duplicated option fields. Flags, defaults, error text, mixed-case environment names, and successful APNs output are preserved.
Production LOC: +18/-37 (net -19). Tests: +85/-30 (net +55). No dependency, configuration, schema, protocol, or API changes.
User Impact
Invalid local arguments now produce the intended diagnostic without needing a reachable Gateway. Valid invocations still contact the Gateway normally.
Evidence
ebd6139f28d116e9de96081608a3eb7bc1fe9f7e.node.listcall before rejection. After: 97 owner and CLI E2E tests passed.