[PR #4645] [MERGED] fix(ida): retain analysis profile in partial operation evidence #6337

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

📋 Pull Request Information

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

Base: main ← Head: fix/ida-partial-evidence-analysis-profile


📝 Commits (4)

  • f5fcba3 fix(ida): retain analysis profile in partial operation evidence
  • 9a0efeb test(ida): cover analysis profile retention in partial operation evidence
  • 0e8df49 test(ida): align analysis profile provider with IDA adapter identity
  • 08f39f4 Merge remote-tracking branch 'upstream/main' into fix/ida-partial-evidence-analysis-profile

📊 Changes

2 files changed (+62 additions, -0 deletions)

View changed files

📝 src/ida/IdaOperationFailures.test.ts (+59 -0)
📝 src/ida/IdaSessionClient.ts (+3 -0)

📄 Description

Summary

Fixes #3992

Retain the session AnalysisProfileCommitment when IdaSessionClient constructs partial operation evidence after an operation fails. Sessions opened without an analysis profile continue to report analysis_profile: null.

Problem and expected behavior

When an IDA operation succeeds, IdaSessionClient passes this.#analysisProfile to createEvidence. When an operation fails after recording partial observations, IdaSessionClient.#failure called createEvidence(this.#artifact, partialResult, ...) without analysisProfile: this.#analysisProfile. As a result, partialObservation.analysis_profile and the projected error details dropped the session profile commitment and reported null.

Expected behavior: partialObservation.analysis_profile and projected failure details retain the session AnalysisProfileCommitment whenever one was supplied to IdaSessionClient, and remain null when no profile was supplied.

Change and scope

  • src/ida/IdaSessionClient.ts: pass analysisProfile: this.#analysisProfile to createEvidence in #failure.
  • src/ida/IdaOperationFailures.test.ts: verify that failed IDA operations retain a supplied AnalysisProfileCommitment on partialObservation and toErrorDetails(), while keeping analysis_profile: null when the session has no profile.
  • Not included: changes to createEvidence defaults or non-IDA providers.

Contract and boundary impact

  • Semantic owner and earliest changed stage: IdaSessionClient.#failure in src/ida/IdaSessionClient.ts.
  • Contribution scope fit and linked maintainer decision: not applicable (bug fix within the existing IDA provider).
  • CLI and MCP/tool-catalog contract: unchanged schemas; partial_observation.analysis_profile in IDA failure details now preserves the session profile commitment when present.
  • Provider, bridge, target-format, or platform compatibility: IDA session failure projection across all IDA profiles.
  • Evidence, artifact, provenance, or reconstruction contract: partial operation evidence retains the committed analysis profile provenance on failure.
  • 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/IdaOperationFailures.test.ts: verifies that a failed inspect_function call with a supplied AnalysisProfileCommitment preserves that commitment on result.error.partialObservation.analysis_profile and result.error.toErrorDetails().partial_observation.analysis_profile, and that an unprofiled session still reports null.
  • Base reproduction or other evidence: source-derived. On the base revision, IdaSessionClient.#failure omits analysisProfile in its createEvidence call at src/ida/IdaSessionClient.ts:499-504, so createEvidence defaults analysis_profile to null.
  • User-visible CLI/MCP output (if applicable): IDA failure details with partial_observation now report the committed analysis_profile object instead of null.
  • Remaining proof gaps: no real IDA engine was run; tests use a scripted bridge client.

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 test suite.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: none run.
  • 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/4645 **Author:** [@viniciusdsandrade](https://github.com/viniciusdsandrade) **Created:** 10/17/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/ida-partial-evidence-analysis-profile` --- ### 📝 Commits (4) - [`f5fcba3`](https://github.com/morluto/rea/commit/f5fcba3a9581011839dcaa71dc1edd69e223514d) fix(ida): retain analysis profile in partial operation evidence - [`9a0efeb`](https://github.com/morluto/rea/commit/9a0efeb917c6a8bc36e9591db49ba0eb21b08475) test(ida): cover analysis profile retention in partial operation evidence - [`0e8df49`](https://github.com/morluto/rea/commit/0e8df49acc8ed99d66ec101a31c7ede5092fcb06) test(ida): align analysis profile provider with IDA adapter identity - [`08f39f4`](https://github.com/morluto/rea/commit/08f39f49ea49dd77b1a8fddae8787b19bd4e57b9) Merge remote-tracking branch 'upstream/main' into fix/ida-partial-evidence-analysis-profile ### 📊 Changes **2 files changed** (+62 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/ida/IdaOperationFailures.test.ts` (+59 -0) 📝 `src/ida/IdaSessionClient.ts` (+3 -0) </details> ### 📄 Description ## Summary Fixes #3992 Retain the session `AnalysisProfileCommitment` when `IdaSessionClient` constructs partial operation evidence after an operation fails. Sessions opened without an analysis profile continue to report `analysis_profile: null`. ## Problem and expected behavior When an IDA operation succeeds, `IdaSessionClient` passes `this.#analysisProfile` to `createEvidence`. When an operation fails after recording partial observations, `IdaSessionClient.#failure` called `createEvidence(this.#artifact, partialResult, ...)` without `analysisProfile: this.#analysisProfile`. As a result, `partialObservation.analysis_profile` and the projected error details dropped the session profile commitment and reported `null`. Expected behavior: `partialObservation.analysis_profile` and projected failure details retain the session `AnalysisProfileCommitment` whenever one was supplied to `IdaSessionClient`, and remain `null` when no profile was supplied. ## Change and scope - `src/ida/IdaSessionClient.ts`: pass `analysisProfile: this.#analysisProfile` to `createEvidence` in `#failure`. - `src/ida/IdaOperationFailures.test.ts`: verify that failed IDA operations retain a supplied `AnalysisProfileCommitment` on `partialObservation` and `toErrorDetails()`, while keeping `analysis_profile: null` when the session has no profile. - Not included: changes to `createEvidence` defaults or non-IDA providers. ## Contract and boundary impact - Semantic owner and earliest changed stage: `IdaSessionClient.#failure` in `src/ida/IdaSessionClient.ts`. - Contribution scope fit and linked maintainer decision: not applicable (bug fix within the existing IDA provider). - CLI and MCP/tool-catalog contract: unchanged schemas; `partial_observation.analysis_profile` in IDA failure details now preserves the session profile commitment when present. - Provider, bridge, target-format, or platform compatibility: IDA session failure projection across all IDA profiles. - Evidence, artifact, provenance, or reconstruction contract: partial operation evidence retains the committed analysis profile provenance on failure. - 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/IdaOperationFailures.test.ts`: verifies that a failed `inspect_function` call with a supplied `AnalysisProfileCommitment` preserves that commitment on `result.error.partialObservation.analysis_profile` and `result.error.toErrorDetails().partial_observation.analysis_profile`, and that an unprofiled session still reports `null`. - Base reproduction or other evidence: source-derived. On the base revision, `IdaSessionClient.#failure` omits `analysisProfile` in its `createEvidence` call at `src/ida/IdaSessionClient.ts:499-504`, so `createEvidence` defaults `analysis_profile` to `null`. - User-visible CLI/MCP output (if applicable): IDA failure details with `partial_observation` now report the committed `analysis_profile` object instead of `null`. - Remaining proof gaps: no real IDA engine was run; tests use a scripted bridge client. 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 test suite. ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: none run. - 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:13:41 +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#6337
No description provided.