CLI: reject conflicting shader-info output modes #2836

Open
109User109 wants to merge 1 commit from upstream-pr/2838 into main
109User109 commented 2026-11-25 21:49:06 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by 109User109 on 2026-11-25T21:49:06Z.


Problem

victory shader-info --effects --disasm and --effects --verbose are accepted, but the effects branch ignores the other output flags. The command appears to honor options it does not use.

Change

Declare those two flag combinations as conflicts in Clap. Each output mode remains unchanged when used on its own.

Verification

  • cargo xtask policy: 186 files ok.
  • git diff --check and targeted rustfmt --check: clean.
  • Tried cargo check -p victory --locked on Linux. It stops in the unchanged victory-gpu/resource.rs because IDLE_FRAMES and IDLE_MS are unavailable under that target. Windows CI will check the CLI build.

No game files or captures are included. Assisted by OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6614442430 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2838). Originally posted by [109User109](https://github.com/109User109) on 2026-11-25T21:49:06Z. --- ## Problem `victory shader-info --effects --disasm` and `--effects --verbose` are accepted, but the effects branch ignores the other output flags. The command appears to honor options it does not use. ## Change Declare those two flag combinations as conflicts in Clap. Each output mode remains unchanged when used on its own. ## Verification - `cargo xtask policy`: 186 files ok. - `git diff --check` and targeted `rustfmt --check`: clean. - Tried `cargo check -p victory --locked` on Linux. It stops in the unchanged `victory-gpu/resource.rs` because `IDLE_FRAMES` and `IDLE_MS` are unavailable under that target. Windows CI will check the CLI build. No game files or captures are included. Assisted by OpenAI Codex.
kotekompotek commented 2026-11-25 22:04:20 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T21:51:21Z.

Review: COMMENTED


Correct — --effects is a third output mode of shader-info; clap-level conflicts_with_all rejects the ambiguous combinations instead of silently picking one. LGTM.

<!-- greyfinch-sync:Marvisak/VIctory:review:6065469846 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2838#pullrequestreview-6065469846). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T21:51:21Z. **Review:** COMMENTED --- Correct — --effects is a third output mode of shader-info; clap-level conflicts_with_all rejects the ambiguous combinations instead of silently picking one. LGTM.
oni-swr commented 2026-11-25 23:06:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by oni-swr on 2026-11-25T22:28:37Z.


Independent Windows verification of exact head 93c97bfb0e50555193b46b02a9f7ae709986491f against main at f3578e3. Both diagnostics app builds passed.

With an empty synthetic directory, shader-info --effects --verbose and shader-info --effects --disasm each exited 2 with a Clap conflict message. Both exited 0 on main. On the PR head, --effects, --verbose, --disasm, and --verbose --disasm all exited 0. The empty directory isolates argument handling.

The edit merges cleanly into current main and is in a separate part of main.rs from #2839. The pair merges cleanly.

Fresh verification and review by Codex (gpt-6.2-sol).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7176409021 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2838#issuecomment-7176409021). Originally posted by [oni-swr](https://github.com/oni-swr) on 2026-11-25T22:28:37Z. --- Independent Windows verification of exact head `93c97bfb0e50555193b46b02a9f7ae709986491f` against `main` at `f3578e3`. Both diagnostics app builds passed. With an empty synthetic directory, `shader-info --effects --verbose` and `shader-info --effects --disasm` each exited 2 with a Clap conflict message. Both exited 0 on main. On the PR head, `--effects`, `--verbose`, `--disasm`, and `--verbose --disasm` all exited 0. The empty directory isolates argument handling. The edit merges cleanly into current main and is in a separate part of `main.rs` from #2839. The pair merges cleanly. Fresh verification and review by Codex (`gpt-6.2-sol`).
fuzeofficlal commented 2026-11-26 01:03:30 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T00:28:28Z.

Review: COMMENTED


Verified head 93c97bfb cleanly merged onto origin/main (63bcca43) on Windows 11 x64.

Code Review

  • Adding conflicts_with_all = ["verbose", "disasm"] on Command::ShaderInfo::effects matches the existing Command::Translate::cache pattern and preserves --verbose --disasm while rejecting conflicting combinations at argument parse time.

Local Verification

  • cargo test --locked -p victory: 14/14 unit + 4/4 integration passed.
  • CLI check: victory.exe shader-info --effects --verbose and --effects --disasm both exit with code 2 and the expected clap conflict error.
  • cargo clippy --locked -p victory --tests -- -D warnings (default and --all-features) & cargo xtask policy (191 files ok): clean.

Looks clean and ready to merge.

<!-- greyfinch-sync:Marvisak/VIctory:review:6066911097 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2838#pullrequestreview-6066911097). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-26T00:28:28Z. **Review:** COMMENTED --- Verified head `93c97bfb` cleanly merged onto `origin/main` (`63bcca43`) on Windows 11 x64. ### Code Review - Adding `conflicts_with_all = ["verbose", "disasm"]` on `Command::ShaderInfo::effects` matches the existing `Command::Translate::cache` pattern and preserves `--verbose --disasm` while rejecting conflicting combinations at argument parse time. ### Local Verification - `cargo test --locked -p victory`: **14/14** unit + **4/4** integration passed. - CLI check: `victory.exe shader-info --effects --verbose` and `--effects --disasm` both exit with code `2` and the expected clap conflict error. - `cargo clippy --locked -p victory --tests -- -D warnings` (default and `--all-features`) & `cargo xtask policy` (`191 files ok`): clean. Looks clean and ready to merge.
Marvisak commented 2026-11-26 04:06:14 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T03:20:41Z.


Automated triage for the maintainers.

Reviewed at 93c97bf, which merges cleanly. CI: passing.

In apps/victory/src/main.rs, ShaderInfo's --effects flag now declares conflicts_with_all = ["verbose", "disasm"]. I checked apps/victory/src/shader.rs run: with effects set, it calls list_effects and continues before anything reads verbose or disasm, and packs are never collected. So those flags really were ignored, and refusing the combination is accurate. Each flag on its own behaves as before, and @oni-swr's Windows run confirms the exit codes.

A small CLI fix, but correct and self-contained.

Verdict: merge candidate (a recommendation to look, not an approval). CI: passing.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7181631159 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2838#issuecomment-7181631159). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-26T03:20:41Z. --- <!-- victory-triage v1 head=93c97bfb0e50555193b46b02a9f7ae709986491f verdict=merge-candidate at=2026-11-26T03:20:41Z --> Automated triage for the maintainers. Reviewed at `93c97bf`, which merges cleanly. CI: passing. In `apps/victory/src/main.rs`, `ShaderInfo`'s `--effects` flag now declares `conflicts_with_all = ["verbose", "disasm"]`. I checked `apps/victory/src/shader.rs` `run`: with `effects` set, it calls `list_effects` and `continue`s before anything reads `verbose` or `disasm`, and packs are never collected. So those flags really were ignored, and refusing the combination is accurate. Each flag on its own behaves as before, and @oni-swr's Windows run confirms the exit codes. A small CLI fix, but correct and self-contained. **Verdict: merge candidate** (a recommendation to look, not an approval). CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
Dukestar69 commented 2026-11-26 11:03:24 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T10:11:04Z.

Review: APPROVED


Verified against origin/main (63bcca4):

  • cargo test -p victory -- --test-threads=1: 14 lib + 4 integration tests passed.
  • cargo clippy -p victory --all-targets -- -D warnings: clean.
  • cargo xtask policy: 191 files ok.

Cleanly rejects conflicting shader-info output mode flags at CLI parse time.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6072161593 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2838#pullrequestreview-6072161593). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-26T10:11:04Z. **Review:** APPROVED --- Verified against `origin/main` (`63bcca4`): - `cargo test -p victory -- --test-threads=1`: 14 lib + 4 integration tests passed. - `cargo clippy -p victory --all-targets -- -D warnings`: clean. - `cargo xtask policy`: 191 files ok. Cleanly rejects conflicting `shader-info` output mode flags at CLI parse time. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
futurepro62 commented 2026-11-26 15:02:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-26T14:04:34Z.


Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head 93c97bf (on its base 61bfc77).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), dxil.dll from Windows SDK 10.0.26100 (the loader's default), debug.
  • cargo build --workspace --locked, then cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 786 passed, 0 failed, 10 ignored.
  • No new #[test] functions in the diff.
  • --skip leaves out tests that fail on main 63bcca4 on this card too, not because of this PR: heap_direct_texture_reads_mark_their_heap_index ends the victory-shader test process with 0xc0000005 (#2571), so without the skip the rest of that crate never reports; dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views and the two stride_tests hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); gathers_at_a_level_match_the_hardware fails on lane 0 (#1744).

Not tested

  • AMD (the tests take the default adapter), a release build, the title (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7194241814 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2838#issuecomment-7194241814). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-26T14:04:34Z. --- Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head `93c97bf` (on its base `61bfc77`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), `dxil.dll` from Windows SDK 10.0.26100 (the loader's default), debug. - `cargo build --workspace --locked`, then `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware`: **786 passed, 0 failed, 10 ignored**. - No new `#[test]` functions in the diff. - `--skip` leaves out tests that fail on main `63bcca4` on this card too, not because of this PR: `heap_direct_texture_reads_mark_their_heap_index` ends the `victory-shader` test process with `0xc0000005` (#2571), so without the skip the rest of that crate never reports; `dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views` and the two `stride_tests` hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); `gathers_at_a_level_match_the_hardware` fails on lane 0 (#1744). **Not tested** - AMD (the tests take the default adapter), a release build, the title (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
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/2838:upstream-pr/2838'
git switch 'upstream-pr/2838'

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