Skip to content

feat(media-buy): add shared budgets and bidding policy - #6088

Open
bokelley wants to merge 10 commits into
mainfrom
flexible-package-budgets
Open

feat(media-buy): add shared budgets and bidding policy#6088
bokelley wants to merge 10 commits into
mainfrom
flexible-package-budgets

Conversation

@bokelley

@bokelley bokelley commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Closes #6106

Summary

  • add a discriminated BudgetAllocation model with backward-compatible fixed allocation and seller-optimized shared budgets
  • add reusable media-buy/package BiddingPolicy blocks for explicit automatic delivery, manual bids, auction ceilings, average-cost controls, and ROAS controls
  • define aggregate/package pacing, complete-block inheritance, explicit automatic overrides, authored-scope-preserving readback, atomic placement validation, update clearing, and deterministic legacy migration
  • bind seller-optimized outcome controls to allocation goals, package overrides to package goals, and fixed defaults only to compatible package result units
  • use one media-buy currency for canonical monetary controls and source-declared value currencies for ROAS events
  • advertise bidding support by authored scope, allocation context, standalone mode, strength, and strength-qualified combination
  • add schema tests and independently capability-gated conformance for shared budgets, fixed cost binding, media-buy inheritance, and package automatic bidding

Motivation

AdCP 3.1 requires explicit package budgets and splits buyer price intent across package bid_price, pricing-option max_bid, and monetary optimization_goals targets. Platforms that optimize one campaign budget and strategy across multiple ad sets or line items cannot express that behavior without vendor extensions.

This gives 3.2 one portable placement story: objective functions stay in optimization_goals; budget allocation, pacing, and bidding execution policy live at the scope where they are authored.

Budget semantics

  • total_budget is the hard aggregate lifetime cap
  • package budget is a hard cap, never a current allocation; it may be omitted or cleared in seller-optimized mode
  • min_spend_target is soft and may be cleared independently
  • media-buy pacing governs aggregate spend; package/allocation pacing is subordinate
  • allocation goals operate across packages; package goals operate within a package
  • continuous seller allocation is delivery behavior and does not mutate revision/history
  • seller-optimized proposals use minimum/maximum percentages rather than exact allocations and can carry package pacing
  • fixed/default add_packages updates keep package budgets required; uncapped additions require explicit seller-optimized allocation context

Bidding semantics

  • media-buy bidding is a complete inherited default; package bidding is a complete override, never a field merge
  • {automatic: true} is an explicit authored policy; at package scope it disables inherited buyer controls, while omission still inherits
  • bid_amount is a manual auction bid; max_bid is the only hard per-auction ceiling
  • cost_per distinguishes average cap from target; roas distinguishes floor from target
  • seller-optimized media-buy controls bind to the allocation primary goal; package controls bind to package goals; fixed defaults require compatible result units
  • primary-goal ties resolve deterministically by array order
  • event cost-result compatibility includes resolved attribution windows; auction-unit identity includes canonical billing qualifiers
  • every canonical monetary amount uses the media-buy currency; selected pricing options must declare it
  • ROAS sources declare value_currencies; each buy consumes exact-currency event values and never converts them
  • capabilities distinguish fixed versus seller-optimized support and combination-only support without implying Cartesian products
  • unsupported placement fails atomically with BIDDING_PLACEMENT_CONFLICT
  • canonical and legacy policy cannot coexist on one effective package; mixed input fails with AMBIGUOUS_BIDDING_POLICY
  • legacy bid_price and monetary goal targets retain deterministic normalization during 3.2 migration

Validation

  • three expert passes: ad-tech protocol, buyer workflow/product, and implementation/conformance
  • 655-schema structural/reference validation
  • 154 focused composed-schema cases
  • documentation schema examples and JSON field audit
  • storyboard sample request/response, context, validation, action, dependency, and contradiction lints
  • oneOf audit, immutable-release, platform-agnostic, diff, and changeset checks
  • TypeScript typecheck

Notes

Daily/hourly caps remain out of scope; the new budget is a lifetime media-buy total. The bidding block represents numeric portfolio policy but not shared provider portfolio identity or lifecycle across media buys; that requires a future provider-neutral resource/reference.

@bokelley
bokelley marked this pull request as ready for review July 30, 2026 10:20
Comment thread docs/media-buy/task-reference/get_media_buys.mdx Outdated
Comment thread static/schemas/source/media-buy/package-request.json

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Escalate to human review

Escalate — gated schema paths require human/CODEOWNERS approval.

This PR modifies published protocol source under static/schemas/source/** (a deterministic hard approval gate) and review_decision is REVIEW_REQUIRED, not APPROVED. Per decision rule row 2, the outcome must be escalate until a real human/CODEOWNERS approval lifts the gate.

No blocking (critical/high) findings were reported. The reviewer classified the change as Normative (non-breaking): additive BudgetAllocation discriminated model, aggregate budget/pacing, package caps, a new capability flag, and a new update_budget_allocation action, with wire changes that are additive or relaxations, a correct minor changeset, and a properly discriminated oneOf. Two Medium coherence/validation gaps remain (see below) but do not on their own change the outcome — the gated-paths gate is the controlling trigger.

Gated files requiring human/CODEOWNERS review include: static/schemas/source/core/budget-allocation.json (added) and the modified media-buy.json, package.json, proposal.json, planned-delivery.json, product-allocation.json, optimization-goal.json, media-buy-features.json, index.json, plus the media-buy request/response schemas.

Medium findings for the human reviewer to weigh:

  • docs/media-buy/task-reference/get_media_buys.mdx:84 — packages[].pacing added to response but undocumented in the package table (schema↔docs coherence gap).
  • static/schemas/source/media-buy/package-request.json:47 — budget no longer required on new_packages[] for fixed-allocation buys.

Once a CODEOWNERS/human approval sets review_decision to APPROVED, this can fall through to the normal table (no blocking findings present).

Medium findings

  • docs/media-buy/task-reference/get_media_buys.mdx:84 — packages[].pacing added to get-media-buys-response but undocumented in get_media_buys package table
  • static/schemas/source/media-buy/package-request.json:47 — budget no longer required on new_packages[] for fixed-allocation buys

Why human review

  • Touches gated protocol source under static/schemas/source/** (e.g. budget-allocation.json, media-buy.json, proposal.json, package.json) — hard approval gate; review_decision is REVIEW_REQUIRED, not APPROVED. Human/CODEOWNERS review required.
  • Two medium schema↔docs coherence/validation gaps to verify: get_media_buys.mdx:84 (packages[].pacing undocumented) and package-request.json:47 (budget no longer required on new_packages[] for fixed allocation).
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/budget-allocation.json (added) matches static/schemas/source/**; static/schemas/source/core/media-buy-features.json (modified) matches static/schemas/source/**; static/schemas/source/core/media-buy.json (modified) matches static/schemas/source/**; static/schemas/source/core/optimization-goal.json (modified) matches static/schemas/source/**; static/schemas/source/core/package.json (modified) matches static/schemas/source/**; static/schemas/source/core/planned-delivery.json (modified) matches static/schemas/source/**; static/schemas/source/core/product-allocation.json (modified) matches static/schemas/source/**; static/schemas/source/core/proposal.json (modified) matches static/schemas/source/**; static/schemas/source/enums/media-buy-valid-action.json (modified) matches static/schemas/source/**; static/schemas/source/index.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/create-media-buy-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/create-media-buy-response.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-response.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buys-response.json (modified) matches static/schemas/source/**; static/sc

…(truncated)…

@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Jul 30, 2026
@bokelley bokelley changed the title feat(media-buy): add seller-optimized package budgets feat(media-buy): add shared budgets and bidding policy Jul 30, 2026
@aao-secretariat

Copy link
Copy Markdown
Contributor

Ladon cannot review this PR until merge conflicts are resolved.

Comment thread static/schemas/source/media-buy/package-update.json Outdated

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Escalate to human review

Escalate — gated protocol source under a hard approval gate, review_decision is not APPROVED.

This PR modifies static/schemas/source/** (gated paths), and review_decision is unknown/not APPROVED. Per decision-table row 2, the hard approval gate is not satisfied and the outcome must be escalate — Ladon cannot auto-approve gated protocol source until a human/CODEOWNERS approval is recorded.

Iteration credit: Both prior medium findings are resolved this pass (no packages[].pacing in get-media-buys-response.json; budget still required in package-request.json). The BiddingPolicy work is coherent and well-tested — mutual exclusion via not.anyOf, deprecated-not-removed bid_price/max_bid, type-const-discriminated execution oneOf, matching docs across create/get/update, new error codes, and composed/AJV coverage. This is a net improvement over the prior run.

Medium findings (surfaced, non-blocking):

  • static/schemas/source/media-buy/package-update.json:202 — bidding-conflict guards reject an explicit bidding:null clear, wrongly rejecting a legit legacy-migration update. Worth fixing but does not itself block.

Escalation reasons:

  • Gated paths under static/schemas/source/** (e.g. bidding-policy.json, budget-allocation.json, media-buy.json, proposal.json) touched; review_decision is not APPROVED. Human/CODEOWNERS review required.
  • New protocol fields, new error codes (BIDDING_PLACEMENT_CONFLICT, AMBIGUOUS_BIDDING_POLICY), and new enum values are additive/normative surface changes on the published protocol; ratification is a human act.

Medium findings

  • static/schemas/source/media-buy/package-update.json:202 — package-update bidding guards reject an explicit bidding:null clear

Why human review

  • Touches gated protocol source under static/schemas/source/** (bidding-policy.json, budget-allocation.json, media-buy.json, proposal.json, package.json, and others) — hard, non-overridable approval gate; review_decision is not APPROVED, so Ladon cannot auto-approve. Human/CODEOWNERS review required.
  • Adds new protocol fields, new error codes, and new enum values to the published AdCP surface — normative/additive spec changes whose ratification is a human act.
  • One medium to verify during human review: static/schemas/source/media-buy/package-update.json:202 — bidding-conflict guards reject an explicit bidding:null clear, blocking a legit legacy-migration update.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/bidding-policy.json (added) matches static/schemas/source/**; static/schemas/source/core/budget-allocation.json (added) matches static/schemas/source/**; static/schemas/source/core/media-buy-features.json (modified) matches static/schemas/source/**; static/schemas/source/core/media-buy.json (modified) matches static/schemas/source/**; static/schemas/source/core/optimization-goal.json (modified) matches static/schemas/source/**; static/schemas/source/core/package.json (modified) matches static/schemas/source/**; static/schemas/source/core/planned-delivery.json (modified) matches static/schemas/source/**; static/schemas/source/core/pricing-option.json (modified) matches static/schemas/source/**; static/schemas/source/core/product-allocation.json (modified) matches static/schemas/source/**; static/schemas/source/core/proposal.json (modified) matches static/schemas/source/**; static/schemas/source/enums/error-code.json (modified) matches static/schemas/source/**; static/schemas/source/enums/media-buy-valid-action.json (modified) matches static/schemas/source/**; static/schemas/source/index.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/create-media-buy-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/create-media-buy-response.json (modified) matches static/schemas/source/**; static/s

…(truncated)…

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Escalate to human review

Escalate — gated protocol-source paths require human/CODEOWNERS approval that is not yet recorded.

This is a subsequent pass on the shared-budgets / bidding-policy PR. Both prior Medium findings are now resolved:

  • get_media_buys.mdx now documents packages[].pacing / min_spend_target / bidding (get_media_buys.mdx:674-681) matching get-media-buys-response.json.
  • The package-request budget-removal is re-guarded by the create-media-buy-request anyOf fixed branch (create-media-buy-request.json:2008-2099) and the update-media-buy-request new_packages conditional (update-media-buy-request.json:2510-2535), with rejection tests at composed-schema-validation.test.cjs:2841/2859/2875.

Reviewer reports no new blocking or Medium findings in the delta. The diff is mechanically clean. However, this PR modifies/adds files under static/schemas/source/** — a hard, non-overridable approval gate — and review_decision is not APPROVED (unknown/none). Per decision-table row 2, the gate is not satisfied and the outcome must be escalate. A human/CODEOWNERS approval must be recorded before this can merge. This also carries new protocol surface (new fields, new bidding-policy / budget-allocation schemas, new conformance scenarios), which under the constitution's breaking-class posture likewise requires human ratification rather than auto-approval.

Escalation reasons

  • Touches gated protocol source under static/schemas/source/** (e.g. bidding-policy.json, budget-allocation.json, media-buy.json, proposal.json, package.json) — hard approval gate; review_decision is not APPROVED. Human/CODEOWNERS review required.
  • Adds new normative protocol surface (new fields, new schemas, new conformance scenarios) — spec ratification is a human act, not auto-approvable.

Why human review

  • Touches gated protocol source under static/schemas/source/** (bidding-policy.json, budget-allocation.json, media-buy.json, proposal.json, package.json, and 20+ others) — hard approval gate; review_decision is not APPROVED (unknown/none). Human/CODEOWNERS review required before merge.
  • Adds new normative protocol surface (new bidding-policy and budget-allocation schemas, new fields, new capability-gated conformance scenarios) — spec ratification is a human act and is never auto-approved absent an APPROVED review.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/bidding-policy.json (added) matches static/schemas/source/**; static/schemas/source/core/budget-allocation.json (added) matches static/schemas/source/**; static/schemas/source/core/media-buy-features.json (modified) matches static/schemas/source/**; static/schemas/source/core/media-buy.json (modified) matches static/schemas/source/**; static/schemas/source/core/optimization-goal.json (modified) matches static/schemas/source/**; static/schemas/source/core/package.json (modified) matches static/schemas/source/**; static/schemas/source/core/planned-delivery.json (modified) matches static/schemas/source/**; static/schemas/source/core/pricing-option.json (modified) matches static/schemas/source/**; static/schemas/source/core/product-allocation.json (modified) matches static/schemas/source/**; static/schemas/source/core/proposal.json (modified) matches static/schemas/source/**; static/schemas/source/enums/error-code.json (modified) matches static/schemas/source/**; static/schemas/source/enums/media-buy-valid-action.json (modified) matches static/schemas/source/**; static/schemas/source/index.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/create-media-buy-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/create-media-buy-response.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-response.json (modified) matches static/schemas/source/**; static/schemas/s

…(truncated)…

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Escalate to human review

Escalate — gated protocol source under hard approval gate; human/CODEOWNERS review required.

This PR adds new normative protocol surface to static/schemas/source/** (new bidding-policy.json and budget-allocation.json schemas, new fields, new error codes, and new capability-gated conformance scenarios). Under this repo's constitution, adding new normative protocol surface — new schemas, new fields, new enum/error codes — is a spec-ratification act that is never auto-approved.

Decision-table trigger (row 2): gated_paths: true AND review_decision is not APPROVED (unknown/none). This is a hard, deterministic, code-enforced gate — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

Reviewer findings: none. The delta since the prior pass only adds two well-formed disposition entries (AMBIGUOUS_BIDDING_POLICY, BIDDING_PLACEMENT_CONFLICT) to scripts/error-code-drift-dispositions.json — both held-for-next-minor / target_version 3.2, present in the source enum, satisfying the lint contract. No new critical/high/medium findings. The prior escalate stands purely on the unsatisfied gate, not on a fresh defect.

Escalation reasons

  • Touches gated protocol source under static/schemas/source/** (bidding-policy.json, budget-allocation.json, media-buy.json, proposal.json, package.json, pricing-options/*, and 20+ others) — hard approval gate; review_decision is not APPROVED. Human/CODEOWNERS review required before merge.
  • Adds new normative protocol surface (new schemas, new fields, new error codes, new conformance scenarios) — spec ratification is a human act and is never auto-approved absent an APPROVED review.

Once a human/CODEOWNERS APPROVED review is recorded, this clean diff can fall through to normal approval.

Why human review

  • Touches gated protocol source under static/schemas/source/** (bidding-policy.json, budget-allocation.json, media-buy.json, proposal.json, package.json, pricing-options/*, and 20+ others) — hard approval gate; review_decision is not APPROVED (unknown/none). Human/CODEOWNERS review required before merge.
  • Adds new normative protocol surface (new bidding-policy and budget-allocation schemas, new fields, new error codes, new capability-gated conformance scenarios) — spec ratification is a human act and is never auto-approved absent an APPROVED review.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/bidding-policy.json (added) matches static/schemas/source/**; static/schemas/source/core/budget-allocation.json (added) matches static/schemas/source/**; static/schemas/source/core/media-buy-features.json (modified) matches static/schemas/source/**; static/schemas/source/core/media-buy.json (modified) matches static/schemas/source/**; static/schemas/source/core/optimization-goal.json (modified) matches static/schemas/source/**; static/schemas/source/core/package.json (modified) matches static/schemas/source/**; static/schemas/source/core/planned-delivery.json (modified) matches static/schemas/source/**; static/schemas/source/core/pricing-option.json (modified) matches static/schemas/source/**; static/schemas/source/core/product-allocation.json (modified) matches static/schemas/source/**; static/schemas/source/core/proposal.json (modified) matches static/schemas/source/**; static/schemas/source/enums/error-code.json (modified) matches static/schemas/source/**; static/schemas/source/enums/media-buy-valid-action.json (modified) matches static/schemas/source/**; static/schemas/source/index.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/create-media-buy-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/create-media-buy-response.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-del

…(truncated)…

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Escalate to human review

Escalate — hard approval gate on protocol source, and Breaking-class/normative-surface ratification requires human review.

This PR touches gated protocol source under static/schemas/source/** (added bidding-policy.json, budget-allocation.json; modified media-buy.json, proposal.json, package.json, pricing-options/*, enums/error-code.json, and 20+ others). gated_paths: true and review_decision: REVIEW_REQUIRED (not APPROVED), so the deterministic hard gate (decision-table row 2) is not satisfied.

The reviewer found no blocking findings: the package-update bid_price/bidding mutual-exclusion delta is correct (null bidding may accompany bid_price or a legacy monetary optimization-goal target for atomic migration; a non-null canonical bidding block still conflicts), the not.anyOf/if-then guards correctly gate on bidding being type:object, update_media_buy.mdx matches with no schema↔docs drift, and four added schema tests isolate the two accept and two reject paths. A changeset is present. Clean pass on content.

However, this adds new normative protocol surface (new schemas, new fields, new error codes, new capability-gated conformance scenarios) — spec ratification is a human act and is never auto-approved absent an APPROVED review. Prior decision was also escalate for the same gate. A human/CODEOWNERS approval is required before merge.

Escalation reasons

  • Gated file(s) under static/schemas/source/** with review_decision: REVIEW_REQUIRED (not APPROVED) — human/CODEOWNERS review required (decision row 2).
  • Adds new normative protocol surface (new bidding-policy/budget-allocation schemas, new fields, new error codes, new conformance scenarios) — spec ratification is a human act, never auto-approved absent an APPROVED review.

Why human review

  • Gated protocol source under static/schemas/source/** (bidding-policy.json, budget-allocation.json, media-buy.json, proposal.json, package.json, pricing-options/*, error-code.json, and 20+ others) is under a hard, non-overridable approval gate and review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS review required before merge.
  • Adds new normative protocol surface (new schemas, new fields, new error codes, new capability-gated conformance scenarios) — spec ratification is a human act and is never auto-approved absent an APPROVED review.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/bidding-policy.json (added) matches static/schemas/source/**; static/schemas/source/core/budget-allocation.json (added) matches static/schemas/source/**; static/schemas/source/core/media-buy-features.json (modified) matches static/schemas/source/**; static/schemas/source/core/media-buy.json (modified) matches static/schemas/source/**; static/schemas/source/core/optimization-goal.json (modified) matches static/schemas/source/**; static/schemas/source/core/package.json (modified) matches static/schemas/source/**; static/schemas/source/core/planned-delivery.json (modified) matches static/schemas/source/**; static/schemas/source/core/pricing-option.json (modified) matches static/schemas/source/**; static/schemas/source/core/product-allocation.json (modified) matches static/schemas/source/**; static/schemas/source/core/proposal.json (modified) matches static/schemas/source/**; static/schemas/source/enums/error-code.json (modified) matches static/schemas/source/**; static/schemas/source/enums/media-buy-valid-action.json (modified) matches static/schemas/source/**; static/schemas/source/index.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/create-media-buy-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/create-media-buy-response.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-response.jso

…(truncated)…

@bokelley

Copy link
Copy Markdown
Contributor Author

Issue #6106 proposes an explicit bidding.max_bid buyer-authored per-auction ceiling with deterministic bid_price normalization — same surface as this PR's BiddingPolicy; consider referencing or closing it from the PR body before merge.


Generated by Claude Code

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Escalate to human review

Escalate — gated protocol source under a hard, non-overridable approval gate with no human/CODEOWNERS approval on record.

Escalation reasons

  • This PR touches static/schemas/source/** (new files: bidding-policy-capability.json, bidding-policy.json, budget-allocation.json; plus 24+ modified core/media-buy/pricing-option/enum schemas) — a hard, deterministic approval gate. gated_paths: true and review_decision: REVIEW_REQUIRED (not APPROVED), so decision-table row 2 forces escalation. Human/CODEOWNERS review is required before merge.
  • Adds new normative protocol surface: new schemas, a new {automatic:true} bidding-policy mode, new fields, a single-media-buy-currency rule, scope-specific goal binding, new error codes, and new capability-gated conformance scenarios. Spec ratification is a human act and is never auto-approved absent an APPROVED review.

Blocking findings
None (no critical/high findings).

Medium findings
None. Schema↔docs coherence, changeset scope, and composed-schema tests are internally consistent per the reviewer.

Note: one Low finding (bidding-policy.json:1710 — cost_per description references a non-existent field name custom_type) — non-blocking, worth a quick doc fix.

This is a subsequent review of a prior escalate. The gate condition (gated paths + non-APPROVED review) still holds unchanged, so escalation persists on standing evidence rather than only sticky row 6.

Why human review

  • Gated protocol source under static/schemas/source/** (new bidding-policy-capability.json, bidding-policy.json, budget-allocation.json plus 24+ modified core/media-buy/pricing/enum schemas) is under a hard, non-overridable approval gate and review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS review required before merge (decision-table row 2).
  • Adds new normative protocol surface (new schemas, {automatic:true} bidding mode, single-media-buy-currency rule, scope-specific goal binding, new fields, new error codes, new capability-gated conformance scenarios) — spec ratification is a human act, never auto-approved absent an APPROVED review.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/bidding-policy-capability.json (added) matches static/schemas/source/**; static/schemas/source/core/bidding-policy.json (added) matches static/schemas/source/**; static/schemas/source/core/budget-allocation.json (added) matches static/schemas/source/**; static/schemas/source/core/media-buy-features.json (modified) matches static/schemas/source/**; static/schemas/source/core/media-buy.json (modified) matches static/schemas/source/**; static/schemas/source/core/optimization-goal.json (modified) matches static/schemas/source/**; static/schemas/source/core/package.json (modified) matches static/schemas/source/**; static/schemas/source/core/planned-delivery.json (modified) matches static/schemas/source/**; static/schemas/source/core/pricing-option.json (modified) matches static/schemas/source/**; static/schemas/source/core/product-allocation.json (modified) matches static/schemas/source/**; static/schemas/source/core/proposal.json (modified) matches static/schemas/source/**; static/schemas/source/enums/error-code.json (modified) matches static/schemas/source/**; static/schemas/source/enums/media-buy-valid-action.json (modified) matches static/schemas/source/**; static/schemas/source/index.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/create-media-buy-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/create-media-buy-response.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-response.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buys-response.json (modified) matches `static/schema

…(truncated)…

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Escalate to human review

Escalate — gated protocol source under a hard approval gate, review not yet APPROVED.

This PR modifies/adds protocol source under static/schemas/source/** (new bidding-policy-capability.json, bidding-policy.json, budget-allocation.json plus 25 modified core/media-buy/pricing/enum schemas). gated_paths is true and review_decision is REVIEW_REQUIRED, not APPROVED — decision-table row 2 forces escalation. Ladon cannot auto-approve gated protocol source until a human/CODEOWNERS approval is recorded.

Additionally, this PR adds new normative protocol surface (new schemas, {automatic:true} bidding mode, new fields, new error codes, new capability-gated conformance scenarios). Under the constitution's hard gate, spec ratification is a human act and is never auto-approved absent an APPROVED review.

Blocking findings: none — the reviewer's delta pass is clean. The single change since the prior pass (bidding-policy.json cost_per compatibility clause: custom_typecustom_event_name) was verified against optimization-goal.json and corrects a reference to a non-existent field.

The diff is mechanically clean and the developer's fix is correct, but the hard approval gate stands until a human/CODEOWNERS review is recorded.

Escalation reasons:

  • Gated protocol source under static/schemas/source/** (28 files) is under a hard, non-overridable approval gate and review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS review required (decision-table row 2).
  • Adds new normative protocol surface — spec ratification is a human act, never auto-approved absent an APPROVED review.

Why human review

  • Gated protocol source under static/schemas/source/** (new bidding-policy-capability.json, bidding-policy.json, budget-allocation.json plus 25 modified core/media-buy/pricing/enum schemas) is under a hard, non-overridable approval gate and review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS review required before merge (decision-table row 2).
  • Adds new normative protocol surface (new schemas, {automatic:true} bidding mode, new fields, new error codes, new capability-gated conformance scenarios) — spec ratification is a human act, never auto-approved absent an APPROVED review (constitution hard gate).
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/bidding-policy-capability.json (added) matches static/schemas/source/**; static/schemas/source/core/bidding-policy.json (added) matches static/schemas/source/**; static/schemas/source/core/budget-allocation.json (added) matches static/schemas/source/**; static/schemas/source/core/media-buy-features.json (modified) matches static/schemas/source/**; static/schemas/source/core/media-buy.json (modified) matches static/schemas/source/**; static/schemas/source/core/optimization-goal.json (modified) matches static/schemas/source/**; static/schemas/source/core/package.json (modified) matches static/schemas/source/**; static/schemas/source/core/planned-delivery.json (modified) matches static/schemas/source/**; static/schemas/source/core/pricing-option.json (modified) matches static/schemas/source/**; static/schemas/source/core/product-allocation.json (modified) matches static/schemas/source/**; static/schemas/source/core/proposal.json (modified) matches static/schemas/source/**; static/schemas/source/enums/error-code.json (modified) matches static/schemas/source/**; static/schemas/source/enums/media-buy-valid-action.json (modified) matches static/schemas/source/**; static/schemas/source/index.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/create-media-buy-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/create-media-buy-response.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-response

…(truncated)…

@bokelley

Copy link
Copy Markdown
Contributor Author

Re-reviewed current head 9b73f095 against the protocol concerns above. The latest revision addresses all four:

  • media-buy cost_per / roas now bind to the seller-optimized allocation goal, while package overrides bind to package goals and fixed inherited controls require compatible result units;
  • monetary fields now have one explicit media-buy denomination, with pricing options contributing auction units rather than a second currency;
  • bidding_policy is now a structured capability by scope, mode, strength, and supported combination instead of a blanket boolean; and
  • { automatic: true } provides the missing explicit package override of inherited bidding.

The conservative legacy normalization (cost_per and per_ad_spend become target, not stronger cap / floor semantics) also remains intact.

I do not see a remaining semantic blocker in the bidding/shared-budget contract. The current schema, docs, compliance scenarios, and migration story are coherent. This still needs the required human/CODEOWNERS ratification because it is normative protocol surface, but from a design review perspective I think it is ready for that approval.

Comment thread static/schemas/source/core/event-custom-data.json Outdated

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Escalate to human review

Escalate — gated protocol source under a hard, non-overridable approval gate, review not yet APPROVED.

This PR refines the 3.2 seller-optimized-budget/bidding work: capability partitioning (fixed/seller_optimized), value_currencies ROAS contract, deterministic priority tie-break, nullable seller-optimized package constraints, subordinate allocation pacing, and two new compliance scenarios. Schema and docs move together with no drift; the new supported_combinations oneOf is const-discriminated (kind), so the audit classifies it as discriminated (no oneOf regression). No critical/high findings.

Medium findings

  • static/schemas/source/core/event-custom-data.json:94 — value now requires currency on released event-custom-data (SHOULD→MUST flip riding a minor changeset)

Escalation reasons

  • Gated paths: 30+ files under static/schemas/source/** (3 added core schemas plus modified core/media-buy/pricing/enum schemas) are under the repo's hard, non-overridable approval gate, and review_decision is REVIEW_REQUIRED, not APPROVED (decision-table row 2). Human/CODEOWNERS approval is required before merge.
  • This adds new normative protocol surface (new schemas, new fields, new error codes, a SHOULD→MUST tightening on a released field, and new conformance scenarios) — spec ratification is a human act and is never auto-approved absent an APPROVED review.

The gate lifts once review_decision becomes APPROVED; the diff itself shows no blocking defects.

Medium findings

  • static/schemas/source/core/event-custom-data.json:94 — value now requires currency on released event-custom-data (SHOULD->MUST flip under minor changeset)

Why human review

  • Gated paths: 30+ files under static/schemas/source/** (added bidding-policy-capability.json, bidding-policy.json, budget-allocation.json plus modified core/media-buy/pricing/enum schemas) are under a hard, non-overridable approval gate and review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS review required before merge (decision-table row 2).
  • Adds new normative protocol surface (new schemas, new fields, new error codes, a released-field SHOULD->MUST tightening, new capability-gated conformance scenarios) — spec ratification is a human act, never auto-approved absent an APPROVED review.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/bidding-policy-capability.json (added) matches static/schemas/source/**; static/schemas/source/core/bidding-policy.json (added) matches static/schemas/source/**; static/schemas/source/core/budget-allocation.json (added) matches static/schemas/source/**; static/schemas/source/core/event-custom-data.json (modified) matches static/schemas/source/**; static/schemas/source/core/media-buy-features.json (modified) matches static/schemas/source/**; static/schemas/source/core/media-buy.json (modified) matches static/schemas/source/**; static/schemas/source/core/optimization-goal.json (modified) matches static/schemas/source/**; static/schemas/source/core/package.json (modified) matches static/schemas/source/**; static/schemas/source/core/planned-delivery.json (modified) matches static/schemas/source/**; static/schemas/source/core/pricing-option.json (modified) matches static/schemas/source/**; static/schemas/source/core/product-allocation.json (modified) matches static/schemas/source/**; static/schemas/source/core/proposal.json (modified) matches static/schemas/source/**; static/schemas/source/enums/error-code.json (modified) matches static/schemas/source/**; static/schemas/source/enums/media-buy-valid-action.json (modified) matches static/schemas/source/**; static/schemas/source/index.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/create-media-buy-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/create-media-buy-res

…(truncated)…

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Escalate to human review

Escalate — gated schema paths require human/CODEOWNERS approval.

This PR touches 30+ files under static/schemas/source/**, a hard, non-overridable approval gate (gated_paths: true), and review_decision is not APPROVED (unknown/none). Decision-table row 2 forces escalate — Ladon cannot auto-approve gated schema changes until a real human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

Additionally, this adds new normative protocol surface (new schemas: bidding-policy, bidding-policy-capability, budget-allocation; new fields; new error codes; new capability-gated conformance scenarios). Spec ratification is a human act and is never auto-approved absent an APPROVED review (per repo governance hard gate on breaking/normative-class changes).

Iteration credit: The prior run's single medium finding (event-custom-data.json SHOULD→MUST tightening under a minor changeset) has been resolved. The reviewer confirms the delta is a clean walk-back: the dependencies: {value: ["currency"]} block was removed so { value: 25 } validates again; net effect versus base is description-only plus the additive value_currencies opt-in, with docs and the composed-schema test moved to the same conditional model. No new blocking or medium findings surfaced in this run.

The escalation persists purely on the gated-paths / normative-surface gate, not on any code defect.

Blocking findings: none.
Medium findings: none.

Why human review

  • Gated paths: 30+ files under static/schemas/source/** (new bidding-policy.json, bidding-policy-capability.json, budget-allocation.json plus modified core/media-buy/pricing/enum schemas) are under a hard, non-overridable approval gate and review_decision is not APPROVED — human/CODEOWNERS review required before merge (decision-table row 2).
  • Adds new normative protocol surface (new schemas, new fields, new error codes, new capability-gated conformance scenarios). Per repo governance, spec ratification is a human act and is never auto-approved absent an APPROVED review.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/bidding-policy-capability.json (added) matches static/schemas/source/**; static/schemas/source/core/bidding-policy.json (added) matches static/schemas/source/**; static/schemas/source/core/budget-allocation.json (added) matches static/schemas/source/**; static/schemas/source/core/event-custom-data.json (modified) matches static/schemas/source/**; static/schemas/source/core/media-buy-features.json (modified) matches static/schemas/source/**; static/schemas/source/core/media-buy.json (modified) matches static/schemas/source/**; static/schemas/source/core/optimization-goal.json (modified) matches static/schemas/source/**; static/schemas/source/core/package.json (modified) matches static/schemas/source/**; static/schemas/source/core/planned-delivery.json (modified) matches static/schemas/source/**; static/schemas/source/core/pricing-option.json (modified) matches static/schemas/source/**; static/schemas/source/core/product-allocation.json (modified) matches static/schemas/source/**; static/schemas/source/core/proposal.json (modified) matches static/schemas/source/**; static/schemas/source/enums/error-code.json (modified) matches static/schemas/source/**; static/schemas/source/enums/media-buy-valid-action.json (modified) matches static/schemas/source/**; static/schemas/source/index.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/create-media-buy-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/create-media-buy-response.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-response.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buys-response.json (mo

…(truncated)…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ladon/needs-human-review Ladon has escalated this PR for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFC(media-buy): add an explicit buyer-authored per-auction bid cap

1 participant