Use writeFileAtomic in Distribution.Client.Config and remove .tmp workaround#28
Merged
ulysses4ever merged 3 commits intomasterfrom Apr 21, 2026
Conversation
Agent-Logs-Url: https://github.com/ulysses4ever/cabal/sessions/ed90ade9-a00f-4613-acaa-c34cdbfe746a Co-authored-by: ulysses4ever <6832600+ulysses4ever@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ulysses4ever/cabal/sessions/ed90ade9-a00f-4613-acaa-c34cdbfe746a Co-authored-by: ulysses4ever <6832600+ulysses4ever@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Distribution.Client.Config to use writeFileAtomic
Use Apr 21, 2026
writeFileAtomic in Distribution.Client.Config and remove .tmp workaround
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates config-file persistence in
Distribution.Client.Configto use atomic writes directly to the target path, instead of a fixed sibling*.tmpfile and rename sequence. It also aligns unit tests with the new behavior and adds a focused concurrency regression test for config updates.Template Α: This PR modifies behaviour or interface
Config write path hardening
writeConfigFilenow:writeFileAtomic file ...file <.> "tmp"+renameFileflowUserConfig unit tests
concurrentUpdateConfigto exercise concurrentuserConfigUpdatecalls and assert no exceptionsconfigFile ++ ".tmp"(no longer applicable)Include the following checklist in your PR:
significance: significantin the changelog file.