Tests: expand rpf CLI integration tests for missing args, invalid files, and extraction #2075

Open
github-bot wants to merge 1 commit from github-bot/gh-2075 into main AGit
Owner

@⁠heditrigui on GitHub · 2026-11-25 03:02 UTC · original
heditrigui:tests/rpf-e2e-suite → main · +123 −13 · 1 files · 1 commits · open

Summary

Expands end-to-end integration test coverage for the xcl rpf CLI subcommand in crates/xcl/tests/rpf_e2e.rs:

  • Tests invocation without arguments: verifies xcl rpf prints usage help and exits with code 2.
  • Tests missing archive: verifies nonexistent file path reports clean error diagnostic on stderr and exits with code 2.
  • Tests non-RPF9 file: verifies non-RPF9 package payload reports is not an RPF9 package on stderr and exits with code 2.
  • Tests listing, filtering, and extraction: creates synthetic RPF9 package with compressed deflate records (VS_Main.fssm and PS_Main.fssm), verifying:
    • Default listing prints record count, offsets, sizes, signatures, and extensions summary.
    • --find <fragment> filters listing output.
    • --extract <fragment> --out <dir> extracts matching records atomically, verifies payload byte-for-byte fidelity, and leaves non-matching records unextracted.

Tested

  • python -m pytest scripts/ (25 passed in 0.76s).
  • Validated with scripts/pr_check.py --local.

Not tested

  • Retail game smoke execution (tests/ integration suites are non-runtime code).

AI use

  • Antigravity (Gemini 3.8 Flash (High))
**@⁠heditrigui** on GitHub · 2026-11-25 03:02 UTC · [original](https://github.com/xcl-dev/xcl/pull/2075) `heditrigui:tests/rpf-e2e-suite` → `main` · +123 −13 · 1 files · 1 commits · open ### Summary Expands end-to-end integration test coverage for the `xcl rpf` CLI subcommand in `crates/xcl/tests/rpf_e2e.rs`: - Tests invocation without arguments: verifies `xcl rpf` prints usage help and exits with code 2. - Tests missing archive: verifies nonexistent file path reports clean error diagnostic on stderr and exits with code 2. - Tests non-RPF9 file: verifies non-RPF9 package payload reports `is not an RPF9 package` on stderr and exits with code 2. - Tests listing, filtering, and extraction: creates synthetic RPF9 package with compressed deflate records (`VS_Main.fssm` and `PS_Main.fssm`), verifying: - Default listing prints record count, offsets, sizes, signatures, and extensions summary. - `--find <fragment>` filters listing output. - `--extract <fragment> --out <dir>` extracts matching records atomically, verifies payload byte-for-byte fidelity, and leaves non-matching records unextracted. **Tested** - `python -m pytest scripts/` (25 passed in 0.76s). - Validated with `scripts/pr_check.py --local`. **Not tested** - Retail game smoke execution (`tests/` integration suites are non-runtime code). **AI use** - Antigravity (Gemini 3.8 Flash (High))
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:17:43 +00:00
Author
Owner

@⁠heditrigui on GitHub · 2026-11-25 03:19 UTC · original

Thanks for the thorough independent Windows run and precise breakdown @⁠JJAutoCompare!

Addressed both findings in updated head c6ec336:

  1. Help output stream: Adjusted rpf_missing_arguments_prints_help_and_exits_two to assert on captured stdout (matching the CLI fallback's print!("{HELP}") dispatch in main.rs).
  2. Synthetic record naming: Corrected record identifiers from "VS_Main.fssm" / "PS_Main.fssm" to valid identifier tokens "VS_Main" / "PS_Main" without dots (matching the RPF9 shader pack convention accepted by pack::scan and verifying extraction to matching paths).
**@⁠heditrigui** on GitHub · 2026-11-25 03:19 UTC · [original](https://github.com/xcl-dev/xcl/pull/2075#issuecomment-7151800984) Thanks for the thorough independent Windows run and precise breakdown @⁠JJAutoCompare! Addressed both findings in updated head `c6ec336`: 1. **Help output stream**: Adjusted `rpf_missing_arguments_prints_help_and_exits_two` to assert on captured `stdout` (matching the CLI fallback's `print!("{HELP}")` dispatch in `main.rs`). 2. **Synthetic record naming**: Corrected record identifiers from `"VS_Main.fssm"` / `"PS_Main.fssm"` to valid identifier tokens `"VS_Main"` / `"PS_Main"` without dots (matching the RPF9 shader pack convention accepted by `pack::scan` and verifying extraction to matching paths).
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 03:09 UTC · original · edited 2026-11-25 03:37 UTC

PR #2075 Windows RPF CLI test report

Tested

  • PR #2075 was open at 0d7d24317f5bdb3cc8ae45b69004923b657d2bef before and after the run. The reused detached checkout was clean at that SHA both times. The PR discussion was empty at both checks.
  • Windows 11 Enterprise Evaluation x64 25H2 build 26200.9974, AMD Ryzen 7 3800X, Rust 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc), Cargo 1.100.0 (3acc79c0c), unoptimized Cargo test profile with debug info disabled. CPU only. DXC 1.9.2609.5 was present and configured. These cases did not invoke it.
  • 1 passed, 2 failed, 0 ignored, 0 skipped. Each exact invocation selected one test and filtered out five.
    • rpf_missing_arguments_prints_help_and_exits_two — The CLI exited 2. The test failed at rpf_e2e.rs:97 because captured stderr lacked xcl rpf <package.rpf>. The CLI fallback uses print! to write help to stdout. CLI dispatch
    • rpf_missing_file_reports_error_and_exits_two — Passed. The CLI exited 2 and stderr contained xcl rpf:.
    • rpf_listing_filtering_and_extraction — The CLI exited successfully on the checked-in synthetic RPF9 fixture, then the test failed at rpf_e2e.rs:149. Listing reported no records with plain names where the fixture expected 2 records. The failure prevented the subsequent --find and --extract invocations and the byte-for-byte comparison of PS_Main.fssm.

Process environment set CARGO_TARGET_DIR=L:/XclTooling/pr1778-2e2ee55-20261125-020159/target, CARGO_BUILD_JOBS=2, CARGO_INCREMENTAL=0, CARGO_PROFILE_DEV_DEBUG=0, CARGO_PROFILE_TEST_DEBUG=0, and XCL_DXC_DIR=$env:LOCALAPPDATA/XclTooling/dxc-1.9.2609/bin/x64. Both TEMP and TMP were set to L:/XclTooling/pr2075/pr2075-0d7d243-20261125T030622362Z/temp. Raw stdout, stderr and exit-code logs are in the parent directory.

& "$env:USERPROFILE/.cargo/bin/cargo.exe" test -p xcl --test rpf_e2e --locked -- rpf_missing_arguments_prints_help_and_exits_two --exact --nocapture --test-threads=1
& "$env:USERPROFILE/.cargo/bin/cargo.exe" test -p xcl --test rpf_e2e --locked -- rpf_missing_file_reports_error_and_exits_two --exact --nocapture --test-threads=1
& "$env:USERPROFILE/.cargo/bin/cargo.exe" test -p xcl --test rpf_e2e --locked -- rpf_listing_filtering_and_extraction --exact --nocapture --test-threads=1

Not tested

  • Filtering and extraction fidelity were unverified because listing failed. Non-RPF9 and malformed inputs, third-party packages, retail data, GPU work, the workspace suite, baseline comparisons and smoke runs were outside this run.

AI use

  • T3 Code / Codex (gpt-6.2-sol) ran the checked-in cases and wrote this report from the logs and checked-in assertions.

Follow-up on c6ec336

Tested

  • The clean checkout and open PR matched c6ec336208 before and after this rerun.
  • STOR-WINLAB, Windows 11 Enterprise Evaluation x64 26200.9974, AMD Ryzen 7 3800X, Rust 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc), Cargo 1.100.0 (3acc79c0c), MSVC 19.44.35230.0, linker 14.44.35230.0. The synthetic archive cases exercised CPU file I/O, scanning and decompression. Arc A770 32.0.101.9175 and DXC/DXIL 1.9.2609.5 were installed. These cases had no optional GPU or DXC path.
  • 2 passed, 0 failed, 0 ignored, 0 skipped. Each invocation selected one test, filtered five, and returned Cargo exit 0. Both Cargo stdout, stderr and exit logs were inspected. The harness captures child CLI streams internally. Its passing assertions established the following observations.
    • rpf_missing_arguments_prints_help_and_exits_two observed CLI exit 2 and xcl rpf <package.rpf> in stdout.
    • rpf_listing_filtering_and_extraction observed successful CLI exits for all three invocations. Listing stdout contained 2 records, VS_Main, PS_Main and the extension summary. --find VS returned VS_Main and excluded PS_Main. --extract PS reported one extraction, wrote PS_Main byte-for-byte as TEST_PIXEL_SHADER_DATA_5678, and left no VS_Main file. Neither selected fixture asserts child stderr.
cargo test --locked -p xcl --test rpf_e2e -- rpf_missing_arguments_prints_help_and_exits_two --exact --nocapture --test-threads=1
cargo test --locked -p xcl --test rpf_e2e -- rpf_listing_filtering_and_extraction --exact --nocapture --test-threads=1

The run used the unoptimized test profile with dev and test debug info disabled, two Cargo jobs, CARGO_INCREMENTAL=0, and CARGO_TARGET_DIR=L:/XclTooling/pr1844-71f2ceb-t3-737e5ee5/target. TEMP and TMP used this report’s sibling temp directory. XCL_ADAPTER was set to an unmatched value.

Not tested

  • The other RPF cases, the workspace suite, GPU execution, retail archives, and smoke or baseline comparisons.

AI use

  • T3 Code / Codex (gpt-6.2-sol) ran the two checked-in cases, inspected the fixtures and logs, and wrote this report.
**@⁠JJAutoCompare** on GitHub · 2026-11-25 03:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/2075#issuecomment-7151638735) · edited 2026-11-25 03:37 UTC # PR #2075 Windows RPF CLI test report **Tested** - [PR #2075](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2075) was open at `0d7d24317f5bdb3cc8ae45b69004923b657d2bef` before and after the run. The reused detached checkout was clean at that SHA both times. The PR discussion was empty at both checks. - Windows 11 Enterprise Evaluation x64 25H2 build `26200.9974`, AMD Ryzen 7 3800X, Rust `1.100.0` (`0ef1bc386`, `x86_64-pc-windows-msvc`), Cargo `1.100.0` (`3acc79c0c`), unoptimized Cargo test profile with debug info disabled. CPU only. DXC `1.9.2609.5` was present and configured. These cases did not invoke it. - **1 passed, 2 failed, 0 ignored, 0 skipped.** Each exact invocation selected one test and filtered out five. - `rpf_missing_arguments_prints_help_and_exits_two` — The CLI exited 2. The test failed at `rpf_e2e.rs:97` because captured stderr lacked `xcl rpf <package.rpf>`. The CLI fallback uses `print!` to write help to stdout. [CLI dispatch](https://github.com/xcl-dev/xcl/blob/0d7d24317f5bdb3cc8ae45b69004923b657d2bef/crates/xcl/src/main.rs#L75-L87) - `rpf_missing_file_reports_error_and_exits_two` — Passed. The CLI exited 2 and stderr contained `xcl rpf:`. - `rpf_listing_filtering_and_extraction` — The CLI exited successfully on the checked-in synthetic RPF9 fixture, then the test failed at `rpf_e2e.rs:149`. Listing reported `no records with plain names` where the fixture expected `2 records`. The failure prevented the subsequent `--find` and `--extract` invocations and the byte-for-byte comparison of `PS_Main.fssm`. Process environment set `CARGO_TARGET_DIR=L:/XclTooling/pr1778-2e2ee55-20261125-020159/target`, `CARGO_BUILD_JOBS=2`, `CARGO_INCREMENTAL=0`, `CARGO_PROFILE_DEV_DEBUG=0`, `CARGO_PROFILE_TEST_DEBUG=0`, and `XCL_DXC_DIR=$env:LOCALAPPDATA/XclTooling/dxc-1.9.2609/bin/x64`. Both `TEMP` and `TMP` were set to `L:/XclTooling/pr2075/pr2075-0d7d243-20261125T030622362Z/temp`. Raw stdout, stderr and exit-code logs are in the parent directory. ```powershell & "$env:USERPROFILE/.cargo/bin/cargo.exe" test -p xcl --test rpf_e2e --locked -- rpf_missing_arguments_prints_help_and_exits_two --exact --nocapture --test-threads=1 & "$env:USERPROFILE/.cargo/bin/cargo.exe" test -p xcl --test rpf_e2e --locked -- rpf_missing_file_reports_error_and_exits_two --exact --nocapture --test-threads=1 & "$env:USERPROFILE/.cargo/bin/cargo.exe" test -p xcl --test rpf_e2e --locked -- rpf_listing_filtering_and_extraction --exact --nocapture --test-threads=1 ``` **Not tested** - Filtering and extraction fidelity were unverified because listing failed. Non-RPF9 and malformed inputs, third-party packages, retail data, GPU work, the workspace suite, baseline comparisons and smoke runs were outside this run. **AI use** - T3 Code / Codex (`gpt-6.2-sol`) ran the checked-in cases and wrote this report from the logs and checked-in assertions. ## Follow-up on c6ec336 **Tested** - The clean checkout and open PR matched c6ec336208a8051693d2c2ccff785a4f6405fe3a before and after this rerun. - STOR-WINLAB, Windows 11 Enterprise Evaluation x64 `26200.9974`, AMD Ryzen 7 3800X, Rust `1.100.0` (`0ef1bc386`, `x86_64-pc-windows-msvc`), Cargo `1.100.0` (`3acc79c0c`), MSVC `19.44.35230.0`, linker `14.44.35230.0`. The synthetic archive cases exercised CPU file I/O, scanning and decompression. Arc A770 `32.0.101.9175` and DXC/DXIL `1.9.2609.5` were installed. These cases had no optional GPU or DXC path. - **2 passed, 0 failed, 0 ignored, 0 skipped.** Each invocation selected one test, filtered five, and returned Cargo exit `0`. Both Cargo stdout, stderr and exit logs were inspected. The harness captures child CLI streams internally. Its passing assertions established the following observations. - `rpf_missing_arguments_prints_help_and_exits_two` observed CLI exit `2` and `xcl rpf <package.rpf>` in stdout. - `rpf_listing_filtering_and_extraction` observed successful CLI exits for all three invocations. Listing stdout contained `2 records`, `VS_Main`, `PS_Main` and the extension summary. `--find VS` returned `VS_Main` and excluded `PS_Main`. `--extract PS` reported one extraction, wrote `PS_Main` byte-for-byte as `TEST_PIXEL_SHADER_DATA_5678`, and left no `VS_Main` file. Neither selected fixture asserts child stderr. ```powershell cargo test --locked -p xcl --test rpf_e2e -- rpf_missing_arguments_prints_help_and_exits_two --exact --nocapture --test-threads=1 cargo test --locked -p xcl --test rpf_e2e -- rpf_listing_filtering_and_extraction --exact --nocapture --test-threads=1 ``` The run used the unoptimized test profile with dev and test debug info disabled, two Cargo jobs, `CARGO_INCREMENTAL=0`, and `CARGO_TARGET_DIR=L:/XclTooling/pr1844-71f2ceb-t3-737e5ee5/target`. `TEMP` and `TMP` used this report’s sibling `temp` directory. `XCL_ADAPTER` was set to an unmatched value. **Not tested** - The other RPF cases, the workspace suite, GPU execution, retail archives, and smoke or baseline comparisons. **AI use** - T3 Code / Codex (`gpt-6.2-sol`) ran the two checked-in cases, inspected the fixtures and logs, and wrote this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 05:09 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 05:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/2075#issuecomment-7153510324) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 11:03 UTC · original

Code review on c6ec336 (crates/xcl/tests/rpf_e2e.rs):

  • Extracting temp_path, ignoring teardown remove_file errors, and adding the four CLI tests (rpf_missing_arguments_prints_help_and_exits_two, rpf_missing_file_reports_error_and_exits_two, rpf_non_rpf9_file_reports_error_and_exits_two, rpf_listing_filtering_and_extraction) cleanly covers the xcl rpf subcommand, and both CI checks are green.

Remaining before merge: Independent Windows verification of cargo test -p xcl --test rpf_e2e on c6ec336 (prior Arc verification was on 0d7d243).

**@⁠raylitebull** on GitHub · 2026-11-25 11:03 UTC · [original](https://github.com/xcl-dev/xcl/pull/2075#issuecomment-7160528263) Code review on `c6ec336` (`crates/xcl/tests/rpf_e2e.rs`): - Extracting `temp_path`, ignoring teardown `remove_file` errors, and adding the four CLI tests (`rpf_missing_arguments_prints_help_and_exits_two`, `rpf_missing_file_reports_error_and_exits_two`, `rpf_non_rpf9_file_reports_error_and_exits_two`, `rpf_listing_filtering_and_extraction`) cleanly covers the `xcl rpf` subcommand, and both CI checks are green. **Remaining before merge:** Independent Windows verification of `cargo test -p xcl --test rpf_e2e` on `c6ec336` (prior Arc verification was on `0d7d243`).
Author
Owner

@⁠tiagonleal on GitHub · 2026-11-25 14:09 UTC · original

Verification on NVIDIA RTX 5070 Ti (Windows 11), head c6ec336208a8051693d2c2ccff785a4f6405fe3a

Tested

  • Head c6ec336208a8051693d2c2ccff785a4f6405fe3a (git rev-parse HEAD of a clean detached worktree, no local changes, built as is). The PR was open and the head unchanged when I started and again before writing this. The earlier verification in the thread was on 0d7d243.
  • Windows 11 Pro 10.0.26300 (Developer Mode on), NVIDIA GeForce RTX 5070 Ti 16 GB (driver 617.42, 32.0.16.1742), AMD Ryzen 7 9800X3D, 32 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), cargo 1.100.0, debug profile (the cargo test default).
  • The PR changes crates/xcl/tests/rpf_e2e.rs, so I ran that target: cargo test -p xcl --test rpf_e2e -- --test-threads=4 --nocapture: 6 passed, 0 failed, 0 ignored (0.44 s after the build). Tests: rpf_missing_arguments_prints_help_and_exits_two, rpf_missing_file_reports_error_and_exits_two, rpf_non_rpf9_file_reports_error_and_exits_two, rpf_listing_filtering_and_extraction (the four new ones), full_scan_and_streaming_probe_agree_on_header_evidence, explicit_probe_rejects_conflicting_options.
  • No SKIPPED lines in the output. git status --short was empty afterwards.

Not tested

  • An AMD host.
  • cargo test --workspace, --lib and the other test targets; release profile; the retail game and xcl-smoke.

Run and written with Claude Code (Claude Fable 5.2 and Claude Sonnet 5.5).

**@⁠tiagonleal** on GitHub · 2026-11-25 14:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/2075#issuecomment-7164841334) Verification on NVIDIA RTX 5070 Ti (Windows 11), head `c6ec336208a8051693d2c2ccff785a4f6405fe3a` **Tested** - Head `c6ec336208a8051693d2c2ccff785a4f6405fe3a` (`git rev-parse HEAD` of a clean detached worktree, no local changes, built as is). The PR was open and the head unchanged when I started and again before writing this. The earlier verification in the thread was on `0d7d243`. - Windows 11 Pro 10.0.26300 (Developer Mode on), NVIDIA GeForce RTX 5070 Ti 16 GB (driver 617.42, 32.0.16.1742), AMD Ryzen 7 9800X3D, 32 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), cargo 1.100.0, debug profile (the `cargo test` default). - The PR changes `crates/xcl/tests/rpf_e2e.rs`, so I ran that target: `cargo test -p xcl --test rpf_e2e -- --test-threads=4 --nocapture`: 6 passed, 0 failed, 0 ignored (0.44 s after the build). Tests: `rpf_missing_arguments_prints_help_and_exits_two`, `rpf_missing_file_reports_error_and_exits_two`, `rpf_non_rpf9_file_reports_error_and_exits_two`, `rpf_listing_filtering_and_extraction` (the four new ones), `full_scan_and_streaming_probe_agree_on_header_evidence`, `explicit_probe_rejects_conflicting_options`. - No `SKIPPED` lines in the output. `git status --short` was empty afterwards. **Not tested** - An AMD host. - `cargo test --workspace`, `--lib` and the other test targets; release profile; the retail game and `xcl-smoke`. Run and written with Claude Code (Claude Fable 5.2 and Claude Sonnet 5.5).
Author
Owner

@⁠throny on GitHub · 2026-11-25 18:18 UTC · original

Two contributors checked independently and found that #1718 #2193 solves the same problem in a different way: #1607, group D99. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

**@⁠throny** on GitHub · 2026-11-25 18:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/2075#issuecomment-7170739340) <!-- xcl-1607-hint:D99 --> Two contributors checked independently and found that #1718 #2193 solves the same problem in a different way: #1607, group D99. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
This pull request has changes conflicting with the target branch.
  • crates/xcl/tests/rpf_e2e.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2075/head:github-bot/gh-2075'
git switch 'github-bot/gh-2075'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2075'
git switch 'github-bot/gh-2075'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2075'
git switch 'github-bot/gh-2075'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2075'
git switch 'main'
git merge --squash 'github-bot/gh-2075'
git switch 'main'
git merge --ff-only 'github-bot/gh-2075'
git switch 'main'
git merge 'github-bot/gh-2075'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.