check_no_game_data: inspect legacy V7 tar archives #1899
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!1899
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/check-no-game-data-v7-tar-20261125"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request successfully merged and closed
Claimed in the coordination issue as: CHECK-NO-GAME-DATA-V7-TAR
https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7166283601
Related: #1024 handles explicit-path validation in the same files; that separate behavior is unchanged here.
What and why
A valid V7 tar archive has no
ustarmarker. Saved under a harmless name such as.bin, it previously passedcheck_no_game_data.pywithout its members being inspected, even if a member started with a prohibited binary-format header.Recognize legacy archives by validating their first 512-byte header through
tarfile.TarInfo.frombuf. The existingustardetection still identifies damaged modern tar archives as unchecked. Member inspection continues through the existing depth, expanded-byte and member-count budgets.Add generated synthetic fixtures covering raw V7 tar, gzip/bzip2/xz compression, ZIP nesting, a clean first member followed by a synthetic DDS header, clean text-only archives, and non-archive controls. All binary fixture bytes are generated in temporary directories; no game files are included or needed.
Tested
Linux x86-64, Python 3.14.8, CPU only:
python3 -I tests/test_check_no_game_data.py: 15 tests passed.python3 -I tests/test_no_game_data_workflow.py: 3 tests passed.tests/test_text_write_line_endings.py: 3 tests passed.runtime/CMakeLists.txtandruntime/test/d3d12_title_va_test.cpp, so the Python sources and semantic fixtures are identical.compileallformake_game.py,tools,testsand the changed scanner;make_game.py --help; changed-file game-data scan;git diff --check: passed.test_runner_calls_all_tests.pyreports the uncalledtest_feature_scan.py::test_out_named_like_the_optional_spirv_index. The same failure was reproduced on a separate clean upstream worktree. Neither file is changed here.GPUs tested: n/a; CPU-only checks. No game installation was accessed.
AI-assisted: yes, OpenAI Codex.
Checklist
mainwithout conflicts.Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main.
python -m pytest -q tests/test_check_no_game_data.py:(AI-assisted test run; output checked by hand.)
Merged into
main(merge commit f7ea55c19), approved by DadaCap (maintainer). Thanks!Checked before merging: Tested in our local release candidate (main + 41 PRs): translator suite 512 files / 6,442 tests clean, Python suite with no new failure versus main, and 360 s game runs on an RTX 5080 with no regression. The merge was pinned to the head commit that was tested (7dcca92ce).
AI-assisted (Claude Code), posted for DadaCap.