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:
co-authored by
Claude Opus 5.5
parent
42b0ed126d
commit
2ff850de68
@@ -191,6 +191,38 @@ describe("target-bound provider routing", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("selected provider capability provenance", () => {
|
||||
it("labels selected-provider capabilities with the resolved identity", async () => {
|
||||
const target = await databaseTarget();
|
||||
const alpha = deepProvider("alpha");
|
||||
const session = selectableSession([alpha.provider], auxiliaryProvider());
|
||||
|
||||
expect((await session.open(target, { providerId: "alpha" })).ok).toBe(true);
|
||||
const resolved = { id: "alpha", name: "alpha provider", version: "1" };
|
||||
const status = bindingStatus(session);
|
||||
expect(status).toMatchObject({
|
||||
analysis_provider_binding: { provider: resolved },
|
||||
analysis_provider_candidates: [
|
||||
{
|
||||
provider: resolved,
|
||||
selected: true,
|
||||
capabilities: [{ provider: resolved }],
|
||||
},
|
||||
],
|
||||
});
|
||||
expect(
|
||||
z
|
||||
.object({ capabilities: z.array(z.object({ provider: z.unknown() })) })
|
||||
.parse(status)
|
||||
.capabilities.map(({ provider }) => provider),
|
||||
).toEqual([
|
||||
{ id: "alpha", name: "alpha provider", version: "1" },
|
||||
{ id: "auxiliary", name: "auxiliary provider", version: "1" },
|
||||
]);
|
||||
await session.close();
|
||||
});
|
||||
});
|
||||
|
||||
interface ClientState {
|
||||
readonly calls: string[];
|
||||
closed: boolean;
|
||||
|
||||
Reference in New Issue
Block a user