Repository navigation
no-game-data: block carved .code/.state programs, .xvc, .lpk and .smh by extension - #9127
Closed
berkay8987 wants to merge 2 commits into
Closed
berkay8987 wants to merge 2 commits into
berkay8987 wants to merge 2 commits into
Conversation
… by name tools/fspx_unpack.py writes the native programs it carves out of the package as fspx/<name>.code and .state: raw machine code with no magic, so check_no_game_data.py cannot see them and the extension check did not list them. The same check also missed .xvc, which make_game.py's CONTAINER_SUFFIXES names next to .msixvc and .xvd; world_build.py's .lpk packs of the game's geometry; and the package's .smh groom files. No tracked file has any of the five extensions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Tested on Apple M1 Max, macOS 27.2.1 arm64, Python 3.12.16: |
.gitignore listed every extension the workflow's extension check refused, so a plain `git add` never staged one, but the five this PR adds to the step were not ignored. Add them, and test that each extension the step refuses is in .gitignore; the test reads the step itself, not a copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested 648640e on Linux, Python 3.14.4, git 2.53.0: pass
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue as: new BUILD item, #9065 (comment)
Depends on: #9000, in the sense the template asks for: it rewrites the same
grepline of the workflow step into anext=variable, sogit merge-treereports a conflict. The resolution is to add these five to itsextlist; there is no code dependency. #8986 adds the LPK1 magic to the other step.What and why
The workflow's extension check is the only one that sees a file without a magic.
tools/fspx_unpack.pywrites the native compute programs it carves out of the package's FidelityFX DLL asfspx/<name>.code(the program's machine code) andfspx/<name>.state;tools/shader_library.pywrites.codefiles too (docs/fspx.md). Raw machine code has no magic, soscripts/check_no_game_data.pycannot catch it, and the extension list did not name it: a carved game shader under its own extension passed both checks..code,.state.xvcmake_game.py'sCONTAINER_SUFFIXESlists.xvcwith.msixvcand.xvd; only the last two were here.lpkworld_build.py's packs of the game's geometry.smhtools/smh_groom.pyreadsNo tracked file has any of the five extensions. A short comment above the
grepline says why each is there..gitignorealready listed every extension the step refused, so a plaingit addnever stages one; the five are added there too, and a new test,RefusedExtensionsAreIgnored, reads the step's own list and checks that each extension in it is in.gitignore, so the two cannot drift apart again. Nothing tracked is newly ignored.Tested
python -I tests/test_no_game_data_workflow.py: 5 tests, OK, run through Git's bash on Windows. The new case runs the workflow's own step (read from the file, as the other cases do) on one file of each extension plus two near misses,codes.txtandstate.md. With the workflow change taken out, it fails. The.gitignoretest fails without the five.gitignorelines, naming them, and passes onmainas it is.test_ci_registration,test_check_apt_keyandtest_cmake_vulkan_missingpass.test_runtime_pathsfails the same way onmainwithout this change (tools/replace_retry.pymissing fromruntime.yml's path filter, which CI: the runtime workflow's path filter lists tools/replace_retry.py (test_runtime_paths red since #2721) #7029 fixes).AI-assisted: yes (Claude Code)
Checklist
docs/design.md, with how it was confirmed. (No translator rule here.)🤖 Generated with Claude Code