fix(pipeline): retry collisions when creating cache staging files #1109

Merged
divyeshganta merged 1 commit from upstream-pr/1109 into main 2026-11-25 00:12:45 +00:00
divyeshganta commented 2026-11-24 15:48:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by divyeshganta on 2026-11-24T15:48:13Z.


Related to #923. Cache writes now preserve stale staging files and retry name collisions a bounded number of times, while returning unrelated I/O errors. Adds deterministic CPU regressions. Patch by DocBlack89 (a32eacdd5e).

<!-- greyfinch-sync:Marvisak/VIctory:issue:6585729956 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1109). Originally posted by [divyeshganta](https://github.com/divyeshganta) on 2026-11-24T15:48:13Z. --- Related to #923. Cache writes now preserve stale staging files and retry name collisions a bounded number of times, while returning unrelated I/O errors. Adds deterministic CPU regressions. Patch by DocBlack89 (a32eacdd5e0f2e55b5c0cddeb0d44d5fa93f9bb9).
DenRakEiw commented 2026-11-24 16:04:52 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-24T16:01:18Z.

Review: APPROVED


Tested head a32eacd (fast-forward on main ffe310e) on Windows 11 x64 (Rust 1.98.1 MSVC):

  • cargo test -p victory-pipeline: 7 passed, 0 failed (including staging_retries_collisions_without_changing_existing_files, staging_collision_retries_are_bounded, and staging_does_not_retry_other_io_errors)
  • cargo clippy -p victory-pipeline --all-targets: 0 warnings
  • cargo xtask policy: ok

Clean bounded retry logic for staging-file collisions. Approving.

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6042810655 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1109#pullrequestreview-6042810655). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-24T16:01:18Z. **Review:** APPROVED --- Tested head `a32eacd` (fast-forward on `main` `ffe310e`) on Windows 11 x64 (Rust 1.98.1 MSVC): - `cargo test -p victory-pipeline`: **7 passed, 0 failed** (including `staging_retries_collisions_without_changing_existing_files`, `staging_collision_retries_are_bounded`, and `staging_does_not_retry_other_io_errors`) - `cargo clippy -p victory-pipeline --all-targets`: **0 warnings** - `cargo xtask policy`: ok Clean bounded retry logic for staging-file collisions. Approving. AI-assisted (Gemini 4 Neon).
catminou4 commented 2026-11-24 17:03:19 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T16:28:59Z.

Review: APPROVED


Cache staging tempfile now retries on AlreadyExists (interrupted writer / PID reuse) with a 128-attempt bound, leaving stale files intact; other IO errors propagate immediately. Three macOS-runnable tests cover collision, bound, and non-collision errors. Local verification: macOS arm64, rustc 1.98.1, PR head merged into main ffe310e, cargo test -p <crate> --locked. Shader execution tests (valu_tests/host) are #[cfg(all(test, windows))], so macOS covers lowering/decode/unit tests only. victory-pipeline: 7 passed, 0 failed.

<!-- greyfinch-sync:Marvisak/VIctory:review:6043262931 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1109#pullrequestreview-6043262931). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-24T16:28:59Z. **Review:** APPROVED --- Cache staging tempfile now retries on AlreadyExists (interrupted writer / PID reuse) with a 128-attempt bound, leaving stale files intact; other IO errors propagate immediately. Three macOS-runnable tests cover collision, bound, and non-collision errors. Local verification: macOS arm64, rustc 1.98.1, PR head merged into main ffe310e, `cargo test -p <crate> --locked`. Shader execution tests (valu_tests/host) are `#[cfg(all(test, windows))]`, so macOS covers lowering/decode/unit tests only. victory-pipeline: 7 passed, 0 failed.
Zipettte commented 2026-11-24 18:06:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:01:49Z.


Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at a32eacd: cargo test -p victory-pipeline passes, 7 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7140054692 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1109#issuecomment-7140054692). Originally posted by [Zipettte](https://github.com/Zipettte) on 2026-11-24T18:01:49Z. --- Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at a32eacd: `cargo test -p victory-pipeline` passes, 7 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
upstream-sync closed this pull request 2026-11-25 01:05:35 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!1109
No description provided.