Context
PR #3493 introduced the allOf \$ref to core/version-envelope.json pattern for fields that appear on every AdCP request and response. The pattern eliminates per-schema duplication (was 127 inline copies, now one source of truth).
Multiple other envelope-level fields exist as inline-per-schema definitions today and would benefit from the same factoring. This issue catalogs them and serves as a tracker for follow-up PRs.
Don't bundle. Each candidate has its own deprecation/migration story. Land them as separate additive PRs across 3.x.
Candidates
idempotency_key
- Currently inlined on mutating requests (
create_media_buy, update_media_buy, sync_creatives, etc.).
- ~50+ source files affected.
- Companion field
replayed (currently in core/protocol-envelope.json's payload contract) is the response-side correlation.
- Factor into
core/idempotency-envelope.json referenced via allOf from mutating-request schemas; keep replayed in the protocol envelope.
governance_context
- Already exists on
core/protocol-envelope.json for the transport-layer wrapper.
- The request-side shape (when a buyer presents an upstream-issued JWS token to a seller on a governed task) isn't envelope-factored — it appears inline on relevant request schemas.
- 3.1 makes governance verification MUST for sellers; this is the moment to factor cleanly.
context and ext
- Already
\$ref'd to core/context.json and core/ext.json, but referenced as inline properties (context: { \$ref: ... }) rather than allOf-composed.
- Inconsistent with the new envelope pattern.
- Migration is mechanical and additive — pull
context and ext into the shared envelope allOf, keep the per-schema properties empty for these fields. Wire-compatible.
replayed and other protocol-envelope payload fields
core/protocol-envelope.json describes the protocol-layer wrapper (context_id, task_id, status, message, payload, replayed, push_notification_config, governance_context, timestamp).
- The wrapper is added by the transport (MCP, A2A, REST), not the AdCP payload.
- Worth a re-read to confirm what belongs in the wrapper vs. in a payload-level envelope.
Plan
For each candidate above, file a separate PR that:
- Adds (or refactors) a
core/<name>-envelope.json schema.
- Removes the inline definitions from each affected request/response.
- Composes via
allOf: [{ \$ref: ... }] at the schema root.
- Confirms
npm run build:schemas, npm run test:schemas, npm run test:composed, npm run test:examples are green.
Use PR #3493 as the template — it shows the pattern end-to-end.
What this issue is NOT
Related
Context
PR #3493 introduced the
allOf \$reftocore/version-envelope.jsonpattern for fields that appear on every AdCP request and response. The pattern eliminates per-schema duplication (was 127 inline copies, now one source of truth).Multiple other envelope-level fields exist as inline-per-schema definitions today and would benefit from the same factoring. This issue catalogs them and serves as a tracker for follow-up PRs.
Don't bundle. Each candidate has its own deprecation/migration story. Land them as separate additive PRs across 3.x.
Candidates
idempotency_keycreate_media_buy,update_media_buy,sync_creatives, etc.).replayed(currently incore/protocol-envelope.json's payload contract) is the response-side correlation.core/idempotency-envelope.jsonreferenced viaallOffrom mutating-request schemas; keepreplayedin the protocol envelope.governance_contextcore/protocol-envelope.jsonfor the transport-layer wrapper.contextandext\$ref'd tocore/context.jsonandcore/ext.json, but referenced as inlineproperties(context: { \$ref: ... }) rather thanallOf-composed.contextandextinto the shared envelopeallOf, keep the per-schemapropertiesempty for these fields. Wire-compatible.replayedand other protocol-envelope payload fieldscore/protocol-envelope.jsondescribes the protocol-layer wrapper (context_id,task_id,status,message,payload,replayed,push_notification_config,governance_context,timestamp).Plan
For each candidate above, file a separate PR that:
core/<name>-envelope.jsonschema.allOf: [{ \$ref: ... }]at the schema root.npm run build:schemas,npm run test:schemas,npm run test:composed,npm run test:examplesare green.Use PR #3493 as the template — it shows the pattern end-to-end.
What this issue is NOT
Related
unevaluatedProperties: falsefor additional strictness on these envelopes)