[PR #4286] [MERGED] fix(ida): keep omitted callee truncation markers unknown #6159

Closed
opened 2026-10-31 01:12:18 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4286
Author: @viniciusdsandrade
Created: 10/15/2026
Status: ✅ Merged
Merged: 10/21/2026
Merged by: @morluto

Base: main ← Head: fix/ida-omitted-callee-truncation-marker


📝 Commits (3)

  • 719ec31 fix(ida): keep omitted callee truncation markers unknown
  • 7e79d0d test(ida): keep omitted callee truncation from becoming not_reached
  • 291f7d8 Merge remote-tracking branch 'upstream/main' into fix/ida-omitted-callee-truncation-marker

📊 Changes

3 files changed (+65 additions, -1 deletions)

View changed files

📝 src/ida/IdaCalleeRelationships.test.ts (+27 -0)
📝 src/ida/IdaOperationRunner.ts (+7 -1)
📝 tests/boundary/providers/ida/calleeRelationships.test.ts (+31 -0)

📄 Description

Summary

Fixes #3988

Keep relationship coverage unknown when a modern headless IDA callees page omits its more truncation marker, so trace_call_path no longer turns unproven callee coverage into goal_status: "not_reached". Observed callee rows are still returned. An explicit more: false stays complete and more: true stays partial.

Problem and expected behavior

In IdaOperationRunner, the modern callees branch mapped every page that was not explicitly capped (more !== true) to { status: "complete" }. A page without more therefore claimed complete coverage. CallPathTracing adds a residual unknown only for partial or unknown coverage, so a trace to a goal outside the listed callees ended as not_reached with no residual unknowns.

Pinned upstream callees (mrexodia/ida-pro-mcp c133c385, api_analysis.py) always emits more on success, so its absence means the reply does not report coverage. The native schema already rejects that omission (IdaNativeProtocol.ts), and the legacy branch already reports unknown coverage when the reply does not report it.

Expected behavior: an omitted marker yields unknown coverage with a reason, the observed rows remain, and a trace to an unlisted goal stays unknown.

Change and scope

  • src/ida/IdaOperationRunner.ts: more: false maps to complete, more: true to partial as before, and an omitted more to unknown with the reason "Upstream callees omitted an explicit truncation marker; additional callees remain unknown."
  • Not included: the native protocol, which already rejects the omission at its schema, and the callgraph path for non-x86 targets.

Contract and boundary impact

  • Semantic owner and earliest changed stage: modern IDA callee coverage in IdaOperationRunner.
  • Contribution scope fit and linked maintainer decision: not applicable (bug fix within the existing IDA provider).
  • CLI and MCP/tool-catalog contract: unchanged schemas; relationshipCoverage can now be unknown for this reply shape.
  • Provider, bridge, target-format, or platform compatibility: modern headless IDA on x86 targets. Native and legacy profiles are unchanged.
  • Evidence, artifact, provenance, or reconstruction contract: unproven coverage is no longer reported as complete.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated:
    • src/ida/IdaCalleeRelationships.test.ts: an x86 callees page without more returns the observed 0x2000 row with unknown coverage and the new reason.
    • tests/boundary/providers/ida/calleeRelationships.test.ts: trace_call_path from main to an unlisted resolved goal returns goal_status: "unknown" with a residual unknown for 0x1000.
  • Base reproduction or other evidence: source-derived. On the base revision the same page yields { status: "complete" }, so projectTrace reaches not_reached because state.residual stays empty. Existing modern fixtures all send more: false and keep complete coverage.
  • User-visible CLI/MCP output (if applicable): trace_call_path reports goal_status: "unknown" and a residual unknown instead of not_reached.
  • Remaining proof gaps: no real IDA engine was run; tests use the simulated producer.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • No local test commands were run: verification is source-derived; CI executes the deterministic suite.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: none run. No IDA process is launched by these tests.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: no change to process ownership or target handling.

Author readiness

Human owner: @viniciusdsandrade

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/4286 **Author:** [@viniciusdsandrade](https://github.com/viniciusdsandrade) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/ida-omitted-callee-truncation-marker` --- ### 📝 Commits (3) - [`719ec31`](https://github.com/morluto/rea/commit/719ec31c2c4a1d469d2bde53cbd4c100d67ea3bb) fix(ida): keep omitted callee truncation markers unknown - [`7e79d0d`](https://github.com/morluto/rea/commit/7e79d0d382e52023d00296dfd33a046fe22c8b1e) test(ida): keep omitted callee truncation from becoming not_reached - [`291f7d8`](https://github.com/morluto/rea/commit/291f7d894967f53033da50611cce82915b3e817d) Merge remote-tracking branch 'upstream/main' into fix/ida-omitted-callee-truncation-marker ### 📊 Changes **3 files changed** (+65 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/ida/IdaCalleeRelationships.test.ts` (+27 -0) 📝 `src/ida/IdaOperationRunner.ts` (+7 -1) 📝 `tests/boundary/providers/ida/calleeRelationships.test.ts` (+31 -0) </details> ### 📄 Description ## Summary Fixes #3988 Keep relationship coverage `unknown` when a modern headless IDA `callees` page omits its `more` truncation marker, so `trace_call_path` no longer turns unproven callee coverage into `goal_status: "not_reached"`. Observed callee rows are still returned. An explicit `more: false` stays `complete` and `more: true` stays `partial`. ## Problem and expected behavior In `IdaOperationRunner`, the modern `callees` branch mapped every page that was not explicitly capped (`more !== true`) to `{ status: "complete" }`. A page without `more` therefore claimed complete coverage. `CallPathTracing` adds a residual unknown only for `partial` or `unknown` coverage, so a trace to a goal outside the listed callees ended as `not_reached` with no residual unknowns. Pinned upstream `callees` (mrexodia/ida-pro-mcp `c133c385`, `api_analysis.py`) always emits `more` on success, so its absence means the reply does not report coverage. The native schema already rejects that omission (`IdaNativeProtocol.ts`), and the legacy branch already reports `unknown` coverage when the reply does not report it. Expected behavior: an omitted marker yields `unknown` coverage with a reason, the observed rows remain, and a trace to an unlisted goal stays `unknown`. ## Change and scope - `src/ida/IdaOperationRunner.ts`: `more: false` maps to `complete`, `more: true` to `partial` as before, and an omitted `more` to `unknown` with the reason "Upstream callees omitted an explicit truncation marker; additional callees remain unknown." - Not included: the native protocol, which already rejects the omission at its schema, and the callgraph path for non-x86 targets. ## Contract and boundary impact - Semantic owner and earliest changed stage: modern IDA callee coverage in `IdaOperationRunner`. - Contribution scope fit and linked maintainer decision: not applicable (bug fix within the existing IDA provider). - CLI and MCP/tool-catalog contract: unchanged schemas; `relationshipCoverage` can now be `unknown` for this reply shape. - Provider, bridge, target-format, or platform compatibility: modern headless IDA on x86 targets. Native and legacy profiles are unchanged. - Evidence, artifact, provenance, or reconstruction contract: unproven coverage is no longer reported as complete. - Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable. - Generated metadata (`docs/public/product-catalog.json`), package, or installation impact: none. Expected effects: - [x] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [ ] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. ## Evidence and regression coverage - Tests added or updated: - `src/ida/IdaCalleeRelationships.test.ts`: an x86 `callees` page without `more` returns the observed `0x2000` row with `unknown` coverage and the new reason. - `tests/boundary/providers/ida/calleeRelationships.test.ts`: `trace_call_path` from `main` to an unlisted resolved goal returns `goal_status: "unknown"` with a residual unknown for `0x1000`. - Base reproduction or other evidence: source-derived. On the base revision the same page yields `{ status: "complete" }`, so `projectTrace` reaches `not_reached` because `state.residual` stays empty. Existing modern fixtures all send `more: false` and keep `complete` coverage. - User-visible CLI/MCP output (if applicable): `trace_call_path` reports `goal_status: "unknown"` and a residual unknown instead of `not_reached`. - Remaining proof gaps: no real IDA engine was run; tests use the simulated producer. For evidence-bearing changes: - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed - No local test commands were run: verification is source-derived; CI executes the deterministic suite. ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: none run. No IDA process is launched by these tests. - Package or release metadata impact: none. - Security, privacy, process, or containment review: no change to process ownership or target handling. ## Author readiness Human owner: @viniciusdsandrade - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. ## Before merge - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] User-visible CLI/MCP changes include representative output. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:12:18 +00:00
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#6159
No description provided.