Repository navigation
Description
Summary
get_adcp_capabilities publishes whatever adcp.supported_versions the seller declares. It never checks that the dispatcher will accept those versions or that the SDK bundles schemas to validate them. A seller can therefore advertise a version that every request is rejected at, and nothing flags it at boot.
Depending on how the seller widened version detection, a buyer that selects the advertised version gets one of two errors:
VERSION_UNSUPPORTEDfromdetect_wire_version, when the version isn't in the accepted wire set; orVALIDATION_ERRORat/with keywordschema_unavailable, from_missing_explicit_schema_outcome(adcp/validation/schema_validator.py:132-175), when detection accepts it but no bundle exists.
The second is a misleading code. The request body is fine; the server can't speak the version it negotiated.
Reproduction (adcp 8.0.0)
import asyncio
from adcp.server import ADCPHandler
from adcp.server.mcp_tools import create_tool_caller
from adcp.server.responses import capabilities_response
from adcp.validation import validate_request
class Seller(ADCPHandler):
async def get_products(self, params, context=None):
return {"products": []}
async def main():
caps = capabilities_response(["media_buy"], major_versions=[3], supported_versions=["3.1-beta.5", "3.2"])
print("advertised:", caps["adcp"]["supported_versions"])
request = {"adcp_version": "3.1-beta.5", "buying_mode": "brief", "brief": "video"}
try:
await create_tool_caller(Seller(), "get_products")(request)
except Exception as exc:
print("dispatch:", exc.errors[0].code)
outcome = validate_request("get_products", request, version="3.1-beta.5")
print("validator:", outcome.valid, outcome.issues[0].keyword)
asyncio.run(main())Output:
advertised: ['3.1-beta.5', '3.2']
dispatch: VERSION_UNSUPPORTED
validator: False schema_unavailable
Why an adopter hits this
This happened in production. Embedded Sales Agent advertised 3.1-beta.5, a compatibility alias added while #883 was open. When adcp 7.0.0 started failing closed on explicit versions without a bundle, every 3.1-beta.5 request began failing with schema_unavailable. The capability kept advertising the version for months, and no boot check or log line pointed at the mismatch.
Ask
- At boot (
validate_capabilities_response_shape, orserve()), reject or warn when an advertisedsupported_versionsentry isn't in the accepted wire set, or has no bundled validator. - When detection accepts an explicit version but no bundle exists, return
VERSION_UNSUPPORTED(withsupported_versionsin details), notVALIDATION_ERRORat/.
Activity
bokelley commentedon Oct 2, 2026
Triage
Classification: Bug (two related sub-bugs in the validation/capabilities boundary)
Bucket(s): validation, handlers (no matching repo labels found; noted for maintainer)
Status: ready-for-human
Milestone: omitted (no target version specified)
What the experts said:
VERSION_UNSUPPORTEDis the correct wire code for sub-bug 2 — compliance storyboards (exact_nonempty_reject_rc0) assert exactly that for the "server accepted a version it cannot validate" case. Technically breaking but a conformance correction. For sub-bug 1, recommends raising (not warning) at boot whensupported_versionsis explicitly supplied, scoped only to caller-supplied lists.VERSION_UNSUPPORTEDwould be actively misleading here, because the dispatcher just accepted the version; the buyer would downgrade unnecessarily.INTERNAL_ERRORis the correct code (server misconfiguration, not a bad request). For sub-bug 1, the warning belongs incapabilities_response()directly (not just in_validate_response_dict), fires only whensupported_versions is not None, and must compare againstSUPPORTED_WIRE_VERSIONS(notget_supported_adcp_versions()) to avoid false positives on legacy versions like"2.5".My take: The two sub-bugs need separate decisions. Sub-bug 1's warning-only path is non-breaking and both experts agree on the
capabilities_response()location and theSUPPORTED_WIRE_VERSIONScomparison set — that piece could land independently. Sub-bug 2 requires a human call: the protocol expert saysVERSION_UNSUPPORTED, the code reviewer saysINTERNAL_ERROR, and they make different arguments from spec conformance vs. buyer UX. Either choice is a breaking wire change.Open questions for @bokelley:
VERSION_UNSUPPORTED. Code reviewer arguesINTERNAL_ERRORis semantically correct (buyer can't fix a missing schema bundle by downgrading). Which is the intended wire contract?supported_versions=["3.1-beta.5"]?exact_nonempty_reject_rc0and any partner storyboards assertingVALIDATION_ERRORforschema_unavailablewould need updating — is there a storyboard audit step in scope here?Implementation scope (for when the decisions above are made):
src/adcp/server/responses.pylines 257–350 — addif supported_versions is not None:guard before the merge block; iterate entries againstSUPPORTED_WIRE_VERSIONSfromadcp.validation.envelope; emitwarnings.warn(..., stacklevel=2)for any miss. No import circularity risk.src/adcp/validation/schema_validator.pylines 160–174 (_missing_explicit_schema_outcome) — change returned keyword/code;src/adcp/validation/schema_errors.pyline 74 (build_adcp_validation_error_payload) — add a parallel builder or keyword-based routing;src/adcp/server/mcp_tools.pylines 3307–3320 and 3607–3614 — add dispatcher routing on the new keyword.Triaged by Claude Code. Session: https://claude.ai/code/session_01K6FZpjMxXcq542XLxCdaEz
Generated by Claude Code