Repository navigation
Conversation
…etion
When a paired remote runtime connection drops, terminal.inspectProcess fails
with no_connected_pty / terminal_handle_stale / terminal_gone. That error was
swallowed into { foregroundProcess: null, hasChildProcesses: false } —
byte-for-byte the same result as a successful inspection confirming no agent
process — so two inspection cycles during a disconnect dispatched a confirmed
process-exit completion (orange attention + notification) while the remote
agent was still working.
Carry a discriminated 'unavailable: true' outcome from remote inspection and
have the completion coordinator treat it as unknown liveness: preserve agent
evidence and exit-arming state, back off like a failed inspection, and only
confirm exits from successful samples. Other inspection consumers keep their
existing no-process fallback behavior.
Closes stablyai#9151
📝 WalkthroughWalkthroughRuntime terminal inspection results now expose 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
…etion
When a paired remote runtime connection drops, terminal.inspectProcess fails
with no_connected_pty / terminal_handle_stale / terminal_gone. That error was
swallowed into { foregroundProcess: null, hasChildProcesses: false } —
byte-for-byte the same result as a successful inspection confirming no agent
process — so two inspection cycles during a disconnect dispatched a confirmed
process-exit completion (orange attention + notification) while the remote
agent was still working.
Carry a discriminated 'unavailable: true' outcome from remote inspection and
have the completion coordinator treat it as unknown liveness: preserve agent
evidence and exit-arming state, back off like a failed inspection, and only
confirm exits from successful samples. Other inspection consumers keep their
existing no-process fallback behavior.
Closes stablyai#9151
OrcaWin
left a comment
There was a problem hiding this comment.
Thanks for the focused report and initial fix. I reworked the final patch so completion inspection is owned by the runtime that actually owns the process:
- transport loss and stale routing remain unknown rather than becoming idle evidence;
- reconnect requires fresh authoritative samples before completion;
- daemon, SSH relay, and local PTY providers share one atomic inspection contract;
- the deterministic regression oracle fails when the fix is reverted and passes on the candidate.
Validated on current main with the focused suites, typecheck, full lint/reliability gates, a headed paired-client flow, and headless parity.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 27d06bb7-9140-44ac-818f-82bdc102a9c0
📒 Files selected for processing (1)
config/reliability-gates.jsonc
| "pnpm exec vitest run --config config/vitest.config.ts tests/e2e/remote-terminal-tab-retirement.unit.test.ts", | ||
| "pnpm test:repro:remote-agent-session", | ||
| "pnpm exec vitest run --config config/vitest.config.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/terminal-orphan-owner.test.ts src/main/runtime/terminal-orphan-topology.test.ts src/renderer/src/runtime/web-session-terminal-orphan-recovery.test.ts src/renderer/src/runtime/web-session-terminal-orphan-mixed-version.test.ts src/renderer/src/runtime/web-session-tabs-sync.test.ts --maxWorkers=1" | ||
| "Manual headed paired-server journey: isolated Orca desktop host + separate paired web client + real Codex process + 20-second WebSocket fault + reconnect + explicit stop", |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
rg -n -C3 'reliability-gates\.jsonc|commands.*reliability|reliability.*commands' \
-g '*.{ts,tsx,js,mjs,cjs,json,jsonc,yml,yaml}' .Repository: stablyai/orca
Length of output: 2262
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Candidate files:"
fd -a 'check-reliability-gates|reliability-gates' . | sed 's#^\./##'
echo
echo "check-reliability-gates outline:"
ast-grep outline config/scripts/check-reliability-gates.mjs 2>/dev/null || true
echo
echo "Relevant check file:"
cat -n config/scripts/check-reliability-gates.mjs
echo
echo "Gates around line 1432:"
sed -n '1380,1455p' config/reliability-gates.jsonc | cat -n | sed 's#^`#1432`+#'
echo
echo "Nearby commands/coverage/evidence structure:"
sed -n '1300,1370p' config/reliability-gates.jsonc | cat -n | sed 's#^`#1300`+#'
sed -n '1455,1505p' config/reliability-gates.jsonc | cat -n | sed 's#^`#1455`+#'Repository: stablyai/orca
Length of output: 38187
Keep the manual journey out of commands.
check-reliability-gates.mjs treats commands as executable coverage and records evidence run command entries against it; moving this prose into coverageNotes/evidenceRuns avoids treating the manual description as a runnable gate command.
…s-access-other-apps-data-prompt-keeps-re Both sides bumped the daemon protocol to 27 (main: completion-process inspection #9263; this PR: preflight-cache replacement). Resolve by moving this PR's replacement bump to 28 so main-built v27 daemons, which lack the preflight fix, are also retired; completion inspection stays gated at >=27 and v27 joins PREVIOUS_DAEMON_PROTOCOL_VERSIONS.
…etion (stablyai#9263) Co-authored-by: OrcaWin <[email protected]>
Problem
A paired or SSH runtime disconnect could be misclassified as a clean agent completion. The viewer collapsed an unreachable/stale remote handle into the same result as an authoritative inspection proving that the agent process had exited, which could trigger a false completion notification and attention state.
Closes #9151
Fix
Testing
main.