Repository navigation
test(e2e): un-rot the SSH freeze repro and probe two failure modes nothing covered - #17940
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 59303c7e4a9714b067a1e3bb8043faf4b762ce43 and a632c3d. 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe Docker SSH E2E suite now waits for restored session and terminal readiness before running the bulk-open freeze test. Its flood-readiness check uses the repeating Merge Risk: 🔵 Low · up to This test-only PR adds and repairs Docker SSH coverage without changing product behavior. A recovery test may fail to complete on slow runs because its timeout is shorter than its sequential wait budget; the PR is otherwise mergeable with explicit owner awareness and follow-up. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description is detailed and on-topic. It explains the changes, rationale, linked issues, test behavior, visual-proof status, verification results, and regression risk. Some template headings and checklist items are omitted, but the required information is substantially present.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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: 017a0950-ad60-444d-8275-5f89eccaf1bc
📒 Files selected for processing (4)
config/scripts/run-ssh-docker-e2e.mjstests/e2e/ssh-docker-bulk-open-freeze-repro.spec.tstests/e2e/ssh-docker-half-open-link.spec.tstests/e2e/ssh-docker-resource-accumulation.spec.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Test-only Docker-SSH E2E work: repairs the rotted bulk-open freeze repro and adds two new probes — one for half-open link detection, one for remote-host resource accumulation.
run-ssh-docker-e2e.mjs— claims the two new specs in the Docker SSH lane and rewrites the freeze-repro exclusion comment to reflect that only its perf-oracle nature keeps it out of CI.ssh-docker-bulk-open-freeze-repro.spec.ts— fixes the four stale call sites, connects after session restore settles, and keys readiness on the repeatingBG:flood marker through an 80k-char read window.ssh-docker-half-open-link.spec.ts(new) — freezes the relay container withdocker pauseand asserts the client leavesconnectedwithin 90s, then recovers and echoes after thaw.ssh-docker-resource-accumulation.spec.ts(new) — samples remote pts devices, relay fds, and process counts across six terminals and five reconnect cycles, asserting no accumulation.
ℹ️ FD_CLOEXEC leak is made visible but not gated
leakedMasterFdCount is computed and included in every logged sample, but no assertion reads it, so a regression in the close-on-exec fix would leave this spec green and surface only in console output. This reads as intentional — #17914 is not landed yet and asserting 0 would fail on main — but the describe header's "Covers … #17914" slightly overstates what is actually gated.
Technical details
# FD_CLOEXEC leak: measurement vs gate
## Affected sites
- tests/e2e/ssh-docker-resource-accumulation.spec.ts:87 — `leakedMasterFdCount` sampled into every `RemoteResourceSample` and logged, never asserted
- tests/e2e/ssh-docker-resource-accumulation.spec.ts:5-7 — describe header claims the spec "covers" #17914
## Required outcome
- None required to merge. Optional follow-up once #17914 lands: add an assertion (e.g. `expect(withTerminals.leakedMasterFdCount).toBe(0)`), or soften the header wording from "covers" to "measures" until then.DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Both new specs pass locally — and the resource-accumulation one reproduces the fd leak deterministicallyRan against a combined branch carrying this sweep's fixes, with a real So the The resource-accumulation spec is more valuable than its title suggestsIts own output is a clean, deterministic reproduction of the pty-master fd leak that #17920 fixes — in 25 seconds, in a container, instead of on a production host: 1+2+3+4+5 = 15. That is exactly the triangular-growth signature: child k inherits the k masters that were open at its spawn instant. It matches the live openclaw measurement (355 masters, with identical fd numbers appearing across separate processes) — but here it is reproducible on demand. And the reconnect series stays flat at 21 across five reconnects, which pins down where the leak comes from: it accumulates on spawn, not on reconnect. Suggested follow-upThis gives #17920 a deterministic validation vehicle that the production census cannot: with the cloexec patch applied, Note the spec currently records |
da69854 to
59303c7
Compare
|
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.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: c7bee99a-3081-40ed-a2cf-aa123c729430
📥 Commits
Reviewing files that changed from the base of the PR and between 7f8eb90 and 59303c7e4a9714b067a1e3bb8043faf4b762ce43.
📒 Files selected for processing (5)
config/scripts/pr-e2e-source-routing.mjsconfig/scripts/run-ssh-docker-e2e.mjstests/e2e/ssh-docker-bulk-open-freeze-repro.spec.tstests/e2e/ssh-docker-half-open-link.spec.tstests/e2e/ssh-docker-resource-accumulation.spec.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- config/scripts/run-ssh-docker-e2e.mjs
- tests/e2e/ssh-docker-resource-accumulation.spec.ts
- tests/e2e/ssh-docker-bulk-open-freeze-repro.spec.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.
| orcaPage, | ||
| registerPostElectronShutdownCleanup | ||
| }, testInfo) => { | ||
| test.setTimeout(420_000) |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
printf '%s\n' '--- repository conventions ---'
find /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4 -maxdepth 2 -type f -name '*.md' -print
printf '%s\n' '--- target file outline ---'
ast-grep outline tests/e2e/ssh-docker-half-open-link.spec.ts
printf '%s\n' '--- target file ---'
cat -n tests/e2e/ssh-docker-half-open-link.spec.tsRepository: stablyai/orca
Length of output: 8784
🏁 Script executed:
printf '%s\n' '--- applicable convention and learning headers ---'
for f in /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/*/*.md; do
case "$f" in
*/learnings/*|*/architecture/*) ;;
*) printf '\n### %s\n' "$f"; head -40 "$f" ;;
esac
done
printf '%s\n' '--- relevant changes ---'
git diff -- tests/e2e/ssh-docker-half-open-link.spec.ts
printf '%s\n' '--- timeout and wait bindings ---'
rg -n -C 3 'setTimeout|waitForTimeout|expect\\.|test\\.' tests/e2e/ssh-docker-half-open-link.spec.tsRepository: stablyai/orca
Length of output: 4477
🏁 Script executed:
printf '%s\n' '--- directly bound helper implementations ---'
rg -n -C 8 'function (ensureTerminalVisible|waitForActiveTerminalManager|waitForActivePanePtyId|waitForTerminalOutput|waitForSessionReady|waitForActiveWorktree)|const (ensureTerminalVisible|waitForActiveTerminalManager|waitForActivePanePtyId|waitForTerminalOutput|waitForSessionReady|waitForActiveWorktree)|async function (ensureTerminalVisible|waitForActiveTerminalManager|waitForActivePanePtyId|waitForTerminalOutput|waitForSessionReady|waitForActiveWorktree)' tests/e2e/helpers
printf '%s\n' '--- Playwright timeout configuration ---'
rg -n -C 5 'timeout:|setTimeout\\(|expect:|testDir|defineConfig' playwright.config.* package.json tests/e2eRepository: stablyai/orca
Length of output: 9444
🏁 Script executed:
printf '%s\n' '--- helper timeout contracts ---'
sed -n '140,185p' tests/e2e/helpers/store.ts
sed -n '260,292p' tests/e2e/helpers/store.ts
sed -n '60,96p' tests/e2e/helpers/terminal.ts
sed -n '64,90p' tests/e2e/helpers/terminal-pane-operations.ts
sed -n '195,216p' tests/e2e/helpers/terminal-pane-operations.ts
printf '%s\n' '--- test runner version and timeout settings ---'
rg -n -C 4 'playwright|setTimeout|timeout:' package.json package-lock.json pnpm-lock.yaml yarn.lock playwright.config.ts playwright.config.js tests/e2e 2>/dev/null || trueRepository: stablyai/orca
Length of output: 50370
🏁 Script executed:
printf '%s\n' '--- runner configuration files ---'
git ls-files | grep -E '(^|/)(package(-lock)?\.json|pnpm-lock\.yaml|yarn\.lock|playwright\.config\.(ts|js))$'
printf '%s\n' '--- relevant timeout settings ---'
for f in package.json tests/playwright.config.ts tests/playwright.config.js playwright.config.ts playwright.config.js; do
if [ -f "$f" ]; then
printf '\n### %s\n' "$f"
rg -n -C 3 'playwright|timeout|defineConfig|testDir' "$f"
fi
done
printf '%s\n' '--- exact helper declarations and timeout bodies ---'
sed -n '145,182p' tests/e2e/helpers/store.ts
sed -n '266,289p' tests/e2e/helpers/store.ts
sed -n '64,92p' tests/e2e/helpers/terminal.ts
sed -n '64,88p' tests/e2e/helpers/terminal-pane-operations.ts
sed -n '201,213p' tests/e2e/helpers/terminal-pane-operations.tsRepository: stablyai/orca
Length of output: 12838
Align the test timeout with the nested wait budgets.
The 420,000 ms timeout applies to the whole test, but its sequential explicit waits total 585,000 ms. A slow run can time out before recovery completes. Increase the timeout to cover these waits plus setup, connection, and Docker command time, or reduce the wait budgets.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the increment since the prior review (da69854 → 59303c7), a squashed rebase that closes the one open concern and wires the new specs into routing.
- Gated the
FD_CLOEXECleak —leakedMasterFdCountwent from measured-only to asserted in two places:withTerminals <= baselineafter the six-terminal open, andlast <= firstacross reconnect cycles. The growth-vs-baseline shape is now sound because both #17914 and #17920 have landed, so post-fix both sides are0while a missing relay rebuild fails loudly. - Claimed the specs in
pr-e2e-source-routing.mjs— addedssh-docker-half-open-linkandssh-docker-resource-accumulationto thessh-terminal-sourceroute, matching the existing Docker-gated entries in that list. - Rewrote the freeze-repro exclusion comment — now excludes it purely on wall-clock-oracle non-portability (workstation vs GitHub-runner lag spanning orders of magnitude), with the stale rot rationale removed.
The prior review's ~ℹ️~ "measured but not gated" note and the header-wording suggestion are both resolved: the assertions gate the leak and the header now reads #17914 / #17920 with accurate "covers" wording.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…thing covered Test-only. No production code. ## The freeze repro was rotted in three ways, not one #16764 tracks four stale call sites. There were three separate problems: 1. **Stale call sites** — `execInTerminal` gained a `ptyId` and `splitActiveTerminalPane` gained a direction. (`startDockerSshRelayTarget`'s missing `testInfo` was the third; #18257 has since landed it on main.) 2. **It connected before session restore settled**, so the seeded tab never bound to a remote PTY and the terminal sat on "Connecting…" forever. 3. **It could never have passed, even once.** It waited for a one-shot `READY:` line through a 4000-char terminal window while its own 2 KB-every-8 ms flood buries that line within ~16 ms. Readiness is now keyed on the repeating `BG:` flood marker, which is strictly stronger — it proves the pane is streaming rather than merely started. It now runs end to end and prints a measurement instead of dying on a call site: ``` [freeze-repro R2] hiddenFloodMaxLagMs 2.1 bulkOpenMaxLagMs 41.5 interactionProbeMs 53.6 softFreeze false hardFreeze false ``` **It is still not CI-gateable, and the exclusion comment now says so.** The same spec on the same commit measured `bulkOpen 2575.6ms / interaction 3464.2ms` on a GitHub ubuntu runner against a 2500 ms soft budget — a ~60x spread on the number the budget reads, with the relay still streaming. That is the budget failing, not the product. The earlier draft of this comment claimed "repaired and passing", which was true only of the host it was measured on; gating this needs a host-relative oracle, not a bigger constant. ## New: a half-open link is judged, not wedged The fixture image has no `iptables` and the container has no `NET_ADMIN`, so `docker pause` is used instead — a harder case, because the container's TCP stack keeps ACKing: no FIN, no RST, and the socket looks perfectly healthy. Only an application-level probe can detect it. ``` [half-open] {"verdict":"reconnecting","verdictMs":25135,"budgetMs":90000} ``` Nothing in the suite covered the failure mode behind the "SSH hangs until I restart Orca" reports. ## New: resource accumulation measured on the remote host 6 terminals, then 5 reconnect cycles, counted on the container itself: ``` open: pts 1->6 (exactly 1/terminal), relay fds 25->30 (exactly 1/terminal) reconnect: pts flat at 6, relay procs flat at 1, node procs flat at 3 ``` `leakedMasterFdCount` is now **asserted**, not merely recorded. It counts PTY master fds held by non-relay processes: without `FD_CLOEXEC` a master is inherited by every later child, so terminal k adds k of them — the triangular signature measured as 15 across 5 terminals before the fix. #17914 patched the app and daemon and #17920 shipped the same patch to the relay host, and both are now on main, so the correct value is 0 and the probe holds it there: ``` baseline leakedMasterFdCount 0 6 terminals leakedMasterFdCount 0 (holders: only relay.js, n=6) reconnects leakedMasterFdCount 0 across all 5 cycles ``` Any growth here means the relay's node-pty rebuild did not take on that host, which is exactly what a remote-host probe exists to catch — and it is the half of #17914's claim that no unit test can reach. ## Routing Both new probes are claimed by `run-ssh-docker-e2e.mjs` (a Docker-gated spec no runner names self-skips everywhere and still reports green) **and** by the `ssh-terminal-source` route in `pr-e2e-source-routing.mjs`, so they run when the relay and SSH code they guard changes rather than only on a scheduled lane.
59303c7 to
a632c3d
Compare
Gating now matches the comment: the freeze-oracle case is
|
| host | hiddenFlood | bulkOpen | interaction |
|---|---|---|---|
| developer workstation | 2.1 ms | 41.5 ms | 53.6 ms |
| GitHub ubuntu runner A | 1.5 ms | 2575.6 ms | 3464.2 ms |
| GitHub ubuntu runner B | 0.2 ms | 397.4 ms | 3386.7 ms |
interactionProbeMs is not a freeze measurement at all — that part is confirmed and is worse than "unportable". It times two setActiveView round trips through a double rAF, i.e. a view remount cost, and it shares SOFT_FREEZE_LAG_MS with the renderer lag probe only because both happen to be milliseconds. It is stably ~64x the workstation figure on both runners. It was never the #16764 symptom.
But bulkOpenMaxLagMs swings 6.5x between the two CI runs of the same measurement path — 2575.6 ms on runner A, 397.4 ms on runner B. So "the renderer is fine on CI hardware" is true of runner B and false of runner A. One sample establishes that the renderer can be fine, not that it is. I've written it that way in the PR body rather than the stronger claim, because the stronger claim is exactly the kind of thing that gets a spec re-enabled and then rots again.
hardFreeze has never tripped on any host; every failure is the soft budget, with remoteHostStillStreaming: true each time.
Why not (2)
A ratio against a calibration run is the right shape. But the quantity you would normalize is bulkOpenMaxLagMs, and it moves 6.5x within the same host class — so a ratio threshold picked from three samples is the same arbitrary constant in dimensionless clothing, and it would fail on runner A exactly as the fixed one did. Gating needs a distribution first. Both the spec comment and run-ssh-docker-e2e.mjs now say that, so the next person does not re-derive it.
Recorded, not hidden
run-ssh-docker-e2e.mjs now marks this a COVERAGE GAP in the same style the file already uses for ssh-docker-relay-perf — 5 simultaneously flooding SSH panes exercise writer saturation, ACK/credit accounting and per-pane polling together, and nothing else covers that combination. The comment also notes the spec is both absent from the lane list and skipped, so the changed-specs lane cannot re-introduce the contradiction by selecting it on edit.
Preserved as asked
leakedMasterFdCountasserted in both phases (withTerminals <= baseline,last <= first) — unchanged.- Both probes still registered in
pr-e2e-source-routing.mjsunderssh-terminal-source— unchanged.
Both new probes pass on CI hardware (half-open 50.7s, resource-accumulation 34.2s), so the two specs this PR adds are portable; only the pre-existing oracle is not.
Rebase note
main moved again mid-change — #17870 landed while I was editing. Rebased onto 510305e5743 before pushing; without it this branch would have reverted #17870 wholesale. Re-verified after the rebase that the runner list gained only the two new probes and dropped nothing (ssh-docker-transport-drop-recovery and ssh-docker-quick-open-large-listing both still present). pnpm tc clean, gate contract 42 passed, changed-code gate 0 findings.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the increment since the prior Pullfrog review (59303c7 → a632c3d), which turns the un-rotted freeze repro into a test.fixme case so its non-portable wall-clock oracle cannot gate CI.
- Marked the freeze repro
test.fixme—ssh-docker-bulk-open-freeze-repro.spec.tsdeclares the bulk-open case withtest.fixmeand an inline// Fixme:rationale, matching the existing pattern inssh-docker-transport-drop-recovery.spec.ts. It stays compiled and flip-back-runnable, but is skipped rather than failing CI on host speed. - Aligned the runner exclusion with the skip — the
run-ssh-docker-e2e.mjscomment now documents both that the spec is absent from the Docker lane and skipped, records the 6.5xbulkOpenswing across two CI runs and the view-remount nature ofinteractionProbeMs, and names the resulting coverage gap (5 simultaneous flooding SSH panes).
The skip-claim the comment makes is accurate: pr-e2e-source-routing.mjs still selects the spec directly whenever its own file is edited, and test.fixme skips it there too, so the exclusion in the runner list and the skip cannot drift apart.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…thing covered (stablyai#17940) Test-only. No production code. ## The freeze repro was rotted in three ways, not one stablyai#16764 tracks four stale call sites. There were three separate problems: 1. **Stale call sites** — `execInTerminal` gained a `ptyId` and `splitActiveTerminalPane` gained a direction. (`startDockerSshRelayTarget`'s missing `testInfo` was the third; stablyai#18257 has since landed it on main.) 2. **It connected before session restore settled**, so the seeded tab never bound to a remote PTY and the terminal sat on "Connecting…" forever. 3. **It could never have passed, even once.** It waited for a one-shot `READY:` line through a 4000-char terminal window while its own 2 KB-every-8 ms flood buries that line within ~16 ms. Readiness is now keyed on the repeating `BG:` flood marker, which is strictly stronger — it proves the pane is streaming rather than merely started. It now runs end to end and prints a measurement instead of dying on a call site: ``` [freeze-repro R2] hiddenFloodMaxLagMs 2.1 bulkOpenMaxLagMs 41.5 interactionProbeMs 53.6 softFreeze false hardFreeze false ``` **It is still not CI-gateable, and the exclusion comment now says so.** The same spec on the same commit measured `bulkOpen 2575.6ms / interaction 3464.2ms` on a GitHub ubuntu runner against a 2500 ms soft budget — a ~60x spread on the number the budget reads, with the relay still streaming. That is the budget failing, not the product. The earlier draft of this comment claimed "repaired and passing", which was true only of the host it was measured on; gating this needs a host-relative oracle, not a bigger constant. ## New: a half-open link is judged, not wedged The fixture image has no `iptables` and the container has no `NET_ADMIN`, so `docker pause` is used instead — a harder case, because the container's TCP stack keeps ACKing: no FIN, no RST, and the socket looks perfectly healthy. Only an application-level probe can detect it. ``` [half-open] {"verdict":"reconnecting","verdictMs":25135,"budgetMs":90000} ``` Nothing in the suite covered the failure mode behind the "SSH hangs until I restart Orca" reports. ## New: resource accumulation measured on the remote host 6 terminals, then 5 reconnect cycles, counted on the container itself: ``` open: pts 1->6 (exactly 1/terminal), relay fds 25->30 (exactly 1/terminal) reconnect: pts flat at 6, relay procs flat at 1, node procs flat at 3 ``` `leakedMasterFdCount` is now **asserted**, not merely recorded. It counts PTY master fds held by non-relay processes: without `FD_CLOEXEC` a master is inherited by every later child, so terminal k adds k of them — the triangular signature measured as 15 across 5 terminals before the fix. stablyai#17914 patched the app and daemon and stablyai#17920 shipped the same patch to the relay host, and both are now on main, so the correct value is 0 and the probe holds it there: ``` baseline leakedMasterFdCount 0 6 terminals leakedMasterFdCount 0 (holders: only relay.js, n=6) reconnects leakedMasterFdCount 0 across all 5 cycles ``` Any growth here means the relay's node-pty rebuild did not take on that host, which is exactly what a remote-host probe exists to catch — and it is the half of stablyai#17914's claim that no unit test can reach. ## Routing Both new probes are claimed by `run-ssh-docker-e2e.mjs` (a Docker-gated spec no runner names self-skips everywhere and still reports green) **and** by the `ssh-terminal-source` route in `pr-e2e-source-routing.mjs`, so they run when the relay and SSH code they guard changes rather than only on a scheduled lane.

Test-only. No production code. Rebased onto current
mainand squashed into one commit.The freeze repro was rotted in three ways, not one
#16764 tracks four stale call sites. There were three separate problems, and the third is the interesting one:
execInTerminalgained aptyId,splitActiveTerminalPanegained a direction. (startDockerSshRelayTarget's missingtestInfowas the third; test(e2e): pass testInfo to startDockerSshRelayTarget in the freeze repro #18257 has since landed that onmain, and this branch is rebased past it.)READY:line through a 4000-char terminal window while its own 2 KB-every-8 ms flood buries that line within ~16 ms. The sibling perf spec avoids this by gating its flood on stdin; this one floods immediately. Readiness is now keyed on the repeatingBG:marker, which is strictly stronger — it proves the pane is actually streaming rather than merely started.It now runs end to end against current
maininstead of dying on a call site:That is what the un-rotting bought. What it does not buy is a gate — see below.
It is still not CI-gateable — so it is now
test.fixmeAn earlier revision of the runner comment claimed the spec was "repaired and passing", while its own CI lane failed. That contradiction is resolved by making the gating match the comment rather than by softening the comment: the freeze-oracle case is marked
test.fixmewith a reference to #16764, matching whatssh-docker-transport-drop-recovery.spec.tsalready does for two cases. It stays compiled and executable — flippingtest.fixmeback totestis how every number below was taken.Three runs of the same measurement path:
Two separate problems, and neither is the product.
interactionProbeMsis not a freeze measurement at all. It times twosetActiveViewround trips through a doublerequestAnimationFrame— a view remount cost. It sharesSOFT_FREEZE_LAG_MSwith the renderer lag probe only because both are milliseconds, and it sits ~64x over the workstation figure on both runners.bulkOpenMaxLagMsis the test(e2e): ssh-docker-bulk-open-freeze-repro has rotted four call sites out of date and cannot compile #16764 symptom, and on runner B it came in at 397 ms against a 2500 ms budget — the renderer is fine. But it was 2575.6 ms on runner A with the same measurement path, a 6.5x swing between two CI runs. So the good reading is real but not yet load-bearing: one sample does not establish that the renderer is fine on CI hardware, it establishes that it can be.hardFreezehas never tripped on any host; every failure is the soft budget, andremoteHostStillStreamingwas true every time.Why not a host-relative oracle instead (the other option considered). A ratio against a calibration run is the right shape, but with a 6.5x within-host swing on the very quantity that would be normalized, a threshold picked from three samples is the same arbitrary constant in dimensionless clothing. Gating needs a distribution first. Both the spec comment and
run-ssh-docker-e2e.mjsnow say this, and the runner file records the resulting coverage gap explicitly — 5 simultaneously flooding SSH panes exercise writer saturation, ACK/credit accounting and per-pane polling together, and nothing else covers that combination.New: a half-open link is judged, not wedged
The fixture image has no
iptablesand the container has noNET_ADMIN, soiptables -j DROPwas unavailable.docker pauseis used instead, which is a harder case: the container's TCP stack keeps ACKing, so there is no FIN and no RST and the socket looks perfectly healthy — only an application-level probe can detect it.25.1 s to leave
connected, then full recovery after unpause. Until now nothing in the suite covered the failure mode behind the "SSH hangs until I restart Orca" reports.New: resource accumulation measured on the remote host
6 terminals, then 5 reconnect cycles, counted on the container itself:
leakedMasterFdCountis now asserted, not merely recorded — the CodeRabbit/pullfrog review is addressed rather than deferred. It counts PTY master fds held by non-relay processes: withoutFD_CLOEXECa master is inherited by every later child, so terminal k adds k of them. That triangular signature was measured at 15 across 5 terminals when this PR opened, which is why asserting it then would have failed onmain.#17914 and #17920 have both since merged, and #17920 is the half that matters here — it ships the same
pty_cloexec()patch to the relay host, which installsnode-ptyfrom npm and so was untouched by #17914's pnpm patch. Re-measured against currentmain:So the header's #17914 claim now holds, with #17920 named alongside it.
<=rather than slack is deliberate: #17920's relay-side rebuild is non-fatal by construction, so a host where it silently did not take is a real finding this probe should surface.Routing
Both new probes are now claimed in two places, not one:
config/scripts/run-ssh-docker-e2e.mjs— a Docker-gated spec no runner names self-skips everywhere and still reports green.config/scripts/pr-e2e-source-routing.mjs,ssh-terminal-source— so they run when the relay and SSH source they guard changes, rather than only on a scheduled lane.The runner-list conflict against
mainwas resolved as a union: taking either side alone would have silently droppedssh-docker-transport-drop-recovery.spec.ts(already onmain) orssh-docker-quick-open-large-listing.spec.ts(added by #17954 today) from the lane, with no conflict marker on the second one.Verification
Refs #16764, #17914, #17920, #18257
ELI5
Three Docker-SSH tests. One was broken in a way that meant it had literally never run; it runs now, and the comment saying why it still can't gate CI is now accurate instead of optimistic. The other two are new: one freezes the remote host to prove Orca notices instead of hanging, and one counts file descriptors and terminals on the remote host to prove reconnecting doesn't leak them.
User-facing regression risk
None. Test-only; no production code changed.
Visual Proof
N/A — test-only change, no UI surface.
Testing
pnpm tc)pr-e2e-gate-contract.test.mjs, 42 passed)test.fixmeis lifted (output above)node:22-bookworm+openssh-servercontainer (linux/arm64).