App: check transitive static imports of mapped title DLLs for missing files #3013

Open
fuzeofficlal wants to merge 1 commit from upstream-pr/3015 into main
fuzeofficlal commented 2026-11-26 03:27:27 +00:00 (Migrated from github.com)

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


Summary

  • Extend apps/victory/src/run.rs::absent_title_dlls to inspect the static import tables of every mapped title DLL (dll.info().imports) in addition to the main executable's direct imports.
  • Matches victory_loader::load_title_dlls's recursive dependency walk so missing transitive title-private DLLs (exe -> A.dll -> missing_B.dll) are caught and reported up front during startup package validation instead of passing silently and trapping during DLL attachment.
  • Add unit test run::absent_tests::missing_static_imports_of_mapped_title_dlls_are_named_once covering transitive missing imports, case-insensitive deduplication, and host/HLE/mapped exclusions.

Verification

  • cargo test --locked -p victory: 15 unit tests + 4 integration tests passed.
  • cargo clippy --locked -p victory --all-targets -- -D warnings: 0 warnings.
  • cargo xtask policy: 191 files ok.
<!-- greyfinch-sync:Marvisak/VIctory:issue:6618850878 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3015). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-26T03:27:27Z. --- ## Summary - Extend `apps/victory/src/run.rs::absent_title_dlls` to inspect the static import tables of every mapped title DLL (`dll.info().imports`) in addition to the main executable's direct imports. - Matches `victory_loader::load_title_dlls`'s recursive dependency walk so missing transitive title-private DLLs (`exe -> A.dll -> missing_B.dll`) are caught and reported up front during startup package validation instead of passing silently and trapping during DLL attachment. - Add unit test `run::absent_tests::missing_static_imports_of_mapped_title_dlls_are_named_once` covering transitive missing imports, case-insensitive deduplication, and host/HLE/mapped exclusions. ## Verification - `cargo test --locked -p victory`: 15 unit tests + 4 integration tests passed. - `cargo clippy --locked -p victory --all-targets -- -D warnings`: 0 warnings. - `cargo xtask policy`: 191 files ok.
Dukestar69 commented 2026-11-26 04:06:04 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T03:35:47Z.

Review: APPROVED


Tested merged onto origin/main (63bcca4) on Windows 11 x64:

  • cargo test -p victory --bin victory run::: 8 passed, 0 failed (including new missing_static_imports_of_mapped_title_dlls_are_named_once).
  • 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:6068209473 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3015#pullrequestreview-6068209473). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-26T03:35:47Z. **Review:** APPROVED --- Tested merged onto `origin/main` (`63bcca4`) on Windows 11 x64: - `cargo test -p victory --bin victory run::`: **8 passed, 0 failed** (including new `missing_static_imports_of_mapped_title_dlls_are_named_once`). - `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).
kotekompotek commented 2026-11-26 05:03:51 +00:00 (Migrated from github.com)

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

Review: APPROVED


LGTM — chaining each mapped DLL's import table catches the transitive case (a mapped title DLL statically importing an absent one). Case-insensitive dedup preserved; the ImportModule test helpers cover it.

<!-- greyfinch-sync:Marvisak/VIctory:review:6068621131 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3015#pullrequestreview-6068621131). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-26T04:38:26Z. **Review:** APPROVED --- LGTM — chaining each mapped DLL's import table catches the transitive case (a mapped title DLL statically importing an absent one). Case-insensitive dedup preserved; the ImportModule test helpers cover it.
futurepro62 commented 2026-11-26 05:04:10 +00:00 (Migrated from github.com)

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


NVIDIA full-suite run, to go with the reports above by Dukestar69, since none of them names a GPU run. Tested exact head c708a6a (on its base 63bcca4).

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: 867 passed, 0 failed, 10 ignored.
  • The new tests ran and passed: missing_static_imports_of_mapped_title_dlls_are_named_once.
  • --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:7182599321 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3015#issuecomment-7182599321). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-26T04:26:35Z. --- NVIDIA full-suite run, to go with the reports above by Dukestar69, since none of them names a GPU run. Tested exact head `c708a6a` (on its base `63bcca4`). **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`: **867 passed, 0 failed, 10 ignored**. - The new tests ran and passed: `missing_static_imports_of_mapped_title_dlls_are_named_once`. - `--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.
Marvisak commented 2026-11-26 07:01:44 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T06:14:36Z.


Automated triage for the maintainers.

absent_title_dlls in apps/victory/src/run.rs now also checks the static imports of every title DLL victory_loader::load_title_dlls mapped, not only the main image's. On main, map_dll (crates/victory-loader/src/windows.rs) silently skips a wanted DLL whose file is missing, so a missing exe -> A.dll -> B.dll dependency went unreported until the title trapped in an unbound import. The change is limited to the startup check, dedup stays case-insensitive, and the new test covers a transitive miss plus host/HLE exclusions. No dependency, policy or rule issues found. CI check: passing.

One small gap that need not block it: load_title_dlls also follows delay imports, which this check (like the one on main) still leaves out.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7184233622 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3015#issuecomment-7184233622). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-26T06:14:36Z. --- <!-- victory-triage v1 head=c708a6ac167ef3ca66cc0f81c2d97058e4dcfcb7 verdict=merge-candidate at=2026-11-26T06:14:26Z --> Automated triage for the maintainers. `absent_title_dlls` in `apps/victory/src/run.rs` now also checks the static imports of every title DLL `victory_loader::load_title_dlls` mapped, not only the main image's. On `main`, `map_dll` (`crates/victory-loader/src/windows.rs`) silently skips a wanted DLL whose file is missing, so a missing `exe -> A.dll -> B.dll` dependency went unreported until the title trapped in an unbound import. The change is limited to the startup check, dedup stays case-insensitive, and the new test covers a transitive miss plus host/HLE exclusions. No dependency, policy or rule issues found. CI `check`: passing. One small gap that need not block it: `load_title_dlls` also follows delay imports, which this check (like the one on `main`) still leaves out. --- _Generated by [Claude Code](https://claude.ai/code)_
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/3015:upstream-pr/3015'
git switch 'upstream-pr/3015'

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