Conversation
…capabilities shim Fixes #379. DecisioningCapabilities gains a supported_billing field (default []) that flows into the auto-generated get_adcp_capabilities response as account.supported_billing, satisfying the spec requirement for media_buy sellers. PlatformHandler now has a get_adcp_capabilities shim that derives supported_protocols from claimed specialisms; validate_platform warns at boot when a sales-* platform omits supported_billing. https://claude.ai/code/session_01HxAzzPmnEpEfexwZW3Wksj
5 tasks
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.
Summary
Fixes #379.
DecisioningCapabilitieshad nosupported_billingfield, andPlatformHandlerhad noget_adcp_capabilitiesshim at all (fell through to_not_supported()). Every sales-* seller was either returning a 501 or emitting a capabilities response that failsget-adcp-capabilities-response.jsonschema validation — the schema requiresaccount.supported_billing(minItems: 1) for any seller claiming themedia_buyprotocol.DecisioningCapabilitiesgainssupported_billing: list[str](default[], non-breaking)PlatformHandlergains aget_adcp_capabilitiesshim that auto-derivessupported_protocolsfrom claimed specialisms via a newSPECIALISM_TO_PROTOCOLmap and projectsaccount.supported_billingwhen non-emptyvalidate_platform()now emits aUserWarningat server boot when a sales-* platform declares nosupported_billingcapabilities_response()gains anaccountkwarg (non-breaking, keyword-only)supported_billing=["operator"]Pre-PR review notes
Two expert subagents reviewed the diff before this PR was opened. Issues addressed and left open:
Fixed (post-review):
audience-syncfromSPECIALISM_TO_PROTOCOL. Both reviewers flagged this: an audience-sync-only agent cannot fulfillget_products/create_media_buy/ etc., so advertisingmedia_buyinsupported_protocolswithout those tools is a buyer-visible lie. A co-claimed sales-* specialism drives themedia_buydeclaration when needed.Open for human reviewer decision:
UserWarningvs hard fail for emptysupported_billingon sales-* platforms. The protocol expert argues for a hard fail (consistent with the governance specialism precedent in the same function). The code reviewer considers a soft warn appropriate here. The spec language is "should" not "must" (schema lines 133–135), which is the basis for the soft warn. The PR usesUserWarningwith an explicit "will become a hard fail in a future minor" note. Reviewer should decide: promote toAdcpErrornow, or accept the staged approach?idempotency={"supported": False}default. The shim always emits this to satisfyadcp.idempotency requiredin the schema. The protocol expert noted adopters who want to upgrade tosupported: truemust override the entireget_adcp_capabilitiesmethod; a future improvement could expose a lighter hook. Out of scope for this fix; noted in the docstring.Triage-managed PR
This PR was opened by the automated triage agent in response to issue #379 filed by @bokelley.
[]; new shim fills a gap that was returning 501)ruff check✓,mypy --ignore-missing-imports✓,pytest99/99 ✓https://claude.ai/code/session_01HxAzzPmnEpEfexwZW3Wksj
Generated by Claude Code