Ignore rpf9-explorer's index cache when it lands in the checkout #1089
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!1089
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1089/head"
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?
@milk4sale on GitHub · 2026-11-24 18:14 UTC · original
milk4sale:fix/ignore-rpfpreview-index-cache→main· +8 −0 · 2 files · 2 commits · merged 2026-11-25 01:22 UTCClaimed in the coordination issue as: REPO-RPFPREVIEW-CACHE-IGNORE
What and why
.gitignore: ignoreRpfPreview/.docs/design.md("Full-scan indexes"): say where the index goes on Linux and when it lands in the current directory.rpf9dump modelsandrpf9dump texturessave a full-scan index throughRecoveryIndexCacheinthird_party/rpf9-explorer. Its path starts withEnvironment.GetFolderPath(SpecialFolder.LocalApplicationData), and on Linux .NET returns an empty string for that when the folder does not exist. The index is then written toRpfPreview/Indexes/under the current directory. Run from the repository root, that leaves an untracked JSON file with the archive's full path and the names of its recovered entries, which is game data under the first hard rule inAGENTS.md.Measured on Linux x64 with .NET SDK 10.0.114 and runtime 10.0.14,
rpf9dumpbuilt frommainwith the submodule ate2939175. The source is a 64 KiB file of zeros, so no game file is needed; the index is written with 0 entries.XDG_DATA_HOMEpoints at a missing folder./RpfPreview/Indexes/models-<hash>.jsonXDG_DATA_HOMEunset, home folder without.local/share./RpfPreview/Indexes/models-<hash>.jsonXDG_DATA_HOMEpoints at an existing folder<that folder>/RpfPreview/Indexes/models-<hash>.json; nothing in the current directoryI first saw this with a real archive, where the index listed the recovered entry names. That file is deleted and not attached.
Neither check catches such a file today:
python -I scripts/check_no_game_data.py <index>exits 0. It matches format magics at the start of a file, and the index is JSON..github/workflows/no-game-data.ymlhas no.json.Follow-ups, not in this change:
tools/rpf9dumpcould create the data folder at start, so the index never lands in the current directory.scripts/check_no_game_data.pycould flag a tracked file that starts with{"Schema":"rpfpreview-payload-index/.Tested
git check-ignore -v RpfPreview/Indexes/<name>.jsonmatches the new rule, at the root and in a subfolder.git ls-files -ci --exclude-standardis empty: no tracked file becomes ignored.python -I tests/test_docs_*.py(12 files) andpython -I tests/test_text_write_line_endings.pypass.python -I scripts/check_no_game_data.py .gitignore docs/design.mdexits 0.GPUs tested: n/a
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator rule)🤖 Generated with Claude Code
@abnalstlll-byte on GitHub · 2026-11-24 18:42 UTC · original · approved these changes
Audited and verified. Adds RpfPreview/ to .gitignore and documents Linux fallback path behavior in docs/design.md, preventing accidental git staging of cached archive listings and entry names. Approved.
@abnalstlll-byte on GitHub · 2026-11-24 18:50 UTC · original · approved these changes
Clean-Room Audit — PR #1089 (
.gitignoreRpfPreview/)Essential clean-room safeguard: ignoring
RpfPreview/prevents accidental commits ofrpf9-explorer's full-scan index cache (which records full archive paths and entry names), and documenting$XDG_DATA_HOMEbehavior indocs/design.mdhelps Linux contributors keep caches out of the checkout.Verdict: APPROVED
@aslan2142 on GitHub · 2026-11-25 01:22 UTC · original
Merged. Thank you, @milk4sale: this keeps a game-derived index out of
git status.claiming: REPO-RPFPREVIEW-CACHE-IGNOREin #14 at 18:13:49 UTC, before this PR opened at 18:14:18, by the author and unedited: valid. No other claim or open PR for it.RecoveryIndexCache.CachePathinrpf9-explorerate2939175builds the path fromLocalApplicationData, which .NET returns as an empty string on Linux when that folder is missing, so the index lands in./RpfPreview/Indexes/under the current directory.RpfPreview/matches that directory at any depth (checked withgit check-ignore -v), and notRpfPreview.*files or other casings. Any depth is right, since the current directory can be anywhere in the checkout.git ls-files -i --exclude-standard -con the merge is empty, and no tracked path containsRpfPreview.docs/design.md: the lines sit in "Full-scan indexes" and say why the index is game data.maincc22b7d4f+271d72bf2: the semantic suite passes (476 files, 6,223 tests, 0 files failed); the 14 docs and writer tests pass;check_no_game_data.pyis clean on the 2 changed files.AI-assisted (Claude Code, Claude Opus 5.5).
@milk4sale on GitHub · 2026-11-25 02:55 UTC · original
Local stand-in for this pull request's CI, which has been queued here since 22:31 UTC (about 580 runs waiting).
Tested:
271d72bf2merged withmainb4b7756e8(2026-11-25 01:13 UTC), in one tree together with #1087, #1090, #1114, #413, next tomainalone. The trees came fromgit merge-tree, and nothing was pushed. Each job used the workflow's own selection fromci.ymlandruntime.yml.main+ the five pull requestsmainalonechecksteps: compileall,make_game.py --helpstdlib-tests-linux(every standalone file, run to the end)translator-tests(pytest files)viewer-testssemantic-testslinux-gpu-tools: ctestlinux-gpu-tools:run_gpu_tests.py, plain,LEONIDA_W64_EMULATE=1 --filter cs_,LEONIDA_BARY_FALLBACK=1no-game-data:scripts/check_no_game_data.pyon this pull request's filesThe
.gitignoreanddocs/design.mdchange: every standalone file passes,tests/test_docs_*.pyincluded.The two pytest failures are
main's:tests/test_translate.pyon the text-only fixturecs_dpp_cmp.asm(test_gpu_samples_translate_and_validate,test_wave64_emulate_uses_no_subgroup_ops). With #1375 applied, both pass.Not covered: the Windows and macOS jobs.
Setup: Linux (CachyOS), Python 3.14.10 (CI uses 3.12), llvm-mc 23.1.4 (CI uses 19), Node 26.13.1. GPU suite on lavapipe from Mesa 26.2.6 with
GALLIUM_OVERRIDE_CPU_CAPS=avx, the code path of CI's runners, which lack AVX-512; and on an RTX 4070 Ti, NVIDIA 620.70.06.AI-assisted (Claude Code).