Repository navigation
Ignore rpf9-explorer's index cache when it lands in the checkout - #1089
Conversation
rpf9dump models and rpf9dump textures save a full-scan index through RecoveryIndexCache in third_party/rpf9-explorer. On Linux, when the local application-data folder does not exist, .NET returns an empty path for it and the index is written to RpfPreview/Indexes under the current directory. The index holds the archive's full path and the names of its recovered entries, so from the repository root it is untracked game data. Ignore RpfPreview/ and say in docs/design.md where the index goes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
abnalstlll-byte
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
Clean-Room Audit — PR #1089 (.gitignore RpfPreview/)
Essential clean-room safeguard: ignoring RpfPreview/ prevents accidental commits of rpf9-explorer's full-scan index cache (which records full archive paths and entry names), and documenting $XDG_DATA_HOME behavior in docs/design.md helps Linux contributors keep caches out of the checkout.
Verdict: APPROVED
Brings the branch up to date with main 68d1331. No conflicts; the merged tree was tested before the push (every standalone test file under tests/ passes except tests/test_ci_registration.py, which fails on main alone since ProjectLeonida#930). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Merged. Thank you, @milk4sale: this keeps a game-derived index out of
AI-assisted (Claude Code, Claude Opus 5.5). |
|
Local stand-in for this pull request's CI, which has been queued here since 22:31 UTC (about 580 runs waiting). Tested:
The The two pytest failures are 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 AI-assisted (Claude Code). |
Claimed 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