[GH-ISSUE #8237] [Bug] Missing comparison closure recommends inline Evidence already supplied #6506

Closed
opened 2026-11-01 21:11:45 +00:00 by bsakaguchi · 1 comment
Owner

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

Before submitting

  • I searched the open and closed issues for a related report.
  • I removed credentials, tokens, private paths, and sensitive target data.

Area

MCP or agent integration

Observed behavior

In a fresh MCP server, find_changed_behavior received a complete inline compare_functions Evidence record and returned evidence_integrity_mismatch because that same comparison ID was absent from the session's Evidence closure. The error advised the caller to supply complete inline Evidence, which was already supplied. Importing the originating bundle and repeating the identical input succeeded.

Reproduction

  1. In a real REA/Ghidra 12.1.4 session, analyze two selected functions on a self-built Mach-O and retain the complete compare_functions response. Export the Evidence bundle, then close the session.
  2. Start a new MCP server without importing the bundle. Call find_changed_behavior with comparisons: [<complete comparison Evidence>]. The request has 238 recursively counted members/elements, below the default 1,024 allowance. It returns evidence_integrity_mismatch with details.reason: "missing"; details.evidence_id is the comparison record supplied inline. Its message and remediation include Supply complete inline Evidence. A controlled repeat produced the same error.
  3. Import the originating Evidence bundle into a fresh server and send the identical complete inline comparison. The call succeeds and returns static candidates with behavior unknown.

One comparison and a Ghidra fixture were exercised; the standalone fixture is NOT_ENOUGH_INFO to attach here. No target execution occurred.

Expected behavior

Keep closure authentication and source provenance intact, but distinguish a missing required retained closure from damaged or changed Evidence and tell the caller which missing record to import or re-create. Do not suggest supplying complete inline Evidence when the exact record is already inline, unless that action actually resolves the missing closure. If allowing inline roots in closure resolution is considered, separately authenticate and retain every required linked source; do not silently drop closure.

Impact and scope

An agent following one offered recovery repeats the ineffective input instead of importing the originating bundle. This is an actionable error-UX issue with a confirmed bundle-import recovery, not evidence that corrupted records were accepted or that closure should be removed. Other investigation operations, CLI and autonomous agent behavior were not tested.

REA version

53a4ab78451a0654e9c3beb3d43a5e371a288fcc

Runtime and platform

Node 24.22.1, macOS 26.3 arm64; Ghidra 12.1.4, MCP SDK 2.3.1.

Target and artifact context

Comparison Evidence generated from a self-built, unexecuted arm64 Mach-O; tests after generation used fresh MCP servers and retained/exported Evidence.

Interface

MCP

Earliest failure stage

Artifact or evidence registration

Relevant output or evidence

code: "evidence_integrity_mismatch", details.reason: "missing", details.expected: "Evidence available to the selected source", and the message says Supply complete inline Evidence for the exact ID already present in comparisons[0]. Importing the original bundle made the same request pass.

Typed outcome or recovery expected

Report missing Evidence closure distinctly from an integrity mismatch where appropriate, with recovery that names importing/selecting the bundle or rerunning a producer. Preserve the actual missing ID and fail closed if the required records remain unavailable.

Analysis or suspected cause

Source-derived: registerChangedBehavior computes from inline records, then resolves all result links from the session ledger. The generic missing-reference message also offers inline input, regardless of this closure context. The correct ownership and desired ability to carry a complete closure inline need design and regression coverage.

Additional context

Related #8214 concerns input size and retained-reference support; this report is specifically the missing-closure reason and ineffective recovery advice. Last known good version: NOT_ENOUGH_INFO.

Originally created by @morluto on GitHub (Oct 30, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/8237 ### Before submitting - [x] I searched the open and closed issues for a related report. - [x] I removed credentials, tokens, private paths, and sensitive target data. ### Area MCP or agent integration ### Observed behavior In a fresh MCP server, `find_changed_behavior` received a complete inline `compare_functions` Evidence record and returned `evidence_integrity_mismatch` because that same comparison ID was absent from the session's Evidence closure. The error advised the caller to supply complete inline Evidence, which was already supplied. Importing the originating bundle and repeating the identical input succeeded. ### Reproduction 1. In a real REA/Ghidra 12.1.4 session, analyze two selected functions on a self-built Mach-O and retain the complete `compare_functions` response. Export the Evidence bundle, then close the session. 2. Start a new MCP server without importing the bundle. Call `find_changed_behavior` with `comparisons: [<complete comparison Evidence>]`. The request has 238 recursively counted members/elements, below the default 1,024 allowance. It returns `evidence_integrity_mismatch` with `details.reason: "missing"`; `details.evidence_id` is the comparison record supplied inline. Its message and remediation include `Supply complete inline Evidence`. A controlled repeat produced the same error. 3. Import the originating Evidence bundle into a fresh server and send the identical complete inline comparison. The call succeeds and returns static candidates with behavior `unknown`. One comparison and a Ghidra fixture were exercised; the standalone fixture is NOT_ENOUGH_INFO to attach here. No target execution occurred. ### Expected behavior Keep closure authentication and source provenance intact, but distinguish a missing required retained closure from damaged or changed Evidence and tell the caller which missing record to import or re-create. Do not suggest supplying complete inline Evidence when the exact record is already inline, unless that action actually resolves the missing closure. If allowing inline roots in closure resolution is considered, separately authenticate and retain every required linked source; do not silently drop closure. ### Impact and scope An agent following one offered recovery repeats the ineffective input instead of importing the originating bundle. This is an actionable error-UX issue with a confirmed bundle-import recovery, not evidence that corrupted records were accepted or that closure should be removed. Other investigation operations, CLI and autonomous agent behavior were not tested. ### REA version `53a4ab78451a0654e9c3beb3d43a5e371a288fcc` ### Runtime and platform Node 24.22.1, macOS 26.3 arm64; Ghidra 12.1.4, MCP SDK 2.3.1. ### Target and artifact context Comparison Evidence generated from a self-built, unexecuted arm64 Mach-O; tests after generation used fresh MCP servers and retained/exported Evidence. ### Interface MCP ### Earliest failure stage Artifact or evidence registration ### Relevant output or evidence `code: "evidence_integrity_mismatch"`, `details.reason: "missing"`, `details.expected: "Evidence available to the selected source"`, and the message says `Supply complete inline Evidence` for the exact ID already present in `comparisons[0]`. Importing the original bundle made the same request pass. ### Typed outcome or recovery expected Report missing Evidence closure distinctly from an integrity mismatch where appropriate, with recovery that names importing/selecting the bundle or rerunning a producer. Preserve the actual missing ID and fail closed if the required records remain unavailable. ### Analysis or suspected cause Source-derived: [`registerChangedBehavior`](https://github.com/morluto/rea/blob/53a4ab78451a0654e9c3beb3d43a5e371a288fcc/src/server/registerInvestigationTools.ts#L70-L81) computes from inline records, then resolves all result links from the session ledger. The [generic missing-reference message](https://github.com/morluto/rea/blob/53a4ab78451a0654e9c3beb3d43a5e371a288fcc/src/domain/analysisErrorPresentation.ts#L385-L388) also offers inline input, regardless of this closure context. The correct ownership and desired ability to carry a complete closure inline need design and regression coverage. ### Additional context Related #8214 concerns input size and retained-reference support; this report is specifically the missing-closure reason and ineffective recovery advice. Last known good version: NOT_ENOUGH_INFO.
bsakaguchi 2026-11-01 21:11:45 +00:00
  • closed this issue
  • added the
    bug
    triage
    labels
Author
Owner

@morluto commented on GitHub (Oct 31, 2026):

Looping in @gensokyo-dev @kaoru0822-kitauji @N0zoM1z0 for visibility on the Ghidra, Kuna, and REA tool-design investigation.

<!-- gh-comment-id:6538806048 --> @morluto commented on GitHub (Oct 31, 2026): Looping in @gensokyo-dev @kaoru0822-kitauji @N0zoM1z0 for visibility on the Ghidra, Kuna, and REA tool-design investigation.
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#6506
No description provided.