CLI: list-diff compares two translate listings program by program #1540
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1541"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by sinan-cmyk on 2026-11-24T18:58:49Z.
Summary:
victory list-diff <before> <after> [--top N]compares twotranslate --validate --listoutputs program by program. The report names no program, so it can be posted as it is.Why
Measuring a shader change on a dump means running
translate --validate --listbefore and after the change and comparing the two listings. #1247 and its follow-ups do this for hundreds of PRs, and every person who measures writes their own comparison script. This adds one comparison to the CLI that everyone can share.What it prints
--toppairs (default 20)The report has counts and failure reasons only, and never prints a program's label (labels carry the title's shader names). So the output can go into an issue or a PR under
docs/asset-policy.md.How a listing line is read
at 0x…offset of the failing instruction is removed from the label. Otherwise a fix that moves a failure to a later instruction would look like a new program.pair …lines and a leading BOM are skipped. A UTF-8 BOM appears when the listing is redirected from Windows PowerShell 5.1.Checks
cargo test -p victory --bins listdiff: 5 synthetic tests, no game data. They cover label splitting, the skipped lines, several failures of one program, gained, lost and moved, and the report naming no program.cargo clippy -p victory --all-targets: clean.rustfmt --checkon the changed files: clean.cargo xtask policy --stagedpassed in the pre-commit hook.main: +1,688 gained, 0 lost, 916 programs with a changed reason. #1492 against #1402: 31 lost, as posted on #1492.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T19:20:59Z.
Review: COMMENTED
Static review only:
apps/victoryis Windows-only, solistdiff.rscannot be compiled or tested on macOS. From the diff: the report deliberately carries only counts and failure reasons (no program labels, perdocs/asset-policy.md) — good privacy hygiene for pasting into issues. The wiring adds alist-diff <before> <after> [--top N]subcommand and README documentation. Two suggestions: (1) the diff/aggregation logic inlistdiff.rsis platform-independent pure Rust — consider unit tests for the parsing/grouping edge cases (missing programs, renamed failures, empty inputs) even though the crate only builds on Windows; (2)--top Nbehavior when N exceeds the bucket count. Not blocking.Imported from Marvisak/VIctory. Originally posted by sinan-cmyk on 2026-11-24T19:28:28Z.
Thanks for the review. On your two points:
listdiff.rs, and they need no GPU. Programs found in only one listing are counted, not dropped. A failure whose instruction offset moves is the same program. A program with several failure lines is one outcome. A program that fails in both listings for another reason is listed as moved.8584546adds a test for a listing without program lines (made without--list):list-diffrefuses it with an error instead of reporting zeros.--toplarger than the number of reason pairs, all pairs are printed and the "... more pairs" note is left out. The same commit adds a test for this.6 tests pass, clippy is clean. AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:30:23Z.
Automated triage for the maintainers.
Needs rebase. This PR no longer merges cleanly into
main:mainhas moved since the last triage, and the branch now conflicts inREADME.mdandapps/victory/src/main.rs. It will be reviewed again once it is rebased onto currentmain.Previous verdict for this head: merge candidate.
Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by sinan-cmyk on 2026-11-25T01:53:53Z.
Rebased onto the current
main(940d32f). There were two one-line conflicts:mainaddedmod prebuild;and thetranslate --cacheline in the README at the same places where this PR adds its own line. I kept both. The listing format thatlist-diffreads is unchanged onmain({label} {outcome}per program). On the rebased head: 6 tests pass, clippy is clean, rustfmt is clean on the changed files.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by StExpeditus on 2026-11-25T09:19:48Z.
Test report: RTX 5060 Ti (Blackwell), Windows 11 Pro 26200, driver 621.24. Branch at
1924cc4.cargo test --workspace --locked --no-fail-fast-> 702 passed, 5 failed, 10 ignored. The failures are the same 5 pre-existing NVIDIA 1M-view-heap-cap failures (also on main; see my reports on #2030 and #1940). Nothing introduced by this PR fails on this machine.Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-25T11:55:44Z.
Independent local validation of PR #1541 (Windows, Rust 1.100.0/MSVC, head
1924cc4, no game data):cargo test --locked -p victory --bins listdiff-> 6 tests passed;cargo test --locked -p victory --bins-> 16 tests passed, exit 0. Synthetic CLI check withbefore.txt(UTF-8 BOM, multi-reason lines,at 0x...offsets) andafter.txt:cargo run --locked -p victory -- list-diff ... --top 5exited 0 and reportedprograms 5 in both (1 only before, 1 only after),validated 1 before, 2 after (+1),gained 2, lost 1, with expected gained/lost/reason-changed sections. Only pre-existing deprecation warnings. Not checked: realtranslate --validate --listoutput and--topedge cases beyond 5. AI-assisted (Hy4 flash). GPU/driver: N/A (CPU-only CLI). No game data, assets or extracted content used.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.