Summary
create-media-buy-response.json and get-media-buys-response.json have inconsistent required arrays for what should be the same media buy object shape. A seller correctly implementing create_media_buy per its schema will Zod-fail get_media_buys validation on every poll step — and vice versa.
Schema diff (3.0.11)
| Field |
create-media-buy-response.json §CreateMediaBuySuccess |
get-media-buys-response.json §media_buys[i] |
required |
["media_buy_id", "packages"] |
["media_buy_id", "status", "currency", "total_budget", "packages"] |
currency |
not listed in properties |
required |
total_budget |
not listed in properties |
required |
created_at / updated_at |
not listed in properties |
listed (optional) |
Impact
A seller implementing deal_to_media_buy (create) and deal_to_media_buy_summary (list) using a single shared mapper will either:
- Strip
currency + total_budget correctly per the create schema → silently Zod-fail every get_media_buys poll step downstream
- Include
currency + total_budget per the list schema → emit fields not in the create schema
Identified during Wave 23.20.7 by a seller whose shared mapper applied the create schema uniformly to both endpoints. The get_media_buys cascade caused 63/128 storyboard score across multiple runs with no server-side errors — all failures were silent Zod rejections at the runner layer.
Expected behavior
currency and total_budget should be present in both schemas with consistent required status. Both responses represent the same media buy entity — buyers expect the same fields regardless of which operation returned it.
Suggested fix
Either:
- Add
currency and total_budget to create-media-buy-response.json properties + required array (preferred — buyers need these fields at creation time too)
- Or document explicitly that the two response shapes are intentionally different and why — so sellers know to use separate mappers
Labels
bug, schema, media-buy
Summary
create-media-buy-response.jsonandget-media-buys-response.jsonhave inconsistentrequiredarrays for what should be the same media buy object shape. A seller correctly implementingcreate_media_buyper its schema will Zod-failget_media_buysvalidation on every poll step — and vice versa.Schema diff (3.0.11)
create-media-buy-response.json§CreateMediaBuySuccessget-media-buys-response.json§media_buys[i]required["media_buy_id", "packages"]["media_buy_id", "status", "currency", "total_budget", "packages"]currencytotal_budgetcreated_at/updated_atImpact
A seller implementing
deal_to_media_buy(create) anddeal_to_media_buy_summary(list) using a single shared mapper will either:currency+total_budgetcorrectly per the create schema → silently Zod-fail everyget_media_buyspoll step downstreamcurrency+total_budgetper the list schema → emit fields not in the create schemaIdentified during Wave 23.20.7 by a seller whose shared mapper applied the create schema uniformly to both endpoints. The
get_media_buyscascade caused 63/128 storyboard score across multiple runs with no server-side errors — all failures were silent Zod rejections at the runner layer.Expected behavior
currencyandtotal_budgetshould be present in both schemas with consistentrequiredstatus. Both responses represent the same media buy entity — buyers expect the same fields regardless of which operation returned it.Suggested fix
Either:
currencyandtotal_budgettocreate-media-buy-response.jsonproperties +requiredarray (preferred — buyers need these fields at creation time too)Labels
bug, schema, media-buy