Validate repeated BC7 dictionary widths #2665

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

@⁠luckyteagirl on GitHub · 2026-11-26 05:37 UTC · original
luckyteagirl:codex/bcpack-bc7-width-copies → main · +43 −1 · 2 files · 1 commits · open

BC7 dictionary entries 1–254 repeat their index widths before the indices. The table generator discarded the copy, so an input with inconsistent widths could overwrite the generated table and exit successfully. Entry 0 uses that position for its first index. Layout reference

What is in it

  • Check the repeated widths before writing the generated Rust table.
  • Add a synthetic CLI regression that accepts a valid table, then rejects a modified copy and verifies the prior output stays intact.

Tested

  • The focused test failed on main b49be183 because the generator accepted the mismatch.
  • python -B -m unittest discover -s scripts -p 'test_*.py': 26 passed, 0 failed, 0 skipped on Windows with Python 3.11.
  • Generated the table from the public VIctory blob 1e548501764588b06e2ed47aa7fed263cd797f3b with both versions and verified byte-identical output.
  • git diff --check passed.

Regression run

  • Not applicable. The change only validates generator input and leaves the generated Rust output for the canonical table unchanged.

Not tested

  • Rust or GPU tests and a retail title run.

AI use

  • Codex (GPT-6.2 Sol) inspected the layout, implemented the check and test, and ran the Python verification.
**@⁠luckyteagirl** on GitHub · 2026-11-26 05:37 UTC · [original](https://github.com/xcl-dev/xcl/pull/2665) `luckyteagirl:codex/bcpack-bc7-width-copies` → `main` · +43 −1 · 2 files · 1 commits · open BC7 dictionary entries 1–254 repeat their index widths before the indices. The table generator discarded the copy, so an input with inconsistent widths could overwrite the generated table and exit successfully. Entry 0 uses that position for its first index. [Layout reference](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2007) **What is in it** - Check the repeated widths before writing the generated Rust table. - Add a synthetic CLI regression that accepts a valid table, then rejects a modified copy and verifies the prior output stays intact. **Tested** - The focused test failed on main `b49be183` because the generator accepted the mismatch. - `python -B -m unittest discover -s scripts -p 'test_*.py'`: 26 passed, 0 failed, 0 skipped on Windows with Python 3.11. - Generated the table from the public VIctory blob `1e548501764588b06e2ed47aa7fed263cd797f3b` with both versions and verified byte-identical output. - `git diff --check` passed. **Regression run** - Not applicable. The change only validates generator input and leaves the generated Rust output for the canonical table unchanged. **Not tested** - Rust or GPU tests and a retail title run. **AI use** - Codex (GPT-6.2 Sol) inspected the layout, implemented the check and test, and ran the Python verification.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:14:59 +00:00
Author
Owner

@⁠oni-swr on GitHub · 2026-11-26 07:01 UTC · original

Independent native Windows CPU verification at d3d959a18c97d88fa9446fb49102daf79544059e against exact parent b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7.

Windows 11 Pro build 26200, Ryzen 7 5700X3D, Python 3.11.9. py -3.11 -B -m unittest discover -s scripts -p 'test_*.py' passed 26 tests at the head and 25 on the parent, with zero failures or skips.

In synthetic CLI controls, the parent accepted both repeated-width mismatches and rewrote the destination. The head rejected mismatches in both width-byte positions and preserved destination bytes and modification time in all four failure runs. A valid input produced byte-identical output at both revisions. Cargo, GPU and retail smoke were outside this run.

AI use: Codex (gpt-6.2-sol) wrote and ran the synthetic checks and drafted this report.

**@⁠oni-swr** on GitHub · 2026-11-26 07:01 UTC · [original](https://github.com/xcl-dev/xcl/pull/2665#issuecomment-7185023388) Independent native Windows CPU verification at `d3d959a18c97d88fa9446fb49102daf79544059e` against exact parent `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`. Windows 11 Pro build 26200, Ryzen 7 5700X3D, Python 3.11.9. `py -3.11 -B -m unittest discover -s scripts -p 'test_*.py'` passed 26 tests at the head and 25 on the parent, with zero failures or skips. In synthetic CLI controls, the parent accepted both repeated-width mismatches and rewrote the destination. The head rejected mismatches in both width-byte positions and preserved destination bytes and modification time in all four failure runs. A valid input produced byte-identical output at both revisions. Cargo, GPU and retail smoke were outside this run. AI use: Codex (gpt-6.2-sol) wrote and ran the synthetic checks and drafted this report.
This pull request can be merged automatically.
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/2665/head:github-bot/gh-2665'
git switch 'github-bot/gh-2665'

Merge

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