[GH-ISSUE #1849] [Feature] Provide bounded native function delivery with actionable retained-evidence continuation #625

Closed
opened 2026-10-15 18:26:44 +00:00 by bsakaguchi · 1 comment
Owner

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

Before submitting

  • I searched open and closed issues and pull requests for related work.
  • I removed credentials, private paths, and sensitive target data.

Area

Native analysis or decompilation; MCP or agent integration.

Current limitation

analyze_function dossiers can exceed the 10,485,760-byte receive budget, and other directory/dossier responses can be too large for useful inline consumption. REA retains the canonical Evidence, but reaching the relevant source through the recovery workflow remains costly.

Use cases

Inspect a selected main/parser function or discover procedures in a stripped native image without moving unrelated value-flow data through every response.

Desired outcome and success criteria

  • Offer an explicit bounded first view or selected facets while preserving the existing complete-result contract.
  • Resource errors identify valid retained Evidence and exact supported continuation arguments.
  • Verify source paging through next_offset and explicit export, including following-call usability.
  • Measure response bytes and time to useful source without silently claiming completeness.

Authority boundaries and non-goals

Read-only native analysis; preserve exact selected procedure and canonical Evidence. Do not silently replace a caller-requested rich result or remove the transport guard.

Alternatives considered

inspect_analysis_view already retrieves retained native pseudocode: an observed 39,225 UTF-16-unit source returned 240 units with next_offset=240. export_evidence_bundle also retrieves the retained source. These working paths must be preserved.

Possible direction

Investigate producer projection, directory overhead and error-to-continuation guidance, reusing the selected-facet work in #1247. Related: #1065 and #723.

Originally created by @N0zoM1z0 on GitHub (Oct 11, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/1849 ### Before submitting - [x] I searched open and closed issues and pull requests for related work. - [x] I removed credentials, private paths, and sensitive target data. ### Area Native analysis or decompilation; MCP or agent integration. ### Current limitation `analyze_function` dossiers can exceed the 10,485,760-byte receive budget, and other directory/dossier responses can be too large for useful inline consumption. REA retains the canonical Evidence, but reaching the relevant source through the recovery workflow remains costly. ### Use cases Inspect a selected main/parser function or discover procedures in a stripped native image without moving unrelated value-flow data through every response. ### Desired outcome and success criteria - Offer an explicit bounded first view or selected facets while preserving the existing complete-result contract. - Resource errors identify valid retained Evidence and exact supported continuation arguments. - Verify source paging through `next_offset` and explicit export, including following-call usability. - Measure response bytes and time to useful source without silently claiming completeness. ### Authority boundaries and non-goals Read-only native analysis; preserve exact selected procedure and canonical Evidence. Do not silently replace a caller-requested rich result or remove the transport guard. ### Alternatives considered `inspect_analysis_view` already retrieves retained native pseudocode: an observed 39,225 UTF-16-unit source returned 240 units with `next_offset=240`. `export_evidence_bundle` also retrieves the retained source. These working paths must be preserved. ### Possible direction Investigate producer projection, directory overhead and error-to-continuation guidance, reusing the selected-facet work in #1247. Related: #1065 and #723.
Author
Owner

@N0zoM1z0 commented on GitHub (Oct 11, 2026):

The native continuation fix in #1910 is verified on head d0aedf63e8af2bed9c6f3d5ee60093b011887713 through fresh stdio MCP and real Ghidra 12.1.4. An unchanged stripped x86-64 ELF at selected procedure 0x41bf30 reproduced the existing receive-buffer limit (at least 10,512,118 bytes). The supplied continuation directly returned two 64-unit source pages with next offsets 64 and 128; each MCP response was 28,863 bytes. Export verified exact slices against all 39,225 UTF-16 units of canonical pseudocode, original procedure parameters and target digest. Ping, explicit session close and unchanged executable bytes passed.

The workflow ran serially under one CPU, a 768-MiB Java heap and a 3-GiB scope: 275.20 seconds including startup/export/close, 1,268,264,960-byte peak, zero OOM/max events. All 28 focused MCP/encoding tests, static checks and documentation checks pass. Real Hopper/IDA and local Windows/macOS provider execution remain unverified; paging does not claim reduced analysis cost or broader directory projection.

<!-- gh-comment-id:6113047407 --> @N0zoM1z0 commented on GitHub (Oct 11, 2026): The native continuation fix in #1910 is verified on head `d0aedf63e8af2bed9c6f3d5ee60093b011887713` through fresh stdio MCP and real Ghidra 12.1.4. An unchanged stripped x86-64 ELF at selected procedure `0x41bf30` reproduced the existing receive-buffer limit (at least 10,512,118 bytes). The supplied continuation directly returned two 64-unit source pages with next offsets 64 and 128; each MCP response was 28,863 bytes. Export verified exact slices against all 39,225 UTF-16 units of canonical pseudocode, original procedure parameters and target digest. Ping, explicit session close and unchanged executable bytes passed. The workflow ran serially under one CPU, a 768-MiB Java heap and a 3-GiB scope: 275.20 seconds including startup/export/close, 1,268,264,960-byte peak, zero OOM/max events. All 28 focused MCP/encoding tests, static checks and documentation checks pass. Real Hopper/IDA and local Windows/macOS provider execution remain unverified; paging does not claim reduced analysis cost or broader directory projection.
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#625
No description provided.