OLD-9850: test_ttpf_assets: read the original DDS before the rebuild removes it #1771

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

@⁠potatoe0100 on GitHub · 2026-11-25 11:47 UTC · original
potatoe0100:carry/old-9850 → main · +5 −2 · 1 files · 1 commits · open

Claimed in the coordination issue as: OLD-9850 (#1608)

What and why

Carries on old PR 9850 (draft #116, branch old-pr/9850, listed in #17; commit author David), rebased on current main with the author's commit kept.

test_profile_added_after_strict_rejection rebuilds the pool with a changed calibration profile and then compared the new file with original.read_bytes(). The rebuild switches the row to a new file and removes the one it replaced (remove_replaced), so that read raises FileNotFoundError on every machine where the bcpack_calibration library is built; without the library the test skips, which is why CI stays green. The test now keeps the original bytes before the rebuild and also checks that the replaced file is gone, which is what remove_replaced promises. Test-only change.

Tested

  • Built tools/bcpack_calibration (cargo build --release --offline, Rust stable, Linux) so the test actually runs instead of skipping.
  • python -I tests/test_ttpf_assets.py on this branch: 31 tests OK (1 skipped, needs RPF9DUMP_DLL).
  • The same with main's test file: FileNotFoundError in test_profile_added_after_strict_rejection (1 error), so this fixes a real failure.

GPUs tested: n/a (no GPU code)

AI-assisted: yes (Claude rebased and tested; the original commit was AI-assisted too)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

🤖 Generated with Claude Code

**@⁠potatoe0100** on GitHub · 2026-11-25 11:47 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1771) `potatoe0100:carry/old-9850` → `main` · +5 −2 · 1 files · 1 commits · open Claimed in the coordination issue as: OLD-9850 (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### What and why Carries on old PR 9850 (draft #116, branch `old-pr/9850`, listed in #17; commit author David), rebased on current `main` with the author's commit kept. `test_profile_added_after_strict_rejection` rebuilds the pool with a changed calibration profile and then compared the new file with `original.read_bytes()`. The rebuild switches the row to a new file and removes the one it replaced (`remove_replaced`), so that read raises `FileNotFoundError` on every machine where the `bcpack_calibration` library is built; without the library the test skips, which is why CI stays green. The test now keeps the original bytes before the rebuild and also checks that the replaced file is gone, which is what `remove_replaced` promises. Test-only change. ### Tested - Built `tools/bcpack_calibration` (`cargo build --release --offline`, Rust stable, Linux) so the test actually runs instead of skipping. - `python -I tests/test_ttpf_assets.py` on this branch: 31 tests OK (1 skipped, needs `RPF9DUMP_DLL`). - The same with `main`'s test file: `FileNotFoundError` in `test_profile_added_after_strict_rejection` (1 error), so this fixes a real failure. GPUs tested: n/a (no GPU code) AI-assisted: yes (Claude rebased and tested; the original commit was AI-assisted too) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
test_profile_added_after_strict_rejection rebuilds the pool with a changed calibration profile and
then compared the new file with original.read_bytes(). The rebuild switched the row to a new file
and removed the one it replaced (remove_replaced), so the read raised FileNotFoundError on every
machine where the bcpack_calibration library is built; without it, the test skips.

The test now keeps the original bytes before the rebuild and also checks that the replaced file is
gone, which is the behaviour remove_replaced promises.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:04:22 +00:00
Author
Owner

@⁠PierreEbele on GitHub · 2026-11-25 18:48 UTC · original

Reviewed e01d022: test-only fix. tests/test_ttpf_assets.py runs 31 tests OK (2 skips) identically on this branch
and on main; the changed test skips in this environment because its native gate needs the built bcpack_calibration
library (no Rust toolchain here), so the fixed path was verified by code reading: the rebuild names the export with
sha256(decoder_digest + profile bytes), the old file lands in the manifest's PENDING list and remove_replaced
unlinks it, so the old line's original.read_bytes() raised FileNotFoundError, and the new
assertFalse(original.exists()) is exactly the removal remove_replaced promises. No findings. AI-assisted review.

Recommendation: Merge

**@⁠PierreEbele** on GitHub · 2026-11-25 18:48 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1771#issuecomment-7171431501) Reviewed e01d022: test-only fix. tests/test_ttpf_assets.py runs 31 tests OK (2 skips) identically on this branch and on main; the changed test skips in this environment because its native gate needs the built bcpack_calibration library (no Rust toolchain here), so the fixed path was verified by code reading: the rebuild names the export with sha256(decoder_digest + profile bytes), the old file lands in the manifest's PENDING list and remove_replaced unlinks it, so the old line's `original.read_bytes()` raised FileNotFoundError, and the new `assertFalse(original.exists())` is exactly the removal remove_replaced promises. No findings. AI-assisted review. **Recommendation:** Merge
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/1771/head:github-bot/gh-1771'
git switch 'github-bot/gh-1771'

Merge

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