Reduce rpf9-explorer workspace validation allocations (RPF9-WORKSPACE-VALIDATION) #3207

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

@⁠FlipkPL on GitHub · 2026-12-02 19:17 UTC · original
FlipkPL:codex/rpf9-workspace-validation → main · +1 −1 · 1 files · 1 commits · open

Claimed in the coordination issue as: RPF9-WORKSPACE-VALIDATION

What and why

Advance third_party/rpf9-explorer from cab9bb6 to 2957dd4. The update checks DDS layout from the header and file length, validates UTF-8 incrementally, and reuses SHA-256 read buffers. Full checksums and existing format checks are retained.

In local synthetic runs, managed allocations dropped from 32.1 MiB to 12.6 KiB for a 32 MiB DDS and from 71.0 MiB to 8.5 MiB when opening a project with 1,000 entries. The pinned commit is retained on the contributor branch. A fresh recursive shallow checkout fetched it through the canonical submodule URL. Module diff

Tested

  • dotnet build tools/rpf9dump/rpf9dump.csproj -c Release from a fresh recursive checkout on Windows, with zero warnings.
  • dotnet run --project third_party/rpf9-explorer/Tools/WorkspaceValidationTests -c Release. The allocation test failed on the original pin and passed on the new pin. Generated fixtures checked decoded DDS pixels, strict UTF-8, bounds, and detection of a changed asset.
  • Clean-room and whitespace checks passed. Test inputs were generated locally without game files.

GPUs tested: n/a (CPU-only validation).

AI-assisted: yes (GPT-6, independent review by GPT-6.2 Sol).

Checklist

  • Based on current main.
  • One topic.
  • No game data, keys, or decryption.
**@⁠FlipkPL** on GitHub · 2026-12-02 19:17 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3207) `FlipkPL:codex/rpf9-workspace-validation` → `main` · +1 −1 · 1 files · 1 commits · open Claimed in the coordination issue as: [RPF9-WORKSPACE-VALIDATION](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/2570) ### What and why Advance `third_party/rpf9-explorer` from `cab9bb6` to `2957dd4`. The update checks DDS layout from the header and file length, validates UTF-8 incrementally, and reuses SHA-256 read buffers. Full checksums and existing format checks are retained. In local synthetic runs, managed allocations dropped from 32.1 MiB to 12.6 KiB for a 32 MiB DDS and from 71.0 MiB to 8.5 MiB when opening a project with 1,000 entries. The pinned commit is retained on the [contributor branch](https://github.com/FlipkPL/rpf9-explorer/tree/codex/rpf9-workspace-validation). A fresh recursive shallow checkout fetched it through the canonical submodule URL. [Module diff](https://github.com/FlipkPL/rpf9-explorer/compare/cab9bb6...codex/rpf9-workspace-validation) ### Tested - `dotnet build tools/rpf9dump/rpf9dump.csproj -c Release` from a fresh recursive checkout on Windows, with zero warnings. - `dotnet run --project third_party/rpf9-explorer/Tools/WorkspaceValidationTests -c Release`. The allocation test failed on the original pin and passed on the new pin. Generated fixtures checked decoded DDS pixels, strict UTF-8, bounds, and detection of a changed asset. - Clean-room and whitespace checks passed. Test inputs were generated locally without game files. GPUs tested: n/a (CPU-only validation). AI-assisted: yes (GPT-6, independent review by GPT-6.2 Sol). ### Checklist - [x] Based on current `main`. - [x] One topic. - [x] No game data, keys, or decryption.
Reduce memory used by workspace DDS and UTF-8 validation and reuse buffers while hashing assets. Claimed as RPF9-WORKSPACE-VALIDATION in #2570.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 19:27:55 +00:00
Author
Owner

@⁠merzleckeier on GitHub · 2026-12-02 19:26 UTC · original

Independent check on e626f5de9 / submodule 2957dd44. A new empty Git repository fetched the pin directly by SHA from the canonical URL in .gitmodules. The contributor branch linked in the PR also points to that exact commit.

On Linux x64 with .NET SDK 8.0.428, I ran the new WorkspaceValidationTests against the previous pin and against the proposed pin. The previous pin reached the allocation assertions and failed. On the new pin the complete suite passed, including the DDS pixel check, UTF-8 across read boundaries, and changed-asset checks. In that run, the synthetic DDS fixture’s AssetPath allocation went from 8,530,160 B to 9,696 B. Mandy’s rpf9dump also restored from the existing lock file and built in Release with zero warnings and errors. Synthetic inputs only.

AI-assisted: OpenAI Codex (GPT-6).

**@⁠merzleckeier** on GitHub · 2026-12-02 19:26 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3207#issuecomment-7356171445) Independent check on `e626f5de9` / submodule `2957dd44`. A new empty Git repository fetched the pin directly by SHA from the canonical URL in `.gitmodules`. The contributor branch linked in the PR also points to that exact commit. On Linux x64 with .NET SDK 8.0.428, I ran the new `WorkspaceValidationTests` against the previous pin and against the proposed pin. The previous pin reached the allocation assertions and failed. On the new pin the complete suite passed, including the DDS pixel check, UTF-8 across read boundaries, and changed-asset checks. In that run, the synthetic DDS fixture’s `AssetPath` allocation went from 8,530,160 B to 9,696 B. Mandy’s `rpf9dump` also restored from the existing lock file and built in Release with zero warnings and errors. Synthetic inputs only. AI-assisted: OpenAI Codex (GPT-6).
Author
Owner

@⁠fiestorra on GitHub · 2026-12-02 20:33 UTC · original

VERIFY-3207 — el puntero y su contenido, con el test del propio bump ejecutado aquí

Merge base b41763227 = current main
Old pointer cab9bb6e
New pointer 2957dd44 (present in the submodule clone: git cat-file -t → commit; parent clean)

What the bump brings (git log cab9bb6e..2957dd44):

2957dd4  Bound memory used by workspace asset validation
6abc4f8  Normalize line endings in ReplacementWorkspace

The first is the substance: pooled reads for SHA-256, DDS layouts inspected from headers instead of decoding the texture, incremental UTF-8 validation — plus a new Tools/WorkspaceValidationTests console project. The second is a pure line-ending commit that rewrites 965 lines of ReplacementWorkspace.cs; it makes the bump look enormous in a --stat and hides the 232-line real change. Worth folding into the same commit upstream (or dropping) so the next reviewer does not have to -w it.

Ran here (dotnet 10.0.404, the new submodule commit checked out)

dotnet run --project Tools/WorkspaceValidationTests -c Release
  AssetPath managed allocation: DDS 8.256 B, UTF-8 73.768 B, binary 8.096 B
  Workspace validation passed.        exit 0

Those numbers are the claim: per asset path, 8 KiB for a 2048x1024 DDS, 74 KiB for a UTF-8 file, 8 KiB for a binary one — the memory is bounded, not proportional to the asset the way the old reader was.

What I could not test

  • The old side of the measurement: the test project is added by the same commit, so running it on cab9bb6e is impossible without writing one; the "before" numbers in the upstream commit message are the author's.
  • The application itself: this bump touches Core/ and adds a console test; I did not launch RpfPreview.

Verdict: the pointer is valid, the change is real and its own allocation test passes on this machine; the line-ending commit is the one thing I would send back.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-12-02 20:33 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3207#issuecomment-7357942836) ## VERIFY-3207 — el puntero y su contenido, con el test del propio bump ejecutado aquí | | | |---|---| | Merge base | `b41763227` = current `main` | | Old pointer | `cab9bb6e` | | New pointer | `2957dd44` (present in the submodule clone: `git cat-file -t` → commit; parent clean) | **What the bump brings** (`git log cab9bb6e..2957dd44`): ``` 2957dd4 Bound memory used by workspace asset validation 6abc4f8 Normalize line endings in ReplacementWorkspace ``` The first is the substance: pooled reads for SHA-256, DDS layouts inspected from headers instead of decoding the texture, incremental UTF-8 validation — plus a new `Tools/WorkspaceValidationTests` console project. **The second is a pure line-ending commit** that rewrites 965 lines of `ReplacementWorkspace.cs`; it makes the bump look enormous in a `--stat` and hides the 232-line real change. Worth folding into the same commit upstream (or dropping) so the next reviewer does not have to `-w` it. **Ran here (dotnet 10.0.404, the new submodule commit checked out)** ``` dotnet run --project Tools/WorkspaceValidationTests -c Release AssetPath managed allocation: DDS 8.256 B, UTF-8 73.768 B, binary 8.096 B Workspace validation passed. exit 0 ``` **Those numbers are the claim**: per asset path, 8 KiB for a 2048x1024 DDS, 74 KiB for a UTF-8 file, 8 KiB for a binary one — the memory is bounded, not proportional to the asset the way the old reader was. ## What I could not test - **The old side of the measurement**: the test project is added by the same commit, so running it on `cab9bb6e` is impossible without writing one; the "before" numbers in the upstream commit message are the author's. - **The application itself**: this bump touches `Core/` and adds a console test; I did not launch RpfPreview. Verdict: **the pointer is valid, the change is real and its own allocation test passes on this machine**; the line-ending commit is the one thing I would send back. Written with an AI assistant.
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/3207/head:github-bot/gh-3207'
git switch 'github-bot/gh-3207'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3207'
git switch 'github-bot/gh-3207'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3207'
git switch 'github-bot/gh-3207'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3207'
git switch 'main'
git merge --squash 'github-bot/gh-3207'
git switch 'main'
git merge --ff-only 'github-bot/gh-3207'
git switch 'main'
git merge 'github-bot/gh-3207'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
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
github/ubiquitarianism--leonida!3207
No description provided.