CLI: flag files configured as directories #2837

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

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


Problem

victory config reports an existing regular file as a valid game_dir or fidelityfx_dir, even though both settings require directories. This can hide a path typo during setup.

Change

Mark those two paths as (not a directory) when they exist but are not directories. Keep test_titles as files or directories, as before. The command remains informational and keeps its current exit behavior.

Verification

  • cargo xtask policy: 186 files ok.
  • git diff --check and targeted rustfmt --check: clean.
  • CLI compilation on this Linux host is blocked by the unchanged victory-gpu/resource.rs errors for IDLE_FRAMES and IDLE_MS; Windows CI will check the build.

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

<!-- greyfinch-sync:Marvisak/VIctory:issue:6614444352 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2839). Originally posted by [109User109](https://github.com/109User109) on 2026-11-25T21:49:14Z. --- ## Problem `victory config` reports an existing regular file as a valid `game_dir` or `fidelityfx_dir`, even though both settings require directories. This can hide a path typo during setup. ## Change Mark those two paths as `(not a directory)` when they exist but are not directories. Keep `test_titles` as files or directories, as before. The command remains informational and keeps its current exit behavior. ## Verification - `cargo xtask policy`: 186 files ok. - `git diff --check` and targeted `rustfmt --check`: clean. - CLI compilation on this Linux host is blocked by the unchanged `victory-gpu/resource.rs` errors for `IDLE_FRAMES` and `IDLE_MS`; Windows CI will check the build. No game files or captures are included. Assisted by OpenAI Codex.
kotekompotek commented 2026-11-25 21:51:26 +00:00 (Migrated from github.com)

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

Review: COMMENTED


Sensible: a configured path that exists but is a file (where a directory is expected) is a different misconfiguration than missing. test_title correctly passes false since a title path can be a file. LGTM.

<!-- greyfinch-sync:Marvisak/VIctory:review:6065470853 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2839#pullrequestreview-6065470853). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T21:51:26Z. **Review:** COMMENTED --- Sensible: a configured path that exists but is a file (where a directory is expected) is a different misconfiguration than missing. test_title correctly passes false since a title path can be a file. 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:38Z.


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

With a synthetic config, victory config marked regular files supplied for both game_dir and fidelityfx_dir as (not a directory). An existing file and directory supplied as test_titles were both accepted, and a missing title path was still marked (does not exist). The command exited 0 on both builds. Main printed the two file paths without a directory warning.

The edit merges cleanly into current main and alongside #2838. The two changes in main.rs touch separate code.

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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7176409478 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2839#issuecomment-7176409478). Originally posted by [oni-swr](https://github.com/oni-swr) on 2026-11-25T22:28:38Z. --- Independent Windows verification of exact head `58857445d7477d7d511527a507e25bfa88a94f1c` against `main` at `f3578e3`. Both diagnostics app builds passed. With a synthetic config, `victory config` marked regular files supplied for both `game_dir` and `fidelityfx_dir` as `(not a directory)`. An existing file and directory supplied as `test_titles` were both accepted, and a missing title path was still marked `(does not exist)`. The command exited 0 on both builds. Main printed the two file paths without a directory warning. The edit merges cleanly into current main and alongside #2838. The two changes in `main.rs` touch separate code. Fresh verification and review by Codex (`gpt-6.2-sol`).
fuzeofficlal commented 2026-11-26 00:28:26 +00:00 (Migrated from github.com)

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

Review: COMMENTED


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

Code Review

  • status(p, directory) cleanly distinguishes nonexistent paths ((does not exist)) from regular files configured for directory keys (game_dir, fidelityfx_dir -> (not a directory)), while keeping test_titles (directory = false) unchanged and following symlinks via Path::exists() / Path::is_dir().

Local Verification

  • cargo test --locked -p victory -p victory-core: victory 14/14 unit + 4/4 integration (census 2, census_unreadable 1, translate 1), victory-core 13/13 passed.
  • cargo clippy --locked -p victory -p victory-core --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:6066910933 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2839#pullrequestreview-6066910933). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-26T00:28:26Z. **Review:** COMMENTED --- Verified head `58857445` cleanly merged onto `origin/main` (`63bcca43`) on Windows 11 x64. ### Code Review - `status(p, directory)` cleanly distinguishes nonexistent paths (`(does not exist)`) from regular files configured for directory keys (`game_dir`, `fidelityfx_dir` -> `(not a directory)`), while keeping `test_titles` (`directory = false`) unchanged and following symlinks via `Path::exists()` / `Path::is_dir()`. ### Local Verification - `cargo test --locked -p victory -p victory-core`: `victory` **14/14** unit + **4/4** integration (`census` 2, `census_unreadable` 1, `translate` 1), `victory-core` **13/13** passed. - `cargo clippy --locked -p victory -p victory-core --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:17 +00:00 (Migrated from github.com)

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


Automated triage for the maintainers.

Verdict: merge candidate (small). show_config in apps/victory/src/main.rs now prints (not a directory) when game_dir or fidelityfx_dir exists but is a file. test_titles still accepts files or directories, and the exit status is unchanged. Both settings are used as directories, so this catches a real setup mistake, and the change is limited to an informational command. oni-swr's Windows run in the comments checks the three cases. It merges cleanly.

CI: passing (check).


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7181677624 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2839#issuecomment-7181677624). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-26T03:23:31Z. --- <!-- victory-triage v1 head=58857445d7477d7d511527a507e25bfa88a94f1c verdict=merge-candidate at=2026-11-26T03:23:30Z --> Automated triage for the maintainers. **Verdict: merge candidate (small).** `show_config` in `apps/victory/src/main.rs` now prints `(not a directory)` when `game_dir` or `fidelityfx_dir` exists but is a file. `test_titles` still accepts files or directories, and the exit status is unchanged. Both settings are used as directories, so this catches a real setup mistake, and the change is limited to an informational command. oni-swr's Windows run in the comments checks the three cases. It merges cleanly. CI: passing (`check`). --- _Generated by [Claude Code](https://claude.ai/code)_
futurepro62 commented 2026-11-26 15:02:27 +00:00 (Migrated from github.com)

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


Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head 5885744 (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:7194408033 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2839#issuecomment-7194408033). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-26T14:11:38Z. --- Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head `5885744` (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.
Dukestar69 commented 2026-11-26 17:53:19 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T17:53:19Z.

Review: APPROVED


Reviewed the diff and verified locally on Windows 11 x64:

  • Flagging existing non-directory paths for game_dir and fidelityfx_dir as (not a directory) in show_config is clean and helpful.
  • cargo test -p victory -- --test-threads=1: 14 unit + 4 integration tests passed, 0 failed.
  • cargo clippy -p victory --all-targets -- -D warnings: clean.
  • cargo xtask policy: 191 files ok.

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

<!-- greyfinch-sync:Marvisak/VIctory:review:6078649358 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2839#pullrequestreview-6078649358). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-26T17:53:19Z. **Review:** APPROVED --- Reviewed the diff and verified locally on Windows 11 x64: - Flagging existing non-directory paths for `game_dir` and `fidelityfx_dir` as `(not a directory)` in `show_config` is clean and helpful. - `cargo test -p victory -- --test-threads=1`: 14 unit + 4 integration tests passed, 0 failed. - `cargo clippy -p victory --all-targets -- -D warnings`: clean. - `cargo xtask policy`: 191 files ok. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
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/2839:upstream-pr/2839'
git switch 'upstream-pr/2839'

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