Skip to content

Conversation

@ethanndickson
Copy link
Member

The test refreshExperiment updates cache and writes it to disk was flaky because fs.writeFile is not atomic β€” it truncates the file before writing, creating a race window where readers can see an empty or partial file.

Switch to write-file-atomic which writes to a temp file then renames, making the operation atomic.


Generated with mux β€’ Model: anthropic:claude-opus-4-5 β€’ Thinking: high

The test 'refreshExperiment updates cache and writes it to disk' was flaky
because fs.writeFile is not atomic - it truncates the file before writing,
creating a race window where readers can see an empty or partial file.

Switch to write-file-atomic which writes to a temp file then renames,
making the operation atomic.

---
_Generated with `mux` β€’ Model: `anthropic:claude-opus-4-5` β€’ Thinking: `high`_
@ethanndickson ethanndickson added this pull request to the merge queue Dec 18, 2025
Merged via the queue into main with commit df2aade Dec 18, 2025
19 of 20 checks passed
@ethanndickson ethanndickson deleted the experiments-t0jr branch December 18, 2025 02:43
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