[PR #2013] [MERGED] fix(session): attribute selected-provider capabilities to the resolved identity #4966

Closed
opened 2026-10-31 00:57:29 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2013
Author: @kaoru0822-kitauji
Created: 10/12/2026
Status: ✅ Merged
Merged: 10/12/2026
Merged by: @morluto

Base: main ← Head: fix/issue-2009


📝 Commits (1)

  • 4554c5a fix(session): attribute selected-provider capabilities to the resolved identity

📊 Changes

5 files changed (+51 additions, -18 deletions)

View changed files

📝 src/application/DirectAnalysis.ts (+2 -7)
📝 src/application/binary/AnalysisProviderRegistry.ts (+11 -2)
📝 src/application/binary/BinarySession.ts (+1 -8)
📝 src/application/binary/SessionProviderRouter.ts (+5 -1)
📝 tests/composition/analysis-sessions/providerBinding.test.ts (+32 -0)

📄 Description

Fixes #2009

Problem

Profile resolution gives Ghidra and Hopper a concrete version. Their static identity has version: null. After #1988 grouped capability facts by provider, binary_session put the selected provider's capability sets (top-level and on the selected candidate) under the static identity. The binding and the selected candidate's provider use the resolved one. The same provider therefore appeared under two identities, and its capability facts lost the known version. Codex raised this on #1988 and nobody followed up.

Change

  • AnalysisProviderRegistry.selectedResult rebinds the selected provider's capabilities to the resolved profile identity once. It stores them on the binding (AnalysisProviderBinding.capabilities) and on the selected candidate status.
  • SessionProviderRouter builds route capabilities from the auxiliary providers plus the binding's rebound capabilities. Operation routing still goes through the provider itself.
  • BinarySession.providerIdentity and DirectAnalysis.providerIdentityForRoute used to swap in the profile identity downstream. The route now carries the resolved identity, so that repair is gone.

Contract impact: the provider.version values in binary_session capability sets now match analysis_provider_binding.provider for the selected provider. The schema is unchanged.

Validation

  • New composition regression in tests/composition/analysis-sessions/providerBinding.test.ts, using the existing deep-provider fixture: static version: null, resolved "1". It fails on the base commit with version: null in the selected candidate's capability set, and passes with this change.
  • npm run lint passes, and tsc --noEmit passes.
  • npm test: 8,613 passed and 12 failed. The 12 failures are in 5 files: interfaceBuilderBundle, nibNativeHierarchy, javascriptRuntimeObservation, javascriptRuntimeTargetLocations and nativeDmgArtifactReader. They fail identically on the unchanged base commit on this host (macOS, Command Line Tools only, no ibtool), so they are environmental and unrelated to this change.

Real-provider scope: verified only with the simulated provider fixture. No real Ghidra or Hopper run was done.

🤖 Generated with Claude Code


🔄 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/2013 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/12/2026 **Status:** ✅ Merged **Merged:** 10/12/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/issue-2009` --- ### 📝 Commits (1) - [`4554c5a`](https://github.com/morluto/rea/commit/4554c5ac4e6d8466a23457d1b2494ef652ef1a83) fix(session): attribute selected-provider capabilities to the resolved identity ### 📊 Changes **5 files changed** (+51 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `src/application/DirectAnalysis.ts` (+2 -7) 📝 `src/application/binary/AnalysisProviderRegistry.ts` (+11 -2) 📝 `src/application/binary/BinarySession.ts` (+1 -8) 📝 `src/application/binary/SessionProviderRouter.ts` (+5 -1) 📝 `tests/composition/analysis-sessions/providerBinding.test.ts` (+32 -0) </details> ### 📄 Description Fixes #2009 ## Problem Profile resolution gives Ghidra and Hopper a concrete version. Their static identity has `version: null`. After #1988 grouped capability facts by provider, `binary_session` put the selected provider's capability sets (top-level and on the selected candidate) under the static identity. The binding and the selected candidate's `provider` use the resolved one. The same provider therefore appeared under two identities, and its capability facts lost the known version. Codex raised this on #1988 and nobody followed up. ## Change - `AnalysisProviderRegistry.selectedResult` rebinds the selected provider's capabilities to the resolved profile identity once. It stores them on the binding (`AnalysisProviderBinding.capabilities`) and on the selected candidate status. - `SessionProviderRouter` builds route capabilities from the auxiliary providers plus the binding's rebound capabilities. Operation routing still goes through the provider itself. - `BinarySession.providerIdentity` and `DirectAnalysis.providerIdentityForRoute` used to swap in the profile identity downstream. The route now carries the resolved identity, so that repair is gone. Contract impact: the `provider.version` values in `binary_session` capability sets now match `analysis_provider_binding.provider` for the selected provider. The schema is unchanged. ## Validation - New composition regression in `tests/composition/analysis-sessions/providerBinding.test.ts`, using the existing deep-provider fixture: static `version: null`, resolved `"1"`. It fails on the base commit with `version: null` in the selected candidate's capability set, and passes with this change. - `npm run lint` passes, and `tsc --noEmit` passes. - `npm test`: 8,613 passed and 12 failed. The 12 failures are in 5 files: `interfaceBuilderBundle`, `nibNativeHierarchy`, `javascriptRuntimeObservation`, `javascriptRuntimeTargetLocations` and `nativeDmgArtifactReader`. They fail identically on the unchanged base commit on this host (macOS, Command Line Tools only, no ibtool), so they are environmental and unrelated to this change. Real-provider scope: verified only with the simulated provider fixture. No real Ghidra or Hopper run was done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 00:57:29 +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#4966
No description provided.