Repository navigation
fix(ssh): a connected conversion proves the host idle with the account-wide census, not this target's lists - #25697
Merged
OrcaWin merged 4 commits intoOct 6, 2026
Conversation
Contributor
|
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Re-reviewed the delta since the prior version (4481c03 → bc2772c) on the PR that makes every exited conversion verdict require the account-wide host census.
- Removed the unread
needsHostCensusflag fromOrcadMigrationTerminalVerdict; theunverifiablereason string now states why the host could not be proven idle. - Updated the gate and host-wide gate tests to assert on that
reasoninstead of the removed flag. - Re-ran the five affected gate/connect/conversion suites — 63 tests pass.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
7 of 9 tasks
added 4 commits
October 5, 2026 17:32
…t-wide census, not this target's lists The migration terminal gate asked the host-wide census only when no relay session existed. With a session, it trusted this target's relay listing and its earlier-relay census, both of which name only this target's instances, and returned `exited` when they were empty, so another desktop's live shell on the same account, under a different target id, let the host convert under it. `exited` now always needs a complete host-wide census: this target's lists can prove `live`, but empty lists only pass the question to the census, and a gate given none answers `unverifiable` with `needsHostCensus`. The connect-time refinement passes the census too, so a connect retires its leases only when no relay on the account holds work. The Windows host lane now runs a second desktop's relay with a live shell and expects the connected gate to read the host live.
…ifiable reason says why
OrcaWin
force-pushed
the
OrcaWin/node-rt-p3-gate-host-census
branch
from
October 6, 2026 00:36
bc2772c to
4e89786
Compare
7 of 8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

ELI5
Before Orca turns an SSH host into a managed server, it checks that no terminal is still running there. When this computer was already connected to the host, Orca only asked about terminals that this computer's relays run. A terminal another computer opened on the same account went unnoticed, so the host could convert underneath it. Now every conversion asks the host about every relay on the account before deciding it is idle.
What Changed
assessOrcadMigrationTerminalsconsulted the account-wide census only when there was no relay session. With a session, an empty listing from this target's relay plus an empty earlier-relay census (both scoped to this target's id) returnedexited. Desktop B's live shell, under a different target id, was never counted.exitedonly from a complete account-wide census (hostWideVerdict):live.hostTerminalscarrying its count.unverifiablewithneedsHostCensus.relayTerminalsOnceConnected) now takes the census as well, so it retires this desktop's leases only when no relay on the account holds work.Why
The gate must not answer "exited" from evidence that can't see the whole account. The target-scoped lists can't, because their socket and pipe names are derived from this target's id. The account-wide census (POSIX socket listing, and the Windows pipe inventory from #25611) is the only evidence that covers other desktops. Requiring it for every cutover, rather than only pre-session, closes the connected path without changing how
liveis detected.Linked Issue
Fixes #
Astra review pass 4, §2.
Visual Proof
N/A: no UI change. A host where another desktop runs a shell stays on the relay as "terminals live".
Testing
orcad-migration-terminal-gate-host-wide.test.tsuses two desktop target ids, with desktop A connected and both of A's lists empty. It runs the real gate with the real census functions:live; once B is idle,exited.live; once B is idle,exited.unverifiablewithneedsHostCensus, and a census that throws givesunverifiable.Refinement: another desktop's live shell reports live and retires none of this desktop's leases.
Real Windows host lane (
orcad-windows-relay-terminal-gate-test-cell.ts): it deploys a second relay for another target id with a live shell. It expects desktop A's connected gate to read the host live, then exited after B's shell stops, and expects A's empty lists alone to be unverifiable.Existing gate, lister, conversion and delta-move fixtures now give their account-wide census explicitly.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
The census adds one host listing per connected conversion, delta move or post-session refinement, the same listing a pre-session connect already runs.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)