Repository navigation
Conversation
…m) in both checks Neither check caught a committed listing such as shader_disasm.py's <hash>.s: the workflow's extension list has no .s/.asm, and check_no_game_data.py reads magics while its docstring said text formats "stay with the extension check". Hundreds of hand-written .s/.asm fixtures are tracked, so the extensions can't be refused outright; a name that starts with 16+ hex characters (optionally followed by a ., ~ or _ suffix, as shader_carve and fspx_unpack name duplicates) is refused instead. No tracked fixture matches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 9016f984f138a3d0113bb574133a9c32b81da818)
LAKSHYA-cmd-tech
approved these changes
Nov 23, 2026
Claimed in the coordination issue as: #8868 (comment)
Depends on: none. Other open
check_no_game_dataPRs (#8090, #6396, #6079, #8231 and the magic-number ones) editmain(),tracked_files()or the magic table. This PR adds a name check insidecheck()and a pattern in the workflow step, so any conflict is local and small.What and why
A committed shader disassembly listing passed both no-game-data checks:
.github/workflows/no-game-data.yml's extension regex has no.sor.asm.scripts/check_no_game_data.pyreads magics. Its docstring said text formats like disassembly "stay with the extension check", which wasn't true for these.tools/shader_disasm.py:43writes a listing under its shader's name with.s. Hundreds of hand-written.s/.asmfixtures are tracked (402 undertests/semantic/fixtures,runtime/test/shaders, ...), so refusing the extensions outright isn't possible, and a copied listing looked like one more fixture. Shader disassembly is on AGENTS.md's no-game-data list.This PR refuses a
.s/.asmfile whose name starts with 16 or more hex digits, case-insensitive. The name either ends there or continues with a suffix after.,~or_:tools/shader_carve.pynames duplicates~N, andtools/fspx_unpack.pyadds_NN. Pattern:(^|/)[0-9a-f]{16,}([._~][^/]*)?\.(s|asm)$. No tracked fixture matches; the longest leading hex run in a fixture name is 3 characters.grep -ziEovergit ls-files -z, so quoted names and plain names are handled alike, as before.check_no_game_data.py: aLISTINGpattern with the same expression andlisting_name(), used incheck()asclassify_file(path) or listing_name(path). The report saysshader disassembly listing (hash-named). The docstring is corrected.main()is unchanged.Tests:
tests/test_no_game_data_workflow.py::test_a_hash_named_listing_is_caughtruns the real workflow step.9f3a1c2b4d5e6f70.s, an upper-case.asm, the.vs.s,~1.sand_01.asmsuffixes, and a nested path.v_add_f32.s,cs_exec_const.asm,deadbeef.sand0123456789abcdef.txt.tests/test_check_no_game_data.pyhas two new tests: paths given as arguments (refused and accepted, includingabc_0123456789abcdef.s), and default mode in a throwaway git repo.mainand pass with this change.The "16+ hex digits" rule is based on how the repo's own tools name their outputs (
shader_disasm,shader_carve,fspx_unpack). It doesn't look at any package data, so a listing renamed by hand still passes. That is the same limit as the existing extension check.Tested
Windows 11, CPython 3.13.14, Git for Windows bash, CPU only (no GPU or driver involved), on
main867d922f0:python -I tests/test_check_no_game_data.py,python -I tests/test_no_game_data_workflow.py(it runs bash and git itself),python -I tests/test_ci_registration.py: OK.python -I scripts/check_no_game_data.pyfrom the repository root: exit 0, so no tracked fixture is refused.python -m compileall -q scripts tests,git diff --check: pass.AI-assisted: yes
Checklist
docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code