Repository navigation
test(browser): quarantine touch-burst-history again: input in transit at a detach is lost (#4174) - #4175
Conversation
… at a lease release is lost (#4174) The script failed in CI (run 44370618553): of 6 wheel reports sent before the lease release, the application received 1, and its log is read only after a round-trip on the same stream, so the reports were lost, not late. A test-side wait (#4173, closed) would hide it; the server-side cause is #4174 and is fixed in its own PR. Until then the entry is back, until 2026-12-18.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 16 minutes. View limit details
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. |
|
Merged through Test-only, on the lead's word (t10k): touch-burst-history goes back into the browser quarantine until 2026-12-18 citing #4174 (input already accepted is lost when the last viewer detaches; server fix in #4182, held for the release). Reviews: none needed beyond the lead's decision for a one-line quarantine entry; CodeRabbit on this PR. Evidence: quarantine tests 4/4, check fast green; one unrelated browser crash (inbox-mode, browser closed) passed on rerun. |
…detach closes the attach (#4182) ## Summary Fixes #4174: typed keys and wheel reports the server had already accepted were lost when the last viewer of a pane detached. Ordinary input is written to the attach and answered as accepted at once; on a viewer's own detach the server then killed the attach (`server/core/terminals.ts`), and the PTY host hung up the attach client and dropped its stdin with nothing drained (`server/pty/session.ts`, `server/pty/pty-host.mjs`; the Rust host's `stop()` the same way). herdr 0.9.5's attach client quits on a hangup without reading what still waits, so a host-side drain alone cannot fix it. Now only a client's own `detach` frame marks the leave as its own. For it, the server stops taking input for that claim, writes herdr's documented detach chord (`ctrl+b q`, in herdr's CLI reference from 0.5.11) into the attach after the accepted input, and waits for the attach client to exit, bounded by `LEAVE_WITHIN_MS = 2000` (the hosts' kill delay). herdr forwards every key read before the chord, then exits. Revocation, a stalled or closed connection, and a disconnect still kill at once; queued input refused with `input_failed` on a detach stays as designed. On Windows (no chord) and right after a lone `ctrl+b` the old immediate close remains. herdr-core's attach already closes after its input on one ordered connection, so it is unchanged. Notes for review: a draining attach can outlive its last viewer by up to 2 s; the change relies on herdr keeping the documented chord. Changelog fragment included. `terminal-touch-burst-history` stays quarantined (#4175) until this is on main and the script passes 10/10 in the CI image. ## Validation - `server/core/terminals.test.ts`: a fake attach accepts bytes at once and delivers behind a gate; a letter and six wheel reports go through the real input lane, the sole client detaches, the gate opens: all seven arrive in order before the attach goes, and input after the detach is refused. Fails on main (only `gone`), passes with the fix. A second case pins that a taken-out connection still kills at once. `server/pty/host.test.ts` adds `leave()` tests on the real Node and Rust hosts. - Scratch check on the isolated `ovis-test` herdr (not committed): a 404-key burst right before a detach arrived 1/404 on main's Rust host and 75-350/404 on its Node host; 404/404 on both with the fix. - Server suites touching input, terminals, sockets, PTY hosts and the keys/take-over/attach contracts: green. - `bun run check fast`: green. --------- Co-authored-by: sisyphus-dev-ai <[email protected]>
Summary
terminal-touch-burst-history-regressiongoes back into the browser quarantine until 2026-12-18, citing #4174. It flaked in CI (#4162's run 44370618553): of 6 wheel reports sent before a voluntary detach, the application received 1. That is a server bug, not a test race: input the server already accepted is lost when the last viewer detaches, and typed keys are lost the same way (#4174). A test-side wait (#4173, closed) would have hidden it. The server fix comes in its own PR and removes this entry again once verified.Validation
bun test scripts/ci-browser-parallel.test.ts -t quarantine: 4/4.bun run check fast: green.