CLI: reject conflicting shader-info output modes #2838

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

@⁠109User109 on GitHub · 2026-11-25 21:49 UTC · original
109User109:codex/shader-info-options → main · +1 −1 · 1 files · 1 commits · open

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.

**@⁠109User109** on GitHub · 2026-11-25 21:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/2838) `109User109:codex/shader-info-options` → `main` · +1 −1 · 1 files · 1 commits · open ## 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:15:30 +00:00
Author
Owner

@⁠oni-swr on GitHub · 2026-11-25 22:28 UTC · original

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).

**@⁠oni-swr** on GitHub · 2026-11-25 22:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/2838#issuecomment-7176409021) 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`).
Author
Owner

@⁠Marvisak on GitHub · 2026-11-26 03:20 UTC · original

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

**@⁠Marvisak** on GitHub · 2026-11-26 03:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/2838#issuecomment-7181631159) <!-- 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)_
Author
Owner

@⁠kotekompotek on GitHub · 2026-11-25 21:51 UTC · original · reviewed

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.

**@⁠kotekompotek** on GitHub · 2026-11-25 21:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/2838#pullrequestreview-6065469846) · **reviewed** 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.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 00:28 UTC · original · reviewed

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.

**@⁠fuzeofficlal** on GitHub · 2026-11-26 00:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/2838#pullrequestreview-6066911097) · **reviewed** 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.
Author
Owner

@⁠Dukestar69 on GitHub · 2026-11-26 10:11 UTC · original · approved these changes

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).

**@⁠Dukestar69** on GitHub · 2026-11-26 10:11 UTC · [original](https://github.com/Marvisak/VIctory/pull/2838#pullrequestreview-6072161593) · **approved these changes** 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).
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-26 14:04 UTC · original

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.
**@⁠futurepro62** on GitHub · 2026-11-26 14:04 UTC · [original](https://github.com/Marvisak/VIctory/pull/2838#issuecomment-7194241814) 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 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/2838/head:github-bot/gh-2838'
git switch 'github-bot/gh-2838'

Merge

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