MODEL-71: bump rpf9-explorer to af54933, recover 71 fragment candidates #347

Open
github-bot wants to merge 1 commit from github-bot/gh-347 into main AGit
Owner

@⁠Tioloff on GitHub · 2026-11-24 03:40 UTC · original
Tioloff:model-71-pin-rpf9 → main · +59 −30 · 4 files · 1 commits · open

MODEL-71

Bump third_party/rpf9-explorer from e293917 to upstream af54933, which recovers the 71 fragment candidates in levels.rpf that the pinned decoder rejected.

Root cause

This is not a Leonida decoder bug — the fixes are already merged upstream. The pin predates upstream commit 549c69c (64 candidates), rpf9-explorer#26 (1 candidate: in-range but truncated secondary-LOD palette hashes) and rpf9-explorer#30 (6 candidates: a sole child drawable selected when a fragment's primary drawable is empty). The claim was posted in the coordination issue before starting.

Changes

  • third_party/rpf9-explorer: e293917 → af54933
  • docs/models.md, docs/README.md, docs/design.md: current counts; the e293917 tables are kept as historical controls

Full ten-archive re-count (fresh candidate scan + recovery, no index cache)

Archive Candidates Models Rejects
data.rpf 2,921 3,175 0
shared_minigame000 1,060 1,296 0
core_restofworld 924 936 0
story000_restofworld 1 3 0
story000.rpf 4,195 7,461 0
packs.rpf 27,288 27,484 0
levels.rpf 235,580 343,648 0
textures.rpf 1 0 1
common, core_restofworld001 0 0 0
Total 271,970 384,003 1

levels.rpf: 343,327 → 343,648 models, 71 → 0 rejects. All ten: 382,781 → 384,003 models, 72 → 1 reject (the texture dictionary in textures.rpf, handled by Rpf9TextureRecovery). The levels.rpf row matches the full re-count in upstream PR #30; the other nine archives were counted locally.

Validation

  • dotnet build tools/rpf9dump/rpf9dump.csproj -c Release — 0 warnings, 0 errors
  • dotnet run --project tests/Rpf9DumpDiagnostics/Rpf9DumpDiagnostics.csproj -c Release — all smoke tests passed
  • python -m compileall -q make_game.py tools tests — OK
  • python -I tests/test_make_game_assets_decoder.py — 5 tests OK
  • python -I tests/test_text_write_line_endings.py — 3 tests OK
  • python -I scripts/check_no_game_data.py . — exit 0
  • git diff --check — clean

No game data, no GPU needed. AI-assisted. Tested on Windows 11 Pro, .NET 8 / 10 Release, AMD Radeon RX 6600 (RDNA2), driver 26.11.2; the GPU was not exercised by these checks.

**@⁠Tioloff** on GitHub · 2026-11-24 03:40 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/347) `Tioloff:model-71-pin-rpf9` → `main` · +59 −30 · 4 files · 1 commits · open ## MODEL-71 Bump `third_party/rpf9-explorer` from `e293917` to upstream `af54933`, which recovers the 71 fragment candidates in `levels.rpf` that the pinned decoder rejected. ### Root cause This is not a Leonida decoder bug — the fixes are already merged upstream. The pin predates upstream commit `549c69c` (64 candidates), [rpf9-explorer#26](https://github.com/breadbbbb/rpf9-explorer/pull/26) (1 candidate: in-range but truncated secondary-LOD palette hashes) and [rpf9-explorer#30](https://github.com/breadbbbb/rpf9-explorer/pull/30) (6 candidates: a sole child drawable selected when a fragment's primary drawable is empty). The claim was posted in the coordination issue before starting. ### Changes - `third_party/rpf9-explorer`: `e293917` → `af54933` - `docs/models.md`, `docs/README.md`, `docs/design.md`: current counts; the `e293917` tables are kept as historical controls ### Full ten-archive re-count (fresh candidate scan + recovery, no index cache) | Archive | Candidates | Models | Rejects | |---|---:|---:|---:| | `data.rpf` | 2,921 | 3,175 | 0 | | `shared_minigame000` | 1,060 | 1,296 | 0 | | `core_restofworld` | 924 | 936 | 0 | | `story000_restofworld` | 1 | 3 | 0 | | `story000.rpf` | 4,195 | 7,461 | 0 | | `packs.rpf` | 27,288 | 27,484 | 0 | | `levels.rpf` | 235,580 | 343,648 | 0 | | `textures.rpf` | 1 | 0 | 1 | | `common`, `core_restofworld001` | 0 | 0 | 0 | | **Total** | **271,970** | **384,003** | **1** | `levels.rpf`: 343,327 → 343,648 models, 71 → 0 rejects. All ten: 382,781 → 384,003 models, 72 → 1 reject (the texture dictionary in `textures.rpf`, handled by `Rpf9TextureRecovery`). The `levels.rpf` row matches the full re-count in upstream PR #30; the other nine archives were counted locally. ### Validation - `dotnet build tools/rpf9dump/rpf9dump.csproj -c Release` — 0 warnings, 0 errors - `dotnet run --project tests/Rpf9DumpDiagnostics/Rpf9DumpDiagnostics.csproj -c Release` — all smoke tests passed - `python -m compileall -q make_game.py tools tests` — OK - `python -I tests/test_make_game_assets_decoder.py` — 5 tests OK - `python -I tests/test_text_write_line_endings.py` — 3 tests OK - `python -I scripts/check_no_game_data.py .` — exit 0 - `git diff --check` — clean No game data, no GPU needed. AI-assisted. Tested on Windows 11 Pro, .NET 8 / 10 Release, AMD Radeon RX 6600 (RDNA2), driver 26.11.2; the GPU was not exercised by these checks.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:54:38 +00:00
Author
Owner

@⁠QemmHD on GitHub · 2026-11-24 05:28 UTC · original

The submodule commit af549336624f is verified on breadbbbb/rpf9-explorer main (not a fork). From e2939175 the Core csproj is unchanged: its only package is still BCnEncoder.Net 2.3.0, with no new build targets. The new Cli project (net10) isn't built by Leonida, and the Process.Start path is opt-in (a user-chosen JSON config, ArgumentList, unused here). No binaries or nested submodules. Safe on security grounds once CI has built rpf9dump against af54933. Please also update docs/world.md:711-719, which still names e2939175 as the pin. This supersedes #214 (16134b0 is an ancestor of af54933).

Security review; read only, nothing run.
AI-assisted (Claude Code, Claude Opus 5.5).
Discord: bigpeppa.

**@⁠QemmHD** on GitHub · 2026-11-24 05:28 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/347#issuecomment-7122983950) The submodule commit `af549336624f` is verified on `breadbbbb/rpf9-explorer` main (not a fork). From `e2939175` the Core csproj is unchanged: its only package is still BCnEncoder.Net 2.3.0, with no new build targets. The new Cli project (net10) isn't built by Leonida, and the `Process.Start` path is opt-in (a user-chosen JSON config, `ArgumentList`, unused here). No binaries or nested submodules. Safe on security grounds once CI has built `rpf9dump` against `af54933`. Please also update `docs/world.md:711-719`, which still names `e2939175` as the pin. This supersedes #214 (`16134b0` is an ancestor of `af54933`). Security review; read only, nothing run. AI-assisted (Claude Code, Claude Opus 5.5). Discord: bigpeppa.
Author
Owner

@⁠milk4sale on GitHub · 2026-11-24 17:28 UTC · original

MODEL-71-RECOUNT: independent recount of levels.rpf confirms 71 → 0

I counted levels.rpf from my own 1.0.2.1 package at both pins. Every number matches: the e293917 row in docs/models.md and this pull request's af54933 row.

levels.rpf Candidates Recovered offsets Models Rejects Decode failures zlib / read-back errors
docs/models.md at e293917 235,330 235,259 343,327 71 0 0
measured at e293917 235,330 235,259 343,327 71 0 0
this pull request at af54933 235,580 not stated 343,648 0 0 not stated
measured at af54933 235,580 235,580 343,648 0 0 0

Where the +321 models come from:

  • All 71 offsets rejected at e293917 are still candidates at af54933 and all 71 are recovered, one model each.
  • The other +250 are new candidates. None is at a page start (the af54933 scan checks every 16-byte boundary); all 250 are recovered with one model each (208 dictionary children, 42 standalone).
  • Nothing is lost: the 235,259 offsets recovered at e293917 are all recovered at af54933 with the same 343,327 models.

The attribution (64 by 549c69c, one by rpf9-explorer#26, 6 by rpf9-explorer#30) also holds. I recovered only those 71 offsets with RpfPreview.Core built at intermediate upstream commits:

RpfPreview.Core at Recovered of the 71
e293917, and bd54fb0 (parent of the merge of 549c69c) 0
6b99030 (merge of 549c69c) 64
4566315 (parent of the rpf9-explorer#26 merge) 64
16134b0 (rpf9-explorer#26 merge) 65
bd06d96 (parent of the rpf9-explorer#30 merge) 65
4bf8c0c (rpf9-explorer#30 merge) 71
af54933 71

The other levels.rpf cells, in case the page wants them at the new pin. The e293917 column reproduces the values already in docs/models.md.

levels.rpf measured at e293917 measured at af54933 Change
Dictionary children 130,239 130,447 +208
Standalone 213,088 213,201 +113
Fragments 50,731 50,802 +71
Bone-bound 59,544 59,615 +71
Meshes 3,854,587 3,856,340 +1,753
Vertices 2,364,218,711 2,373,997,560 +9,778,849
Triangles 2,509,947,536 2,519,673,756 +9,726,220
Embedded textures 1,293 1,293 0

One suggestion, not a blocker: docs/models.md says the levels.rpf row comes from the full re-count reported in rpf9-explorer#30. It can now say the row was also re-counted on a second copy of the package.

Method. A count-only pass, not a full export. A small local harness makes the same calls as the models mode of tools/rpf9dump: a fresh Rpf9ModelRecovery.FindCandidateOffsets scan (no index cache), RecoverAtOffsets in chunks of 32, then RecoveredResource.Read and RageModelDecoder.Decode for every entry. It writes no OBJ files. Checks on the harness:

  • On data.rpf it gives the same result as the real rpf9dump models at both pins (2,921 candidates, 3,175 models, 0 rejects, 0 failures).
  • On packs.rpf it gives 26,389 / 26,585 / 0 at e293917 (the docs' row) and 27,288 / 27,484 / 0 at af54933 (this pull request's row).

Details.

  • leonida main at 1504c1af6; this pull request's head d49949f6. tools/rpf9dump does not differ between the two.
  • Submodule pins e2939175 and af549336, each built into its own output folder.
  • Package 1.0.2.1; all 108 files match game/xbox-1.0.2.1.json by SHA-256.
  • .NET SDK 10.0.114, runtime 10.0.14 (the net8.0 target rolled forward), Release, Linux x64. No GPU involved.

Not covered. The other seven archives, a full OBJ export at af54933 (so the export's own summary lines were not regenerated), and the docs/world.md lines from the earlier review comment.

AI-assisted (Claude Code). No game data is posted here: counts only.

**@⁠milk4sale** on GitHub · 2026-11-24 17:28 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/347#issuecomment-7139258764) **MODEL-71-RECOUNT: independent recount of `levels.rpf` confirms 71 → 0** I counted `levels.rpf` from my own 1.0.2.1 package at both pins. Every number matches: the `e293917` row in `docs/models.md` and this pull request's `af54933` row. | `levels.rpf` | Candidates | Recovered offsets | Models | Rejects | Decode failures | zlib / read-back errors | |---|---:|---:|---:|---:|---:|---:| | `docs/models.md` at `e293917` | 235,330 | 235,259 | 343,327 | 71 | 0 | 0 | | measured at `e293917` | 235,330 | 235,259 | 343,327 | 71 | 0 | 0 | | this pull request at `af54933` | 235,580 | not stated | 343,648 | 0 | 0 | not stated | | measured at `af54933` | 235,580 | 235,580 | 343,648 | 0 | 0 | 0 | Where the +321 models come from: - All 71 offsets rejected at `e293917` are still candidates at `af54933` and all 71 are recovered, one model each. - The other +250 are new candidates. None is at a page start (the `af54933` scan checks every 16-byte boundary); all 250 are recovered with one model each (208 dictionary children, 42 standalone). - Nothing is lost: the 235,259 offsets recovered at `e293917` are all recovered at `af54933` with the same 343,327 models. The attribution (64 by `549c69c`, one by rpf9-explorer#26, 6 by rpf9-explorer#30) also holds. I recovered only those 71 offsets with `RpfPreview.Core` built at intermediate upstream commits: | `RpfPreview.Core` at | Recovered of the 71 | |---|---:| | `e293917`, and `bd54fb0` (parent of the merge of `549c69c`) | 0 | | `6b99030` (merge of `549c69c`) | 64 | | `4566315` (parent of the rpf9-explorer#26 merge) | 64 | | `16134b0` (rpf9-explorer#26 merge) | 65 | | `bd06d96` (parent of the rpf9-explorer#30 merge) | 65 | | `4bf8c0c` (rpf9-explorer#30 merge) | 71 | | `af54933` | 71 | The other `levels.rpf` cells, in case the page wants them at the new pin. The `e293917` column reproduces the values already in `docs/models.md`. | `levels.rpf` | measured at `e293917` | measured at `af54933` | Change | |---|---:|---:|---:| | Dictionary children | 130,239 | 130,447 | +208 | | Standalone | 213,088 | 213,201 | +113 | | Fragments | 50,731 | 50,802 | +71 | | Bone-bound | 59,544 | 59,615 | +71 | | Meshes | 3,854,587 | 3,856,340 | +1,753 | | Vertices | 2,364,218,711 | 2,373,997,560 | +9,778,849 | | Triangles | 2,509,947,536 | 2,519,673,756 | +9,726,220 | | Embedded textures | 1,293 | 1,293 | 0 | One suggestion, not a blocker: `docs/models.md` says the `levels.rpf` row comes from the full re-count reported in rpf9-explorer#30. It can now say the row was also re-counted on a second copy of the package. **Method.** A count-only pass, not a full export. A small local harness makes the same calls as the `models` mode of `tools/rpf9dump`: a fresh `Rpf9ModelRecovery.FindCandidateOffsets` scan (no index cache), `RecoverAtOffsets` in chunks of 32, then `RecoveredResource.Read` and `RageModelDecoder.Decode` for every entry. It writes no OBJ files. Checks on the harness: - On `data.rpf` it gives the same result as the real `rpf9dump models` at both pins (2,921 candidates, 3,175 models, 0 rejects, 0 failures). - On `packs.rpf` it gives 26,389 / 26,585 / 0 at `e293917` (the docs' row) and 27,288 / 27,484 / 0 at `af54933` (this pull request's row). **Details.** - leonida `main` at `1504c1af6`; this pull request's head `d49949f6`. `tools/rpf9dump` does not differ between the two. - Submodule pins `e2939175` and `af549336`, each built into its own output folder. - Package 1.0.2.1; all 108 files match `game/xbox-1.0.2.1.json` by SHA-256. - .NET SDK 10.0.114, runtime 10.0.14 (the `net8.0` target rolled forward), Release, Linux x64. No GPU involved. **Not covered.** The other seven archives, a full OBJ export at `af54933` (so the export's own summary lines were not regenerated), and the `docs/world.md` lines from the earlier review comment. AI-assisted (Claude Code). No game data is posted here: counts only.
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-25 19:43 UTC · original

Merged onto current main, tests/test_docs_links.py fails: the root README.md still links docs/models.md#full-archive-re-count-at-e293917, and this PR renames that heading. Please update the link.

QemmHD's request about docs/world.md:711-719 is also still open on this head.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-25 19:43 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/347#issuecomment-7172690545) Merged onto current `main`, `tests/test_docs_links.py` fails: the root `README.md` still links `docs/models.md#full-archive-re-count-at-e293917`, and this PR renames that heading. Please update the link. QemmHD's request about `docs/world.md:711-719` is also still open on this head. AI-assisted (Claude Code, Claude Opus 5.5).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/347/head:github-bot/gh-347'
git switch 'github-bot/gh-347'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-347'
git switch 'github-bot/gh-347'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-347'
git switch 'github-bot/gh-347'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-347'
git switch 'main'
git merge --squash 'github-bot/gh-347'
git switch 'main'
git merge --ff-only 'github-bot/gh-347'
git switch 'main'
git merge 'github-bot/gh-347'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.