What
schemas/cache/media-buy/create-media-buy-async-response-submitted.json (the submitted-branch schema referenced by create-media-buy-response.json's 3-branch anyOf) currently only lists context and ext in properties and describes itself as "usually empty or just context."
The main create-media-buy-response.json Branch 3 requires status: const "submitted" + task_id (string) — that's the AdCP async-task contract: a buyer needs a polling handle.
Impact
When a platform implementation forgets task_id in the submitted envelope, the SDK's per-tool output validator (FastMCP / jsonschema) surfaces a misleading error. jsonschema's deepest-schema-path heuristic picks the enum violation on status inside the success branch (depth 7) over the required: task_id violation in the submitted branch (depth 3). The reported error reads:
Output validation error: 'submitted' is not one of ['pending_creatives', 'pending_start', 'active', 'paused', 'completed', 'rejected', 'canceled']
…which sends implementors hunting in the wrong direction. Verified empirically with jsonschema on the union schema: adding task_id to the same payload validates cleanly.
If the submitted-branch schema itself enumerated status (const) and required task_id, the SDK's opt-in validate_response() (which routes on status="submitted" and validates against this file) would catch the missing task_id with a clear, branch-local message instead of letting it propagate to the union validator's misleading deepest-error pick.
Proposed change
In static/schemas/v1/media-buy/create-media-buy-async-response-submitted.json:
{
"properties": {
"status": { "const": "submitted" },
"task_id": { "type": "string", "description": "Polling handle for the async task" },
"context": { ... existing ... },
"ext": { ... existing ... }
},
"required": ["status", "task_id"]
}
(Adjust to match the spec repo's actual file location and existing structure.)
Surfaced by
adcp-client-python issue #570 — salesagent live GAM CRUD probe. The SDK side has been addressed in adcp-client-python#575 (return-type + alias) but the underlying schema gap is upstream.
What
schemas/cache/media-buy/create-media-buy-async-response-submitted.json(the submitted-branch schema referenced bycreate-media-buy-response.json's 3-branch anyOf) currently only listscontextandextinpropertiesand describes itself as "usually empty or just context."The main
create-media-buy-response.jsonBranch 3 requiresstatus: const "submitted"+task_id(string) — that's the AdCP async-task contract: a buyer needs a polling handle.Impact
When a platform implementation forgets
task_idin the submitted envelope, the SDK's per-tool output validator (FastMCP / jsonschema) surfaces a misleading error. jsonschema's deepest-schema-path heuristic picks the enum violation onstatusinside the success branch (depth 7) over therequired: task_idviolation in the submitted branch (depth 3). The reported error reads:…which sends implementors hunting in the wrong direction. Verified empirically with jsonschema on the union schema: adding
task_idto the same payload validates cleanly.If the submitted-branch schema itself enumerated
status(const) and requiredtask_id, the SDK's opt-invalidate_response()(which routes onstatus="submitted"and validates against this file) would catch the missingtask_idwith a clear, branch-local message instead of letting it propagate to the union validator's misleading deepest-error pick.Proposed change
In
static/schemas/v1/media-buy/create-media-buy-async-response-submitted.json:{ "properties": { "status": { "const": "submitted" }, "task_id": { "type": "string", "description": "Polling handle for the async task" }, "context": { ... existing ... }, "ext": { ... existing ... } }, "required": ["status", "task_id"] }(Adjust to match the spec repo's actual file location and existing structure.)
Surfaced by
adcp-client-python issue #570 — salesagent live GAM CRUD probe. The SDK side has been addressed in adcp-client-python#575 (return-type + alias) but the underlying schema gap is upstream.