Repository navigation
fix(compliance): pin hosted auth pre-discovery to the run target version - #7682
Merged
Merged
Conversation
comply() pre-discovers agent capabilities to infer hosted auth defaults. That probe ran without the run target's adcpVersion, so the SDK sent its own default (a 3.2 prerelease) to agents being evaluated at an explicit stable target such as 3.1.20. Agents that only support 3.1 correctly rejected it with VERSION_UNSUPPORTED. Refs #7356 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Contributor
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — clean, minimal server/Addie fix with no blocking or medium findings.
What I checked:
hostedAuthDefaultsForRunnow pins hosted-auth pre-discovery to the run target viawithHostedTestOptions(options, target), matching the existing pattern at compliance-testing.ts:306. This stops the SDK'sADCP_VERSIONdefault (a prerelease) from leaking a rejected probe to agents pinned to 3.1 — a correct, targeted fix.- Auth inference is unchanged (raw-options early return preserved).
- The
withHostedTestOptionseval stays inside the try/catch, so an artifact-assert failure fails closed to warn-only. - New regression test asserts the correct
adcpVersionreaches discovery. - Server/Addie-only change: no
static/schemas/source/**, docs,dist/**, or migration surface touched — no changeset required per repo scope rules.
Decision path: No critical/high/medium findings. gated_paths is false (row 2 N/A). high_risk is true only via a (modified) match on server/src/addie/**, with no medium finding attached (rows 3 & 5 N/A). No no-auto-approve team match (row 7 N/A). Fewer than three mediums (row 8 N/A). Falls through to row 9 → approve. review_decision: REVIEW_REQUIRED alone does not block since gated_paths is false and no prose hard gate applies.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
#7356 reports that
evaluate_agent_qualitywithcompliance_target: "3.1.20"sent3.2.0-rc.1to an agent that only supports3.1, and the agent (correctly) rejected it withVERSION_UNSUPPORTED.#7679 hardened bare line aliases (
3.2) so they no longer fall back to an RC silently. That was a useful change, but it did not cover this report: an exact version like3.1.20never reacheslatestBadgeEligibleComplianceVersionForLine, andstoryboards.test.tsalready pins3.1.20to3.1.20.The actual source is
comply()inserver/src/addie/services/compliance-testing.ts. Before the SDK run starts,hostedAuthDefaultsForRunpre-discovers capabilities to infer the auth probe task and static fixture key. It passed the caller's options without the run target'sadcpVersion, so the SDK's test client used its ownADCP_VERSIONdefault. On the report date, main pinned@adcp/[email protected], whose default is3.2.0-rc.1. Current main (14.0.0-rc.40) defaults to3.2.0-rc.3, so everyevaluate_agent_qualityrun still sends one prerelease-versioned probe to the agent under test.The failure is caught and logged as a warning, and the SDK's own
complythen pins every call to the bundle version, so the run itself uses3.1.20. The operator of the agent still sees a rejected prerelease request in their logs, which reads as a tool-side version bug.What changed
hostedAuthDefaultsForRunnow takes the run target and pre-discovers withwithHostedTestOptions(options, target), matching howselectComplianceTargetForAgentSelectionandexplicitTargetSupportErrorFromAgentalready pin discovery.compliance-target-discovery.test.ts:comply()with an exact3.1.20target must pre-discover withadcpVersion: '3.1.20'. It failed before the fix (noadcpVersion) and passes after.No changeset: server/Addie-only.
Not covered here
classifyCapabilityResolutionErrorWithDeclaredProtocolsinserver/src/addie/mcp/member-tools.tsalso reprobes capabilities without the run target, but only after a run has already failed with a capability-resolution error. It only feeds error classification. It needs a handler-level test harness, so it's left for a follow-up.Testing
adcpVersion) and passes after.compliance-target-discovery.test.tsandstoryboards.test.tspass (67 tests).Refs #7356
🤖 Generated with Claude Code