Tests: expand rpf integration tests for missing arguments and empty-TOC archives #2193

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

@⁠heditrigui on GitHub · 2026-11-25 08:41 UTC · original
heditrigui:tests/rpf-cli-and-empty-toc-suite → main · +65 −0 · 1 files · 1 commits · open

Summary

Expands integration testing in crates/xcl/tests/rpf_e2e.rs to cover CLI error paths, missing arguments, and empty-TOC archives:

  • Verifies that invoking xcl rpf without arguments exits with code 2, prints usage help containing xcl rpf <package.rpf> to stdout, and writes nothing to stderr.
  • Verifies that attempting to inspect a nonexistent archive reports xcl rpf: <path> to stderr with exit code 2.
  • Verifies that non-RPF archives lacking the 9FPR magic report is not an RPF9 package to stderr with exit code 2.
  • Verifies that valid RPF9 headers without plain records report no records with plain names, invoke the probe summary, and exit cleanly with code 0.

Tested

  • python -m pytest scripts/ (25 passed in 0.50s).
  • 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 08:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/2193) `heditrigui:tests/rpf-cli-and-empty-toc-suite` → `main` · +65 −0 · 1 files · 1 commits · open ### Summary Expands integration testing in `crates/xcl/tests/rpf_e2e.rs` to cover CLI error paths, missing arguments, and empty-TOC archives: - Verifies that invoking `xcl rpf` without arguments exits with code 2, prints usage help containing `xcl rpf <package.rpf>` to stdout, and writes nothing to stderr. - Verifies that attempting to inspect a nonexistent archive reports `xcl rpf: <path>` to stderr with exit code 2. - Verifies that non-RPF archives lacking the `9FPR` magic report `is not an RPF9 package` to stderr with exit code 2. - Verifies that valid RPF9 headers without plain records report `no records with plain names`, invoke the probe summary, and exit cleanly with code 0. **Tested** - `python -m pytest scripts/` (25 passed in 0.50s). - 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:22:36 +00:00
Author
Owner

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

Code review on 2df583d:

  • Adding rpf_missing_arguments_prints_help_and_exits_two, rpf_nonexistent_file_and_invalid_magic_report_errors, and rpf_header_with_no_records_summarizes_and_exits_zero in crates/xcl/tests/rpf_e2e.rs cleanly verifies CLI diagnostics and empty-TOC handling, with both CI checks green.

Remaining before merge: Independent verification on 2df583d.

**@⁠raylitebull** on GitHub · 2026-11-25 10:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/2193#issuecomment-7160201422) Code review on `2df583d`: - Adding `rpf_missing_arguments_prints_help_and_exits_two`, `rpf_nonexistent_file_and_invalid_magic_report_errors`, and `rpf_header_with_no_records_summarizes_and_exits_zero` in `crates/xcl/tests/rpf_e2e.rs` cleanly verifies CLI diagnostics and empty-TOC handling, with both CI checks green. **Remaining before merge:** Independent verification on `2df583d`.
Author
Owner

@⁠tiagonleal on GitHub · 2026-11-25 12:32 UTC · original

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

Tested

  • Head 2df583d3aca6e2d358880ecb4e762939a51b2781 (git rev-parse HEAD of a clean worktree, no local changes, built as is). The PR was open and the head unchanged when I started and again before writing this.
  • Windows 11 Pro 10.0.26300 (Developer Mode off), NVIDIA GeForce RTX 5070 Ti 16 GB (driver 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 and not --lib: cargo test -p xcl --test rpf_e2e -- --test-threads=4 --nocapture: 5 passed, 0 failed, 0 ignored (about 20 s including an incremental build). Tests: rpf_missing_arguments_prints_help_and_exits_two, rpf_nonexistent_file_and_invalid_magic_report_errors, rpf_header_with_no_records_summarizes_and_exits_zero (the three new ones), full_scan_and_streaming_probe_agree_on_header_evidence, explicit_probe_rejects_conflicting_options.
  • No SKIPPED lines in the output.

Not tested

  • An AMD host.
  • cargo test --workspace, --lib and the other test targets; release profile; Developer Mode on (off here); the retail game and xcl-smoke.

AI use

  • Claude Code created the clean worktree, built and ran the test target above, and wrote this report. No code was changed.

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

**@⁠tiagonleal** on GitHub · 2026-11-25 12:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/2193#issuecomment-7162524622) Verification on NVIDIA RTX 5070 Ti (Windows 11), head `2df583d3aca6e2d358880ecb4e762939a51b2781` **Tested** - Head `2df583d3aca6e2d358880ecb4e762939a51b2781` (`git rev-parse HEAD` of a clean worktree, no local changes, built as is). The PR was open and the head unchanged when I started and again before writing this. - Windows 11 Pro 10.0.26300 (Developer Mode off), NVIDIA GeForce RTX 5070 Ti 16 GB (driver 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 and not `--lib`: `cargo test -p xcl --test rpf_e2e -- --test-threads=4 --nocapture`: 5 passed, 0 failed, 0 ignored (about 20 s including an incremental build). Tests: `rpf_missing_arguments_prints_help_and_exits_two`, `rpf_nonexistent_file_and_invalid_magic_report_errors`, `rpf_header_with_no_records_summarizes_and_exits_zero` (the three new ones), `full_scan_and_streaming_probe_agree_on_header_evidence`, `explicit_probe_rejects_conflicting_options`. - No `SKIPPED` lines in the output. **Not tested** - An AMD host. - `cargo test --workspace`, `--lib` and the other test targets; release profile; Developer Mode on (off here); the retail game and `xcl-smoke`. **AI use** - Claude Code created the clean worktree, built and ran the test target above, and wrote this report. No code was changed. 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 #2075 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/2193#issuecomment-7170739811) <!-- xcl-1607-hint:D99 --> Two contributors checked independently and found that #1718 #2075 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/2193/head:github-bot/gh-2193'
git switch 'github-bot/gh-2193'

Merge

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