Repository navigation
Description
Problem
SDK 8.0.0b2 changes the request-signing default to the strict AdCP 3.2 profile, but the high-level client does not derive that profile from its configured/negotiated AdCP version.
ADCPClient(adcp_version="3.1", signing=SigningConfig(...)) injects adcp_version="3.1" into requests while SigningConfig.signing_profile_version independently defaults to "3.2". _sign_outgoing_request() passes that value directly to sign_request().
The resulting request claims 3.1 but uses 3.2 Structured Fields binary encoding. A strict 3.1 peer expects the legacy Base64URL representation and may reject it.
Reproduction
client = ADCPClient(
config,
adcp_version="3.1",
signing=SigningConfig(private_key=key, key_id="buyer-key"),
)
assert client.get_adcp_version() == "3.1"
assert client.signing.signing_profile_version == "3.2"The migration guide currently tells adopters to override signing_profile_version="3.1" manually. That is easy to miss and makes the high-level client's version pin internally inconsistent.
Proposed behavior
- Make the high-level signing profile default derive from the client's trusted configured/negotiated AdCP version.
- Preserve an explicit
SigningConfig(signing_profile_version=...)override for endpoints whose trusted deployment configuration requires it. - Apply per-agent pins in
ADCPMultiAgentClient, including mixed 3.1/3.2 fleets. - Never select a verification profile from an unsigned request-body field; trusted endpoint configuration and negotiated capabilities remain authoritative.
- For low-level
sign_request()/async_sign_request(), either require an explicitsigning_profile_versionor make the newest-profile default unmistakable in API docs and warnings. Requiring it in SDK 8 is preferable because the low-level function has no negotiation context.
Acceptance tests
- A 3.1-pinned
ADCPClientsigns with the 3.1 binary encoding when no profile override is supplied. - A 3.2-pinned client signs with standard padded Base64.
- Explicit overrides win and are documented as advanced/trusted configuration.
- A heterogeneous multi-agent client signs each endpoint using its own pin.
- Low-level signer behavior is explicit and covered by both 3.1 and 3.2 conformance vectors.
Activity
bokelley commentedon Aug 18, 2026
Triage
Classification: Bug
Bucket(s): signing (label missing from repo — see run summary)
Status: ready-to-implement
What the experts said:
sig1=:<b64>:vs raw Base64URL); a strict 3.1 peer will reject a 3.2-signed request. Fix is protocol-correct but must also address the low-levelsign_request/async_sign_requestfootgun (they still default to "3.2" with no context to derive from). Noted that capability advertisement (request_signing.supported_profiles) should sit between explicit override and version inference in the precedence chain.Nonemust resolve exclusively fromself._adcp_version(construction-time local config), never fromself._server_version(peer-supplied) — the existing conflation atclient.py:682must not be copied here. Also, the resolved value must be asserted to a valid literal before reachingsigner.py:225; ifNonereaches that guard (signing_profile_version != "3.2"), it evaluatesTrueand silently picks legacy encoding — the wrong direction.My take: Both experts agree on direction; disagreement is on implementation pitfalls, not architecture. This is a correct bug fix for a real encoding mismatch. Because signing is security-sensitive, the PR authorization gate does not pass automatically — this needs a human or
/triage executeto authorize a draft PR.Implementation scope:
src/adcp/signing/autosign.py—SigningConfig: Changesigning_profile_versiondefault from"3.2"to a sentinel (None). Update type toLiteral["3.0","3.1","3.2"] | None = None. The__post_init__validator should acceptNone(meaning "derive from context"). Update__repr__to reflect theNonecase.src/adcp/client.py—_sign_outgoing_request(): Whenself.signing.signing_profile_version is None, resolve the effective profile fromself._adcp_version(notself._server_version). Map"3.0"→"3.0","3.1"or"3.1-beta"→"3.1","3.2"+→"3.2". Assert the result is a valid literal before passing tosign_request(). Precedence: explicit override > capability advertisement (request_signing.supported_profilesif the block advertises one) > version inference.src/adcp/signing/signer.py— low-level API: Remove or deprecate the"3.2"default onsign_requestandasync_sign_request. These functions have no negotiation context; callers should pass an explicit value. In SDK 8 (beta), requiring the argument is preferable to a silent default.src/adcp/client.py—ADCPMultiAgentClient: The sameSigningConfigis passed to each per-agentADCPClient. SinceADCPClientnow derives the profile from its own_adcp_version, mixed-version fleets automatically get per-agent signing profiles — no additional change needed there.pytestontests/(especially any signing tests),mypy src/(type change onSigningConfig),ruff check .,black --check .signing_profile_version="3.1"wins regardless ofadcp_version. Mixed-versionADCPMultiAgentClientsigns each endpoint using its per-agent pin.Non-breaking rationale: The current behavior is a bug that produces wire-invalid requests for 3.1-pinned clients. The fix changes the default only for clients where
adcp_version != "3.2"andsigning_profile_versionwas not explicitly set — a case that was already broken. Existing callers that explicitly setsigning_profile_versionor that use the defaultadcp_version(which resolves to the SDK compile-time pin) are unaffected.Triaged by Claude Code. Session: https://claude.ai/code/cse_018nAEbrtuXYRKbEewyA341Z
Generated by Claude Code