fix(session): attribute selected-provider capabilities to the resolved identity (#2013)

Profile resolution gives Ghidra and Hopper a concrete version, but the
selected candidate's capabilities and the session route kept the
provider's static identity with a null version. binary_session therefore
grouped capability sets under a different identity than the binding and
the selected candidate.

The registry now rebinds the selected provider's capabilities to the
resolved identity once, on the binding, and the route uses them. Evidence
provenance already compensated downstream by substituting the profile
identity; that repair is removed because the route now carries the
resolved identity.

Fixes #2009

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kaoru0822
2026-10-12 10:36:28 +08:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 42b0ed126d
commit 2ff850de68
5 changed files with 51 additions and 18 deletions
@@ -125,7 +125,11 @@ const selectableRoute = (
? undefined
: new CompositeProvider(providers);
const identity = provider?.identity() ?? emptyProviderIdentity();
const capabilities = capabilityMap(provider?.capabilities() ?? []);
// The binding attributes deep-provider capabilities to the resolved version.
const capabilities = capabilityMap([
...auxiliaryProviders.flatMap((auxiliary) => auxiliary.capabilities()),
...(binding?.capabilities ?? []),
]);
return {
identity,
capabilities,