Repository navigation
CLI: include connected nodes in nodes list - #50871
KevinSailema wants to merge 9 commits into
Conversation
Greptile SummaryThis PR fixes a real inconsistency where All four issues raised in the previous review round have been resolved:
Minor observation (not blocking): Test coverage: Five new E2E cases cover the primary bug, old-gateway fallback, Confidence Score: 4/5
Last reviewed commit: "CLI: stabilize nodes..." |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7bf1afa3b4
ℹ️ 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: 38cd5a5f64
ℹ️ 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: f38a69b5f2
ℹ️ 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: b915c3fcaf
ℹ️ 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".
|
@greptile-apps please review the latest commits and provide an updated summary. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d9fc52f0f
ℹ️ 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".
|
@greptile-apps please review the latest commits and provide an updated summary. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 467a1b2ec7
ℹ️ 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".
| try { | ||
| nodes = parseNodeList(await callGatewayCli("node.list", opts, {})); |
There was a problem hiding this comment.
Merge pair-list rows instead of overwriting them with node.list
Nodes approved through the existing nodes approve flow can disappear from nodes list once they disconnect, because this assignment replaces the node.pair.list seed with node.list rows instead of merging them. openclaw nodes approve still calls node.pair.approve (src/cli/nodes-cli/register.pairing.ts:45-53), and the gateway backs node.pair.list with listNodePairing() while node.list reads listDevicePairing() plus live sessions (src/gateway/server-methods/nodes.ts:538 and src/gateway/server-methods/nodes.ts:655-679). Any node that exists only in the node-pairing store—especially a previously approved but currently disconnected node—was shown before this change and is now silently dropped.
Useful? React with 👍 / 👎.
| connected: false, | ||
| paired: true, |
There was a problem hiding this comment.
Don't fabricate offline state in the legacy node.list fallback
When the compatibility fallback runs, these seeded rows are hard-coded as connected: false, but node.pair.list does not carry live connectivity at all; it only stores pairing metadata like lastConnectedAtMs (src/infra/node-pairing.ts:35-46). On gateways old enough to lack node.list, the new output therefore reports Connected: 0 and emits connected: [] even if some paired nodes are actually online. Since this branch exists specifically to support older gateways, turning “unknown” into “offline” is misleading for both operators and JSON consumers.
Useful? React with 👍 / 👎.
|
Closing this as duplicate or superseded after Codex automated review. PR #50871 should close as superseded. Current main still has the underlying nodes-list/nodes-status mismatch, but the same remaining work is now tracked by the open canonical issue #46871 and the newer open PR #65772, which targets the same CLI surface with a narrower two-file change and compatibility-focused tests. This older branch is dirty and carries unrelated Signal test-harness churn plus unresolved final review feedback on the same implementation area. Best possible solution: Close #50871 as superseded, keep #46871 and #65772 as the active path, and land a narrow CLI fix that aligns 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
Describe the problem and fix in 2–5 bullets:
openclaw nodes listrelied onnode.pair.listas its primary source, so active connected nodes could be missing from the rendered list when pair data was incomplete/stale.Connected: 1innodes statusbut not see that node innodes list, causing confusing and inconsistent operational output.nodes listnow merges live state fromnode.list, includes nodes inpairedorconnectedstates, preserves existing table format, and computesPending/Pairedcounts from actual state. Added regression coverage inprogram.nodes-basic.e2e.test.ts.nodes list/nodes statusCLI surface.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
openclaw nodes listandopenclaw nodes status#50847openclaw nodes listandopenclaw nodes status#50847User-visible / Behavior Changes
openclaw nodes listnow includes nodes that are currently connected even whennode.pair.listdoes not contain them.PendingandPairedsummary counts now reflect actual runtime node states used for rendering.Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation: NoneRepro + Verification
Environment
Steps
node.pair.listhas no paired entry for an active node.openclaw nodes list.openclaw nodes statusoutput showing connected node(s).Expected
nodes listincludes nodes inpairedorconnectedstates, and summary counts match rendered states.Actual
nodes listwhilenodes statusreported it as connected.Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
pnpm test -- src/cli/program.nodes-basic.e2e.test.tsand confirmed new regression case; ran full quality gatepnpm check.--connectedand--last-connectedfilters still work with merged live/pair data; display fallback for node name/IP remains stable.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)No)Failure Recovery (if this breaks)
7bf1afa3bfrom this PR branch.register.status.tsandprogram.nodes-basic.e2e.test.tsnodes listomits connected nodes again orPaired/Pendingcounts diverge from table rows.Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.node.listandnode.pair.listcould produce unexpected label/count combinations.