Repository navigation
perf(hopper): stop repeating Hopper replies as raw_result - #1405
Merged
Merged
Conversation
HopperProvider passed the bridge reply as rawResult and, for every operation except address_to_file_offset, the same object as the result. Every Hopper Evidence record (decompilation, procedure and string listings, xrefs, ...) therefore carried its complete result twice, and an MCP response four times counting its text copy. raw_result is now null unless REA transformed the reply, which only the file-offset mapping does; that case keeps Hopper's original reply. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
darsrc
pushed a commit
to darsrc/rea
that referenced
this pull request
Oct 10, 2026
HopperProvider passed the bridge reply as rawResult and, for every operation except address_to_file_offset, the same object as the result. Every Hopper Evidence record (decompilation, procedure and string listings, xrefs, ...) therefore carried its complete result twice, and an MCP response four times counting its text copy. raw_result is now null unless REA transformed the reply, which only the file-offset mapping does; that case keeps Hopper's original reply.
3 of 5 tasks
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In
HopperProvider.execute,mappedis the reply itself (mapped = result) for every operation exceptaddress_to_file_offset, yet Evidence was built withso
raw_resultwas the same object asnormalized_result. Every Hopper Evidence record carried its complete result twice: decompilation, procedure/string listings, xrefs, call graphs and instructions. An MCP response repeats Evidence in text and structured content, so it carried the result four times. The duplicate also counted twice against the 10 MiB transport budget. Hopper is the primary deep-analysis provider, so this affects the largest everyday results.Change
rawResult: mapped === result ? null : result.value. Onlyaddress_to_file_offsettransforms Hopper's reply (mapHopperFileOffset), and it keeps the original reply asraw_result. Everything else recordsnull, meaning no distinct provider representation (see #1402).normalized_result, the analysis profile and limitations are unchanged.Tests
tests/acceptance/applications/runtime.test.ts("returns the selected document on macOS through MCP…") drives the production stdio server with the fake Hopper launcher and now assertsraw_result === null. The assertion fails onmainand passes here.npx vitest run tests/boundary/providers/hopper src/hopper tests/boundary/mcp tests/composition: 641 passed, 4 skippednpm run check:fastNot verified with real Hopper (not installed on this machine). The change is confined to how REA records the reply after Hopper returns it; no bridge or protocol behavior changes.
Related: #1402 (
createAnalysisExecutiondefault copy) and #1404 (pwntools diagnostics). The three PRs are independent. Refs #723, #1065.🤖 Generated with Claude Code