CLI: report shader scan input failures #534
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/534"
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 Quat3rnion on 2026-11-24T04:35:06Z.
What
victory shader-infoandvictory translatediscardedWalkDirerrors andsilently skipped metadata and file-read failures. A mistyped explicit path
exited successfully with zero shader counts, and a failed read in a mixed
scan quietly undercounted coverage. Both commands now reject a path that does
not exist and report per-file input errors; an empty directory still scans
successfully.
An AI tool wrote part of this change.
Tested
cargo test --workspace: 168 passed, 0 failed, 3 ignored. Four CLI-level regressions: missing and empty-directory paths for both commands, asserting a named diagnostic and a nonzero result only for the missing path.cargo check --target x86_64-pc-windows-gnu --workspace --testspasses. No Windows host here.cargo xtask policypasses (150 files ok). No game files or data from them were added.Checklist
cargo xtask policypasses. No game files or data from them were added.Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-24T11:48:43Z.
Independent verification & code review on Windows 11 Pro (build 26100, Rust
1.98.1), cleanly merged ontomain(ffe310e):cargo xtask policy: PASS (154 files ok)cargo test -p victory --locked: 5 passed, 0 failed (including all 4 new scan/translation missing-path and empty-dir tests)cargo clippy --workspace --all-targets --locked -- -D warnings: FAIL (2 errors)Findings
clippy::items-after-test-module): Both new test modules are placed before non-test items in their files, which failsclippy --all-targets -- -D warnings:apps/victory/src/shader.rs:244(mod testsappears beforeformat_instructionat line 265)apps/victory/src/translate.rs:156(mod scan_testsappears beforepub fn runand helpers at lines 177–717)scan_testsintotranslate.rs's existing trailing test module if present) resolves the CI failure. The scan error-reporting logic itself looks clean and useful.AI-assisted; synthetic tests only, no game files.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T12:48:52Z.
Review: CHANGES_REQUESTED
Blocking issue, verified locally: this adds
tempfileas a dev-dependency ofapps/victorybut does not updateCargo.lock. Test-merged with current main (ffe310e) and rancargo metadata --locked→So any
--lockedbuild/test (clippy CI uses--locked) fails until the lockfile is regenerated (cargo update -p victory --offlineor justcargo checkonce and commit the lock). #517 solves the same problem and does include the lockfile update — see my triage comment there.Design note for the maintainer's pick between this and #517: this PR's semantics are "missing root = hard error, per-file walk/read errors = report and continue (exit 0)"; #517's are "any traversal error fails the whole scan (exit 1)". I find this PR's distinction more practical for scanning large title dumps, but the unit tests here don't exercise
translate.rs's scan (only shader.rs) and the app crate doesn't build on macOS, so I couldn't run them — the tests look correct statically.Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-24T14:00:22Z.
Review: COMMENTED
Tested merged cleanly onto
main(ffe310e) on Windows 11 x64 (Rust 1.98.1 MSVC):cargo test -p victory: 5 passed, 0 failed (a_missing_scan_path_is_an_error,an_empty_scan_directory_succeeds,a_missing_translation_path_is_an_error,an_empty_translation_directory_succeeds,loader_lock_is_reentrant_and_exclusive)cargo xtask policy: okcargo clippy -p victory --all-targets: 2clippy::items_after_test_modulewarnings:apps/victory/src/shader.rs:244:mod testsis defined beforefn format_instruction(...)apps/victory/src/translate.rs:156:mod scan_testsis defined beforepub fn run(...)and the remaining functionsMoving both
#[cfg(test)]modules to the bottom of their respective files will clear both clippy warnings for CI.AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by Quat3rnion on 2026-11-24T14:06:55Z.
Fixed the blocking issue: committed the
Cargo.lockupdate that recordstempfileas a dev-dependency ofapps/victory(new head54b4402).cargo metadata --lockednow succeeds, and I rebased onto current main (ffe310e).cargo test --workspace --no-fail-fastpasses: 222 passed, 0 failed. Thanks for the clear triage — I kept this PR's semantics of 'missing root = hard error, per-file walk/read errors = report and continue' as you noted.Imported from Marvisak/VIctory. Originally posted by Quat3rnion on 2026-11-24T14:19:37Z.
@geiyiliyabumo Thanks for the Windows clippy run. Fixed the
clippy::items-after-test-moduleblocker in new head29046af7:format_instructionnow sits beforeshader.rs's test module, andscan_testsmoved to the bottom oftranslate.rs.cargo test -p victory --lockedpasses all 4 scan/translation tests;cargo test --workspace --no-fail-fastpasses 222/0. Could you re-runcargo clippy --workspace --all-targets --locked -- -D warningson Windows when you get a chance?Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-24T14:31:26Z.
Re-verified new head
29046afmerged ontomainffe310eon Windows 11 x64 MSVC:cargo xtask policy: PASS (154 files ok)cargo clippy --workspace --all-targets --locked -- -D warnings: PASS (0 warnings — bothclippy::items-after-test-moduleblockers are resolved)cargo clippy --workspace --all-targets --features diagnostics --locked -- -D warnings: PASS (0 warnings)cargo test -p victory --locked: PASS (all unit + scan/translation tests green)Looks clean and ready to merge!
AI-assisted; synthetic tests only, no game files.
Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-24T18:38:43Z.
The
GPU Loc Sigmystery closes from the exe side — the name is encrypted, the watchdog IS the consumer, and the question changes. Decoding the function that owns the watchdog site (+0x23cf620, hash-matched copy):Three consequences, largest first:
GPU Loc Sigdoes not read as1. That is why every string scan whiffed — the name is built by a 12-byte rolling obfuscation at runtime, so it appears in no.rdataand no binary grep, exactly matching both prior negative results (this board:7333478dnot a file constant; xcl side: "GPU Loc Sig" not in strings, yet it shows up in live debug-parameter logs — the log prints the deobfuscated name).7333478dwrite is the same parameter's value channel — bvironn, your log captured writes toGPU Loc Sigwith value7333478dwhere the gate demands1. Ask for the whole write-sequence of that name (every value + timestamp + call stack, if cheap): if some run ever shows1landing, that run is the first success condition ever observed; if it only ever shows signature-shaped values like7333478d, the title is computing a location/completion signature that never matches, and the emulator-side diff target becomes what feeds that signature — GPU-visible placement of completed work, which sits precisely on top of the #549 read-too-early class and the never-completing-PSO class alike.+0x2215950lives in the+0x2215xxxdebug-parameter cluster whose global (+0x71b6348) and null-callback consumers are already on the kill-map — the gate and the two null-callback stops share the parameter service, consistent with one reporting/validation subsystem.The 30 s stop→death gap stays measured and real, but its meaning moves from "heartbeat timeout" to "the signature-update deadline for the current step". Kill-map update:
+0x23cf683=GPU Loc Sig != 1gate, trap imm4d8bd421, obfuscated-name producer verified byte-exact (0x1b5d6844174b453b+0xff65664f, rolling +12..+1).Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:04:02Z.
Automated triage for the maintainers. Closing because another open pull request covers the same change.
See #517. Same change as #517 (report missing or unreadable scan inputs in shader-info and translate), larger and with read errors still exiting 0; #517 is the tighter one.
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed