Skip to content

Flake batch 9: Windows PTY console test and gh-shim rung tests wait out runner load - #1062

Merged
ualtinok merged 3 commits into
mainfrom
land/flake-batch-9
Oct 28, 2026
Merged

ualtinok merged 3 commits into
mainfrom
land/flake-batch-9

Conversation

@aft-alfonso

@aft-alfonso aft-alfonso Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Main's Windows integration shard failed bash_exit_status_test::bash_pty_waiter_inherits_console_input (run 40589580750): the task printed "ready" but was still running at the test's single 30 s deadline, which started at spawn.

Native repro on a Windows Server 2022 runner: 0 lost inputs in 180 unloaded runs (including input written before ReadLine, at spawn, and 1.5 s late). With 16 parallel round trips on 4 CPUs, PowerShell took up to 21.5 s just to print "ready", while ready-to-exit never exceeded 1.66 s. AFT already answers the console's cursor-position query before any typed input. So this is test timing: startup used most of the shared budget.

The test now waits up to 120 s for "ready", then up to 30 s from the single write. It still checks exactly one write, exit code 3 and the read:hello output, and failure messages name the stalled phase with timings. bash_write now logs one INFO line with the byte count it sent (never the content), so a CI log shows whether input reached the terminal.

Verified: fixed test passed natively on Windows, 96/96 at 16 in parallel; 16 bash_write lib tests on Linux; Windows target check with -D warnings.


Summary by cubic

Fixes two flaky Windows CI tests: the PTY console round-trip test now waits for PowerShell startup and the round trip separately, and gh-shim rung discovery no longer trips over the 2 s product budget on a loaded runner.

  • The PTY test waits up to 120 s for ready, then up to 30 s for exit after the single write; checks are unchanged and failures name the stalled phase with timings.
  • bash_write logs one INFO line with the byte count it sent (never the content) so CI logs show whether input reached the terminal.
  • Seven gh-shim tests that expect discovery to finish use a 60 s test deadline; tests of the budget itself keep the 2 s product deadline.

Written for commit 7c9e693. Summary will update on new commits.

View guided diff Turn on auto-fix


Also: gh_shim::tests::cached_lower_rungs_are_reused_only_with_same_repository_provenance failed on main's Windows shard (run 40598367225): rung discovery overran the 2 s product budget on the loaded runner, so it answered R1 (budget exhausted) instead of the expected R2. The seven gh-shim tests that expect discovery to finish now use a 60 s test deadline. Tests of the budget itself (expired deadlines, slow test daemons, probe stages) keep the 2 s product budget. 149 gh_shim tests pass on Linux.

ualtinok and others added 3 commits October 28, 2026 00:02
…nd-trip budgets

bash_pty_waiter_inherits_console_input failed on Windows CI with the task
still running at 30 s and pty_raw ending in "ready". Native repro on a
Windows Server 2022 runner: 0/180 failures unloaded (including input
written before ReadLine and at spawn) and 0/96 with 16 round trips in
parallel on 4 CPUs, where PowerShell took up to 21.5 s to print ready
but ready-to-exit never exceeded 1.7 s. AFT answers ConPTY's ESC[6n
query in the PTY reader, so the input is not held behind it. The single
30 s budget from spawn left no time for the round trip after a slow
start. The test now waits up to 120 s for ready, then 30 s for exit,
still writes once and checks the exact exit code and read: output, and
its failure messages name the phase and when ready was seen and the
write returned. write_pty logs an INFO line with the byte count (never
the content) so a CI log shows whether input reached the terminal.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit c90b8106690991dadbdc521d85f0943662cc8cc3)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
cached_lower_rungs_are_reused_only_with_same_repository_provenance failed on
a loaded Windows runner (main, run 40598367225): rung discovery overran the
2 s product budget, so the answer became R1 (budget exhausted) instead of
the R2 the test expects. Tests that expect discovery to finish now use a
60 s test deadline; tests of the budget itself still pass an expired one.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
@aft-alfonso aft-alfonso Bot changed the title Flake batch 9: Windows PTY console test waits for startup and round trip separately Flake batch 9: Windows PTY console test and gh-shim rung tests wait out runner load Oct 27, 2026
@ualtinok
ualtinok added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 5b7b9cc Oct 28, 2026
93 of 94 checks passed
@ualtinok
ualtinok deleted the land/flake-batch-9 branch October 28, 2026 00:46
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