test(victory-loader): cover the pool-hook place tables #32

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

@⁠imShangLi on GitHub · 2026-12-02 16:24 UTC · original
imShangLi:feat/pool-users-tests → main · +48 −0 · 1 files · 1 commits · open

What

Adds a #[cfg(test)] module to crates/victory-loader/src/heap_sites/pool_users.rs (the largest module of pool-hook place rows without tests), pinning the invariants the hooking code relies on:

  • the 24 CASES rows are indexed ..n in order;
  • every window offset across COPY, LINKS, SPECIAL, TABLE and CASES is unique (a collision would patch the wrong place);
  • every BLAKE3-64 digest is unique (two rows for one window would be ambiguous);
  • no window has a length of zero.

Verification

  • cargo test -p victory-loader --lib heap_sites::pool_users ? 4 passed / 0 failed.
  • cargo clippy -p victory-loader --all-targets --locked -- -D warnings ? no warnings in this file; the only failure is a pre-existing unction 'unwind_copy' is never used in crates/victory-loader/src/crash.rs:804, which exists on an unmodified main and is unrelated to this PR.
  • Pure data, no title bytes, no executable, no fixtures.

Disclosure

Written by an AI agent (LobsterAI/DSH); invariants and verification run locally, reproducible with the commands above. No game data, no proprietary assets, no third-party names.

**@⁠imShangLi** on GitHub · 2026-12-02 16:24 UTC · [original](https://github.com/ToLIManl/VIctory-Hydra/pull/32) `imShangLi:feat/pool-users-tests` → `main` · +48 −0 · 1 files · 1 commits · open ## What Adds a #[cfg(test)] module to crates/victory-loader/src/heap_sites/pool_users.rs (the largest module of pool-hook place rows without tests), pinning the invariants the hooking code relies on: - the 24 CASES rows are indexed ..n in order; - every window offset across COPY, LINKS, SPECIAL, TABLE and CASES is unique (a collision would patch the wrong place); - every BLAKE3-64 digest is unique (two rows for one window would be ambiguous); - no window has a length of zero. ## Verification - cargo test -p victory-loader --lib heap_sites::pool_users ? **4 passed / 0 failed**. - cargo clippy -p victory-loader --all-targets --locked -- -D warnings ? no warnings in this file; the only failure is a **pre-existing** unction 'unwind_copy' is never used in crates/victory-loader/src/crash.rs:804, which exists on an unmodified main and is unrelated to this PR. - Pure data, no title bytes, no executable, no fixtures. ## Disclosure Written by an AI agent (LobsterAI/DSH); invariants and verification run locally, reproducible with the commands above. No game data, no proprietary assets, no third-party names.
Add a #[cfg(test)] module to crates/victory-loader/src/heap_sites/pool_users.rs
for the places the pool hooks patch in the title image:
- the 24 case rows are indexed 0..n in order;
- every window offset across COPY, LINKS, SPECIAL, TABLE and CASES is unique;
- every BLAKE3-64 digest is unique;
- no window has a length of zero.

Pure data, no title bytes, no executable, no fixtures.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 18:55:42 +00:00
Author
Owner

@⁠imShangLi on GitHub · 2026-12-03 03:43 UTC · original

The check and policy-and-tests failures here are pre-existing on main (3425e05) and unrelated to this PR - see #37. This diff is a #[cfg(test)] module only; the 4 tests pass locally (cargo test -p victory-loader --lib heap_sites::pool_users ? 4 passed) and the file is clippy-clean. Happy to help with the unwind_copy/asset-policy fixes if you'd like this to go green.

**@⁠imShangLi** on GitHub · 2026-12-03 03:43 UTC · [original](https://github.com/ToLIManl/VIctory-Hydra/pull/32#issuecomment-7366866971) The check and policy-and-tests failures here are pre-existing on main (3425e05) and unrelated to this PR - see #37. This diff is a #[cfg(test)] module only; the 4 tests pass locally (cargo test -p victory-loader --lib heap_sites::pool_users ? 4 passed) and the file is clippy-clean. Happy to help with the unwind_copy/asset-policy fixes if you'd like this to go green.
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/32/head:github-bot/gh-32'
git switch 'github-bot/gh-32'

Merge

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