Title: Tier 2 commercial-identity error codes don't conform to AdCP spec — cross-tenant oracle risk · Issue #375 · adcontextprotocol/adcp-client-python · GitHub
Open Graph Title: Tier 2 commercial-identity error codes don't conform to AdCP spec — cross-tenant oracle risk · Issue #375 · adcontextprotocol/adcp-client-python
X Title: Tier 2 commercial-identity error codes don't conform to AdCP spec — cross-tenant oracle risk · Issue #375 · adcontextprotocol/adcp-client-python
Description: Summary The Python SDK raises four non-spec error codes in src/adcp/decisioning/handler.py and src/adcp/decisioning/registry.py for the v3 buyer-agent gate. The codes the spec rejects are emitted today as load-bearing public wire errors:...
Open Graph Description: Summary The Python SDK raises four non-spec error codes in src/adcp/decisioning/handler.py and src/adcp/decisioning/registry.py for the v3 buyer-agent gate. The codes the spec rejects are emitted t...
X Description: Summary The Python SDK raises four non-spec error codes in src/adcp/decisioning/handler.py and src/adcp/decisioning/registry.py for the v3 buyer-agent gate. The codes the spec rejects are emitted t...
Opengraph URL: https://github.com/adcontextprotocol/adcp-client-python/issues/375
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Tier 2 commercial-identity error codes don't conform to AdCP spec — cross-tenant oracle risk","articleBody":"## Summary\n\nThe Python SDK raises four non-spec error codes in `src/adcp/decisioning/handler.py` and `src/adcp/decisioning/registry.py` for the v3 buyer-agent gate. The codes the spec rejects are emitted today as load-bearing public wire errors:\n\n- `AGENT_SUSPENDED`\n- `AGENT_BLOCKED`\n- `REQUEST_AUTH_UNRECOGNIZED_AGENT`\n- `INVALID_BILLING_MODEL`\n\n## Why it's wrong\n\nThe AdCP spec at `static/schemas/source/error-details/agent-permission-denied.json` (line 10) explicitly considers and rejects separate codes for these scenarios on cross-tenant onboarding-oracle grounds:\n\n> If a future major version elevates `suspended` / `blocked` to dedicated error codes (e.g., `AGENT_SUSPENDED` / `AGENT_BLOCKED`), those codes will carry their own details shapes and SHOULD NOT carry an explicit `scope` field — the code itself is the discriminator on that path.\n\nAnd, more importantly, the schema description and `error-handling.mdx` (Per-Agent Authorization Gate) require **identical observable channels** — code, message, headers, latency, side effects — between the unrecognized-agent path and the recognized-but-denied path. Distinct codes per status leak which `agent_url`s are onboarded with which sellers, enabling cross-tenant enumeration of commercial relationships.\n\n## Required fixes\n\n### Code surface\n\n- `AGENT_SUSPENDED` → `PERMISSION_DENIED` with `details.scope=\\\"agent\\\"`, `details.status=\\\"suspended\\\"`. Recovery is currently `transient`; the spec treats suspension as terminal-pending-onboarding (the agent MUST surface to a human; auto-retry is not a recovery path).\n- `AGENT_BLOCKED` → `PERMISSION_DENIED` with `details.scope=\\\"agent\\\"`, `details.status=\\\"blocked\\\"`, recovery terminal.\n- `REQUEST_AUTH_UNRECOGNIZED_AGENT` → `PERMISSION_DENIED` with `scope` **omitted** (must be indistinguishable on the wire from recognized-but-denied; the schema's omit-on-unestablished-identity rule).\n- `INVALID_BILLING_MODEL` → `BILLING_NOT_PERMITTED_FOR_AGENT` with `details.rejected_billing` (required) and optional `details.suggested_billing` per `error-details/billing-not-permitted-for-agent.json`. The current details payload also leaks `permitted_billing` (the full subset), which the billing schema explicitly forbids — \\\"MUST NOT carry the agent's full permitted-billing subset\\\".\n\n### Non-trivial requirement: parity, not just renaming\n\nThe spec's clamp is normative on **latency / headers / side-effects / observability parity** between:\n\n- the unrecognized-agent path (registry returned `None`)\n- the recognized-but-denied path (status `suspended`/`blocked`/unknown, or billing not permitted)\n\nThe current eager-raise pattern in `_resolve_buyer_agent` likely violates this:\n\n- The unrecognized-agent branch raises immediately after the registry returns `None`.\n- The suspended/blocked branches raise after a successful registry hit — measurable as a different latency profile.\n- Logging may differ (status-known branches log structured details; the unknown branch may not).\n\nA correct implementation needs to fold all four denial paths through a common emit point with deliberate latency padding, identical headers, and side-effect parity (audit-log shape, metrics tags). Worth a design pass — naive renaming will close the code mismatch but leave the oracle.\n\n## Refs\n\n- Spec: `static/schemas/source/error-details/agent-permission-denied.json` line 10 (the elevation note); `static/schemas/source/error-details/billing-not-permitted-for-agent.json` (the billing details shape).\n- SDK: `src/adcp/decisioning/handler.py` lines 377, 394, 407, 421; `src/adcp/decisioning/registry.py` line 350.\n\n## Notes\n\n- This is independent of the v3 reference seller PR (#373); the SDK's existing dispatch path has the bug regardless of which adopter is wiring the registry.\n- Suggested labels: `bug`, `security`, `spec-conformance` (only `bug` exists in this repo today; the security/spec-conformance labels would be useful additions).","author":{"url":"https://github.com/bokelley","@type":"Person","name":"bokelley"},"datePublished":"2026-05-03T00:15:14Z","url":"https://github.com/adcontextprotocol/adcp-client-python/issues/375"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a7604d0c-0e5b-6635-e8a0-abc9c2e2513b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EDCC:2564F:D32278:1179C32:6B00F8BC |
| html-safe-nonce | 39b16cd0336fb1c415c3bf26c1811c5323e6dc16afc778ee4fdd2cadee1b2b25 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRENDOjI1NjRGOkQzMjI3ODoxMTc5QzMyOjZCMDBGOEJDIiwidmlzaXRvcl9pZCI6IjY3NjU4ODg4Njk2NzkyOTg3NDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 948027ce151724fc15ff8ce3660ed3b9ffcbcba3d841441cc435fb5d312bfb5f |
| hovercard-subject-tag | issue:4370427152 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/adcontextprotocol/adcp-client-python/375/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5d3f4d6508d74bdf77dbbc1ace5740df7ee07b1fef19137a11308e9c11f125b5/adcontextprotocol/adcp-client-python/issues/375 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5d3f4d6508d74bdf77dbbc1ace5740df7ee07b1fef19137a11308e9c11f125b5/adcontextprotocol/adcp-client-python/issues/375 |
| og:image:alt | Summary The Python SDK raises four non-spec error codes in src/adcp/decisioning/handler.py and src/adcp/decisioning/registry.py for the v3 buyer-agent gate. The codes the spec rejects are emitted t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bokelley |
| hostname | github.com |
| expected-hostname | github.com |
| None | e208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187 |
| turbo-cache-control | no-preview |
| go-import | github.com/adcontextprotocol/adcp-client-python git https://github.com/adcontextprotocol/adcp-client-python.git |
| octolytics-dimension-user_id | 221690821 |
| octolytics-dimension-user_login | adcontextprotocol |
| octolytics-dimension-repository_id | 1090305973 |
| octolytics-dimension-repository_nwo | adcontextprotocol/adcp-client-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1090305973 |
| octolytics-dimension-repository_network_root_nwo | adcontextprotocol/adcp-client-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7dafd017fb7809a839c443dba08622af38e63c09 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width