Skip to content

armgit / rea

Public Imported from GitHub
0

Reverse engineer anything with agents, from app behavior down to native binaries.

perf(hopper): stop repeating Hopper replies as raw_result (#1405)

Kaoru08221f0f728c63a4
diff --git a/src/hopper/HopperProvider.ts b/src/hopper/HopperProvider.ts
index 5b1da0ba9..6c314ddb6 100644
--- a/src/hopper/HopperProvider.ts
+++ b/src/hopper/HopperProvider.ts
@@ -249,7 +249,8 @@ export class HopperProvider implements AnalysisProviderCandidate {
? {
ok: true,
value: createAnalysisExecution(mapped.value, executionProvider, {
- rawResult: result.value,
+ // Only the file-offset mapping differs from Hopper's reply.
+ rawResult: mapped === result ? null : result.value,
...(profile === undefined ? {} : { analysisProfile: profile }),
limitations: [
...(preparedImage === undefined
diff --git a/tests/acceptance/applications/runtime.test.ts b/tests/acceptance/applications/runtime.test.ts
index 1a50c3fc1..bfa75b721 100644
--- a/tests/acceptance/applications/runtime.test.ts
+++ b/tests/acceptance/applications/runtime.test.ts
@@ -144,6 +144,8 @@ describe("production stdio runtime", () => {
expect(evidence.operation).toBe("current_document");
expect(evidence.provider.id).toBe("hopper");
expect(evidence.normalized_result).toBe(observation.normalized_result);
+ // Hopper's reply is the result; it is not repeated as raw_result.
+ expect(evidence.raw_result).toBeNull();
expect(records).toContainEqual(
expect.objectContaining({
application: "rea",