Skip to content

test(updates): make the atomic-save test prove its reader overlapped the writer - #107

Merged
vibesoftwarecoder merged 1 commit into
masterfrom
fix/flaky-atomic-save-test
Oct 9, 2026
Merged

vibesoftwarecoder merged 1 commit into
masterfrom
fix/flaky-atomic-save-test

Conversation

@vibesoftwarecoder

Copy link
Copy Markdown
Owner

The test asserted the reader had read at least once after a fixed 40 saves. On a busy CI runner the reader thread had not run by the time the writer finished (it failed on #106, at line 178), so the assertion failed, and a passing run could have proved nothing about atomicity.

The writer now starts only after the reader has read the file, and keeps saving until the reader has seen it 200 times (60 s limit). A run that did not overlap fails with a clear message. A non-atomic save still turns the test red (checked by mutation). I could not reproduce the original failure locally, so the fix removes the dependence on thread timing instead of tuning it.

Test-only change. Suite: 1348 passed, 18 skipped.

🤖 Generated with Claude Code

…the writer

The test asserted the reader had read at least once after a fixed 40 saves. On a busy
CI runner the reader thread had not run by the time the writer finished (PR #106, line
178), so the assertion failed, and a passing run could have proved nothing about
atomicity. The writer now starts only after the reader has read the file, and keeps
saving until the reader has seen it 200 times (60 s limit). A non-atomic save still
turns it red.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@vibesoftwarecoder
vibesoftwarecoder merged commit 235a32a into master Oct 9, 2026
3 checks passed
@vibesoftwarecoder
vibesoftwarecoder deleted the fix/flaky-atomic-save-test branch October 20, 2026 18:14
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