Repository navigation
fix(cli): align nodes list with node status - #51053
wangji0923 wants to merge 1 commit into
Conversation
Greptile SummaryThis PR fixes a real UX inconsistency where Key findings:
Confidence Score: 3/5
Prompt To Fix All With AIThis is a comment left during a code review.
Path: src/cli/nodes-cli/register.status.ts
Line: 127-136
Comment:
**Fallback may not trigger on gateways with generic error messages**
`shouldFallbackToPairList` requires the string `"node.list"` to appear in the error message before checking for "unknown method", "not implemented", etc. Some older gateways return generic errors without including the method name (e.g. just `"unknown method"` or `"not supported"`). In those cases `message.includes("node.list")` is `false`, the function returns `false`, and `loadPairedNodesForList` re-throws — causing `nodes list` to fail entirely where it never did before (the old implementation never called `node.list` in the `list` command).
Since _we_ are the caller of `node.list`, we already know which method produced the error; the method-name guard in the message is unnecessary and makes the fallback brittle. Consider removing the `node.list` string requirement and trusting the keyword check alone:
```suggestion
function shouldFallbackToPairList(error: unknown): boolean {
const message = messageFromError(error).toLowerCase();
return (
message.includes("unknown method") ||
message.includes("method not found") ||
message.includes("not implemented") ||
message.includes("unsupported")
);
}
```
The existing test only covers the case where the error explicitly says `"unknown method: node.list"`, which masks this gap.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: src/cli/nodes-cli/register.status.ts
Line: 425-430
Comment:
**`--connected` silently returns zero results when `node.list` falls back**
Before this PR, the `list` command only called `node.list` when `hasFilters` was true (i.e. `--connected` or `--last-connected` was passed). If `node.list` was unavailable, that code path would throw a clear error.
Now `node.list` is always fetched inside `loadPairedNodesForList` and if it is unavailable, the fallback seeds every entry with `connected: false`. When the user then runs:
```
openclaw nodes list --connected
```
on a gateway that falls back to `node.pair.list`, the filter `!node.connected` drops every entry and the output quietly shows `Pending: 0 · Paired: 0` — even though paired nodes exist. The user gets no indication that connectivity data was unavailable.
Consider emitting a warning when `node.list` was unavailable but filters that require live connectivity data are in use, or document this behaviour in the `--connected` help text.
How can I resolve this? If you propose a fix, please make it concise.Last reviewed commit: "CLI: align nodes lis..." |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70e491d062
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3aa6d28c40
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2602f6807
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
7fc87c5 to
1f23308
Compare
|
Refreshed this PR onto the current This update specifically addresses the legacy-compatibility regressions called out in review:
Re-verified with focused checks:
|
|
Closing this as duplicate or superseded after Codex automated review. PR #51053 should close as superseded by open PR #65772. Current main still has the nodes list/status source-of-truth split, but #65772 is now the active canonical PR for the same CLI fix and includes the same compatibility concerns this PR addressed. Best possible solution: Close #51053 as superseded and keep #65772 as the canonical review/landing path for this CLI behavior fix, carrying forward #51053's useful fallback and JSON compatibility considerations. What I checked:
So I’m closing this here and keeping the remaining discussion on the canonical linked item. Codex Review notes: model gpt-5.5, reasoning high; reviewed against 76cf013df507. |
Summary
openclaw nodes statusreads the livenode.listview, butopenclaw nodes liststill renders paired nodes fromnode.pair.list, so gateways using the newer device-pairing path can show a connected node instatuswhilelistreportsPaired: 0.nodes listas the paired-node inventory, so the mismatch hides healthy paired nodes.nodes listnow keepsnode.pair.listfor pending requests, but it builds the paired-node table fromnode.listfirst and only falls back to legacynode.pair.listdata whennode.listis unavailable.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
openclaw nodes listandopenclaw nodes status#50847User-visible / Behavior Changes
openclaw nodes listnow shows the same paired/connected node inventory asopenclaw nodes statuson gateways that already expose nodes throughnode.list.openclaw nodes listwhen no filters are applied.node.liststill fall back to the legacynode.pair.listview.Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation:Repro + Verification
Environment
Steps
node.listreports it as paired/connected.openclaw nodes statusand confirm the node appears.openclaw nodes list.Expected
Actual
nodes statusshows the node, whilenodes listcan reportPending: 0 · Paired: 0because it only reads the legacynode.pair.listsource.Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
node.listand an emptynode.pair.list, then confirmednodes listnow reports the paired node; also verified the legacy fallback path whennode.listis unavailable.--connectedfiltering still works against live node connectivity; pending pairing rows remain visible when no filters are applied.Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoFailure Recovery (if this breaks)
node.pair.list-only behavior innodes list.src/cli/nodes-cli/register.status.tsnodes listomits paired nodes on older gateways that should still fall back tonode.pair.list.Risks and Mitigations
node.listrows withoutpaired: true, which could still hide a legacy paired entry.node.pair.listmetadata and treats matching live rows as paired when a legacy paired entry already exists.