GPU: retry publishing prebuilt pipeline lists after a write failure #2230

Closed
andrewpozdnakov7-jpg wants to merge 2 commits from upstream-pr/2232 into main
andrewpozdnakov7-jpg commented 2026-11-25 08:27:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-25T08:27:13Z.


The save clears the prebuilt list's dirty flag when it serializes the library. If publication then fails, the next save can skip the list even after the destination is available. This can leave the prebuild without a matching list of pipelines already built.

Mark an unpublished prebuilt list dirty again on the write error so the next save retries. The regression blocks the list's path with a directory, saves a native D3D12 library, removes the obstruction, and saves again. Before the fix the list was missing after the retry. With the fix it contains the recorded key and its tag matches the library on disk.

  • Windows/WARP GPU library suite with the same regression on both builds went from 145 passed, 2 failed, 2 ignored to 146 passed, 1 failed, 2 ignored. The placed-view texture-format test failed in both builds.
  • Clippy passed for victory-gpu all targets with warnings denied, with and without diagnostics.

Coordination claim in #1633.

AI-assisted using Codex. Synthetic data only.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6600341770 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2232). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-25T08:27:13Z. --- The save clears the prebuilt list's dirty flag when it serializes the library. If publication then fails, the next save can skip the list even after the destination is available. This can leave the prebuild without a matching list of pipelines already built. Mark an unpublished prebuilt list dirty again on the write error so the next save retries. The regression blocks the list's path with a directory, saves a native D3D12 library, removes the obstruction, and saves again. Before the fix the list was missing after the retry. With the fix it contains the recorded key and its tag matches the library on disk. - Windows/WARP GPU library suite with the same regression on both builds went from 145 passed, 2 failed, 2 ignored to 146 passed, 1 failed, 2 ignored. The placed-view texture-format test failed in both builds. - Clippy passed for victory-gpu all targets with warnings denied, with and without diagnostics. [Coordination claim in #1633](https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7156933654). AI-assisted using Codex. Synthetic data only.
catminou4 commented 2026-11-25 09:05:54 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T08:48:29Z.

Review: COMMENTED


Retry publishing prebuilt pipeline lists after a save failure (prebuilt_changed reset on write error). Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1.

<!-- greyfinch-sync:Marvisak/VIctory:review:6054380353 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2232#pullrequestreview-6054380353). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T08:48:29Z. **Review:** COMMENTED --- Retry publishing prebuilt pipeline lists after a save failure (prebuilt_changed reset on write error). Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1.
DenRakEiw commented 2026-11-25 09:05:54 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T09:02:32Z.

Review: APPROVED


Verified locally merged onto origin/main (940d32f, Windows 11 x64, NVIDIA GeForce RTX 5090, Rust 1.98.1 MSVC):

  • cargo test -p victory-gpu --lib a_prebuilt_list_is_retried_after_a_failed_publication — passed on RTX 5090
  • cargo clippy -p victory-gpu --all-targets — 0 warnings
  • cargo xtask policy — ok (183 files ok)

Clean retry handling when publishing a prebuilt pipeline list fails to write. Looks good.

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6054567612 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2232#pullrequestreview-6054567612). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-25T09:02:32Z. **Review:** APPROVED --- Verified locally merged onto `origin/main` (`940d32f`, Windows 11 x64, NVIDIA GeForce RTX 5090, Rust 1.98.1 MSVC): - `cargo test -p victory-gpu --lib a_prebuilt_list_is_retried_after_a_failed_publication` — passed on RTX 5090 - `cargo clippy -p victory-gpu --all-targets` — 0 warnings - `cargo xtask policy` — ok (`183 files ok`) Clean retry handling when publishing a prebuilt pipeline list fails to write. Looks good. AI-assisted (Gemini 4 Neon).
Dathinel commented 2026-11-25 09:06:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dathinel on 2026-11-25T08:44:58Z.


Integration note for #1429: the two heads conflict in pipeline/library.rs, and they preserve different retry behavior. On Windows with a native D3D12 library, the prebuilt-list regression on 84b873c passed. I then blocked early-pipelines.txt with a directory, saved one used key, removed the directory, and saved again without adding another key.

  • On 84b873c with an empty prebuilt set, the second save left early-pipelines.txt absent. Marking the used list dirty again wrote the expected key, confirming the path was writable.
  • On #1429 at 88ecb4c with an empty prebuilt set, the second save wrote the key as expected.

If the changes are integrated, keeping both regressions would cover the two files independently. The early-list case is outside this PR's stated prebuilt-list fix. AI-assisted, synthetic data only.

Follow-up on combined commit 5138eff: I blocked the early-list destination on save 1, unblocked it, recorded a second synthetic key, and blocked the prebuilt-list destination on save 2. After unblocking both, save 3 recovered both keys in each list without any further updates. The prebuilt tag matched the serialized library on disk, and both dirty flags cleared. All 12 selected pipeline-library tests, including this case, passed on the default Windows D3D12 device and again on WARP. This exercises sequential retry and publication with synthetic keys and an empty native library.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7157421622 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2232#issuecomment-7157421622). Originally posted by [Dathinel](https://github.com/Dathinel) on 2026-11-25T08:44:58Z. --- Integration note for #1429: the two heads conflict in pipeline/library.rs, and they preserve different retry behavior. On Windows with a native D3D12 library, the prebuilt-list regression on 84b873c passed. I then blocked early-pipelines.txt with a directory, saved one used key, removed the directory, and saved again without adding another key. - On 84b873c with an empty prebuilt set, the second save left early-pipelines.txt absent. Marking the used list dirty again wrote the expected key, confirming the path was writable. - On #1429 at 88ecb4c with an empty prebuilt set, the second save wrote the key as expected. If the changes are integrated, keeping both regressions would cover the two files independently. The early-list case is outside this PR's stated prebuilt-list fix. AI-assisted, synthetic data only. Follow-up on combined commit 5138eff: I blocked the early-list destination on save 1, unblocked it, recorded a second synthetic key, and blocked the prebuilt-list destination on save 2. After unblocking both, save 3 recovered both keys in each list without any further updates. The prebuilt tag matched the serialized library on disk, and both dirty flags cleared. All 12 selected pipeline-library tests, including this case, passed on the default Windows D3D12 device and again on WARP. This exercises sequential retry and publication with synthetic keys and an empty native library.
andrewpozdnakov7-jpg commented 2026-11-25 09:06:26 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-25T09:05:26Z.


Thanks for confirming the repro and pointing out #1429. I tried the same Windows/WARP tests on its current head (88ecb4c) and on 5138eff, which layers the prebuilt retry on top.

  • Blocking only prebuilt-pipelines.txt leaves it missing on the next save on 88ecb4c. The combined commit writes it on retry and verifies its tag against the serialized library.
  • Blocking early-pipelines.txt with a prebuilt update pending makes the next save restore the early list on 88ecb4c, but still drops the prebuilt list. The combined commit restores both files on retry.

The victory-gpu diagnostics suite went from 146 passed, 3 failed, 2 ignored to 148 passed, 1 failed, 2 ignored. The placed-view texture-format test fails in both runs. Clippy with diagnostics and all targets is clean.

The combined commit can be cherry-picked onto #1429 if that lands first. If you fold in the prebuilt retry, please retain Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7157860663 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2232#issuecomment-7157860663). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-25T09:05:26Z. --- Thanks for confirming the repro and pointing out #1429. I tried the same Windows/WARP tests on its current head (`88ecb4c`) and on [`5138eff`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/5138eff6da8495dfff3f58f415bea83a69677bef), which layers the prebuilt retry on top. - Blocking only `prebuilt-pipelines.txt` leaves it missing on the next save on `88ecb4c`. The combined commit writes it on retry and verifies its tag against the serialized library. - Blocking `early-pipelines.txt` with a prebuilt update pending makes the next save restore the early list on `88ecb4c`, but still drops the prebuilt list. The combined commit restores both files on retry. The `victory-gpu` diagnostics suite went from 146 passed, 3 failed, 2 ignored to 148 passed, 1 failed, 2 ignored. The placed-view texture-format test fails in both runs. Clippy with diagnostics and all targets is clean. The combined commit can be cherry-picked onto #1429 if that lands first. If you fold in the prebuilt retry, please retain `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>`.
Marvisak commented 2026-11-25 14:07:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T13:30:28Z.


Automated triage for the maintainers.

On a failed write, pipeline::library::save (crates/victory-gpu/src/pipeline/library.rs) now sets prebuilt_changed again, so the next save retries the prebuilt list instead of skipping it. On main the flag is already cleared when the library is serialized. The change is small, and the regression test blocks the destination with a directory and then checks that the list's tag matches the library on disk. CI passes. One thing to know: it conflicts with #1429, which fixes the separate early-list retry in the same function. One will need rebasing after the other lands, and a tester has posted a combined commit (5138eff) above.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7163876111 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2232#issuecomment-7163876111). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T13:30:28Z. --- <!-- victory-triage v1 head=84b873c2692428e476186b8050b426216a6ab924 verdict=merge-candidate at=2026-11-25T13:39:00Z --> Automated triage for the maintainers. On a failed write, `pipeline::library::save` (`crates/victory-gpu/src/pipeline/library.rs`) now sets `prebuilt_changed` again, so the next save retries the prebuilt list instead of skipping it. On main the flag is already cleared when the library is serialized. The change is small, and the regression test blocks the destination with a directory and then checks that the list's tag matches the library on disk. CI passes. One thing to know: it conflicts with #1429, which fixes the separate early-list retry in the same function. One will need rebasing after the other lands, and a tester has posted a combined commit (5138eff) above. --- _Generated by [Claude Code](https://claude.ai/code)_
andrewpozdnakov7-jpg commented 2026-11-25 22:04:44 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-25T22:03:02Z.


I resolved the conflict in 728d376. The merged code uses the upstream ordered early-list loader, fallible serialization allocation and separate pipeline-load handle.

On merged main 5c7489f, the same WARP fixture leaves the prebuilt list missing at the second save when its retry is disabled. With the patch the second save writes the list with the matching library tag. Both saves retain the expected order in the early list. The app-local WARP GPU suite passed 242 tests with one ignored, including the upstream parallel load and oldest-keys tests. Both strict Clippy configurations and staged asset policy pass. Clean merge-tree with f3578e3.

Please retain the Git author if moving the original change, or keep this trailer if it is folded into another commit.

Co-authored-by: andrewpozdnakov7-jpg [email protected]

AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7175871582 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2232#issuecomment-7175871582). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-25T22:03:02Z. --- I resolved the conflict in [728d376](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/728d376a83059cb2070c62e485207cc171b11152). The merged code uses the upstream ordered early-list loader, fallible serialization allocation and separate pipeline-load handle. On merged main `5c7489f`, the same WARP fixture leaves the prebuilt list missing at the second save when its retry is disabled. With the patch the second save writes the list with the matching library tag. Both saves retain the expected order in the early list. The app-local WARP GPU suite passed 242 tests with one ignored, including the upstream parallel load and oldest-keys tests. Both strict Clippy configurations and staged asset policy pass. Clean merge-tree with f3578e3. Please retain the Git author if moving the original change, or keep this trailer if it is folded into another commit. Co-authored-by: andrewpozdnakov7-jpg <[email protected]> AI-assisted with Codex.
upstream-sync closed this pull request 2026-11-25 23:04:06 +00:00
Marvisak commented 2026-11-25 23:05:58 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:06:46Z.


Automated triage for the maintainers, second look (a review against current main, with builds and tests where they could change the verdict).

Closing in favour of #2327, which gives back every dirty mark on a failed serialise or write. This restores only prebuilt_changed, and only on a write failure, so a failed library write with nothing else dirty is still not retried.

If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7175950586 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2232#issuecomment-7175950586). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T22:06:46Z. --- Automated triage for the maintainers, second look (a review against current `main`, with builds and tests where they could change the verdict). Closing in favour of #2327, which gives back every dirty mark on a failed serialise or write. This restores only `prebuilt_changed`, and only on a write failure, so a failed library write with nothing else dirty is still not retried. If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.

Pull request closed

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!2230
No description provided.