[PR #1089] [MERGED] Ignore rpf9-explorer's index cache when it lands in the checkout #1124

Closed
opened 2026-11-26 20:20:10 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1089
Author: @milk4sale
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142

Base: main ← Head: fix/ignore-rpfpreview-index-cache


📝 Commits (2)

  • 48d5a1d Ignore rpf9-explorer's index cache when it lands in the checkout
  • 271d72b Merge main into fix/ignore-rpfpreview-index-cache

📊 Changes

2 files changed (+8 additions, -0 deletions)

View changed files

📝 .gitignore (+2 -0)
📝 docs/design.md (+6 -0)

📄 Description

Claimed in the coordination issue as: REPO-RPFPREVIEW-CACHE-IGNORE

What and why

  • .gitignore: ignore RpfPreview/.
  • docs/design.md ("Full-scan indexes"): say where the index goes on Linux and when it lands in the current directory.

rpf9dump models and rpf9dump textures save a full-scan index through RecoveryIndexCache in third_party/rpf9-explorer. Its path starts with Environment.GetFolderPath(SpecialFolder.LocalApplicationData), and on Linux .NET returns an empty string for that when the folder does not exist. The index is then written to RpfPreview/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 in AGENTS.md.

Measured on Linux x64 with .NET SDK 10.0.114 and runtime 10.0.14, rpf9dump built from main with the submodule at e2939175. The source is a 64 KiB file of zeros, so no game file is needed; the index is written with 0 entries.

Case Index written to
XDG_DATA_HOME points at a missing folder ./RpfPreview/Indexes/models-<hash>.json
XDG_DATA_HOME unset, home folder without .local/share ./RpfPreview/Indexes/models-<hash>.json
XDG_DATA_HOME points at an existing folder <that folder>/RpfPreview/Indexes/models-<hash>.json; nothing in the current directory

I 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.
  • The extension list in .github/workflows/no-game-data.yml has no .json.

Follow-ups, not in this change:

  • tools/rpf9dump could create the data folder at start, so the index never lands in the current directory.
  • scripts/check_no_game_data.py could flag a tracked file that starts with {"Schema":"rpfpreview-payload-index/.

Tested

  • git check-ignore -v RpfPreview/Indexes/<name>.json matches the new rule, at the root and in a subfolder.
  • git ls-files -ci --exclude-standard is empty: no tracked file becomes ignored.
  • python -I tests/test_docs_*.py (12 files) and python -I tests/test_text_write_line_endings.py pass.
  • python -I scripts/check_no_game_data.py .gitignore docs/design.md exits 0.

GPUs tested: n/a

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator rule)

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1089 **Author:** [@milk4sale](https://github.com/milk4sale) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/25/2026 **Merged by:** [@aslan2142](https://github.com/aslan2142) **Base:** `main` ← **Head:** `fix/ignore-rpfpreview-index-cache` --- ### 📝 Commits (2) - [`48d5a1d`](https://github.com/ubiquitarianism/leonida/commit/48d5a1d42ab32f4b1739f370b5deeec8d4d7785e) Ignore rpf9-explorer's index cache when it lands in the checkout - [`271d72b`](https://github.com/ubiquitarianism/leonida/commit/271d72bf20130ac300db045b076dcac66f3a2172) Merge main into fix/ignore-rpfpreview-index-cache ### 📊 Changes **2 files changed** (+8 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+2 -0) 📝 `docs/design.md` (+6 -0) </details> ### 📄 Description Claimed in the coordination issue as: REPO-RPFPREVIEW-CACHE-IGNORE ### What and why - `.gitignore`: ignore `RpfPreview/`. - `docs/design.md` ("Full-scan indexes"): say where the index goes on Linux and when it lands in the current directory. `rpf9dump models` and `rpf9dump textures` save a full-scan index through `RecoveryIndexCache` in `third_party/rpf9-explorer`. Its path starts with `Environment.GetFolderPath(SpecialFolder.LocalApplicationData)`, and on Linux .NET returns an empty string for that when the folder does not exist. The index is then written to `RpfPreview/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 in `AGENTS.md`. Measured on Linux x64 with .NET SDK 10.0.114 and runtime 10.0.14, `rpf9dump` built from `main` with the submodule at `e2939175`. The source is a 64 KiB file of zeros, so no game file is needed; the index is written with 0 entries. | Case | Index written to | |---|---| | `XDG_DATA_HOME` points at a missing folder | `./RpfPreview/Indexes/models-<hash>.json` | | `XDG_DATA_HOME` unset, home folder without `.local/share` | `./RpfPreview/Indexes/models-<hash>.json` | | `XDG_DATA_HOME` points at an existing folder | `<that folder>/RpfPreview/Indexes/models-<hash>.json`; nothing in the current directory | I 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. - The extension list in `.github/workflows/no-game-data.yml` has no `.json`. Follow-ups, not in this change: - `tools/rpf9dump` could create the data folder at start, so the index never lands in the current directory. - `scripts/check_no_game_data.py` could flag a tracked file that starts with `{"Schema":"rpfpreview-payload-index/`. ### Tested - `git check-ignore -v RpfPreview/Indexes/<name>.json` matches the new rule, at the root and in a subfolder. - `git ls-files -ci --exclude-standard` is empty: no tracked file becomes ignored. - `python -I tests/test_docs_*.py` (12 files) and `python -I tests/test_text_write_line_endings.py` pass. - `python -I scripts/check_no_game_data.py .gitignore docs/design.md` exits 0. GPUs tested: n/a AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator rule) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:20:10 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1124
No description provided.