Tests: pin RPF probe rejection of non-RPF9 and missing files #1718

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

@⁠amazedturnip on GitHub · 2026-11-24 19:43 UTC · original
amazedturnip:xcl/tests-rpf-probe-rejection-contract-192613 → main · +59 −0 · 1 files · 1 commits · open

Adds two e2e tests pinning the bounded RPF probe's two rejection contract paths: a file with no 9FPR magic at offset 0 and a non-existent path, both rejected with exit 2 and a clear stderr message and no 'RPF9 archives' stdout summary. The tests invoke the real xcl binary via CARGO_BIN_EXE_xcl, require no GPU, and were verified against a temporary root_magic-guard disable (probe_rejects_file_without_rpf9_header failed as expected, then passed after restore).

What is in it

  • crates/xcl/tests/rpf_e2e.rs: added probe_rejects_file_without_rpf9_header (0x860 zero-byte file with no 9FPR magic -> exit 2, stderr contains 'is not an RPF9 package', and no 'RPF9 archives' stdout line).
  • crates/xcl/tests/rpf_e2e.rs: added probe_rejects_missing_file (non-existent path -> exit 2, stderr naming the missing path, and no 'RPF9 archives' stdout line).

Tested

  • Hardware / OS / Rust: AMD Ryzen 7 9800X3D 8-Core Processor, Windows 11 Pro 10.0.26100 (Build 26100), rustc 1.94.1 (e408947bf 2026-03-25), stable-x86_64-pc-windows-msvc, debug build
  • AMD (AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64), XCL_ADAPTER=radeon): cargo test --workspace -- --test-threads=1 — 860 passed, 0 failed, 42 ignored (SKIPPED GPU tests: 1 (no heap windows))
  • Verification / negative control: Temporarily replaced if !probe.root_magic { with if false { in crates/xcl/src/rpf_probe.rs and ran cargo test --test rpf_e2e; probe_rejects_file_without_rpf9_header failed (exit code was 0 with 'RPF9 archives (headers every 2 KB): 0' on stdout). Restored the source via Copy-Item from a backup in $env:TEMP, touched the file, re-ran cargo test, and all 4 tests passed.

Not tested

  • retail Xbox Series X|S title (not available on this host)
  • NVIDIA wave32 GPU (not run in this pass; verified on AMD Radeon native wave64)

AI use

  • Local AI (thinkingmachines_inkling-2-mini) assisted with diagnosis, implementation, tests, review, and description; all tests executed locally on AMD Radeon (native wave64).
**@⁠amazedturnip** on GitHub · 2026-11-24 19:43 UTC · [original](https://github.com/xcl-dev/xcl/pull/1718) `amazedturnip:xcl/tests-rpf-probe-rejection-contract-192613` → `main` · +59 −0 · 1 files · 1 commits · open Adds two e2e tests pinning the bounded RPF probe's two rejection contract paths: a file with no 9FPR magic at offset 0 and a non-existent path, both rejected with exit 2 and a clear stderr message and no 'RPF9 archives' stdout summary. The tests invoke the real xcl binary via CARGO_BIN_EXE_xcl, require no GPU, and were verified against a temporary root_magic-guard disable (probe_rejects_file_without_rpf9_header failed as expected, then passed after restore). **What is in it** - `crates/xcl/tests/rpf_e2e.rs`: added `probe_rejects_file_without_rpf9_header` (0x860 zero-byte file with no 9FPR magic -> exit 2, stderr contains 'is not an RPF9 package', and no 'RPF9 archives' stdout line). - `crates/xcl/tests/rpf_e2e.rs`: added `probe_rejects_missing_file` (non-existent path -> exit 2, stderr naming the missing path, and no 'RPF9 archives' stdout line). **Tested** - Hardware / OS / Rust: AMD Ryzen 7 9800X3D 8-Core Processor, Windows 11 Pro 10.0.26100 (Build 26100), rustc 1.94.1 (e408947bf 2026-03-25), stable-x86_64-pc-windows-msvc, debug build - AMD (`AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64)`, `XCL_ADAPTER=radeon`): `cargo test --workspace -- --test-threads=1` — 860 passed, 0 failed, 42 ignored (SKIPPED GPU tests: 1 (no heap windows)) - Verification / negative control: Temporarily replaced `if !probe.root_magic {` with `if false {` in crates/xcl/src/rpf_probe.rs and ran `cargo test --test rpf_e2e`; `probe_rejects_file_without_rpf9_header` failed (exit code was 0 with 'RPF9 archives (headers every 2 KB): 0' on stdout). Restored the source via `Copy-Item` from a backup in $env:TEMP, touched the file, re-ran cargo test, and all 4 tests passed. **Not tested** - retail Xbox Series X|S title (not available on this host) - NVIDIA wave32 GPU (not run in this pass; verified on AMD Radeon native wave64) **AI use** - Local AI (thinkingmachines_inkling-2-mini) assisted with diagnosis, implementation, tests, review, and description; all tests executed locally on AMD Radeon (native wave64).
The bounded RPF9 probe already rejects files whose root magic is missing and files that cannot be opened, with exit code 2 and a 'is not an RPF9 package' stderr line; neither behavior was pinned by e2e tests. Add two tests in crates/xcl/tests/rpf_e2e.rs that invoke the real xcl binary: (1) an 0x860-byte file with no 9FPR header is rejected with exit 2, stderr mentioning 'is not an RPF9 package', and no 'RPF9 archives' line; (2) a non-existent path is rejected with exit 2 and stderr naming the missing path. The new tests fail on unpatched logic (verified by temporarily disabling the root_magic guard) and pass with the restored source.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:02:35 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 22:28 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 22:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/1718#issuecomment-7146278373) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~23 ignored. Thanks!
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 04:02 UTC · original

XCL PR #1718 verification

Head 6c4a438b7f60a5a1583f2bb1294dc1bf7dda5c68, clean detached checkout. The diff adds two CLI integration tests in crates/xcl/tests/rpf_e2e.rs.

STOR-WINLAB ran Windows 11 x64 (build 26200), AMD64 Family 23 Model 113 CPU, Intel Arc A770 (driver 32.0.101.9175), DXC 1.9.2609.5, and rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Cargo used unoptimized profiles with debuginfo and incremental compilation disabled.

Tested

  • cargo build --workspace and cargo test --workspace --no-run succeeded outside the GPU lock. The latter built 19 test binaries.
  • cargo test -p xcl --test rpf_e2e probe_rejects_ with XCL_ADAPTER=NONE_CPU_ONLY ran outside the lock. It returned 3 passed, 0 failed, 0 ignored, 0 skipped, and 1 filtered out. The filter included the existing option-conflict test.
  • Both new tests exercised xcl rpf <path> --probe. The headerless 0x860-byte file exited 2 with the RPF9 rejection on stderr. The absent path exited 2 with the path on stderr. Both produced no RPF9 archives summary on stdout.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 ran once under Invoke-ArcTest.ps1 with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1. The run logged the Arc backend and all four RPF tests passed. It exited 101. Summing the 20 test result: lines in pr1718-suite.log (19 binaries and one doctest harness) gave 842 passed, 18 failed, and 42 ignored.

Workspace failures and skips

  • Library tests had 17 failures. Thirteen reported CreateComputePipelineState error 0x80070057. Four failed assertions for FMA, mip sampling, VALU, and pixel wave reductions. The test-title end-to-end check also failed. Dynamic depth bias produced blue where the test expected green.
  • Six lines began with SKIPPED . Two were wave64 checks, one was for tiled-resource tier, one was for heap windows, and two required the debug layer. Those checks provided no coverage. The log also records early returns for missing sample data, audio, and system XGameRuntime.

Not tested

Matched main baseline, retail archives and title smoke runs, and other GPU adapters. Baseline status for the workspace failures remains unverified.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1718-suite.log and published.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 04:02 UTC · [original](https://github.com/xcl-dev/xcl/pull/1718#issuecomment-7152468630) # XCL PR #1718 verification Head `6c4a438b7f60a5a1583f2bb1294dc1bf7dda5c68`, clean detached checkout. The diff adds two CLI integration tests in `crates/xcl/tests/rpf_e2e.rs`. STOR-WINLAB ran Windows 11 x64 (build 26200), AMD64 Family 23 Model 113 CPU, Intel Arc A770 (driver 32.0.101.9175), DXC 1.9.2609.5, and rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Cargo used unoptimized profiles with debuginfo and incremental compilation disabled. **Tested** - `cargo build --workspace` and `cargo test --workspace --no-run` succeeded outside the GPU lock. The latter built 19 test binaries. - `cargo test -p xcl --test rpf_e2e probe_rejects_` with `XCL_ADAPTER=NONE_CPU_ONLY` ran outside the lock. It returned 3 passed, 0 failed, 0 ignored, 0 skipped, and 1 filtered out. The filter included the existing option-conflict test. - Both new tests exercised `xcl rpf <path> --probe`. The headerless 0x860-byte file exited 2 with the RPF9 rejection on stderr. The absent path exited 2 with the path on stderr. Both produced no `RPF9 archives` summary on stdout. - `cargo test --workspace --no-fail-fast -- --test-threads=4` ran once under `Invoke-ArcTest.ps1` with `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1`. The run logged the Arc backend and all four RPF tests passed. It exited 101. Summing the 20 `test result:` lines in `pr1718-suite.log` (19 binaries and one doctest harness) gave 842 passed, 18 failed, and 42 ignored. **Workspace failures and skips** - Library tests had 17 failures. Thirteen reported `CreateComputePipelineState` error `0x80070057`. Four failed assertions for FMA, mip sampling, VALU, and pixel wave reductions. The test-title end-to-end check also failed. Dynamic depth bias produced blue where the test expected green. - Six lines began with `SKIPPED `. Two were wave64 checks, one was for tiled-resource tier, one was for heap windows, and two required the debug layer. Those checks provided no coverage. The log also records early returns for missing sample data, audio, and system XGameRuntime. **Not tested** Matched `main` baseline, retail archives and title smoke runs, and other GPU adapters. Baseline status for the workspace failures remains unverified. **AI use** T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr1718-suite.log` and published.
Author
Owner

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

Two contributors checked independently and found that #2075 #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/1718#issuecomment-7170738786) <!-- xcl-1607-hint:D99 --> Two contributors checked independently and found that #2075 #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.
Author
Owner

@⁠amazedturnip on GitHub · 2026-11-25 21:43 UTC · original

Rebased onto current main and resolved the merge conflict in crates/xcl/tests/rpf_e2e.rs by keeping both the existing rpf_rejects_unknown_options_missing_values_and_invalid_numbers test and the two new probe rejection tests (probe_rejects_file_without_rpf9_header, probe_rejects_missing_file). cargo test --test rpf_e2e: 5 passed, 0 failed on AMD Radeon. No other changes were made.

**@⁠amazedturnip** on GitHub · 2026-11-25 21:43 UTC · [original](https://github.com/xcl-dev/xcl/pull/1718#issuecomment-7175452753) Rebased onto current main and resolved the merge conflict in crates/xcl/tests/rpf_e2e.rs by keeping both the existing rpf_rejects_unknown_options_missing_values_and_invalid_numbers test and the two new probe rejection tests (probe_rejects_file_without_rpf9_header, probe_rejects_missing_file). `cargo test --test rpf_e2e`: 5 passed, 0 failed on AMD Radeon. No other changes were made.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 06:17 UTC · original

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 06:17 UTC · [original](https://github.com/xcl-dev/xcl/pull/1718#issuecomment-7184277282) Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
Author
Owner

@⁠amazedturnip on GitHub · 2026-11-26 07:56 UTC · original

On the #1607 D99 hint: the three PRs test different code paths.

xcl rpf <file> --probe returns early into rpf_probe::run (crates/xcl/src/rpf.rs:161-163). That function has its own open, metadata and RPF9-magic checks (crates/xcl/src/rpf_probe.rs:121-146). #2075 and #2193 run xcl rpf <file> without --probe, so they cover only the full-scan checks in crates/xcl/src/rpf.rs:167-192. The two tests here are the only ones that exercise the probe's rejection of a non-RPF9 file and of a missing file.

All three append to crates/xcl/tests/rpf_e2e.rs, so whichever merges later needs a rebase. They do not overlap in what they test.

AI use: Claude Code (Claude Opus 5.5) compared the three diffs against main at b49be183.

**@⁠amazedturnip** on GitHub · 2026-11-26 07:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/1718#issuecomment-7186001540) On the #1607 D99 hint: the three PRs test different code paths. `xcl rpf <file> --probe` returns early into `rpf_probe::run` (`crates/xcl/src/rpf.rs:161-163`). That function has its own open, metadata and RPF9-magic checks (`crates/xcl/src/rpf_probe.rs:121-146`). #2075 and #2193 run `xcl rpf <file>` without `--probe`, so they cover only the full-scan checks in `crates/xcl/src/rpf.rs:167-192`. The two tests here are the only ones that exercise the probe's rejection of a non-RPF9 file and of a missing file. All three append to `crates/xcl/tests/rpf_e2e.rs`, so whichever merges later needs a rebase. They do not overlap in what they test. AI use: Claude Code (Claude Opus 5.5) compared the three diffs against `main` at b49be183.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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