Repository navigation
fix(compliance): pin capability-resolution reprobe to the run target version - #7683
Conversation
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — clean, well-scoped fix with no blocking or medium findings.
Checked:
- Refactor moves
classifyCapabilityResolutionErrorWithDeclaredProtocolsintocompliance-testing.tsand pins the capability-resolution reprobe to the run target viawithHostedTestOptions, matching sibling probe pinning. Fail-closed behavior preserved; no dangling imports; call-siterunTargetis the resolved target. - TDD regression test is sound.
- Changeset correctly omitted: Addie/server-only change, no published protocol surface (
static/schemas/source/**, task defs, normative reference docs, release scripts,distartifacts) touched. - No schema↔docs, oneOf, released-artifact, 3.1.x patch-eligibility, or governance-precedent concerns apply.
High-risk flag is true only via (modified) matches under server/src/addie/** with no medium-or-higher finding, so the modification is presumed safe (no escalation on the flag alone). No no-auto-approve team match; gated_paths is false. Rows 1–8 do not fire → row 9 approve.
4403b3a to
98e3e02
Compare
…version When an evaluate_agent_quality run fails with a specialism parent-protocol error, Addie reprobes the agent's capabilities to classify the failure. That reprobe ran without the run target's adcpVersion, so the SDK sent its own prerelease default to agents evaluated at an explicit stable target. The reprobe helper moves next to the other hosted discovery helpers in the compliance-testing service and pins discovery to the run target. Fixes #7356 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… deadline The reprobe now runs through discoverCapabilitiesWithDeadline, so a hung agent cannot stall the evaluate_agent_quality error response, and its warning no longer names a single caller. Tests cover pinning across auth branches, the probe-task early return, the reprobe gate, the refined classification, the failure fallback, and the deadline. The SDK error mock now matches the real object-param constructor, and the pinning mock preserves a caller-supplied version. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
98e3e02 to
540639b
Compare
There was a problem hiding this comment.
Ladon verdict: Approve
Approve.
Clean pass. This PR moves classifyCapabilityResolutionErrorWithDeclaredProtocols from member-tools.ts into compliance-testing.ts, routing the capability reprobe through discoverCapabilitiesWithDeadline (30s deadline + safe transport) and pinning it to the failed run target via withHostedTestOptions — an operational-readiness improvement over the previously unbounded reprobe, with matching test coverage. No schema/wire changes, so no changeset required for the Addie surface.
Checked against the decision table:
- No critical/high findings (row 1 n/a).
gated_pathsis false;review_decisionis APPROVED (rows 2 satisfied regardless).high_riskis true but both reasons are(modified)with no medium-or-higher findings, so the modifications are presumed safe (rows 3, 5 n/a).- No medium findings in data-loss/schema/infra (row 4 n/a).
- Prior decision was
approve, notescalate(row 6 n/a). - No no-auto-approve team match (row 7 n/a).
- Zero medium findings (row 8 n/a).
Falls through to row 9 → approve.
Why
Follow-up to #7682. That PR pinned the hosted auth pre-discovery probe to the run target. #7356 stayed open because one more
evaluate_agent_qualitypath still called the agent without a version.When a run fails with a
specialism_parent_protocol_missingcapability-resolution error,classifyCapabilityResolutionErrorWithDeclaredProtocolsreprobesget_adcp_capabilitiesto refine the error classification. That reprobe passed onlyauth, so the SDK test client used its built-inADCP_VERSION(currently3.2.0-rc.3). An agent evaluated at an explicit stable target like3.1.20would get a prerelease request it rejects withVERSION_UNSUPPORTED, and the classification then fell back to the unrefined result.What changed
classifyCapabilityResolutionErrorWithDeclaredProtocolsmoves fromserver/src/addie/mcp/member-tools.tsintoserver/src/addie/services/compliance-testing.ts, next toclassifyCapabilityResolutionErrorand the other hosted discovery helpers. It now takes the run target and reprobes withwithHostedTestOptions(..., target), the same pinningexplicitTargetSupportErrorFromAgentandinferHostedAuthProbeTaskuse.evaluate_agent_qualitypasses itsrunTargetinto the reprobe.compliance-target-discovery.test.ts. With a3.1.20target, the reprobe must sendadcpVersion: '3.1.20'. The test was written first and failed (noadcpVersion), then passed after the fix.The move is there so the helper can be tested with the existing discovery mocks. The alternative was a new handler-level harness for the lease, rate-limit, and DB layers.
No changeset: server/Addie-only.
Review follow-ups (second commit)
From a review pass by the repo's code-review, SDK-protocol, spec, and testing agents:
discoverCapabilitiesWithDeadline(30s), so a hung agent can't stall the error response.evaluate_agent_quality, since the helper is now a shared service export.specialism_parent_protocol_missinggate; the refined classification; the reprobe failure fallback; and the deadline. TheCapabilityResolutionErrormock now uses the real object-param constructor, and thewithHostedTestOptionsmock keeps a caller-suppliedadcpVersionlike the real helper does.Out of scope, tracked separately: probes pinned via
withHostedTestOptionsthrow before sending for prerelease targets the SDK doesn't bundle a schema for (for example3.2.0-rc.6). Wrapping them inwithExternalSchemaRootfixes this. It affects pre-existing probes too, so it gets its own issue.Testing
Fixes #7356
🤖 Generated with Claude Code