Flake batch 9: Windows PTY console test and gh-shim rung tests wait out runner load
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_writelogs 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.
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.