Repository navigation
Pipeline: accept existing entry when concurrent cache publication races on Windows - #1324
Conversation
Keep the published entry open without delete sharing and assert that replacement is blocked. The regression fails with the pre-fix publication code and passes with the current implementation. Validation: 5 pipeline tests passed on x86_64-pc-windows-msvc; pipeline Clippy with warnings denied and formatting checks passed.
|
Tested on Windows 11 with the repo toolchain, merged into current
I didn't test with game data. Tested locally with an AI-assisted script (Claude Code); I checked the results before posting. |
|
Automated triage for the maintainers. Merge candidate. Update after your rebase: CI: passing ( Generated by Claude Code |
|
Rebased onto current |
…cache publication races on Windows
Adapt PR Marvisak#1324 at 8f28c35 (including a8ed29d) by mgunes1311-lab. Preserve the local existing-writer fallback and collision-resistant staging. Return staging-write errors separately from rename errors and strengthen the existing held-reader regression to prove replacement is blocked, instead of adding a duplicate race test. Exact source five tests and candidate nine tests pass; removing the rename fallback fails the existing regression. Deterministic staging-write failure injection was not available. Co-authored-by: mgunes1311-lab <mgunes.1311@gmail.com>
Marvisak#1324, Marvisak#1432 and Marvisak#1032 landed with their evidence; Marvisak#1436 is closed upstream. The two accepted ztrx ports were re-verified as working (wait-budget tests and the launcher parse), and a declaration sweep shows 575 ztrx-only symbols, which is why the remaining features stay held rather than cherry-picked.
…cache publication races on Windows
…es on Windows (Marvisak#1324) * Pipeline: accept existing entry when concurrent cache publication races on Windows * Pipeline: exercise the blocked Windows cache publication path Keep the published entry open without delete sharing and assert that replacement is blocked. The regression fails with the pre-fix publication code and passes with the current implementation. Validation: 5 pipeline tests passed on x86_64-pc-windows-msvc; pipeline Clippy with warnings denied and formatting checks passed. * Pipeline: adapt concurrent publication test to new tempfile_in signature (cherry picked from commit a73d59e) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
On Windows,
std::fs::rename(&tmp, &path)fails with access denied / sharing violation if another thread or process concurrently finishes publishing the same content-addressedCacheKeyentry and holds an open read handle onpathafter thepath.is_file()check at line 51.Changes
std::fs::renameseparately inCache::get_or_convert(crates/victory-pipeline/src/cache.rs).std::fs::rename(&tmp, &path)fails, remove the staging file and returnOk(path)whenpath.is_file()is now true (still propagating the error whenpathis not a file, e.g. a directory).accepts_entry_published_concurrently_while_open.Verification
cargo test -p victory-pipeline --target x86_64-pc-windows-msvc --locked(5 passed; 0 failed)cargo clippy --workspace --all-targets --target x86_64-pc-windows-msvc --locked -- -D warningsRUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --target x86_64-pc-windows-msvc --lockedcargo run -p xtask --target x86_64-pc-windows-msvc --locked -- policy --staged(asset policy: 1 files ok)