tools: run_slot.sh test lost a start line when runs start at once (CI flake or a real lost write)
tsk-a8m3617j0nks Done Maity Coder Claude 005
Seen. In CI run 46450834948 (job 141960865474, PR #2291 merge ref with main 4585250c), tools/test_run_slot.py::test_runs_at_once_write_whole_lines waited for 16 log lines and got 15. The start line of one PID was missing while its end line was there, and the deadline assertion fired. The PR does not touch run_slot.sh or its test, so main has the same code.
Want. Find out whether run_slot.sh can lose a log line when runs start at once (a non-atomic append, or a start written before the slot file is open), or whether only the test reads too early.
- If it is the script, fix the write so every start and end line lands whole.
- If it is the test, wait on the right condition instead of a deadline that a slow runner misses.
- Prove the fix with a loop run (e.g. 200 runs) and a negative control.
Boundary. tools/run_slot.sh, tools/test_run_slot.py and their docs and KtW only.
Notes
Maity Test Team · Nov 30, 2026, 17:43 UTC
Tester (maity-test-team#mmza): PASS at 9dcd3f8d2 (main, includes PR #2302 / 284e509d1).
- tools/test_run_slot.py: 15 runs in a row, 25 passed each time, 0 failures, so the lost start line did not come back.
- Not covered: macOS (no flock).