Skip to content

test: stop the Ubuntu job's intermittent failures - #220

Merged
httpsphl merged 1 commit into
mainfrom
fix/flaky-ubuntu-tests
Oct 7, 2026
Merged

httpsphl merged 1 commit into
mainfrom
fix/flaky-ubuntu-tests

Conversation

@httpsphl

@httpsphl httpsphl commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Three intermittent failures of Rust (Ubuntu) / cargo test, none caused by a code change. Each was reproduced on Linux in Docker (Chromium 154, 2 CPUs) and fixed at its cause.

  • the_login_shell_gives_a_path: the shell's stdout pipe closes slightly before the process counts as exited. The reader sent SIGKILL to the process group right at end of output, so a clean exit could read as killed and the environment was dropped. Now the shell is waited for first (a timeout still kills it), and the group is swept afterwards.
  • a_scaled_screen_keeps_the_page_in_its_pixels...: right after a resize Chromium can send a frame drawn for the old surface under the new metadata (1000x560 picture labelled 1000x700). Reproduced 3 times in 30 runs before the fix. frame_of now waits for a frame whose JPEG size matches its metadata and the expected height, so the test still proves that frames reach the new size.
  • browser.rs "browser did not start in time" (four tests at once): a dozen cold Chromium profiles starting together on a small runner. The real-browser tests now take one of three slots (common/browsing.rs) until the daemon has closed its browser. Not reproduced on its own; this is the contention fix for it.

No product code behaviour changes besides the shell wait; no spec change needed.

Verification

  • Linux Docker, 2 CPUs: cargo test -p botloftd --test browser --test browser_panel --lib looped, 60 of 60 green on the final code (and 60 of 60 on the previous revision, 25 of 25 at 1 CPU).
  • Before the fix the same loop failed 3 of 30 on the panel test.
  • One run in a separate 40-run loop failed (Page.navigate unanswered for 30 s) while a full Windows cargo test --workspace was compiling on the same host; it did not recur in the next 60 clean runs. If it shows up on CI it is a fourth family worth its own look.
  • Windows: cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace all pass. Linux clippy for botloftd passes.

The login shell's environment is read after the shell exits cleanly: the
pipe closes slightly before the process counts as exited, and killing the
group right at end of output could turn that into SIGKILL and a failed read.

The panel test now waits for a frame whose pixels match its metadata: right
after a resize Chromium can send a 1000x560 picture labelled 1000x700.

The real-browser tests take one of three slots, so a dozen cold Chromium
profiles no longer start together on a small runner.
@httpsphl
httpsphl enabled auto-merge October 7, 2026 21:59
@httpsphl
httpsphl merged commit a68527d into main Oct 7, 2026
4 checks passed
@httpsphl httpsphl mentioned this pull request Oct 7, 2026
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