Skip to content

feat(schema): bills_through_adcp capability + BILLING_OUT_OF_BAND error (closes #2881, #2882)#4561

Merged
bokelley merged 1 commit into
mainfrom
bokelley/2881-2882-creative-billing-schema
May 15, 2026
Merged

feat(schema): bills_through_adcp capability + BILLING_OUT_OF_BAND error (closes #2881, #2882)#4561
bokelley merged 1 commit into
mainfrom
bokelley/2881-2882-creative-billing-schema

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

Summary

Two strictly additive schema changes spawned by #2879 (which softened creative-ad-server conformance for agents that bill out of band). Both close loops that #2879 deliberately left open.

  • capabilities.creative.bills_through_adcp (boolean, default false/absent) on get-adcp-capabilities-response.json. Pre-call discriminator so buyer agents can pre-filter creative agents across a portfolio before establishing an account just to probe pricing. When true, buyers can expect pricing_options on list_creatives, pricing_option_id/vendor_cost on build_creative, and report_usage that accepts records. Closes spec: add bills_through_adcp capability to creative get_adcp_capabilities #2881.

  • BILLING_OUT_OF_BAND (recovery: terminal) on the error-code enum. The standard per-record report_usage rejection for accounts that bill via a non-AdCP channel. Distinct from BILLING_NOT_SUPPORTED (media-buy billing-value rejection) and BILLING_NOT_PERMITTED_FOR_AGENT (per-buyer-agent commercial gate) — this signals that the entire billing surface is offline for the account, not that a specific value or caller is rejected. The code itself is the discriminator; no error.details shape defined (mirroring CONFIGURATION_ERROR). Closes spec: standard error code for "agent does not accept usage records" #2882.

Investigation note: checked whether OPERATION_NOT_SUPPORTED existed as #2882 raised — it does not. BILLING_OUT_OF_BAND is the right choice on specificity grounds and not redundant.

Both follow the established 3.0.x drift policy: held-for-next-minor / 3.1. Adding an enum value is a wire change and ships in 3.1, not as a 3.0.x patch.

What this touches

  • static/schemas/source/protocol/get-adcp-capabilities-response.jsonbills_through_adcp added to the creative block alongside the existing boolean siblings.
  • static/schemas/source/enums/error-code.jsonBILLING_OUT_OF_BAND in enum, enumDescriptions, and enumMetadata (per the dual-surface pattern established in feat(schema): manifest.json + structured enumMetadata (closes #3725) #3738).
  • scripts/error-code-drift-dispositions.jsonheld-for-next-minor / 3.1 entry.
  • static/compliance/source/specialisms/creative-ad-server/index.yamlreport_usage narrative replaces the "vendor codes are fine today" placeholder with the standard code. No new hard assertions (the skip_if gating on the new capability is a separate follow-up — keeping fix(storyboards): make creative-ad-server pricing/billing optional #2879's softer conformance posture).
  • specs/creative-agent-pricing.md — Pre-account-discovery and Capabilities-change sections updated.
  • docs/protocol/get_adcp_capabilities.mdx — capability table row + example.
  • .changeset/2881-2882-creative-billing-schema.md

Test plan

  • npm run test:error-codes clean (87 storyboard files scanned against 67 canonical codes — +1)
  • npm run test:error-code-drift clean (22 ahead, all dispositioned)
  • npm run test:schemas — 525 schemas, 7 tests passed
  • npm run test:json-schema — 260 schema blocks validated
  • npm run test:storyboard-doc-parity clean
  • npm run test:examples clean
  • npm run test:unit — 887 tests pass
  • npm run typecheck clean
  • CI green

Backward compatibility

Strictly additive. No existing agents break — they remain in probe-to-discover mode until they opt into declaring bills_through_adcp. Buyers that haven't upgraded continue to probe; the response shape for report_usage is unchanged, only the errors[].code vocabulary is widened.

…ND error

PR #2879 softened the creative-ad-server conformance for agents that bill out
of band (flat license, SaaS contract, bundled enterprise — CM360 is the
canonical case) but left two loops open on the wire: buyers had no pre-call
way to discover which billing mode an agent was in, and there was no standard
error code for "this account does not accept usage records."

Both follow-ups are strictly additive:

- capabilities.creative.bills_through_adcp lets buyers pre-filter creative
  agents across a portfolio without first establishing an account just to
  probe pricing. Agents that don't declare it stay in the probe-to-discover
  mode buyers already tolerate.

- BILLING_OUT_OF_BAND is the per-record report_usage rejection for accounts
  that bill via a non-AdCP channel. Distinct from BILLING_NOT_SUPPORTED
  (media-buy billing-value rejection) and BILLING_NOT_PERMITTED_FOR_AGENT
  (per-agent commercial gate) — this signals that the entire billing surface
  is offline for the account, not that a specific value or caller is rejected.
  Recovery: terminal — auto-retry will not change the outcome.

Both codes are held-for-next-minor / 3.1 per the drift registry policy:
adding to an enum is a wire change against 3.0.x receivers.

Closes #2881, #2882. Builds on #2879.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spec: standard error code for "agent does not accept usage records" spec: add bills_through_adcp capability to creative get_adcp_capabilities

1 participant