Repository navigation
Conversation
📝 WalkthroughWalkthroughThe CLI host listing now includes local, registered SSH, and paired hosts. SSH rows can include connection state and remote platform data. Paired rows use bounded runtime probes with legacy platform fallback, sanitized errors, and stable selectors. The listing preserves rows when probes or SSH inventory fail and reports warnings for incomplete SSH inventory. Formatting displays probe metadata and warnings. RPC socket termination and test-server controls were updated to validate timeout cleanup. CLI documentation and command notes describe the new behavior. Merge Risk: 🔵 Low · up to The test server cannot currently emit explicitly configured null or missing result payloads, limiting coverage of malformed runtime responses. This is bounded to test infrastructure but should be corrected. 🚥 Pre-merge checks | ✅ 1 | ❌ 4❌ Failed checks (4 warnings)
✅ Passed checks (1 passed)
Full details: Linked Issues checkExplanation The linked issue [ Full details: Docstring CoverageExplanation Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 16 files. (2 skipped: 2 unsupported.) Full details: Description checkExplanation The description gives a detailed explanation of the implementation, behavior, limitations, and verification. However, it does not follow the repository template: the required ELI5, Why, Linked Issue with a Fixes reference, Visual Proof or exact N/A statement, Testing, Review, Agent skill upstream boundary, Notes, and Checklist sections are missing or renamed. Resolution Add the missing template sections and include the required linked issue in the form
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 69c14980-eb21-4df0-ba6d-b1da0939210f
📒 Files selected for processing (10)
docs/site/content/docs/cli/reference.mdxsrc/cli/format.tssrc/cli/handlers/environment.tssrc/cli/host-selector-alternatives.test.tssrc/cli/host-selector-alternatives.tssrc/cli/index-local-command-routing-flags.test.tssrc/cli/specs/environment.tssrc/main/runtime/rpc/methods/ssh.test.tssrc/main/runtime/rpc/methods/ssh.tssrc/shared/ssh-types.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.
There was a problem hiding this comment.
ℹ️ No blocking issues — one consistency nit inline and a few rough edges below.
Reviewed changes
- Paired-server metadata — each paired environment is probed live via
status.getand reported withplatform,connected, andconnectionStatus; any probe failure renders the rowdisconnectedwithout exposing pairing credentials or endpoints. - SSH target metadata —
ssh.listTargetSummariesand the legacyssh.listTargetsnow carryconnected,connectionStatus, andremotePlatform, with a CLI-sidessh.getStateenrichment fallback for hosts that only servessh.listTargets. - Formatting, types, docs —
HostListEntry/formatHostConnectiongain the new columns, the sharedSshTargetSummarytype is extended, and the CLI reference and command specs are updated.
ℹ️ Nitpicks
src/cli/host-selector-alternatives.ts:8redefinesSshTargetSummarywithconnectionStatus?: stringwhilesrc/shared/ssh-types.tstypes the field asSshConnectionStatus; the CLI copy is a looser duplicate that can drift from the shared contract.connectionStatusinhost list --jsonmixes two vocabularies —SshConnectionStatus(auth-failed,deploying-relay, …) for SSH rows vsRuntimeHostConnectionState(runtime-unavailable,workspace-window-closed, …) for paired-server rows. Scripts reading that field must handle both.host listused to be a purely local read; it now makes onestatus.getround-trip per paired server (5 s timeout,Promise.all-bounded). Offline servers add up to ~5 s latency to a previously instant command — a user-visible behavior change worth a release note.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes (delta since the prior review at e8505cd)
- Paired-server probing — extracted into
paired-host-inventory.tswith a four-connection concurrency cap and a five-second total scan budget viaAbortController, removing the unboundedPromise.alllatency the prior review flagged. - SSH inventory fanout — legacy
ssh.getStateenrichment is nowmapWithConcurrency-bounded with a shared deadline;host listsurfaces an incomplete-inventory warning instead of silently dropping SSH targets when the runtime is unavailable. - Probe socket teardown — failed or aborted one-shot sockets
terminate()rather thanclose(), so a half-open peer cannot keep a socket lingering past the deadline. - Conditional
connected—ssh.tsnow omitsconnectedwhen no registered state exists, addressing the prior inline comment. - Type + docs — re-exported the shared
SshTargetSummaryinstead of a looser local duplicate, and documented the probe semantics ([probe]/connectionSource/probeError) in the CLI reference and skill guide.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes (delta since the prior review at 3af78e2)
- Host connectivity text coverage — added
host-list-format.test.ts, which pins theformatHostListconnection labels (connected/not connected (…)/connection unknown) and asserts the redundantconnected (connected)text stays gone. - Shared SSH contract reuse — dropped the local
SshTargetSummaryduplicate inhost-selector-alternatives.tsand re-exported the shared type, narrowingssh.getState's enrichmentstatus/remotePlatformtoSshTargetSummary['connectionStatus']/['remotePlatform']. This fully resolves the priorconnectionStatus?: stringdrift nitpick.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes (delta since the prior pullfrog review at 52f154b)
- Malformed-status guard —
paired-host-inventory.tsnow rejectsstatus.getresults that are falsy, non-object, or arrays (status_unavailableinstead of a falseconnected: true), so a malformed payload can no longer masquerade as a verified probe. - Regression coverage — added an
it.each([null, undefined, 42, 'not a status', []])case pinning the guard, plus a keepalive-only wire test proving the 5 s whole-scan deadline still holds while a peer sends keepalives. - Test-server support —
remote-runtime-shared-control-test-server.tsgainedresultsandactiveConnectionCountto back the new wire cases. - Guide regeneration — combined CLI guides were regenerated from the
mainmerge; no PR-specific content change.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 4fa5bd9f-ae43-4321-b088-ac38f8c65959
📒 Files selected for processing (18)
docs/site/content/docs/cli/reference.mdxskill-guides/orca-cli.mdsrc/cli/bundled-skill-guides.tssrc/cli/format.tssrc/cli/handlers/environment.tssrc/cli/handlers/paired-host-inventory-wire.test.tssrc/cli/handlers/paired-host-inventory.test.tssrc/cli/handlers/paired-host-inventory.tssrc/cli/host-list-format.test.tssrc/cli/host-selector-alternatives.test.tssrc/cli/host-selector-alternatives.tssrc/cli/index-local-command-routing-flags.test.tssrc/cli/specs/environment.tssrc/main/runtime/rpc/methods/ssh.test.tssrc/main/runtime/rpc/methods/ssh.tssrc/shared/remote-runtime-client.test.tssrc/shared/remote-runtime-request-socket.tssrc/shared/remote-runtime-shared-control-test-server.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- src/main/runtime/rpc/methods/ssh.test.ts
- src/main/runtime/rpc/methods/ssh.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.
| const result = streaming | ||
| ? { type: 'ready', subscriptionId: `${request.method}:subscription` } | ||
| : { method: request.method } | ||
| : (options.results?.[request.method] ?? { method: request.method }) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Preserve explicit null and undefined fixture results.
Line 180 treats a configured null or undefined result as an absent entry. The server then returns the default result. This prevents wire tests from producing malformed missing or null result payloads through results.
Proposed fix
- : (options.results?.[request.method] ?? { method: request.method })
+ : (Object.hasOwn(options.results ?? {}, request.method)
+ ? options.results![request.method]
+ : { method: request.method })📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| : (options.results?.[request.method] ?? { method: request.method }) | |
| : (Object.hasOwn(options.results ?? {}, request.method) | |
| ? options.results![request.method] | |
| : { method: request.method }) |

What this does
orca host listis the "what can I target, and what do I type" command. Before this PR it answered that well for SSH targets but barely at all for paired Orca servers — they showed up as a bare name with no platform and no connectivity:Now paired servers report the same two facts SSH targets do — what OS they run and whether they answer right now:
Follow-up to merged #18896, which added the SSH half of this. That PR is also corrected here (see Fixes to #18896 below).
How paired servers are queried
status.get→hostPlatformfield, falling back to the olderhost.platformRPC. No new wire fields, so no server update is needed and mixed-version pairs keep working. If neither answers, the row saysplatform unknown— it is never guessed from the name.[probe]in text,connectionSource: "probe"in JSON. A successfulstatus.getmeansconnected: true.connectionStatus: "unknown"with a sanitizedprobeError(runtime_timeout/status_unavailable/probe_failed). It never reportsnot connected, and it never emits remote error text, addresses, or credentials. Per the SSH execution boundary, silence from a host is not evidence that the host or its processes are gone.connected: truewithprobeError: "status_rejected". That tells you to re-pair rather than go debug the network.Cost and side effects
Listing is read-only and bounded. At most 4 concurrent probes and a 5s total budget for the whole paired-server scan (legacy platform fallbacks included). The deadline aborts in-flight requests and skips queued ones. Saved pairing metadata and last-used ordering are untouched.
If you want a listing with no network traffic at all,
orca environment liststill does that.Fixes to #18896
listSshTargetsfanned out onessh.getStateper target on every call with an unboundedPromise.all— including selector-resolution calls that only need names to build an error message. The fan-out is now inventory-only, capped at 4, and budget-bounded.[], which is indistinguishable from "this machine has no SSH targets". It now prints an explicit incomplete-list warning.connected (connected)text; the lifecycle detail only prints when it adds information.terminate()instead ofclose(), so a half-open peer can't hold the socket open through a close handshake.Review round: three things this PR got wrong
Caught in review of an earlier head and fixed in
a3493c61aa3.SSH
connectedmust stay authoritative. An earlier revision madessh.listTargetSummariesomitconnectedwhen a target had no live connection object, on the theory that absence of state means "we don't know". It doesn't. Whether this app holds an SSH connection is a local fact the app knows for certain — thelive/unverifiable/exitedvocabulary governs remote process state, not our own socket table. SincegetPublicSshStatereturnsundefinedfor every target that hasn't connected in this session, the effect was that a fresh app launch or an~/.ssh/configimport made every SSH target printconnection unknown. Reverted toconnected: state?.status === 'connected'.That also caused a silent fan-out. The
target.connected !== undefinedshort-circuit inlistSshTargetswas keyed on that field always being present. With it omitted, every idle target got anssh.getStateround-trip that returns{state: null}and merges nothing — 40 imported ssh-config hosts meant 40 guaranteed-useless RPCs against the shared budget. Fixed by the revert above; pinned by a test.The enumeration call shouldn't share the fan-out budget. It was capped at 5s, down from the 60s client default, and on failure the inventory path rethrows into an "SSH inventory unavailable" warning. So one briefly busy main process — cold start, large git operation — replaced the entire SSH inventory with a warning, all-or-nothing, where before it simply waited. The enumeration call now keeps the default timeout; only the per-target fan-out, which is the actually-unbounded part, is charged against the 5s budget.
Also:
host listhelp said--environment <name>whilehost listoutput printed--environment <id>. Help now matches. (omitted-host-scope-selectors.tsstill emits the name form for a different command's scope line — pre-existing, both forms resolve, left alone.)Files
New
src/cli/handlers/paired-host-inventory.tsholds the probe logic, with colocated unit and encrypted-wire tests. Everything else reuses existing pieces: the shared SSH contract types,mapWithConcurrency, and the existing remote-runtime transport. CLI help,docs/site/.../cli/reference.mdx, the bundled agent guide and its generated artifact are updated.Verification
Rebuilt CLI run against real saved hosts, no server state modified:
Full
src/clisuite plus the transport and SSH-RPC tests: 1259 tests, 128 files, all passing. Deterministic 100-host tests pin the concurrency cap and deadline behavior; authenticated WebSocket tests cover old-server fallback, mid-flight drop, keepalive-cannot-extend-the-deadline, and socket release. New regression tests cover the three review fixes: no-live-state reportsconnected: false, idle targets are not re-queried, the enumeration call is not passed a shrunken timeout, and a refusal reports proven contact. CLI + node typechecks, changed-code quality, and guide/manifest verification pass.Not verified: no physical Wi-Fi/sleep/SSH-disconnect chaos testing and no mobile-device run — network failure coverage is controlled WebSocket fixtures, not a real outage. No Electron UI changed.
Note on semantics: paired
connected: truemeans this CLI reached the server. It does not mean the desktop app holds a persistent link, nor that everything on that host is healthy. SSHconnectedis a different and stronger claim: the app knows whether it holds that connection.