Repository navigation
Conversation
Take rust-minor (tokio 1.53.2, thiserror 2.0.21, uuid 1.27.0, libc 0.2.190, tract-onnx 0.23.8) and @types/node 26.6.4 so PRs 149 and 150 can close.
The first retry reused a temp file the winner had already renamed, so Linux returned NotFound. Each attempt now writes a fresh temp, and a non-file destination still fails immediately.
Split the rename race into a helper whose lines the directory-dest and missing-parent tests hit, so whycodes-config stays at 100%.
Concurrent saves recreate the temp and retry NotFound, AlreadyExists, and Windows sharing violations. Real IO errors still return immediately, and tmp cleanup is logged.
Rename onto a missing file first, and only replace when the dest already exists. A lost race re-reads the file the other writer just created instead of returning File exists.
llvm-cov counts the unwrap_or_else body as its own line. The empty-parent fallback is now a match arm the relative-path test already hits.
A process-wide lock keeps write_atomic on the single path coverage already counts. Concurrent saves no longer share a temp file or return File exists.
… floor Replace the lock closure and the lazy parent fallback with match arms the existing write_atomic tests already run.
The save lock stays a single unwrap_or_else line, and the temp file is always .config.toml.tmp. That removes the two load.rs lines the 100% config floor was missing.
The two missed load.rs lines were the temp-file cleanup after a failed replace. Fold that failure into the returned I/O error and hit it by planting a directory on the next temp path under the save lock.
1 of 2 tasks
Member
Author
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.
Summary
@types/node26.6.4.File existsfrom concurrentconfig.tomlsaves; that race is fixed on main by fix(config): unique temp files for concurrent config saves #151. These lockfile bumps are applied here so both Dependabot PRs can close.Test plan
cargo check -p whycodes-cli --locked