Repository navigation
Conversation
[Low impact] The PR appears safe to merge; the previous cleanup finding is fixed. SummaryAdds an opt-in, read-only script that compares PSP function labels with a caller-selected Ghidra inventory using explicit address bases.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
S[Selected symbol file] --> P[Bounded parser]
I[Selected function inventory] --> V[Check rows and Evidence claims]
P --> C[Compare mapped addresses and names]
V --> C
B[Explicit address bases] --> C
C --> R[Read-only report on stdout]
Reviews (10) · Last reviewed commit: "test(psp): retain failed symbol verifier..." · Reviewed by Greptile |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
There was a problem hiding this comment.
🟡 Changes recommended
The parser rejects valid template-style labels containing commas and silently accepts malformed D/L records, causing valid comparisons to abort and invalid inputs to produce successful reports.
2 open issues
What changed in this PR
Adds an opt-in, read-only developer script to correlate PPSSPP-style function labels with captured REA Ghidra inventories, without changing public CLI/MCP tools or modifying targets.
Changes:
- Parses legacy
.symand modern.ppsymlabels with explicit address mapping, input bounds, hashes, and uncertainty reporting. - Adds source/command checks and extends real PSP/Ghidra verification with label agreement and wrong-base controls.
- Documents usage and limitations, and registers the scripts with Knip.
| File | Description |
|---|---|
scripts/verify-real-ghidra-mips.mjs |
Adds real PSP inventory correlation and wrong-base verification. |
scripts/verify-psp-symbol-correlation.mjs |
Adds parser, command, identity, and input-bound controls. |
scripts/psp-symbol-correlation.mjs |
Implements bounded, read-only symbol correlation and reporting. |
knip.json |
Registers both opt-in scripts as entry points. |
docs/ghidra-psp.md |
Documents formats, address mapping, provenance limits, and verification. |
Review effort: Balanced
|
Hi! This PR's checks pass, but GitHub shows a merge conflict with 🤖 Written with Claude Code (Opus 5.5), posted with my OK 🦊 |
|
@jaelliot thanks for the PR — this branch has merge conflicts with |
6030f27 to
5882047
Compare

Summary
Provide an opt-in, read-only developer script to correlate caller-selected PPSSPP-style function labels with an existing REA
list_proceduresinventory, preserving original addresses, explicit source/analysis bases, selected file paths and hashes, and uncertainty. No Ghidra rename, binary mutation, new MCP/CLI tool, or additional provider.Problem and expected behavior
Analyzing PSP game functions benefits from PPSSPP's labels, but a name or 32-bit address does not prove which PSP module or load base it belongs to. The legacy
.symexported by ghidra-allegrex and modern.ppsymsaved by PPSSPP have different layouts: modern module symbols are module-relative, while module-index-zero game/RAM symbols are absolute. Silent zero-offset matching can invent function identities.Change and scope
scripts/psp-symbol-correlation.mjs: bounded.sym/.ppsym 1function-label parser, explicit base selection, optional externally-known CRC comparison, read-only comparison with already captured REAlist_proceduresJSON array or Evidencenormalized_result.scripts/verify-psp-symbol-correlation.mjs: focused source-only positive and negative controls.--pspreal Ghidra verifier to compare three independently readelf-derived, legacy export-shaped labels with actual MCPlist_proceduresobservations; deliberately wrong-base mapping fails.knip.jsonand document usage indocs/ghidra-psp.md. No schema, external package, bridge, provider, installer or public REA surface changes.Contract and boundary impact
Evidence and regression coverage
3b64bca0380ab2f7e37981166795beea22bd2ba2(preserved in earlier merge head4969685685f41376ee356a316f542756976cf435; prior pre-review head008cd17a)..map, gzipped exports, arbitrary PSP binaries/PRX/PBP/ISO/CSO, live overlays. Does not establish module CRC/provenance on its own.Validation performed
node scripts/verify-psp-symbol-correlation.mjs— passed.node --check scripts/psp-symbol-correlation.mjsand existing PSP verifier — passed.oxfmt --check,npm ci,npm run build:cached,npm run check:fast,npm run docs:check— passed at the prior pre-review source head; updated current-head fixes are verified below.node scripts/verify-real-ghidra-mips.mjs --psp— passed on Linux x64 using independently checksum-verified Ghidra, Allegrex and PSPDEV, including existing ELF/ABI/Evidence, snapshot A→B→A and owned-process cleanup.Upstream CI repair and branch refresh (November 1, 2026)
Initial upstream CI on the earlier branch failed on the same 16 formatting errors and independent JavaScript/Frida test fixtures as old main
d3ab0fa. Fork-only integration of #8592 and #8596 with the pre-review symbol branch passed.Canonical upstream
mainhas since repaired those failures directly in00c4f44(fix(ci): repair verifier fixtures and formatting failures), with passing main CI. #8592 was closed without merging and #8596 remains draft; the original fixes are present on main notwithstanding those separate PR statuses.This PR was refreshed without history rewriting: a two-parent merge of
main00c4f44onto the existing symbol branch produced49696856. Against repaired main, the diff contains exactly the same five PSP-specific files, including all four Greptile review corrections. Updated upstream PR CI and fork-only real PSP/Ghidra qualification are separate checks. The fork validation completed successfully on this exact merge head, including repository-wide formatting, 11 focused JavaScript/Frida fixture tests, source/CLI checks, build/type/lint/docs, and real PSP/Ghidra verification. The current source head and its completed upstream/fork validation are recorded below.Review follow-up and current-head verification (November 1, 2026)
Addressed four actionable Greptile review threads in the original PR branch, without modifying REA's public CLI/MCP tools or adding a provider:
EXTERNAL:0x1) and exclude them from the explicitly unqualified PSP mapping rather than rejecting the whole inventory. Count excluded rows; preserve source selection.observed_labels_by_address, not on every source record. The regression exercises 8,192 duplicate source rows with 50,000 observed function rows and bounds the serialized report.0xffbytes are refused, rather than silently substituted.Prior review-fix source head:
3b64bca0380ab2f7e37981166795beea22bd2ba2(later commits add further boundary checks).The original review-fix proof predates the
49696856merge; a separate current-head qualification is linked above. The fork-only tests are not a human-author readiness declaration.Review corrections and current head (November 3, 2026)
Greptile's later review identified two additional input-boundary problems:
list_namesEvidence record as a function inventory if its target digest matched. The command now requiresoperation: "list_procedures"for Evidence-shaped inputs. Raw procedure arrays remain a caller-selected input, with no invented authenticated provenance. A real CLI subprocess regression rejectslist_namesnonzero without successful output.head -cstreams through pipes with zero metadata size. Their shell/child invocation has a 15-second deadline and bounded output capture, rather than an infinite/dev/zeroproducer.These changes remain confined to the original source-tree developer script, its existing verifier, and the PSP guide. No new public REA CLI/MCP operation, provider, executable mutation, or dependency was introduced.
Previous source head (before the November 5 parser correction):
bf508507801498ae51f43fd76b02248446e0890e.bf508507801498ae51f43fd76b02248446e0890e: source/CLI controls, build/type/lint/docs, and real PSP/Ghidra verification passed. The real fixture produced three address-and-label agreements, and the wrong-base negative control did not agree.tests/boundary/browser/sazWebCapture.test.ts, where a short literal0042happened to occur inside a computed Evidence ID. That failure was outside this PR's changed files; no unrelated SAZ test was changed here. Current upstream PR CI completed successfully onbf508507801498ae51f43fd76b02248446e0890e, with 17 successful jobs, 23 skipped jobs, and no failed jobs.November 5, 2026 — resolved parser review findings
Current commit
2b46964corrects two Copilot findings in the existing parser and its source verifier: malformed.ppsymdata/label records are rejected before being omitted from function comparison, and legacy.symlabels containing commas are parsed using the final comma as the size delimiter. Regression tests cover both failure cases and preserve valid unnamed data records.Exact-current-head upstream CI 41947131062 passed after this change, including source tests, all required built-test shards, build, static checks, and documentation. Both associated review threads were resolved after that result. Earlier real-Ghidra qualification linked above applies to the previous parser revision; the new change is in the offline symbol parser and its source test only.
Compatibility, safety, and release
No public schema or package change. The script explicitly fails on unsupported/malformed input and never alters Ghidra annotations. Address agreement is not functional equivalence or target authorization.
Author readiness
Human owner: @jaelliot
Before merge