xtask: add CPU-only source verification report #2164

Open
yefan911 wants to merge 1 commit from upstream-pr/2166 into main
yefan911 commented 2026-11-25 06:46:19 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by yefan911 on 2026-11-25T06:46:19Z.


Summary

Adds cargo xtask verify-cpu to run a reviewed CPU-only selection of existing component tests and emit a Markdown report (or list planned checks). The report records the source revision, compiler, target, commands, summaries, and full output. It fails on command errors or empty test selections.

The verifier excludes title-path overrides and GitHub tokens from Cargo test subprocesses and selects the supported MSVC target by default on Windows x64.

The change to crates/victory-loader/tests/load_probe.rs supports that explicit target selection: the loader test launches a second Cargo process to build its synthetic probe DLL. Cargo's command-line --target on the outer test invocation does not propagate to this nested invocation. The fixture builder now derives its target from the running test's architecture and Windows ABI, passes it to nested Cargo, and loads the DLL from the corresponding target-specific output directory. This keeps the probe and test executable on the same target when the host's default target or Cargo configuration differs.

This complements #2057 and #2090: it is a curated run/report entry point reusing existing tests, not another conformance suite.

Coverage and limits

Type-checks workspace targets, then runs existing source-library, loader, selected HLE, CPU shader-analysis/lowering, and xtask tests. GPU execution tests, game data, title execution, gameplay compatibility, and performance are not covered. The report explicitly describes ignored/skipped tests and these limitations.

Maintainer acceptance of the extra command and its maintained test selection is still needed. This description update clarifies the loader fixture change called out in triage; it does not claim that acceptance or resolve the requested decision about documentation length.

Verification

Previously recorded on Windows x64 with Rust 1.98.1 and the MSVC target:

  • cargo xtask verify-cpu --jobs 2 --report target/cpu-verification.md: 333 passed, 0 failed, 7 ignored across all selected suites; workspace target check passed.
  • cargo clippy --workspace --all-targets --locked -- -D warnings: passed.
  • Same Clippy command with --all-features: passed.
  • cargo xtask policy: 184 files ok; rustfmt --check and git diff --check: passed.

No source changes or new test runs are included in this description clarification. No game files were used and the title was not launched. Coordination claim: https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7153668658.

Description clarification assisted by GPT-6.1 Sol.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6598899552 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2166). Originally posted by [yefan911](https://github.com/yefan911) on 2026-11-25T06:46:19Z. --- ## Summary Adds `cargo xtask verify-cpu` to run a reviewed CPU-only selection of existing component tests and emit a Markdown report (or list planned checks). The report records the source revision, compiler, target, commands, summaries, and full output. It fails on command errors or empty test selections. The verifier excludes title-path overrides and GitHub tokens from Cargo test subprocesses and selects the supported MSVC target by default on Windows x64. The change to `crates/victory-loader/tests/load_probe.rs` supports that explicit target selection: the loader test launches a second Cargo process to build its synthetic probe DLL. Cargo's command-line `--target` on the outer test invocation does not propagate to this nested invocation. The fixture builder now derives its target from the running test's architecture and Windows ABI, passes it to nested Cargo, and loads the DLL from the corresponding target-specific output directory. This keeps the probe and test executable on the same target when the host's default target or Cargo configuration differs. This complements [#2057](https://github.com/Marvisak/VIctory/pull/2057) and [#2090](https://github.com/Marvisak/VIctory/pull/2090): it is a curated run/report entry point reusing existing tests, not another conformance suite. ## Coverage and limits Type-checks workspace targets, then runs existing source-library, loader, selected HLE, CPU shader-analysis/lowering, and xtask tests. GPU execution tests, game data, title execution, gameplay compatibility, and performance are not covered. The report explicitly describes ignored/skipped tests and these limitations. Maintainer acceptance of the extra command and its maintained test selection is still needed. This description update clarifies the loader fixture change called out in triage; it does not claim that acceptance or resolve the requested decision about documentation length. ## Verification Previously recorded on Windows x64 with Rust 1.98.1 and the MSVC target: - `cargo xtask verify-cpu --jobs 2 --report target/cpu-verification.md`: 333 passed, 0 failed, 7 ignored across all selected suites; workspace target check passed. - `cargo clippy --workspace --all-targets --locked -- -D warnings`: passed. - Same Clippy command with `--all-features`: passed. - `cargo xtask policy`: 184 files ok; `rustfmt --check` and `git diff --check`: passed. No source changes or new test runs are included in this description clarification. No game files were used and the title was not launched. Coordination claim: https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7153668658. Description clarification assisted by GPT-6.1 Sol.
DenRakEiw commented 2026-11-25 07:03:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T07:03:22Z.

Review: APPROVED


Verified locally merged onto origin/main (940d32f, Windows 11 x64, Rust 1.98.1 MSVC):

  • cargo test -p xtask — 15 passed, 0 failed
  • cargo clippy -p xtask -p victory-loader --all-targets — 0 warnings
  • cargo xtask policy — ok (185 files ok)

Clean CPU-only source verification report subcommand in xtask with solid unit tests and docs. Looks good.

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6053209802 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2166#pullrequestreview-6053209802). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-25T07:03:22Z. **Review:** APPROVED --- Verified locally merged onto `origin/main` (`940d32f`, Windows 11 x64, Rust 1.98.1 MSVC): - `cargo test -p xtask` — **15 passed, 0 failed** - `cargo clippy -p xtask -p victory-loader --all-targets` — 0 warnings - `cargo xtask policy` — ok (`185 files ok`) Clean CPU-only source verification report subcommand in `xtask` with solid unit tests and docs. Looks good. AI-assisted (Gemini 4 Neon).
catminou4 commented 2026-11-25 07:24:41 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T07:24:41Z.

Review: APPROVED


Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main 940d32f69b, cargo test -p xtask --locked.

15 passed / 0 failed. CPU-only source verification report — portable xtask verification; exactly the kind of macOS-runnable tooling this repo needs.

<!-- greyfinch-sync:Marvisak/VIctory:review:6053419613 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2166#pullrequestreview-6053419613). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T07:24:41Z. **Review:** APPROVED --- Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main 940d32f69b, `cargo test -p xtask --locked`. 15 passed / 0 failed. CPU-only source verification report — portable xtask verification; exactly the kind of macOS-runnable tooling this repo needs.
Marvisak commented 2026-11-25 13:02:52 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T12:36:38Z.


Automated triage for the maintainers.

Needs work: needs the maintainer's decision. This adds cargo xtask verify-cpu (xtask/src/verify_cpu.rs, about 610 lines), plus docs/cpu-verification.md and README/architecture lines. It runs a curated list of cargo check/cargo test invocations as child processes and writes a Markdown report. Tooling that spawns processes is the maintainer's call.

On the merits:

  • It overlaps cargo test --workspace. The new doc says the full suite also needs no game data. The extra this adds is a hand-picked subset and a report file, and the doc itself says the list needs reviewing whenever tests are added or moved. That ongoing upkeep is the main cost.
  • Unrelated change. It also changes crates/victory-loader/tests/load_probe.rs, which isn't explained in the PR.
  • Docs. Repo docs are meant to stay short. If the maintainer wants the tool, the usage lines could live in the xtask's --help instead of a new doc.

What would change the verdict: a maintainer saying the tool is wanted, plus the load_probe.rs change explained or split out.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7162611176 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2166#issuecomment-7162611176). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T12:36:38Z. --- <!-- victory-triage v1 head=2eef587a8bc21827debc35499d4f9989f0678bdc verdict=needs-work at=2026-11-25T13:41:00Z --> Automated triage for the maintainers. **Needs work: needs the maintainer's decision.** This adds `cargo xtask verify-cpu` (`xtask/src/verify_cpu.rs`, about 610 lines), plus `docs/cpu-verification.md` and README/architecture lines. It runs a curated list of `cargo check`/`cargo test` invocations as child processes and writes a Markdown report. Tooling that spawns processes is the maintainer's call. On the merits: - **It overlaps `cargo test --workspace`.** The new doc says the full suite also needs no game data. The extra this adds is a hand-picked subset and a report file, and the doc itself says the list needs reviewing whenever tests are added or moved. That ongoing upkeep is the main cost. - **Unrelated change.** It also changes `crates/victory-loader/tests/load_probe.rs`, which isn't explained in the PR. - **Docs.** Repo docs are meant to stay short. If the maintainer wants the tool, the usage lines could live in the xtask's `--help` instead of a new doc. What would change the verdict: a maintainer saying the tool is wanted, plus the `load_probe.rs` change explained or split 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/2166:upstream-pr/2166'
git switch 'upstream-pr/2166'

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