[GH-ISSUE #1243] feat(native): return resolved procedure identity in batch decompilation #441

Closed
opened 2026-10-15 18:25:05 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @N0zoM1z0 on GitHub (Oct 9, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/1243

Current limitation

batch_decompile usefully accepts an interior instruction address, but each successful item returns only that request's address, status and pseudocode. The actual containing procedure identity is absent from structured fields. Consumers can accidentally label a retained result with an interior address, or must make another query or parse the provider's pseudocode naming convention.

Real observation

After opening the audited x86 PE with Ghidra:

{"addresses":["0x412b00","0x40d1b0"]}

The actual entries are 0x412a50 and 0x40cf70, respectively, while successful items retain the requested interior addresses. resolve_containing_procedure confirms the first entry. Full analyze_function already identifies its canonical procedure; the gap is specifically the batch result boundary.

Required behavior

Return separate requested and resolved procedure addresses, plus an observed procedure name when available. Bind result provenance to the analyzed object while preserving the caller's selector. Do not obtain identity by parsing pseudocode labels.

Test entry/interior selectors, two selectors resolving to one function, no containing function, external/named address spaces, partial batch failures, and equivalent CLI/MCP output. Keep successful prefix results useful.

Source

src/application/EnhancedTools.ts:251 and src/contracts/toolOutputSchemaGroups.ts:257.

Verification and scope

Reproduced through real Ghidra MCP on both baselines; containing-function resolution succeeded separately. This is an additive identity/usability request, not a failed decompilation.

Audit date: 2026-10-09. Latest npm dist-tag verified as rea-agents@6.1.0; current main tested at f4c99ab8a53806dd57dc24b3d5a600905bcb4686. Linux x64, Node 24.18.0, MCP client SDK 2.3.1. Native observations use unmodified Ghidra 12.1.4 and JDK 21, two CPUs and a 512 MiB Java heap. No target execution or executable mutation was used for the static native checks.

Originally created by @N0zoM1z0 on GitHub (Oct 9, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/1243 ### Current limitation `batch_decompile` usefully accepts an interior instruction address, but each successful item returns only that request's `address`, `status` and `pseudocode`. The actual containing procedure identity is absent from structured fields. Consumers can accidentally label a retained result with an interior address, or must make another query or parse the provider's pseudocode naming convention. ### Real observation After opening the audited x86 PE with Ghidra: ```json {"addresses":["0x412b00","0x40d1b0"]} ``` The actual entries are `0x412a50` and `0x40cf70`, respectively, while successful items retain the requested interior addresses. `resolve_containing_procedure` confirms the first entry. Full `analyze_function` already identifies its canonical procedure; the gap is specifically the batch result boundary. ### Required behavior Return separate requested and resolved procedure addresses, plus an observed procedure name when available. Bind result provenance to the analyzed object while preserving the caller's selector. Do not obtain identity by parsing pseudocode labels. Test entry/interior selectors, two selectors resolving to one function, no containing function, external/named address spaces, partial batch failures, and equivalent CLI/MCP output. Keep successful prefix results useful. ### Source [src/application/EnhancedTools.ts:251](https://github.com/morluto/rea/blob/f4c99ab8a53806dd57dc24b3d5a600905bcb4686/src/application/EnhancedTools.ts#L251) and [src/contracts/toolOutputSchemaGroups.ts:257](https://github.com/morluto/rea/blob/f4c99ab8a53806dd57dc24b3d5a600905bcb4686/src/contracts/toolOutputSchemaGroups.ts#L257). ### Verification and scope Reproduced through real Ghidra MCP on both baselines; containing-function resolution succeeded separately. This is an additive identity/usability request, not a failed decompilation. Audit date: 2026-10-09. Latest npm dist-tag verified as `rea-agents@6.1.0`; current main tested at `f4c99ab8a53806dd57dc24b3d5a600905bcb4686`. Linux x64, Node 24.18.0, MCP client SDK 2.3.1. Native observations use unmodified Ghidra 12.1.4 and JDK 21, two CPUs and a 512 MiB Java heap. No target execution or executable mutation was used for the static native checks.
Sign in to join this conversation.
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
morluto/rea#441
No description provided.