Repository navigation
rpf9dump: record scan-level candidate and recovery counts - #853
Conversation
Candidates that RecoverAtOffsets rejects never reach the per-item loop,
so ModelDecodeFailures stays empty even when candidates are missing.
Write Scan { Candidates, Recovered, NotRecovered, Entries } into the
manifest and print the shortfall. Recovered counts resources (distinct
candidate offsets): since the 917e9b9 pin a drawable dictionary yields
one entry per child, so Entries can exceed Candidates.
On a cached run the candidate count comes from the index cache's coverage
text, which rpf9dump now writes with invariant digits; older caches with
grouped digits still parse. The count is null when another tool wrote the
cache.
Suggested by Kam471 in the review of ItsNotRexed#30; that follow-up commit was pushed
after ItsNotRexed#30 had been merged, so it is resubmitted here on current main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed 9e0d871: 1 finding
Ran: |
The old coverage text used N0, whose group separator is not always one of . , ' or a space: de-CH writes U+2019, ar-* U+066C, nqo U+060C, ff-Adlm U+2E41. Accept any punctuation or space between the digits. With ICU, the old pattern failed for 77 of 852 cultures and the new one for none; the diagnostics test now checks every culture. Reported by kotorvr in the review of ItsNotRexed#853. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for checking this. It's fixed in eea3677: the pattern now accepts any punctuation or space between the digits ( The diagnostics test now formats the old coverage text under every culture and requires 183,801 back. On Linux x64 with .NET 8.0.428 and ICU (852 cultures), the old pattern failed for 77 and the new one for none. You saw 75 on 8.0.34, so the count depends on the ICU data. AI-assisted. |
|
Reviewed eea3677: looks good. My finding from 9e0d871 is fixed. The new loop over every culture in |
Follow-up to #30. Kam471 suggested this in the review, but I pushed the commit after #30 was merged, so here it is again on current
main.Why
Candidates that
RecoverAtOffsetsrejects never reach the per-item loop.ModelDecodeFailuresstays empty and the summary printsfail=0, even when candidates are missing. The scan-level shortfall was not recorded anywhere.Change
The manifest gets a
Scanobject:CandidatesRecoveredNotRecoveredCandidates - Recovered: rejected before decodingEntriesEntriesandRecoveredare separate because since the917e9b9pin, a drawable dictionary yields one entry per child at the same offset. rpf9dump also prints the shortfall.On a cached run, the candidate count is read back from the index cache's coverage text. rpf9dump now writes that text with invariant digits, and older caches with grouped digits (
2,313) still parse. The count isnullif another tool wrote the cache.Tested
Tested on Linux x64 with .NET SDK 8.0.428, CPU only (no GPU involved).
dotnet run --project tests/Rpf9DumpDiagnostics -c Releasepasses. The new checks cover coverage text that is invariant, comma-grouped, space-grouped, from another tool, or missing.rpf9dump models data.rpfat the current pin, once with a fresh scan and once from the cache, gives the same result both times:Candidates 2402, Recovered 2327, NotRecovered 75, Entries 2581. The 2,581 entries match the count in Track model layout recovery in Leonida #29.AI-assisted: an AI agent (Claude, Anthropic) did the code and tests on the author's behalf. No game data is included.
🤖 Generated with Claude Code