Skip to content

Give each submit test its own log file - #39

Merged
Zenofex merged 1 commit into
mainfrom
fix-submit-test-race
Oct 7, 2026
Merged

Zenofex merged 1 commit into
mainfrom
fix-submit-test-race

Conversation

@Zenofex

@Zenofex Zenofex commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

#37 shipped a race, and it blocked #38.

Every test in submit_cli.rs wrote the same tmpdir()/boot.log. Rust runs tests in parallel threads, and fs::write truncates before it writes, so one test's spawned process could read the file in the instant another had emptied it. The binary then did exactly what it should:

Error: /tmp/submit_cli/boot.log is empty; nothing to submit

It passed 7/7 locally and passed on main's own CI run, then failed test (default-features) on the next branch. That is the shape of flake that survives: red often enough to erode trust in the suite, green often enough that nobody can reproduce it.

Each test now writes its own <tag>.log.

Verified with 15 consecutive runs of the file — 0 failures — and seven distinct files on disk.

🤖 Generated with Claude Code

#37 shipped a race. Every test in submit_cli.rs wrote the same
`tmpdir()/boot.log`, Rust runs tests in parallel threads, and `fs::write`
truncates before it writes. So one test's spawned process could read the file
in the instant another test had emptied it, and the binary did exactly what it
should: "boot.log is empty; nothing to submit".

It passed 7/7 locally and passed on main's own CI run, then failed
`test (default-features)` on the next branch. That is the shape of flake that
survives: red often enough to erode trust in the suite, green often enough that
nobody can reproduce it.

Each test now writes its own `<tag>.log`. Verified with 15 consecutive runs of
the file, 0 failures, and seven distinct files on disk.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Zenofex
Zenofex merged commit a9b675a into main Oct 7, 2026
11 checks passed
@Zenofex
Zenofex deleted the fix-submit-test-race branch October 7, 2026 10:28
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