Repository navigation
Conversation
Collaborator
|
Superseded by #26630, which negotiates input sequence numbers and acks on the same Input frame |
This branch has not been deployed
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
A remote terminal can look connected while its network has stopped carrying data. Typing in that window may never arrive, or it may run while the reply gets lost. Orca now warns you to check the terminal before retrying; it does not resend an uncertain command.
What Changed
Ordinary keyboard batches now request host write receipts. New hosts negotiate
ackInput: 1, reuse the existing Input frame's sequence field, and return a JSON receipt after the PTY provider settles the write. Older hosts use the existingterminal.sendrequest/reply path. No new binary opcode is introduced, and unnegotiated clients keep their existing behavior.Unanswered writes show a persistent, dismissible warning after 15 seconds or stream teardown. Unrelated output cannot settle a receipt. Parser replies remain untracked. A thrown stream handoff cannot trigger an automatic RPC resend. Receipt state retains only bounded numeric IDs and times.
Why
A controlled real SSH TCP stall reproduced missing input while Orca still reported connected. Receipt loss cannot distinguish a lost command from an executed command whose reply vanished, so automatic replay could execute it twice. Execution-host receipts preserve that distinction and keep the existing binary batching for updated peers.
Linked Issue
Related: SSH consolidation #26483, known half-open input finding F1.
Visual Proof
Before: reconnect silently loses the DURING line; the same remote process receives BEFORE and AFTER.
After: the warning remains visible after reconnect, with the same process and no replay.
Original host-ledger reproduction, unchanged-app warning failure, final source-built server run, older-server run.
Testing
CI integration follow-up: the sidecar subscription test now requires
ackInput:1, and the half-open SSH test runs in the managed-server lane that builds its template. Source routing, dedicated-job selection, and lane reachability are covered by 65 passing integration tests.Hidden macOS Electron + Linux arm64 Docker SSH: both a two-way TCP stall and a reply-only stall pass against the source-built server, then pass against the installed pre-receipt server. A final source-built run passes both again. The independent host ledger requires one process, BEFORE/AFTER exactly once, lost DURING absent for a two-way stall, and executed DURING exactly once for a reply-only stall. Real keyboard input and the rendered warning are asserted; warnings appear around 15.1–15.3 seconds. Faults use an owned TCP proxy, not a claimed physical network outage.
330 affected tests across 52 files pass (one existing skip), including batching, stale stream fencing, output recovery, rejected-write pane recovery, and no fallback resend after a handoff throws. The 10-test real-release terminal wire suite also passes, including both mixed-version pairings; only new/new negotiates input receipts. Full
pnpm tc,pnpm lint, changed-code quality, Electron e2e build, and headless-server build pass.Reliability class/gate:
terminal-input.remote-delivery-uncertainty, experimental. Invariant: only host receipts settle writes; uncertainty stays visible without replay or process replacement. Local/daemon transports are unchanged, with the Linux daemon exercised through the host. Native Windows/WSL and Linux desktop clients remain coverage gaps. Receipts prove provider acceptance, not command execution; old hosts that omit settlement fields prove request receipt only.Performance: existing 8 ms batching stays; updated peers send without awaiting prior round trips. At most 1,024 numeric receipts and one deadline timer per active stream; no polling, inventory scans, subprocesses, or startup waits. Broad WAN latency and long-term soak remain unproved.
Review
Self-reviewed stream teardown, same-ID replacements, host-owned settlements, old-peer fallback, parser replies, and both directions of network uncertainty. This addresses silent input uncertainty; it cannot recover an unacknowledged command safely.
Agent skill upstream boundary
Checklist