[CLAIM] VSP-24: unit tests for the XMA tables in vesper-formats #43

Open
opened 2026-12-02 10:51:26 +00:00 by github-bot · 0 comments
Owner

@⁠imShangLi on GitHub · 2026-12-02 10:51 UTC · original

Proposed scoped task (new): Add a #[cfg(test)] module to crates/vesper-formats/src/xma/tables.rs verifying the WMA Pro Huffman and level tables are well-formed.

Scope (Primary Files): crates/vesper-formats/src/xma/tables.rs (+ narrow unit test in the same file). No other files, no dependency bumps.

Rationale: xma/tables.rs (~393 lines) is currently the largest module in esper-formats without any unit tests. It holds the canonical (symbol, code length) pairs for the WMA Pro bitstream that XMA2 frames use. A test module can assert invariants the decoder relies on:

  • each table is in canonical code order,
  • code lengths are within the valid 1-21 bit range,
  • the CRITICAL_FREQ list is strictly increasing,
  • SCALE / SCALE_RL entries cover the expected symbol space with no duplicate symbols.

Verification: cargo test -p vesper-formats --locked plus the repo's standard gates (cargo test -p xtask --locked, cargo clippy --workspace --all-targets --locked -- -D warnings, cargo test --workspace --locked -- --test-threads=1). Pure data, no game assets, no GPU/audio hardware required.

AI disclosure: Assisted by an AI agent (LobsterAI / DSH). Implementation, checks, and local verification will be personally run and reported. No game data, no banned third-party or franchise names.

Requesting maintainer approval to scope and claim this task.

**@⁠imShangLi** on GitHub · 2026-12-02 10:51 UTC · [original](https://github.com/monte-alt/vesper/issues/43) **Proposed scoped task (new):** Add a #[cfg(test)] module to crates/vesper-formats/src/xma/tables.rs verifying the WMA Pro Huffman and level tables are well-formed. **Scope (Primary Files):** crates/vesper-formats/src/xma/tables.rs (+ narrow unit test in the same file). No other files, no dependency bumps. **Rationale:** xma/tables.rs (~393 lines) is currently the largest module in esper-formats without any unit tests. It holds the canonical (symbol, code length) pairs for the WMA Pro bitstream that XMA2 frames use. A test module can assert invariants the decoder relies on: - each table is in canonical code order, - code lengths are within the valid 1-21 bit range, - the CRITICAL_FREQ list is strictly increasing, - SCALE / SCALE_RL entries cover the expected symbol space with no duplicate symbols. **Verification:** cargo test -p vesper-formats --locked plus the repo's standard gates (cargo test -p xtask --locked, cargo clippy --workspace --all-targets --locked -- -D warnings, cargo test --workspace --locked -- --test-threads=1). Pure data, no game assets, no GPU/audio hardware required. **AI disclosure:** Assisted by an AI agent (LobsterAI / DSH). Implementation, checks, and local verification will be personally run and reported. No game data, no banned third-party or franchise names. Requesting maintainer approval to scope and claim this task.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 10:51:26 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.