Skip to content

fix(addie): pin capability-resolution reprobe to the run target version - #7688

Closed
garvitkaushik-123 wants to merge 1 commit into
adcontextprotocol:mainfrom
garvitkaushik-123:fix/7356-reprobe-target-pin
Closed

garvitkaushik-123 wants to merge 1 commit into
adcontextprotocol:mainfrom
garvitkaushik-123:fix/7356-reprobe-target-pin

Conversation

@garvitkaushik-123

Copy link
Copy Markdown
Collaborator

Summary

classifyCapabilityResolutionErrorWithDeclaredProtocols() reprobes an agent's capabilities after a specialism_parent_protocol_missing error, to check for a near-miss protocol declaration. That reprobe called testCapabilityDiscovery() without pinning adcpVersion, so it fell back to the SDK's built-in default version instead of the actual run target. Same class of bug #7682 fixed in the pre-discovery probe (hostedAuthDefaultsForRun), just in this second, error-path call site.

@bokelley flagged this exact gap on #7356 after #7682 merged:

After #7682 lands, the error-path reprobe in classifyCapabilityResolutionErrorWithDeclaredProtocols (server/src/addie/mcp/member-tools.ts) remains unpinned per @andybevan-scope3's analysis. Issue stays open as the tracker until that second path is also addressed.

Change

Test plan

  • Added server/tests/unit/member-tools-capability-reprobe-target.test.ts. Verified it fails without the fix (reprobe call had no adcpVersion) and passes with it.
  • Ran the full addie-chat-org-selection.test.ts and the new test file together: 36/36 pass.
  • npx tsc --project server/tsconfig.json --noEmit: no new errors from this change.

Related to #7356 — this addresses the second path bokelley named; leaving the issue itself for him to close once confirmed, not claiming to fix it here.

classifyCapabilityResolutionErrorWithDeclaredProtocols() reprobes an
agent's capabilities after a specialism_parent_protocol_missing error,
to check for a near-miss protocol declaration. That reprobe called
testCapabilityDiscovery() without pinning adcpVersion, so it fell back
to the SDK's built-in default version instead of the run's actual
target, the same class of bug adcontextprotocol#7682 fixed in the pre-discovery probe.

Pin it to the run target with withHostedTestOptions(), matching the
pattern adcontextprotocol#7682 used.

Flagged by bokelley on adcontextprotocol#7356 as the remaining unpinned path after
adcontextprotocol#7682 landed, blocking that issue from closing.

Related to adcontextprotocol#7356

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve — clean, targeted app-only fix with no blocking or medium findings.

This PR pins the error-path capability-resolution reprobe in classifyCapabilityResolutionErrorWithDeclaredProtocols to the run's HostedComplianceTarget, closing the second unpinned call site from #7356. The reviewer confirmed the fix is correct: runTarget is the resolved selected target, the wrapping mirrors the pre-discovery probe at member-tools.ts:695 (the sole production call site), and both the production call site and the new test supply the required parameter.

Change scope is Addie/app-only (server/src/addie/**) — no static/schemas/source/**, docs, dist artifacts, or protocol surface touched, so no changeset is in scope and no schema↔docs coherence concerns apply.

High-risk flag is true only because server/src/addie/member-tools.ts matches server/src/addie/**, but the change-kind is (modified) with zero medium-or-higher findings — presumed safe per the high-risk reading rules. No deletions. gated_paths is false, so row 2 does not apply despite review_decision: REVIEW_REQUIRED. No author team gate. No prior decision.

Decision table: rows 1–8 do not fire (no critical/high, gated_paths false, no deletions, no medium findings, no team gate, fewer than 3 mediums). Falls through to row 9 → approve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants