Skip to content

feat(schema): add optional currency and total_budget to create/update media buy success responses#4417

Draft
bokelley wants to merge 1 commit into
mainfrom
claude/issue-4416-create-media-buy-currency-total-budget
Draft

feat(schema): add optional currency and total_budget to create/update media buy success responses#4417
bokelley wants to merge 1 commit into
mainfrom
claude/issue-4416-create-media-buy-currency-total-budget

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

Refs #4416

CreateMediaBuySuccess and UpdateMediaBuySuccess both lacked currency and total_budget in their properties declarations while get-media-buys-response.json required 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 every get_media_buys poll 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) to CreateMediaBuySuccess and UpdateMediaBuySuccess. Neither field is added to required. 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 currency and total_budget should be required in CreateMediaBuySuccess, particularly for proposal mode where both values are deterministic at creation time. Making them required is a breaking change (MAJOR bump — forces all create_media_buy sellers 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_budget as an object {amount, currency} (proposal mode only). The response flattens this into two sibling scalar fields — total_budget: number and currency: 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:

  • code-reviewer: approved — no blockers; fixed blocker re: total_budget.currency description ambiguity (request object vs. response scalar); 2 nits noted in PR body above
  • ad-tech-protocol-expert: approved — non-breaking per spec; field naming, types, and pattern match get-media-buys-response.json; optional-on-write vs. required-on-read is consistent with OpenRTB cur echo pattern

Triage-managed PR. This bot does not currently iterate on
review comments or PR conversation threads (only on the source
issue). To unblock:

  • Push fixup commits directly: gh pr checkout <num>
    fix → push.
  • Or re-trigger: comment /triage execute on the source
    issue.

See #3121
for context.

Session: https://claude.ai/code/session_01QH73KwxYwPBV4uF551zAE1


Generated by Claude Code

… 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
@bokelley bokelley added the claude-triaged Issue has been triaged by the Claude Code triage routine. Remove to re-triage. label May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-triaged Issue has been triaged by the Claude Code triage routine. Remove to re-triage.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants