XMA tests: count frames only in the selected stream #1589

Open
zhaibingye wants to merge 1 commit from upstream-pr/1590 into main
zhaibingye commented 2026-11-24 19:31:46 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by zhaibingye on 2026-11-24T19:31:46Z.


walks_saved_streams decodes one XMA stream but sums frame counts from every interleaved stream. Follow each header's packet skip when counting expected frames. The regression test covers two unevenly interleaved streams.

A five-packet synthetic input on main reported 8 frames counted, 4 walked, 0 decode errors. With the change it reports 4 counted and 4 walked. A single-stream control passes, and a packet claiming an extra frame still fails.

On Linux, cargo test --locked -p victory-formats passed (24 passed, 4 ignored by default). Clippy and cargo xtask policy passed. Synthetic inputs only. AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6589765956 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1590). Originally posted by [zhaibingye](https://github.com/zhaibingye) on 2026-11-24T19:31:46Z. --- walks_saved_streams decodes one XMA stream but sums frame counts from every interleaved stream. Follow each header's packet skip when counting expected frames. The regression test covers two unevenly interleaved streams. A five-packet synthetic input on main reported 8 frames counted, 4 walked, 0 decode errors. With the change it reports 4 counted and 4 walked. A single-stream control passes, and a packet claiming an extra frame still fails. On Linux, cargo test --locked -p victory-formats passed (24 passed, 4 ignored by default). Clippy and cargo xtask policy passed. Synthetic inputs only. AI-assisted with Codex.
acetonahard-code commented 2026-11-24 23:05:54 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by acetonahard-code on 2026-11-24T22:24:11Z.


Tested on Windows 11 with the repo toolchain, merged into current main (70564ae):

cargo test -p victory-formats passed failed ignored
main 23 0 4
main + this PR 24 0 4
  • The new test passes.
  • cargo clippy --all-targets -- -D warnings, with and without --all-features: clean.

I didn't test with game data.


Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7146185334 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1590#issuecomment-7146185334). Originally posted by [acetonahard-code](https://github.com/acetonahard-code) on 2026-11-24T22:24:11Z. --- Tested on Windows 11 with the repo toolchain, merged into current `main` (70564ae): | `cargo test -p victory-formats` | passed | failed | ignored | |---|---|---|---| | `main` | 23 | 0 | 4 | | `main` + this PR | 24 | 0 | 4 | - The new test passes. - `cargo clippy --all-targets -- -D warnings`, with and without `--all-features`: clean. I didn't test with game data. --- <sub>Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.</sub>
Marvisak commented 2026-11-25 02:06:09 +00:00 (Migrated from github.com)

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


Automated triage for the maintainers.

Needs rebase. This pull request conflicts with main (conflicting: crates/victory-formats/src/xma.rs). It will be reviewed once it is rebased onto the current main.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7149646745 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1590#issuecomment-7149646745). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T01:31:36Z. --- <!-- victory-triage v1 head=44e0c31d149b8964ba1e72258325edcf402865e3 verdict=needs-rebase at=2026-11-25T01:31:36Z --> Automated triage for the maintainers. **Needs rebase.** This pull request conflicts with `main` (conflicting: `crates/victory-formats/src/xma.rs`). It will be reviewed once it is rebased onto the current `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
Headache3318 commented 2026-11-25 02:06:11 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Headache3318 on 2026-11-25T01:33:35Z.


Tested on Linux (Arch, kernel 7.3.5, 3× RTX 4090 driver 620.73.04), Rust 1.98.1 (pinned). PR head 44e0c31 applied cleanly onto current main ccfb029.

  • cargo test --locked -p victory-formats: 24 passed, 0 failed, 4 ignored. All XMA tests pass, including the new regression test for counting frames in interleaved streams.
  • cargo clippy -p victory-formats --all-targets --all-features --locked -- -D warnings: clean.

Not tested: Windows MSVC build, the title itself. AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7149686390 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1590#issuecomment-7149686390). Originally posted by [Headache3318](https://github.com/Headache3318) on 2026-11-25T01:33:35Z. --- Tested on Linux (Arch, kernel 7.3.5, 3× RTX 4090 driver 620.73.04), Rust 1.98.1 (pinned). PR head `44e0c31` applied cleanly onto current `main` `ccfb029`. - `cargo test --locked -p victory-formats`: 24 passed, 0 failed, 4 ignored. All XMA tests pass, including the new regression test for counting frames in interleaved streams. - `cargo clippy -p victory-formats --all-targets --all-features --locked -- -D warnings`: clean. Not tested: Windows MSVC build, the title itself. AI-assisted.
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/1590:upstream-pr/1590'
git switch 'upstream-pr/1590'

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