feat(schema): add optional currency and total_budget to create/update media buy success responses#4417
Draft
bokelley wants to merge 1 commit into
Draft
Conversation
… media buy success responses CreateMediaBuySuccess and UpdateMediaBuySuccess both lacked currency and total_budget in their properties declarations while get-media-buys-response required them, causing silent Zod validation failures for sellers using a shared mapper across create and list (issue #4416, Wave 23.20.7 63/128 score). https://claude.ai/code/session_01QH73KwxYwPBV4uF551zAE1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #4416
CreateMediaBuySuccessandUpdateMediaBuySuccessboth lackedcurrencyandtotal_budgetin their properties declarations whileget-media-buys-response.jsonrequired them. A seller using a shared mapper across create and list would either strip these fields (per the create schema) — causing silent Zod validation failures on everyget_media_buyspoll step — or include them as undocumented extensions. The Wave 23.20.7 compliance run reported 63/128 storyboard score with no server-side errors; all failures were Zod rejections at the runner layer.Non-breaking justification: Adds two optional properties (
currency: string,total_budget: number) toCreateMediaBuySuccessandUpdateMediaBuySuccess. Neither field is added torequired. Both schemas already have"additionalProperties": true, so existing sellers returning these fields were not previously breaking; this change makes the declared shape match reality. No existing implementation needs to change to stay conformant.Open question for @bokelley (not in this PR): The product expert argues
currencyandtotal_budgetshould be required inCreateMediaBuySuccess, particularly for proposal mode where both values are deterministic at creation time. Making them required is a breaking change (MAJOR bump — forces allcreate_media_buysellers to emit these fields). This PR takes the non-breaking path; the required-upgrade question is left for WG decision. See issue #4416 for full context.Note on request/response shape difference: The create request encodes
total_budgetas an object{amount, currency}(proposal mode only). The response flattens this into two sibling scalar fields —total_budget: numberandcurrency: string. The field descriptions document this explicitly to prevent mis-implementation.Milestone: Targets 3.1.0 (MINOR bump — additive optional fields on stable surface, not patch-eligible per the stable-schemas rule). Milestone not assigned; needs @bokelley to confirm milestone number.
Build note: Local build environment is missing
node_modules(pre-existing — unrelated to this PR). Schema JSON validated syntactically via Python. CI will run the full schema build.Pre-PR review:
total_budget.currencydescription ambiguity (request object vs. response scalar); 2 nits noted in PR body aboveget-media-buys-response.json; optional-on-write vs. required-on-read is consistent with OpenRTBcurecho patternSession: https://claude.ai/code/session_01QH73KwxYwPBV4uF551zAE1
Generated by Claude Code