Skip to content

fix(compliance): pin hosted auth pre-discovery to the run target version - #7682

Merged
andybevan-scope3 merged 1 commit into
mainfrom
issue-7356
Sep 24, 2026
Merged

andybevan-scope3 merged 1 commit into
mainfrom
issue-7356

Conversation

@andybevan-scope3

Copy link
Copy Markdown
Collaborator

Why

#7356 reports that evaluate_agent_quality with compliance_target: "3.1.20" sent 3.2.0-rc.1 to an agent that only supports 3.1, and the agent (correctly) rejected it with VERSION_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 like 3.1.20 never reaches latestBadgeEligibleComplianceVersionForLine, and storyboards.test.ts already pins 3.1.20 to 3.1.20.

The actual source is comply() in server/src/addie/services/compliance-testing.ts. Before the SDK run starts, hostedAuthDefaultsForRun pre-discovers capabilities to infer the auth probe task and static fixture key. It passed the caller's options without the run target's adcpVersion, so the SDK's test client used its own ADCP_VERSION default. On the report date, main pinned @adcp/[email protected], whose default is 3.2.0-rc.1. Current main (14.0.0-rc.40) defaults to 3.2.0-rc.3, so every evaluate_agent_quality run 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 comply then pins every call to the bundle version, so the run itself uses 3.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

  • hostedAuthDefaultsForRun now takes the run target and pre-discovers with withHostedTestOptions(options, target), matching how selectComplianceTargetForAgentSelection and explicitTargetSupportErrorFromAgent already pin discovery.
  • The probe-task early return still reads the caller's raw options, so auth inference behavior is unchanged.
  • Added a regression test in compliance-target-discovery.test.ts: comply() with an exact 3.1.20 target must pre-discover with adcpVersion: '3.1.20'. It failed before the fix (no adcpVersion) and passes after.

No changeset: server/Addie-only.

Not covered here

classifyCapabilityResolutionErrorWithDeclaredProtocols in server/src/addie/mcp/member-tools.ts also 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

Refs #7356

🤖 Generated with Claude Code

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]>

@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, minimal server/Addie fix with no blocking or medium findings.

What I checked:

  • hostedAuthDefaultsForRun now pins hosted-auth pre-discovery to the run target via withHostedTestOptions(options, target), matching the existing pattern at compliance-testing.ts:306. This stops the SDK's ADCP_VERSION default (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 withHostedTestOptions eval stays inside the try/catch, so an artifact-assert failure fails closed to warn-only.
  • New regression test asserts the correct adcpVersion reaches 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.

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.

1 participant