Skip to content

The slow-Drive test no longer fails when a loaded runner slows the Drive's close (#950) - #955

Merged
Skeyelab merged 1 commit into
mainfrom
fix/950-slowdrive-flake
Oct 24, 2026
Merged

Skeyelab merged 1 commit into
mainfrom
fix/950-slowdrive-flake

Conversation

@Skeyelab

Copy link
Copy Markdown
Member

Fixes #950.

What

slowDrive failed once in CI (run 39868816619, 34.5 s) on three expectations: the Drive wasn't .repaired, its samples didn't match, and the Device Take folder still existed. That last one means the stand-in did start (the issue text guessed it never did; I'll correct it there). What fits all three is that Stop gave the Drive up: TakeSession.finish waits on the writers with a no-progress window (writerStopTimeout), and this test's recorder hard-coded 300 ms. A Drive writer that makes no progress for 300 ms at its close is abandoned. Repair skips an abandoned Drive, and the stand-in stays on the Device. On a starved runner a 300 ms pause is easy to hit.

The test's recorder helper now takes a stopTimeout (default 300 ms, so every other test is unchanged). slowDrive sets 30 s. That still bounds a hang: a writer with no progress for 30 s is given up, and a finished writer returns at once.

Red first

SlowStem gets a finalizeDelay, and slowDrive uses 600 ms. With the 300 ms window it fails on the same three expectations as CI (3 issues). With the 30 s window it passes. The whole DriveOnlyTakeTests suite passed three runs in a row (90 tests each). VERIFY_QUICK=1 ./scripts/verify.sh passes.

What this does and doesn't prove

The red run reproduces a pause of at least the window in the Drive writer, which matches CI's failure. It is not a measured cause: the CI log has no direct proof, and the failure didn't reproduce idle (25/25), under load with the full target (3/3), or with 24 hogs on this test alone (60/60). If #950 comes back with .repaired but a sample mismatch, look at the loop that feeds 5 s of audio in about 0.5 s (10 times real time, though the comment says audio never arrives faster than real time).

Tests only; no code under Sources changes.

…ive's close (#950)

slowDrive's recorder gave Stop a 300 ms no-progress window, so a Drive writer that
paused that long at the close was given up: Repair skipped it and the stand-in
stayed on the Device, the three expectations that failed in CI. The test's
recorder now takes a stop window (default unchanged), and slowDrive sets 30 s,
which still bounds a hang. The Drive stem closes 600 ms late in the test, which
reproduced the failure before the change.

Assisted-by: Claude Code:claude-sonnet-5-5
@codecov

codecov Bot commented Oct 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Skeyelab
Skeyelab merged commit 61d09fe into main Oct 24, 2026
11 checks passed
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.

slowDrive flaked once in CI: the Device never stood in (run 39868816619, 34.5 s)

1 participant