Skip to content

feat(terminal): report execution host and listing scope in terminal list - #14973

Merged
brennanb2025 merged 10 commits into
mainfrom
brennanb2025/terminal-list-host-scope-2
Aug 17, 2026
Merged

brennanb2025 merged 10 commits into
mainfrom
brennanb2025/terminal-list-host-scope-2

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​473 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​473
Prod 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​167 $\color{#cf222e}{\Huge{\mathbf{−}}}$​47 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​120

Problem

orca terminal list did not identify where each terminal executes or state which execution hosts the result covered. A partial listing could therefore be mistaken for proof that a remote worker had exited.

The fixed liveness vocabulary is live / unverifiable / exited. Failure to query an execution host remains unverifiable; it is never evidence of either neighboring state.

Invariant

terminal-list.execution-host-scope: every row names its execution host when that identity is verifiable, and every listing distinguishes hosts that answered from known hosts that were not covered. An absent row is evidence of exited only within a positively covered host inventory.

  • Failure source: a live SSH worker was previously reported as exited after a partial listing.
  • Oracle: row-level executionHostId, result-level hostScope, and focused tests covering local, SSH, paired-runtime, folder-workspace, malformed-owner, unavailable-provider, and scoped-list behavior.
  • Performance budget: global provider inventory remains diagnostic-only; exact-host paths stay targeted, and floating-terminal hydration does not scan configured repo/folder providers.
  • Diagnostics: JSON and human output expose exact covered and omitted host IDs.

What changed

  • Added optional RuntimeTerminalSummary.executionHostId and RuntimeTerminalListResult.hostScope fields.
  • Derived SSH and paired-runtime ownership from encoded PTY IDs, with worktree fallback only for host-less local IDs.
  • Failed closed for malformed, blank, whitespace, or owner-less foreign PTY IDs instead of labeling them local.
  • Counted only providers that answered the current inventory as covered; disconnected SSH hosts and paired runtimes remain omitted.
  • Included SSH folder workspaces and explicit paired-runtime folder owners, even when stale SSH metadata is also present.
  • Kept mirrored paired-runtime rows from implying complete peer-runtime inventory.
  • Updated human output to use host=unverifiable, scope: unverifiable, and No terminals listed.
term_remote  worker  connected  host=ssh:box-1  /remote/repo
preview: ...

scope: ssh:box-1 — not covered: local

Wire compatibility

Both fields are optional additions to an existing RPC response. Older hosts omit them and new clients render the scope as unverifiable; older clients ignore the extra fields. No existing field, stream opcode, or persisted mobile state changed.

Testing

  • 18/18 execution-host and host-scope tests passed after the final paired-runtime folder fix.
  • 22/22 focused CLI, RPC, SSH bridge, and renderer tests passed.
  • A broader run passed 1,207 tests and exposed only the paired-runtime folder regression subsequently fixed and re-run above.
  • Node, CLI, and web TypeScript checks passed.
  • Touched-file oxlint and max-lines ratchet passed; no suppression was added.
  • CLI and relay builds passed.
  • PR CI completed: 47 successful checks, 4 intentionally skipped, 0 failures.
  • Disposable Ubuntu 22.04 SSH target used Node 20.20.2 and Git 2.34.1. When that target was disconnected/contended, it appeared in omittedHostIds, never as exited; the remote repo and worktree remained clean.

Visual proof

Exact-head Electron QA is unverified. The Grok worker pinned to ec3d5ea28a never accepted its prompt after three delivery methods, so no Electron action or screenshot was produced for the reviewed head.

Earlier Electron evidence is explicitly pre-fix and is not evidence for ec3d5ea28a. It observed live local/SSH CLI rows and a scoped empty listing, but the in-app command resolved to the installed old client and the app GPU-crashed before a second capture. The in-app new-format path and a live old-host unverifiable-scope case remain unverified.

Compatibility checklist

  • Additive remote wire fields only.
  • SSH and folder-workspace ownership considered.
  • Paired-runtime mixed-version behavior considered.
  • Git provider-neutral; no provider API behavior changed.
  • No mobile-facing persisted state or protocol migration.
  • Windows/WSL Electron smoke was not run; no platform-specific path, shell, keyboard, or native-module behavior changed.

Review

Same-model adversarial review repeated until clean, followed by a fresh end readiness review. Final result: no P0/P1/P2 findings at ec3d5ea28a.

No linked issue. No merge performed. AI-assisted review and implementation. Author: @BrennanKB5.

@coderabbitai

coderabbitai Bot commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Terminal listings now include execution-host identifiers and host-scope metadata. Shared utilities encode and parse remote PTY identifiers and resolve PTY ownership. Runtime services discover known hosts, attach host identity to terminal summaries, and report covered or omitted hosts. RPC forwarding and CLI output preserve and display this metadata. Tests cover local, SSH, paired, remote, empty, filtered, JSON, and human-readable listings.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 15.38% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Linked Issues check ⚠️ Warning The description explicitly states that no issue is linked, although the repository template requires one. Add a valid linked issue reference in the Fixes # section.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: reporting execution hosts and listing scope in terminal lists.
Description check ✅ Passed The description is detailed and covers the change, rationale, compatibility, testing, review, and platform limitations, but it lacks a linked issue.
Out of Scope Changes check ✅ Passed The changes are focused on terminal execution-host identity, listing scope, formatting, shared parsing, and related tests.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3161401d-d937-4d25-b25f-af39a587f809

📥 Commits

Reviewing files that changed from the base of the PR and between 17ef6cc and b4bf53c.

📒 Files selected for processing (11)
  • src/cli/index-terminal-list-host-scope.test.ts
  • src/cli/terminal-format.ts
  • src/cli/terminal-list-host-scope-format.test.ts
  • src/main/runtime/orca-runtime.ts
  • src/main/runtime/rpc/terminal-list-host-scope-transport.test.ts
  • src/main/runtime/terminal-list-execution-host-scope.test.ts
  • src/main/ssh/ssh-remote-cli-terminal-host-scope.test.ts
  • src/renderer/src/runtime/runtime-terminal-stream.ts
  • src/shared/remote-runtime-pty-id.ts
  • src/shared/runtime-types.ts
  • src/shared/terminal-execution-host.ts

Included review availability: Your plan includes up to 10 reviews per rolling hour; 4 remain after this review.

Comment on lines +11 to +16
export function toRemoteRuntimePtyId(handle: string, environmentId?: string | null): string {
const owner = environmentId?.trim()
if (!owner) {
return `${REMOTE_PTY_ID_PREFIX}${handle}`
}
return `${REMOTE_PTY_ID_PREFIX}${encodeURIComponent(owner)}${REMOTE_PTY_OWNER_SEPARATOR}${encodeURIComponent(handle)}`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Preserve legacy handles that contain @@.

Line 14 emits ownerless handles without escaping. Lines 24-31 then interpret any @@ in a legacy handle as an owner separator. For example, toRemoteRuntimePtyId('a@@b') cannot round-trip.

Use an unambiguous, validated discriminator for owner-bearing IDs. Preserve all existing ownerless remote:${handle} values as ownerless IDs. Add a regression test for an ownerless handle containing @@.

`orca terminal list` returned rows with no host identity and no statement
of what the listing covered, so a scoped listing that saw nothing read as
"nothing exists anywhere" — an agent reported a live remote worker dead.

Each row now carries an optional `executionHostId` derived from the PTY id
(SSH and paired-runtime ids embed their owner), and the result carries an
optional `hostScope` naming the hosts covered and the known hosts skipped.
Both are surfaced in `--json` and in the human-readable CLI output, where
an absent field renders as `unknown` rather than `local`.

Both row builders route through one resolver, so the rule lives in one place.
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Electron QA evidence — terminal list host + listing scope

QA only. Did not review code, change product code, or merge.

What I ran

  • Launched the PR worktree (brennanb2025/terminal-list-host-scope-2, identity Orca: brennanb2025/terminal-list-host-scope-2) with an isolated ORCA_DEV_USER_DATA_PATH and Playwright over CDP.
  • Built relay, then connected a throwaway Linux Docker SSH target (orca-e2e-ssh-relay, mapped port 56342) and registered /work/demo-project as a remote repo.
  • Created live terminals on both the local repo (/private/tmp/orca-qa-14973-local-repo) and the SSH repo.
  • Created a second local worktree (empty-scope) with no terminals for the scoped empty listing.
  • Exercised the PR-branch CLI (out/bin/orca-dev, same user-data profile) against that live instance, and also typed orca terminal list inside the app's visible local terminal.

1. Non-local row with host populated — observed

PR CLI unscoped listing against the live app (two connected terminals):

term_5a699b02-1b58-428e-a31d-09d6dfdcac73  Terminal 1  connected  host=local  /private/tmp/orca-qa-14973-local-repo
preview: brennanbenson /private/tmp/orca-qa-14973-local-repo [main] $

term_3929bb86-b12e-4caf-a94c-b4797b169afe  Terminal 1  connected  host=ssh:ssh-1786931460055-6xy5un  /work/demo-project
preview: root@492eacfe34dd:/work/demo-project#

scope: local, ssh:ssh-1786931460055-6xy5un

--json matched: executionHostId was local / ssh:ssh-1786931460055-6xy5un, hostScope.hostIds was both hosts, omittedHostIds was [].

The SSH PTY id was ssh:ssh-1786931460055-6xy5un@@pty-1 (not guessed from the path).

2. Empty / scoped case — the defect under test — observed

orca-dev terminal list --worktree /Users/brennanbenson/orca/workspaces/orca-qa-14973-local-repo/empty-scope:

No live terminals.
scope: local — not covered: ssh:ssh-1786931460055-6xy5un

--json: terminals: [], hostScope.hostIds: ["local"], hostScope.omittedHostIds: ["ssh:ssh-1786931460055-6xy5un"].

This is not a bare No live terminals. The omitted SSH host is named. That is the src/cli/terminal-format.ts:20 contract.

3. host=local for unknown — not observed (pass)

  • Local row: host=local and it was local.
  • SSH row: host=ssh:ssh-1786931460055-6xy5un, never local.
  • No host=unknown appeared in this run because both rows had a known host. I did not exercise the old-host / owner-less remote: PTY path live (that remains unit-covered).

Screenshot (full app window)

The visible pane is the installed orca on PATH inside the local terminal (old client). It lists both the local and SSH terminals but does not print host= / scope: — expected old-client behavior (Rule 3: extra keys ignored). The sidebar shows both hosts: local orca-qa-14973-local-repo and QA 14973 SSH demo (1 remote host in the status bar).

01-after-type-list.png

Gaps (do not treat as a clean in-pane visual of the new format)

  • I could not get a second screenshot of orca-dev terminal list inside the Electron terminal. The first orca invocation hit the production CLI; the app then GPU-crashed (GPU process exited unexpectedly: exit_code=15) and a relaunch hung CDP/runtime before I could type the PR wrapper.
  • The new human format was observed from the PR CLI against that same live instance, not from a second in-pane capture.
  • Old-host scope: unknown / host=unknown was not exercised against a real mixed-version host in this session.

Verdict

Runtime + PR CLI behavior on a live local+SSH inventory matches the intended contract. The empty scoped listing is self-describing. In-app visual of the new format string is incomplete because PATH resolved to the installed CLI and the QA Electron instance crashed before retry.

@brennanb2025
brennanb2025 force-pushed the brennanb2025/terminal-list-host-scope-2 branch from b4bf53c to ec3d5ea Compare August 17, 2026 02:49

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/main/runtime/terminal-list-execution-host-scope.test.ts (1)

8-10: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Shorten or remove this narrative comment.

Replace it with one concise rationale. The suite name and test cases already define the behavior.

Proposed change
-// An agent once declared a task exited because `terminal list` came back without
-// its worker: the worker was live on an SSH host, and nothing in the response
-// said the listing was scoped or which host each row ran on.
+// Preserve execution-host identity and listing scope for remote terminals.

As per coding guidelines, “Comments must be concise, non-obvious, and brief—prefer one line.”

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8e2b28e4-7ceb-43b2-9bc6-58100141d1d4

📥 Commits

Reviewing files that changed from the base of the PR and between b4bf53c and ec3d5ea.

📒 Files selected for processing (8)
  • src/cli/index-terminal-list-host-scope.test.ts
  • src/cli/terminal-format.ts
  • src/cli/terminal-list-host-scope-format.test.ts
  • src/main/ipc/pty.ts
  • src/main/runtime/orca-runtime.ts
  • src/main/runtime/terminal-list-execution-host-scope.test.ts
  • src/shared/runtime-types.ts
  • src/shared/terminal-execution-host.ts
🚧 Files skipped from review as they are similar to previous changes (5)
  • src/shared/terminal-execution-host.ts
  • src/cli/terminal-format.ts
  • src/cli/terminal-list-host-scope-format.test.ts
  • src/cli/index-terminal-list-host-scope.test.ts
  • src/shared/runtime-types.ts

Included review availability: Your plan includes up to 10 reviews per rolling hour; 5 remain after this review.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Electron QA — PR #14973 @ ec3d5ea — UNVERIFIED

QA only. Did not review code, change product code, or merge.

Pin

  • Requested SHA: ec3d5ea28a
  • Tested SHA: ec3d5ea28aae2909190851002c01171854a2709e
  • git rev-parse HEAD after explicit checkout: ec3d5ea28aae2909190851002c01171854a2709e
  • Branch tip at run time: same SHA (origin/brennanb2025/terminal-list-host-scope-2 had not moved past the pin)
  • Worktree: /Users/brennanbenson/orca/workspaces/orca/qa2-grok-14973 (detached HEAD)

Binary used

I did not use /Users/brennanbenson/.local/bin/orca (installed old client).

Built from ec3d5ea28a in this worktree:

  • pnpm run build:cli → out/cli/index.js (sha1 cc6ac40cd60865d29d609a3382edb215b66860df)
  • out/cli/terminal-format.js (sha1 61c86c326f1a791715ef4d9b5f515a39e5d708bf)
  • Host wrapper: out/bin/orca-dev → node out/cli/index.js with ORCA_USER_DATA_PATH=/tmp/orca-qa2-14973-profile.Vv6ZYI
  • In-app wrapper written by the electron-vite runner: /tmp/orca-qa2-14973-profile.Vv6ZYI/cli/bin/orca (sha1 d5f44e42e9579e1263017eb1c3f43d2471d87f42), which runs this SHA's out/cli/index.js via ELECTRON_RUN_AS_NODE=1 on the instance bundle Orca: qa2-14973-ec3d5ea28a.app

How I confirmed the running app was this SHA's build:

{"name":"Orca: qa2-14973-ec3d5ea28a","isDev":true,"devLabel":"qa2-grok-14973 @ ec3d5ea28a","devBranch":"brennanb2025/terminal-list-host-scope-2","devWorktreeName":"qa2-grok-14973","devRepoRoot":"/Users/brennanbenson/orca/workspaces/orca/qa2-grok-14973","dockBadgeLabel":null}

CDP port 9333, renderer http://127.0.0.1:5176/, isolated ORCA_DEV_USER_DATA_PATH=/tmp/orca-qa2-14973-profile.Vv6ZYI, Electron PID 46552.

Compiled formatter on this SHA (not live output):

  • empty listing: No terminals listed.\n${scope} — not No live terminals.
  • missing host id: host=${executionHostId ?? 'unverifiable'} — not unknown, and not local
  • missing scope: scope: unverifiable — this host does not report which hosts it lists

What I saw live

  1. Fresh profile, store ready, repoCount: 0.
  2. Added local repo /private/tmp/orca-qa2-14973-local-repo → repo id 0dc8c653-4168-45fc-b357-3229d518b1af, executionHostId: "local", one worktree.
  3. Started throwaway Docker SSH orca-qa2-14973-1786935812 on 127.0.0.1:56720 (image orca-e2e-ssh-relay:3a864c665ba2cefd) with /work/demo-project.
  4. window.api.ssh.addTarget + connect began. Main log: platform linux-arm64, relay uploaded, native deps installed, Relay started successfully.
  5. Then the instance wedged:
    • CDP GET /json timed out with 0 bytes
    • Playwright attach could not retrieve the websocket URL
    • out/bin/orca-dev status --json still reported app.running=true / runtime.state=starting / runtime.reachable=false
    • Electron log stopped after the relay-started line
    • A long renderer evaluate for SSH connect plus other default-session playwright-cli eval pollers on this machine contended for the same CDP port

One Electron instance only. Did not relaunch after the hang (previous QA GPU-crashed on relaunch; load was still high).

Legs

Required evidence Result
1. Terminal list with local + host=ssh:... UNVERIFIED — no listing observed
2. Empty/scoped listing names omitted hosts (not a bare No live terminals.) UNVERIFIED — never reached a list call against a live runtime
3. In-app orca terminal list from this SHA's binary UNVERIFIED — CDP died before I could type in a pane
4. host=local when host is not known to be local Not observed (no listing). Not a pass.

orca-dev terminal list was started against the live PID but blocked because the desktop runtime never left starting.

Not claimed

No pass. No screenshot of the new format. No PR image upload, because there was no captured listing to attach.

Hung instance left running: Electron PID 46552 (CDP 9333), Docker orca-qa2-14973-1786935812.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Electron QA retry — PR #14973 @ ec3d5ea — UNVERIFIED (partial)

QA only. Did not review code, change product code, or merge.

Pin

  • Requested / tested SHA: ec3d5ea28aae2909190851002c01171854a2709e
  • git rev-parse HEAD before capture: that SHA
  • Branch tip had not moved past the pin
  • Worktree: /Users/brennanbenson/orca/workspaces/orca/qa2-grok-14973

Binary used

Not ~/.local/bin/orca (installed old client).

Built and launched from ec3d5ea28a:

  • pnpm run build:cli → out/cli/index.js (this SHA)
  • Host invocation that produced the listing below:
    ORCA_DEV_USER_DATA_PATH=/tmp/orca-qa2-14973-profile2.1ppqDP config/scripts/orca-dev.mjs terminal list
    which runs node out/cli/index.js from this worktree
  • In-app wrapper prepared by the electron-vite runner:
    /tmp/orca-qa2-14973-profile2.1ppqDP/cli/bin/orca → same out/cli/index.js

Confirmed running app identity via Playwright CDP before the hang:

{"name":"Orca: qa2-14973-ec3d5ea28a","isDev":true,"devLabel":"qa2-grok-14973 @ ec3d5ea28a","devBranch":"brennanb2025/terminal-list-host-scope-2","devWorktreeName":"qa2-grok-14973","devRepoRoot":"/Users/brennanbenson/orca/workspaces/orca/qa2-grok-14973"}

Electron PID 52834, CDP 9333, renderer http://127.0.0.1:5176/. Isolated profile /tmp/orca-qa2-14973-profile2.1ppqDP.

Compiled formatter on this SHA (source of the built CLI, not a live mixed-version host):

  • empty: No terminals listed. + scope — not No live terminals.
  • missing host: host=unverifiable — not unknown, and not local

What I observed live

CLI listing against this instance, after adding a local repo and creating one terminal:

term_3259bc15-02be-401d-a8df-b33d5a7481e7  Terminal 1  connected  host=local  /private/tmp/orca-qa2-14973-local-repo
preview: brennanbenson /private/tmp/orca-qa2-14973-local-repo [main] $

scope: local

--json: executionHostId: "local", hostScope.hostIds: ["local"], omittedHostIds: [].

That local row was local. I did not see host=local on an unknown host.

The in-app pane showed Terminal 1 on orca-qa2-14973-local-repo (Playwright snapshot, one hidden discovered worktree). I did not get a screenshot of typed orca terminal list in that pane.

SSH target ssh-1786937087917-b7v4uh (QA2 14973 SSH demo, 127.0.0.1:56720) was added. Relay log: already installed, Relay started successfully. Then the same instance wedged: CDP /json returned 0 bytes, screenshot timed out, orca-dev status went back to runtime.state=starting / reachable=false. One instance only after that; no third launch.

Legs

Required Result
1. List with host=local and host=ssh:... Partial. host=local observed via this SHA's CLI. host=ssh:... not observed — connect hung the instance before addRemote / SSH terminal.
2. Empty / scoped listing names omitted hosts UNVERIFIED. Hidden discovered worktree existed (empty-scope) but I never listed it before the hang.
3. In-app orca terminal list from this SHA's binary UNVERIFIED. Wrapper exists and points at out/cli/index.js; I never typed it in the pane.
4. host=local when host is not known to be local Not observed. Not a pass.

No screenshot upload: Playwright screenshot timed out after CDP died. Do not treat the CLI text as an in-app visual of the new format.

Hung instance left running: Electron PID 52834 (CDP 9333), Docker orca-qa2-14973-1786935812.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Electron QA — PR #14973 @ ec3d5ea

QA only. Did not review code, change product code, or merge.

Pin

  • Tested SHA: ec3d5ea28aae2909190851002c01171854a2709e
  • git rev-parse HEAD before and after capture: that SHA
  • Branch tip had not moved past the pin

Binary used

Not ~/.local/bin/orca (that is first on PATH and is the installed old client).

In the app’s local terminal I invoked:

/tmp/orca-qa2-14973-profile2.1ppqDP/cli/bin/orca

Confirmed in-pane:

  • which -a orca listed ~/.local/bin/orca first, then this wrapper
  • wrapper head is ORCA_USER_DATA_PATH=/tmp/orca-qa2-14973-profile2.1ppqDP and exec node .../qa2-grok-14973/out/cli/index.js
  • App identity via CDP: {"name":"Orca: qa2-14973-ec3d5ea28a","isDev":true,"devLabel":"qa2-grok-14973 @ ec3d5ea28a","devBranch":"brennanb2025/terminal-list-host-scope-2","devRepoRoot":"/Users/brennanbenson/orca/workspaces/orca/qa2-grok-14973"}

Same CLI used from the host: ORCA_DEV_USER_DATA_PATH=/tmp/orca-qa2-14973-profile2.1ppqDP config/scripts/orca-dev.mjs → that out/cli/index.js.

1. Local + SSH hosts — observed

In-app orca terminal list (wrapper above) and host CLI both printed:

term_3259bc15-02be-401d-a8df-b33d5a7481e7  Terminal 1  connected  host=local  /private/tmp/orca-qa2-14973-local-repo
term_ed4a8d95-741f-49cf-b5a5-961aa8480b98  Terminal 1  connected  host=ssh:ssh-1786937087917-b7v4uh  /work/demo-project
scope: local, ssh:ssh-1786937087917-b7v4uh

--json: executionHostId local / ssh:ssh-1786937087917-b7v4uh, omittedHostIds: [].

01-inapp-terminal-list.png

2. Empty / scoped — observed

--worktree /private/tmp/orca-qa2-14973-empty-scope (no terminals; SSH host omitted):

No terminals listed.
scope: local — not covered: ssh:ssh-1786937087917-b7v4uh

Not a bare No live terminals. Scoped local-only list also printed scope: local — not covered: ssh:ssh-1786937087917-b7v4uh.

02-inapp-empty-scoped.png

3. In-app path — observed

See screenshots. Command was the profile wrapper → out/cli/index.js built from ec3d5ea28a, not PATH orca.

4. host=local for unknown — not observed (not a failure)

  • Local row: host=local and it was local
  • SSH row: host=ssh:ssh-1786937087917-b7v4uh, never local
  • Absent-host unverifiable / unknown was not exercised against a mixed-version host (unit-covered). This SHA’s formatter uses unverifiable, not unknown.

Verdict

Live local+SSH inventory, empty scoped listing, and in-app invocation of this SHA’s CLI all match the intended contract on ec3d5ea28a.

@brennanb2025
brennanb2025 merged commit 8ca4ed9 into main Aug 17, 2026
51 checks passed
brennanb2025 added a commit that referenced this pull request Aug 17, 2026
The Known gaps section was accurate when written and becomes actively
misleading as its fixes land: it told a reader to go fix restoreRequired,
the missing unverifiable verdict, and the absent terminal-list host field,
three things now addressed by #14974, #14977 and #14973.

Mark the section as dated, require verification against current code before
acting on any entry, name the PR per entry, and move landed items out. Also
correct the two body claims that the landed fixes invalidated. The rules
above are durable; only this section rots.
brennanb2025 added a commit that referenced this pull request Aug 20, 2026
…bulary (#14971)

* docs(ssh): state the SSH execution boundary and pin the liveness vocabulary

Nothing under docs/ described how work splits between the client and an SSH
host, so agents and humans inferred it from error strings and got it wrong:
loss of contact was repeatedly reported as process death, which orphaned live
remote agents and cold-started duplicates over the same worktree.

Pins the vocabulary to the incumbent live/unverifiable/exited verdict from
unstopped-pty-verification so no synonym is introduced, records the one real
discriminator (all of a host's terminals drop together on link loss; one alone
means process exit), and lists the outstanding gaps with citations.

Tracked via the docs allow-list and linked from AGENTS.md, per the convention
in .gitignore.

* docs(ssh): cite the live restoreRequired site after it moved

The throw now lives in reattachSshPtySessionForSpawn; ssh-pty-provider.ts no
longer contains it. Caught by the worker fixing it, against a newer main than
the audit ran on.

* docs(ssh): require host evidence for liveness verdicts

* docs(ssh): keep boundary references stable

* docs(ssh): fence liveness evidence to its host identity

* docs(ssh): state replay and environment boundaries precisely

* docs(ssh): correct replay and platform boundary claims

* docs(ssh): describe headless runtime continuity accurately

* docs(ssh): distinguish authority from client metadata

* docs(ssh): describe pending fixes accurately

* docs(ssh): date the gap list and name the PR that closes each entry

The Known gaps section was accurate when written and becomes actively
misleading as its fixes land: it told a reader to go fix restoreRequired,
the missing unverifiable verdict, and the absent terminal-list host field,
three things now addressed by #14974, #14977 and #14973.

Mark the section as dated, require verification against current code before
acting on any entry, name the PR per entry, and move landed items out. Also
correct the two body claims that the landed fixes invalidated. The rules
above are durable; only this section rots.

* docs(ssh): make the boundary doc a durable ruleset, not an incident record

The Known gaps section was 18 of 93 lines enumerating specific defects from
one investigation, several already fixed by sibling PRs in the same batch. A
reference doc that needs a 'this section rots' warning is telling you the
section belongs somewhere else; those entries belong in issues.

Replace the six-row table of currently-lying signals with the method that
outlands any particular bug: ask whether the owning host produced the signal,
whether every PTY on the target went quiet together, whether the termination
event matches the current incarnation and generation, and whether a returned
status is actually a claim. Same for artifacts - state what ls-remote and a PR
head each do and do not prove, rather than listing which command is currently
wrong.

Nothing here goes stale when the open fixes land.
paidaxingyo666 pushed a commit to paidaxingyo666/Manta that referenced this pull request Aug 21, 2026
…ist (stablyai#14973)

* feat(terminal): report execution host and listing scope in terminal list

`orca terminal list` returned rows with no host identity and no statement
of what the listing covered, so a scoped listing that saw nothing read as
"nothing exists anywhere" — an agent reported a live remote worker dead.

Each row now carries an optional `executionHostId` derived from the PTY id
(SSH and paired-runtime ids embed their owner), and the result carries an
optional `hostScope` naming the hosts covered and the known hosts skipped.
Both are surfaced in `--json` and in the human-readable CLI output, where
an absent field renders as `unknown` rather than `local`.

Both row builders route through one resolver, so the rule lives in one place.

* fix(terminal): preserve unverifiable host scope

* fix(terminal): fail closed on unverifiable hosts

* test(terminal): name unverifiable scope explicitly

* perf(terminal): keep graph hydration host scans narrow

* fix(terminal): reject blank foreign host owners

* fix(terminal): validate inferred inventory hosts

* fix(terminal): preserve paired folder host scope

* fix(terminal): keep inventory host inference typed

* fix(terminal): disclose paired folder hosts
paidaxingyo666 pushed a commit to paidaxingyo666/Manta that referenced this pull request Aug 21, 2026
…bulary (stablyai#14971)

* docs(ssh): state the SSH execution boundary and pin the liveness vocabulary

Nothing under docs/ described how work splits between the client and an SSH
host, so agents and humans inferred it from error strings and got it wrong:
loss of contact was repeatedly reported as process death, which orphaned live
remote agents and cold-started duplicates over the same worktree.

Pins the vocabulary to the incumbent live/unverifiable/exited verdict from
unstopped-pty-verification so no synonym is introduced, records the one real
discriminator (all of a host's terminals drop together on link loss; one alone
means process exit), and lists the outstanding gaps with citations.

Tracked via the docs allow-list and linked from AGENTS.md, per the convention
in .gitignore.

* docs(ssh): cite the live restoreRequired site after it moved

The throw now lives in reattachSshPtySessionForSpawn; ssh-pty-provider.ts no
longer contains it. Caught by the worker fixing it, against a newer main than
the audit ran on.

* docs(ssh): require host evidence for liveness verdicts

* docs(ssh): keep boundary references stable

* docs(ssh): fence liveness evidence to its host identity

* docs(ssh): state replay and environment boundaries precisely

* docs(ssh): correct replay and platform boundary claims

* docs(ssh): describe headless runtime continuity accurately

* docs(ssh): distinguish authority from client metadata

* docs(ssh): describe pending fixes accurately

* docs(ssh): date the gap list and name the PR that closes each entry

The Known gaps section was accurate when written and becomes actively
misleading as its fixes land: it told a reader to go fix restoreRequired,
the missing unverifiable verdict, and the absent terminal-list host field,
three things now addressed by stablyai#14974, stablyai#14977 and stablyai#14973.

Mark the section as dated, require verification against current code before
acting on any entry, name the PR per entry, and move landed items out. Also
correct the two body claims that the landed fixes invalidated. The rules
above are durable; only this section rots.

* docs(ssh): make the boundary doc a durable ruleset, not an incident record

The Known gaps section was 18 of 93 lines enumerating specific defects from
one investigation, several already fixed by sibling PRs in the same batch. A
reference doc that needs a 'this section rots' warning is telling you the
section belongs somewhere else; those entries belong in issues.

Replace the six-row table of currently-lying signals with the method that
outlands any particular bug: ask whether the owning host produced the signal,
whether every PTY on the target went quiet together, whether the termination
event matches the current incarnation and generation, and whether a returned
status is actually a claim. Same for artifacts - state what ls-remote and a PR
head each do and do not prove, rather than listing which command is currently
wrong.

Nothing here goes stale when the open fixes land.
dallascrilley pushed a commit to dallascrilley/orca that referenced this pull request Aug 27, 2026
…bulary (stablyai#14971)

* docs(ssh): state the SSH execution boundary and pin the liveness vocabulary

Nothing under docs/ described how work splits between the client and an SSH
host, so agents and humans inferred it from error strings and got it wrong:
loss of contact was repeatedly reported as process death, which orphaned live
remote agents and cold-started duplicates over the same worktree.

Pins the vocabulary to the incumbent live/unverifiable/exited verdict from
unstopped-pty-verification so no synonym is introduced, records the one real
discriminator (all of a host's terminals drop together on link loss; one alone
means process exit), and lists the outstanding gaps with citations.

Tracked via the docs allow-list and linked from AGENTS.md, per the convention
in .gitignore.

* docs(ssh): cite the live restoreRequired site after it moved

The throw now lives in reattachSshPtySessionForSpawn; ssh-pty-provider.ts no
longer contains it. Caught by the worker fixing it, against a newer main than
the audit ran on.

* docs(ssh): require host evidence for liveness verdicts

* docs(ssh): keep boundary references stable

* docs(ssh): fence liveness evidence to its host identity

* docs(ssh): state replay and environment boundaries precisely

* docs(ssh): correct replay and platform boundary claims

* docs(ssh): describe headless runtime continuity accurately

* docs(ssh): distinguish authority from client metadata

* docs(ssh): describe pending fixes accurately

* docs(ssh): date the gap list and name the PR that closes each entry

The Known gaps section was accurate when written and becomes actively
misleading as its fixes land: it told a reader to go fix restoreRequired,
the missing unverifiable verdict, and the absent terminal-list host field,
three things now addressed by stablyai#14974, stablyai#14977 and stablyai#14973.

Mark the section as dated, require verification against current code before
acting on any entry, name the PR per entry, and move landed items out. Also
correct the two body claims that the landed fixes invalidated. The rules
above are durable; only this section rots.

* docs(ssh): make the boundary doc a durable ruleset, not an incident record

The Known gaps section was 18 of 93 lines enumerating specific defects from
one investigation, several already fixed by sibling PRs in the same batch. A
reference doc that needs a 'this section rots' warning is telling you the
section belongs somewhere else; those entries belong in issues.

Replace the six-row table of currently-lying signals with the method that
outlands any particular bug: ask whether the owning host produced the signal,
whether every PTY on the target went quiet together, whether the termination
event matches the current incarnation and generation, and whether a returned
status is actually a claim. Same for artifacts - state what ls-remote and a PR
head each do and do not prove, rather than listing which command is currently
wrong.

Nothing here goes stale when the open fixes land.
Jinwoo-H added a commit that referenced this pull request Aug 27, 2026
Pre-hostScope hosts (before #14973) cannot prove emptiness, so parking
them forever would strand agent auto-resume on every truly-empty legacy
host. Keep main's behavior for them: a scope-less empty probe result
settles the mirror. New hosts always publish hostScope, so the
authoritative-inventory fix for STA-5377 is unaffected; outdated hosts
keep main's existing narrow duplicate-writer window until they update.
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…ist (stablyai#14973)

* feat(terminal): report execution host and listing scope in terminal list

`orca terminal list` returned rows with no host identity and no statement
of what the listing covered, so a scoped listing that saw nothing read as
"nothing exists anywhere" — an agent reported a live remote worker dead.

Each row now carries an optional `executionHostId` derived from the PTY id
(SSH and paired-runtime ids embed their owner), and the result carries an
optional `hostScope` naming the hosts covered and the known hosts skipped.
Both are surfaced in `--json` and in the human-readable CLI output, where
an absent field renders as `unknown` rather than `local`.

Both row builders route through one resolver, so the rule lives in one place.

* fix(terminal): preserve unverifiable host scope

* fix(terminal): fail closed on unverifiable hosts

* test(terminal): name unverifiable scope explicitly

* perf(terminal): keep graph hydration host scans narrow

* fix(terminal): reject blank foreign host owners

* fix(terminal): validate inferred inventory hosts

* fix(terminal): preserve paired folder host scope

* fix(terminal): keep inventory host inference typed

* fix(terminal): disclose paired folder hosts
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…bulary (stablyai#14971)

* docs(ssh): state the SSH execution boundary and pin the liveness vocabulary

Nothing under docs/ described how work splits between the client and an SSH
host, so agents and humans inferred it from error strings and got it wrong:
loss of contact was repeatedly reported as process death, which orphaned live
remote agents and cold-started duplicates over the same worktree.

Pins the vocabulary to the incumbent live/unverifiable/exited verdict from
unstopped-pty-verification so no synonym is introduced, records the one real
discriminator (all of a host's terminals drop together on link loss; one alone
means process exit), and lists the outstanding gaps with citations.

Tracked via the docs allow-list and linked from AGENTS.md, per the convention
in .gitignore.

* docs(ssh): cite the live restoreRequired site after it moved

The throw now lives in reattachSshPtySessionForSpawn; ssh-pty-provider.ts no
longer contains it. Caught by the worker fixing it, against a newer main than
the audit ran on.

* docs(ssh): require host evidence for liveness verdicts

* docs(ssh): keep boundary references stable

* docs(ssh): fence liveness evidence to its host identity

* docs(ssh): state replay and environment boundaries precisely

* docs(ssh): correct replay and platform boundary claims

* docs(ssh): describe headless runtime continuity accurately

* docs(ssh): distinguish authority from client metadata

* docs(ssh): describe pending fixes accurately

* docs(ssh): date the gap list and name the PR that closes each entry

The Known gaps section was accurate when written and becomes actively
misleading as its fixes land: it told a reader to go fix restoreRequired,
the missing unverifiable verdict, and the absent terminal-list host field,
three things now addressed by stablyai#14974, stablyai#14977 and stablyai#14973.

Mark the section as dated, require verification against current code before
acting on any entry, name the PR per entry, and move landed items out. Also
correct the two body claims that the landed fixes invalidated. The rules
above are durable; only this section rots.

* docs(ssh): make the boundary doc a durable ruleset, not an incident record

The Known gaps section was 18 of 93 lines enumerating specific defects from
one investigation, several already fixed by sibling PRs in the same batch. A
reference doc that needs a 'this section rots' warning is telling you the
section belongs somewhere else; those entries belong in issues.

Replace the six-row table of currently-lying signals with the method that
outlands any particular bug: ask whether the owning host produced the signal,
whether every PTY on the target went quiet together, whether the termination
event matches the current incarnation and generation, and whether a returned
status is actually a claim. Same for artifacts - state what ls-remote and a PR
head each do and do not prove, rather than listing which command is currently
wrong.

Nothing here goes stale when the open fixes land.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant