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

Open
EatCodeSleep2 wants to merge 1 commit from upstream-pr/1805 into main
EatCodeSleep2 commented 2026-11-24 22:51:23 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by EatCodeSleep2 on 2026-11-24T22:51:23Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6592999924 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1805). Originally posted by [EatCodeSleep2](https://github.com/EatCodeSleep2) on 2026-11-24T22:51:23Z. --- 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.
catminou4 commented 2026-11-24 23:05:35 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:03:37Z.

Review: COMMENTED


Static review only: apps/Windows-only (CLI/run paths) — nothing compiles on macOS; source review of the diff.

Pipeline key listings in stable pack order: 2.4K CLI determinism fix — stable output ordering for cache tooling.

<!-- greyfinch-sync:Marvisak/VIctory:review:6048803582 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1805#pullrequestreview-6048803582). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-24T23:03:37Z. **Review:** COMMENTED --- Static review only: apps/Windows-only (CLI/run paths) — nothing compiles on macOS; source review of the diff. Pipeline key listings in stable pack order: 2.4K CLI determinism fix — stable output ordering for cache tooling.
DesertGamer commented 2026-11-24 23:06:05 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DesertGamer on 2026-11-24T22:56:32Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7146825648 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1805#issuecomment-7146825648). Originally posted by [DesertGamer](https://github.com/DesertGamer) on 2026-11-24T22:56:32Z. --- ### 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.*
Melow-code commented 2026-11-25 00:06:10 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Melow-code on 2026-11-24T23:08:28Z.

Review: APPROVED


Deterministic pack order is correct — worker completion order was the wrong default for a listing.

<!-- greyfinch-sync:Marvisak/VIctory:review:6048853224 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1805#pullrequestreview-6048853224). Originally posted by [Melow-code](https://github.com/Melow-code) on 2026-11-24T23:08:28Z. **Review:** APPROVED --- Deterministic pack order is correct — worker completion order was the wrong default for a listing.
Marvisak commented 2026-11-25 07:03:17 +00:00 (Migrated from github.com)

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


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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7154828167 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1805#issuecomment-7154828167). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T06:28:33Z. --- <!-- 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)_
cloph-dsp commented 2026-11-25 12:03:38 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-25T11:09:16Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7160664596 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1805#issuecomment-7160664596). Originally posted by [cloph-dsp](https://github.com/cloph-dsp) on 2026-11-25T11:09:16Z. --- 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.
fuzeofficlal commented 2026-11-26 02:06:56 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T01:14:25Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7179573408 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1805#issuecomment-7179573408). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-26T01:14:25Z. --- 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 cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1805:upstream-pr/1805'
git switch 'upstream-pr/1805'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1805'
git switch 'upstream-pr/1805'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1805'
git switch 'upstream-pr/1805'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1805'
git switch 'main'
git merge --squash 'upstream-pr/1805'
git switch 'main'
git merge --ff-only 'upstream-pr/1805'
git switch 'main'
git merge 'upstream-pr/1805'
git push origin 'main'
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!1804
No description provided.