xcl inspect: include the console verdict in --json output #268

Closed
github-bot wants to merge 1 commit from gh-pr/268/head into gh-pr/268/base
Owner

@⁠NethminaYasas on GitHub · 2026-11-23 22:11 UTC · original
inspect-json-console-verdict → main · +71 −23 · 1 files · 1 commits · closed without merging

xcl inspect --json omitted the "Console game: yes/no" verdict the text output prints,
so scripts consuming the JSON had to parse the PE again. The verdict is now computed once
from the imports run already reads and returned as is_console plus console_imports.
The text path reuses the same verdict instead of re-reading the file.

What is in it

  • crates/xcl/src/inspect.rs: shared console_imports_from helper, report() builder,
    the two new JSON fields, and two unit tests. No dependency or doc changes.

Tested

  • Windows 11, NVIDIA GTX 1650 Max-Q, Rust 1.99 x86_64-pc-windows-msvc, debug build.
  • cargo build --workspace: ok.
  • cargo test --workspace -- --test-threads=4: 653 passed, 0 failed, 40 ignored
    (lib 613 passed / 20 ignored; e2e 3/3; gpu_compute_e2e 2/2; gpu_pso_e2e 7/7; rest passed).
  • cargo clippy --workspace: no new warnings in the changed file.
  • coderabbit review --uncommitted --agent: 0 findings.
  • No cargo fmt (the tree is not rustfmt-clean; only changed lines were formatted).

Not tested

  • No AMD GPU, no mesh-shader path, no retail game data (XCL_SAMPLE_* unset), no release build.
  • GPU-specific rendering behaviour is out of scope for this CLI-only change.

AI use

  • OpenCode, Hy4 flash Free: wrote the change, the tests, and this draft; responded to review.
    Commit carries Assisted-by: OpenCode (Hy4 flash Free).

GPL-2.0-only compatible: no new dependencies, no external code, no console SDK material.

**@⁠NethminaYasas** on GitHub · 2026-11-23 22:11 UTC · [original](https://github.com/xcl-dev/xcl/pull/268) `inspect-json-console-verdict` → `main` · +71 −23 · 1 files · 1 commits · closed without merging `xcl inspect --json` omitted the "Console game: yes/no" verdict the text output prints, so scripts consuming the JSON had to parse the PE again. The verdict is now computed once from the imports `run` already reads and returned as `is_console` plus `console_imports`. The text path reuses the same verdict instead of re-reading the file. **What is in it** - `crates/xcl/src/inspect.rs`: shared `console_imports_from` helper, `report()` builder, the two new JSON fields, and two unit tests. No dependency or doc changes. **Tested** - Windows 11, NVIDIA GTX 1650 Max-Q, Rust 1.99 `x86_64-pc-windows-msvc`, debug build. - `cargo build --workspace`: ok. - `cargo test --workspace -- --test-threads=4`: 653 passed, 0 failed, 40 ignored (lib 613 passed / 20 ignored; e2e 3/3; gpu_compute_e2e 2/2; gpu_pso_e2e 7/7; rest passed). - `cargo clippy --workspace`: no new warnings in the changed file. - `coderabbit review --uncommitted --agent`: 0 findings. - No `cargo fmt` (the tree is not rustfmt-clean; only changed lines were formatted). **Not tested** - No AMD GPU, no mesh-shader path, no retail game data (`XCL_SAMPLE_*` unset), no release build. - GPU-specific rendering behaviour is out of scope for this CLI-only change. **AI use** - OpenCode, Hy4 flash Free: wrote the change, the tests, and this draft; responded to review. Commit carries `Assisted-by: OpenCode (Hy4 flash Free)`. GPL-2.0-only compatible: no new dependencies, no external code, no console SDK material.
The text report prints whether the file imports console libraries, but --json omitted it, so scripts consuming the JSON had to parse the PE again. Compute the verdict once from the imports already read by run(), share the helper with console_imports(), and expose is_console plus console_imports in the JSON report.

Assisted-by: OpenCode (Hy4 flash Free)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:18:09 +00:00
github-bot closed this pull request 2026-11-26 04:18:09 +00:00
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-24 00:12 UTC · original

Tested head 2e6fdee6417362db6944fe3947108b2a4fa8047c merged cleanly onto main 85bdf2193e7a793d568485b35f9cae5e8159bc39 at 8fc54010eae3c2d6cfe0dbb740e797338089e778.

The CLI correctly reports is_console: true and console_imports: ["kernelx.dll"] for a PE whose only console import is delay-loaded. Both new tests still passed when I made the CLI ignore delay-loaded libraries; the same fixture then reported false. Please add this case through xcl inspect --json. Main omits both fields, and the PR unit tests use private helpers introduced here.

Tested

RTX 5070 Ti (NVIDIA 610.74), Ryzen 9 9950X, Windows 11 build 26200, debug MSVC. cargo build --workspace and cargo test --workspace -- --test-threads=4 through the GPU queue: 667 passed, 0 failed, 41 ignored. Runtime skips included in the pass count: gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu_wave32_program_in_wave64_hardware (no wave64). Both inspect unit tests passed on the merge. Three synthetic CLI cases passed: ordinary Windows imports, delay-only console imports, and mixed tables with a duplicate.

Not tested

The retail game, Wine or other architectures. Sample-data variables were unset.

🤖 GPT-6.2 Astra

**@⁠Kalmarv** on GitHub · 2026-11-24 00:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/268#issuecomment-7117823847) Tested head `2e6fdee6417362db6944fe3947108b2a4fa8047c` merged cleanly onto main `85bdf2193e7a793d568485b35f9cae5e8159bc39` at `8fc54010eae3c2d6cfe0dbb740e797338089e778`. The CLI correctly reports `is_console: true` and `console_imports: ["kernelx.dll"]` for a PE whose only console import is delay-loaded. Both new tests still passed when I made the CLI ignore delay-loaded libraries; the same fixture then reported false. Please add this case through `xcl inspect --json`. Main omits both fields, and the PR unit tests use private helpers introduced here. **Tested** RTX 5070 Ti (NVIDIA 610.74), Ryzen 9 9950X, Windows 11 build 26200, debug MSVC. `cargo build --workspace` and `cargo test --workspace -- --test-threads=4` through the GPU queue: **667 passed, 0 failed, 41 ignored**. Runtime skips included in the pass count: `gpu_geometry_wave32_prefix_count_over_a_mask` (no wave64), `gpu_wave32_program_in_wave64_hardware` (no wave64). Both inspect unit tests passed on the merge. Three synthetic CLI cases passed: ordinary Windows imports, delay-only console imports, and mixed tables with a duplicate. **Not tested** The retail game, Wine or other architectures. Sample-data variables were unset. 🤖 GPT-6.2 Astra
Author
Owner

@⁠MesshM on GitHub · 2026-11-24 04:33 UTC · original

Test run of 2e6fdee6417362db6944fe3947108b2a4fa8047c on AMD RDNA4. I merged it onto current main 64b3f35 locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 703 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 662 passed, 0 failed, 21 ignored
  • 0 SKIPPED; the inspect tests pass.

Review: The verdict is computed once (console_imports_from) and used by both the text and the JSON output, so they cannot disagree. I found nothing to change.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

**@⁠MesshM** on GitHub · 2026-11-24 04:33 UTC · [original](https://github.com/xcl-dev/xcl/pull/268#issuecomment-7122133036) Test run of `2e6fdee6417362db6944fe3947108b2a4fa8047c` on AMD RDNA4. I merged it onto current `main` `64b3f35` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **703 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 662 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; the `inspect` tests pass. **Review:** The verdict is computed once (`console_imports_from`) and used by both the text and the JSON output, so they cannot disagree. I found nothing to change. **Not tested:** no retail title or regression run (I have no unpacked game), no `XCL_SAMPLE_*` tests, release build; the PR's head on its old base was not run, only its merge onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.