CLI: write pipeline key listings in stable pack order #1805

Open
github-bot wants to merge 1 commit from github-bot/gh-1805 into main AGit
Owner

@⁠EatCodeSleep2 on GitHub · 2026-11-24 22:51 UTC · original
EatCodeSleep2:fix/stable-prebuild-key-listing → main · +9 −6 · 1 files · 1 commits · open

When VICTORY_PREBUILD_KEYS is set, worker completion order currently determines the output order. That makes repeated listings noisy to diff, even on the same input. Record each line by its job and emit it in pack order: compute entries first, then graphics, each by record index. Pipeline scheduling and the listing format are unchanged.

On Windows, a synthetic pack with 80 compute records produced different listings with one and eight workers on main. With the patch, the files are byte-for-byte identical and both contain all 80 records. CLI unit tests and strict Clippy passed.

AI use: Codex wrote and tested the change.

**@⁠EatCodeSleep2** on GitHub · 2026-11-24 22:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/1805) `EatCodeSleep2:fix/stable-prebuild-key-listing` → `main` · +9 −6 · 1 files · 1 commits · open When VICTORY_PREBUILD_KEYS is set, worker completion order currently determines the output order. That makes repeated listings noisy to diff, even on the same input. Record each line by its job and emit it in pack order: compute entries first, then graphics, each by record index. Pipeline scheduling and the listing format are unchanged. On Windows, a synthetic pack with 80 compute records produced different listings with one and eight workers on main. With the patch, the files are byte-for-byte identical and both contain all 80 records. CLI unit tests and strict Clippy passed. AI use: Codex wrote and tested the change.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:45:09 +00:00
Author
Owner

@⁠DesertGamer on GitHub · 2026-11-24 22:56 UTC · original

VIctory V2: community PRs, merged and tested

Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.

Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).

⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.

Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2

Unofficial community fork of Marvisak/VIctory, GPL-3.0.

**@⁠DesertGamer** on GitHub · 2026-11-24 22:56 UTC · [original](https://github.com/Marvisak/VIctory/pull/1805#issuecomment-7146825648) ### VIctory V2: community PRs, merged and tested Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch. **Where it stands today:** launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1). :warning: Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk. Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help: https://DesertGamer/VIctory-V2 *Unofficial community fork of Marvisak/VIctory, GPL-3.0.*
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 06:28 UTC · original

Automated triage for the maintainers.

Merge candidate. The VICTORY_PREBUILD_KEYS listing in apps/victory/src/prebuild.rs used to be written in whatever order the worker threads finished. It now collects lines in a BTreeMap<Job, String>, so the file comes out in pack order and two runs can be diffed. Job derives Ord, and its variants are reordered so compute records sort first. That changes no Debug output, only the order, and the order is the purpose. The change is small and confined to the diagnostics listing.

Note: #1806 and #1809 by the same author touch the same function. #1809 changes how keys_only reaches run, so the second and third to land will need a small rebase.

CI: check failing, but in victory-shader tests this PR does not touch (synthetic_tests::gathers_at_a_level_match_the_hardware, permutes_read_the_lane_named_…) on its older base. A re-run on current main would confirm.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 06:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/1805#issuecomment-7154828167) <!-- victory-triage v1 head=703d5204cee3ab600f2e57117a30b4797cf96d72 verdict=merge-candidate at=2026-11-25T06:30:00Z --> Automated triage for the maintainers. **Merge candidate.** The `VICTORY_PREBUILD_KEYS` listing in `apps/victory/src/prebuild.rs` used to be written in whatever order the worker threads finished. It now collects lines in a `BTreeMap<Job, String>`, so the file comes out in pack order and two runs can be diffed. `Job` derives `Ord`, and its variants are reordered so compute records sort first. That changes no `Debug` output, only the order, and the order is the purpose. The change is small and confined to the diagnostics listing. Note: #1806 and #1809 by the same author touch the same function. #1809 changes how `keys_only` reaches `run`, so the second and third to land will need a small rebase. CI: `check` failing, but in `victory-shader` tests this PR does not touch (`synthetic_tests::gathers_at_a_level_match_the_hardware`, `permutes_read_the_lane_named_…`) on its older base. A re-run on current `main` would confirm. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠cloph-dsp on GitHub · 2026-11-25 11:09 UTC · original

Independent local validation (Windows, Rust 1.100.0/MSVC, head 703d520, no game data): cargo test --locked -p victory -> 1 test passed (run::tests::loader_lock_is_reentrant_and_exclusive), exit 0. Limits: Scoop Rust has no clippy component, so -D warnings lint validation was not run; CI red is from unrelated old-base shader tests; the behavioral repro needs a synthetic pack plus VICTORY_PREBUILD_KEYS, which I did not construct. Overlap with #1809/#1806 still needs a rebase decision. AI-assisted (Hy4 flash). GPU/driver: N/A (CPU-only test). No game data used.

**@⁠cloph-dsp** on GitHub · 2026-11-25 11:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/1805#issuecomment-7160664596) Independent local validation (Windows, Rust 1.100.0/MSVC, head 703d520, no game data): `cargo test --locked -p victory` -> 1 test passed (`run::tests::loader_lock_is_reentrant_and_exclusive`), exit 0. Limits: Scoop Rust has no clippy component, so `-D warnings` lint validation was not run; CI red is from unrelated old-base shader tests; the behavioral repro needs a synthetic pack plus `VICTORY_PREBUILD_KEYS`, which I did not construct. Overlap with #1809/#1806 still needs a rebase decision. AI-assisted (Hy4 flash). GPU/driver: N/A (CPU-only test). No game data used.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 01:14 UTC · original

Code review and Windows 11 verification at head 703d5204cee3 merged cleanly onto main (63bcca43c6a0):

  • Code review (apps/victory/src/prebuild.rs:33-37, 202-223):
    • Deriving Ord on enum Job { Compute(usize), Graphics(usize) } matches the jobs construction order (prebuild.rs:173-174), and collecting into Mutex<BTreeMap<Job, String>> removes multi-worker scheduling jitter from VICTORY_PREBUILD_KEYS output. (Also verified zero merge conflict and full complementarity with #1809.)
  • Verified (Windows 11, Rust 1.98.1):
    • cargo xtask policy: 191 files ok; cargo clippy -p victory --all-targets -- -D warnings: 0 warnings
    • cargo test --locked -p victory: 18/18 passed (14 unit + 4 integration).

LGTM.

**@⁠fuzeofficlal** on GitHub · 2026-11-26 01:14 UTC · [original](https://github.com/Marvisak/VIctory/pull/1805#issuecomment-7179573408) Code review and Windows 11 verification at head `703d5204cee3` merged cleanly onto `main` (`63bcca43c6a0`): - **Code review (`apps/victory/src/prebuild.rs:33-37, 202-223`)**: - Deriving `Ord` on `enum Job { Compute(usize), Graphics(usize) }` matches the `jobs` construction order (`prebuild.rs:173-174`), and collecting into `Mutex<BTreeMap<Job, String>>` removes multi-worker scheduling jitter from `VICTORY_PREBUILD_KEYS` output. (Also verified zero merge conflict and full complementarity with `#1809`.) - **Verified (Windows 11, Rust 1.98.1)**: - `cargo xtask policy`: `191 files ok`; `cargo clippy -p victory --all-targets -- -D warnings`: 0 warnings - `cargo test --locked -p victory`: **18/18 passed** (14 unit + 4 integration). LGTM.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1805/head:github-bot/gh-1805'
git switch 'github-bot/gh-1805'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1805'
git switch 'github-bot/gh-1805'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1805'
git switch 'github-bot/gh-1805'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1805'
git switch 'main'
git merge --squash 'github-bot/gh-1805'
git switch 'main'
git merge --ff-only 'github-bot/gh-1805'
git switch 'main'
git merge 'github-bot/gh-1805'
git push origin 'main'
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!1805
No description provided.