GPU: a save before the early list was loaded leaves the early list file alone #2326

Closed
github-bot wants to merge 1 commit from gh-pr/2326/head into gh-pr/2326/base
Owner

@⁠denkencar-sketch on GitHub · 2026-11-25 10:42 UTC · original
denkencar-sketch:fix/plib-002 → main · +25 −3 · 1 files · 1 commits · closed without merging

Summary

save() read the early-list state directly, so a save made before the early list was loaded wrote that file empty and erased the keys earlier runs had recorded. early_text now leaves the file alone when the list was not loaded.

Testing

Test an_unloaded_early_list_is_not_written_empty fails if the unloaded case writes an empty list and passes with this change. It tests early_text, not the file write in save().

cargo test --workspace --locked passes apart from known flakes: modules::dstorage::tests::a_page_list_filled_after_its_request_starts fails now and then on main too, and so does a parallel-run flake in victory-gpu's lib tests (watch:: and descriptor::host:: tests, 2 of 40 runs on pristine main).

This touches save() like #2327 and #2328 do: they conflict textually only in adjacent test blocks in library.rs. Not tried: a run in the game.

AI-assisted.

**@⁠denkencar-sketch** on GitHub · 2026-11-25 10:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/2326) `denkencar-sketch:fix/plib-002` → `main` · +25 −3 · 1 files · 1 commits · closed without merging ## Summary `save()` read the early-list state directly, so a save made before the early list was loaded wrote that file empty and erased the keys earlier runs had recorded. `early_text` now leaves the file alone when the list was not loaded. ## Testing Test `an_unloaded_early_list_is_not_written_empty` fails if the unloaded case writes an empty list and passes with this change. It tests `early_text`, not the file write in `save()`. `cargo test --workspace --locked` passes apart from known flakes: `modules::dstorage::tests::a_page_list_filled_after_its_request_starts` fails now and then on `main` too, and so does a parallel-run flake in `victory-gpu`'s lib tests (`watch::` and `descriptor::host::` tests, 2 of 40 runs on pristine `main`). This touches `save()` like #2327 and #2328 do: they conflict textually only in adjacent test blocks in `library.rs`. Not tried: a run in the game. AI-assisted.
It wrote the file empty, erasing the keys earlier runs recorded.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:02:23 +00:00
github-bot closed this pull request 2026-11-26 05:02:23 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 15:20 UTC · original

Automated triage for the maintainers.

Proposed close. The case this guards against cannot happen on main. In crates/victory-gpu/src/pipeline/library.rs, save() returns early unless added, prebuilt_changed or USED_CHANGED is set, and each of those is only set after USED has been loaded:

  • every title pipeline reaches the workers through make::early, which calls wanted_early and so used(), or through make::ready, which calls note_used before anything is made;
  • the pre-build calls keep_early_list() before it builds anything, and its doc comment says it exists so that a save keeps the list.

So when save() writes, USED is always Some, and the new early_text(None) branch never runs; the added test exercises only the helper, not a reachable path. A call sequence on main where a save writes the early list while USED is None would change this verdict. CI: passing.

This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the label.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 15:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/2326#issuecomment-7166687478) <!-- victory-triage v1 head=b0fe5f0fe002389070656d789891c610fd9abfd9 verdict=proposed-close at=2026-11-25T15:27:00Z --> Automated triage for the maintainers. **Proposed close.** The case this guards against cannot happen on `main`. In `crates/victory-gpu/src/pipeline/library.rs`, `save()` returns early unless `added`, `prebuilt_changed` or `USED_CHANGED` is set, and each of those is only set after `USED` has been loaded: - every title pipeline reaches the workers through `make::early`, which calls `wanted_early` and so `used()`, or through `make::ready`, which calls `note_used` before anything is made; - the pre-build calls `keep_early_list()` before it builds anything, and its doc comment says it exists so that a save keeps the list. So when `save()` writes, `USED` is always `Some`, and the new `early_text(None)` branch never runs; the added test exercises only the helper, not a reachable path. A call sequence on `main` where a save writes the early list while `USED` is `None` would change this verdict. CI: passing. This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the label. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠denkencar-sketch on GitHub · 2026-11-25 23:12 UTC · original

Closing per triage: \save()\ only writes after \USED\ has already been loaded on \main, so \early_text(None)\ is unreachable.

**@⁠denkencar-sketch** on GitHub · 2026-11-25 23:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/2326#issuecomment-7177260069) Closing per triage: \save()\ only writes after \USED\ has already been loaded on \main\, so \early_text(None)\ is unreachable.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!2326
No description provided.