Skip to content

test(terminal-input): ask for the liveness probe after the snapshot, not after input-ready - #1019

Merged
devswha merged 1 commit into
mainfrom
test/terminal-input-waits-for-snapshot
Oct 14, 2026
Merged

devswha merged 1 commit into
mainfrom
test/terminal-input-waits-for-snapshot

Conversation

@devswha

@devswha devswha commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Change

terminal-input-regression.ts fails with "input regression timed out" more than any other browser check: 14 failures and 1 second-run pass in the last 30 hours of CI. #1001 made it wait for the connection before it asks for a liveness probe, and that was not the cause: on main with #1001 the check still needed a second run in 2 of 6 runs of the lane.

A CI run with diagnostics printed on the timeout shows the order of frames on the runner:

+259 <- role-ack interact
+260 <- pty-data, input-ready, pane-geometry
+340 dispatched online
+348 <- snapshot features=…|ping
+10358 -> ping            (the idle path, after the check had given up)

The snapshot is what tells the client the bridge answers pings. A wake before it probes nothing (probe() returns while pingKnown is false), and nothing asks again. On a development machine the snapshot arrives first (+114 ms against +213 ms here), so the check never failed locally and #1001's reproduction found another way to time out, not this one. The page was visible and connected, and a second online after the timeout did send the ping.

The check now notes when the snapshot was forwarded to the page and waits for that before it dispatches online. No app code changes: a wake in the first few milliseconds of a connection has nothing stale to find.

This commit was meant for #1016 and was pushed seconds after it merged.

Validation

  • Reproduced by holding only the snapshot frame back 1.5 s: 2 of 2 fail with CI's message at that wait on main's code. With the change: 3 of 3 pass under the same hold, 3 of 3 without it.
  • bun run check run --build bun scripts/ui-regression.ts: 65 PASS, exit 0 (macOS arm64, Bun 1.4.0). bun run typecheck, scripts/conventions.test.ts, changelog-fold.test.ts: pass.
  • On CI: scripts/ui-regression.ts run six times on this change, one script per job (run 38497470872, a throwaway branch): 6 of 6 passed on the first run. On main before it the check needed a second run in 2 of 6 jobs of the same shape (run 38495833732) and in 2 of 6 jobs of the whole lane, which runs two scripts side by side (run 38494284688). Six clean runs fit the cause above; they do not prove the check can never time out again.
  • Not run locally: the integration lane and the other browser scripts.

…not after input-ready

#1001 made the check wait for the connection, and it still needed a second run about one time in three. A diagnostic CI run shows why: input-ready arrived at +260 ms, the check dispatched `online` at +340 ms, and the snapshot that names the bridge's features (ping among them) arrived at +348 ms, so the wake probed nothing. Reproduced by holding only the snapshot frame back.
@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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 34 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 414a54f0-c258-471c-a844-a0d4451a79b6
📥 Commits

Reviewing files that changed from the base of the PR and between 28f1b5b and 0b3f844.

📒 Files selected for processing: 2
  • changelog.d/terminal-input-waits-for-the-snapshot.md
  • scripts/terminal-input-regression.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@devswha
devswha merged commit dc2f11d into main Oct 14, 2026
9 checks passed
@devswha
devswha deleted the test/terminal-input-waits-for-snapshot branch October 14, 2026 02:54
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