Skip to content

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

Closed
denkencar-sketch wants to merge 1 commit into
Marvisak:mainfrom
denkencar-sketch:fix/plib-002
Closed

denkencar-sketch wants to merge 1 commit into
Marvisak:mainfrom
denkencar-sketch:fix/plib-002

Conversation

@denkencar-sketch

@denkencar-sketch denkencar-sketch commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

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.

…le alone

It wrote the file empty, erasing the keys earlier runs recorded.

@catminou4 catminou4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A save before the early list was loaded leaves the early file alone (early_text Some/None split). 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. Pipeline-library save cluster with #2327/#2328 (and #2232 earlier).

Copy link
Copy Markdown
Owner

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

@denkencar-sketch

Copy link
Copy Markdown
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants