Repository navigation
feat(media-buy): add structured product frequency-cap constraints - #7438
Conversation
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated schema-source paths require human/CODEOWNERS approval.
This PR modifies and adds files under static/schemas/source/**, which are under a hard, deterministic approval gate (gated_paths: true). The current review_decision is REVIEW_REQUIRED, not APPROVED, so per decision-table row 2 the outcome must be escalate — the gate is not satisfied by an automated review.
The reviewer found no Critical/High/Medium issues: the change is a clean additive Normative change adding scoped frequency-cap support (package vs. shared MediaBuy-root caps) on the 3.2 main line, with a correct minor changeset, verified schema↔docs coherence, backward-compatible legacy overlay_support.frequency_cap boolean, well-formed nullable/not constructs (no new undiscriminated oneOf), and no dist/** edits. Diff quality is not the blocker — the gate is.
Escalation reasons
- Touches gated protocol-source files under
static/schemas/source/**(e.g.core/media-buy.json,core/product.json, newcore/frequency-cap-*.json) whilereview_decisionisREVIEW_REQUIRED. Human/CODEOWNERS approval is required before merge.
No blocking findings from the reviewer; the escalation is purely the unsatisfied approval gate. Once a human/CODEOWNERS approval lands (review_decision: APPROVED), this clean diff can fall through to approval.
Why human review
- Gated paths: PR modifies/adds files under static/schemas/source/** while review_decision is REVIEW_REQUIRED (not APPROVED) — human/CODEOWNERS review required before merge.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/canonical-media-buy-action-fields.json (modified) matches
static/schemas/source/**; static/schemas/source/core/canonical-media-buy-action.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/canonical-product.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-constraints.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-requirements.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-available-action.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-frequency-cap.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-support-requirements.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-support.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/package.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/product-identity.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/product.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/proposal.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/targeting-overlay-requirements.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/targeting-overlay-support.json (modified) matchesstatic/schemas/source/**; static/schemas/source/enums/canonical-media-buy-action.json (modified) matchesstatic/schemas/source/**; static/schemas/source/enums/media-buy-valid-action.json (modified) matchesstatic/schemas/source/**; static/schemas/source/media-buy/buy-products-request.json (modified) matchesstatic/schemas/source/**; static/schemas/source/media-buy/commercial-terms.json (modified) matchesstatic/schemas/source/**; static/schemas/source/media-buy/control-media-buy-request.json (modified) matchesstatic/schemas/source/**; static/schemas/source/media-buy/create-media-buy-request.json (modified) matchesstatic/schemas/source/**; s
…(truncated)…
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated schema paths require human/CODEOWNERS approval.
This PR modifies and adds numerous files under static/schemas/source/**, which is a hard, non-overridable approval gate (gated_paths: true). The current GitHub review decision is REVIEW_REQUIRED, not APPROVED, so decision-table row 2 fires: Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.
The reviewer's clean-delta pass found no critical/high/medium findings — the incremental change adds annotation-only title fields to array items subschemas across eight schema files, with no wire-shape, enum, const, required, or validation impact. This is a net-positive iteration on top of the prior escalated review. However, the escalation persists purely because of the unsatisfied gated-paths approval gate, not because of any code concern.
Escalation reasons
- PR modifies/adds files under
static/schemas/source/**whilereview_decisionisREVIEW_REQUIRED(notAPPROVED) — human/CODEOWNERS review required before merge. Affected files include the frequency-cap additions (frequency-cap-constraints.json,frequency-cap-requirements.json,media-buy-frequency-cap.json,media-buy-support*.json) and modifications across core/media-buy/enums/protocol schemas.
Once a human/CODEOWNERS approval is recorded, this PR would fall through to a normal approve on the current findings.
Why human review
- Gated paths: PR modifies/adds files under static/schemas/source/** while review_decision is REVIEW_REQUIRED (not APPROVED) — human/CODEOWNERS approval required before merge.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/canonical-media-buy-action-fields.json (modified) matches
static/schemas/source/**; static/schemas/source/core/canonical-media-buy-action.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/canonical-product.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-constraints.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-requirements.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-available-action.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-frequency-cap.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-support-requirements.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-support.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/package.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/product-identity.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/product.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/proposal.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/targeting-overlay-requirements.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/targeting-overlay-support.json (modified) matchesstatic/schemas/source/**; static/schemas/source/enums/canonical-media-buy-action.json (modified) matchesstatic/schemas/source/**; static/schemas/source/enums/media-buy-valid-action.json (modified) matchesstatic/schemas/source/**; static/schemas/source/media-buy/buy-products-request.json (modified) matchesstatic/schemas/source/**; static/schemas/source/media-buy/commercial-terms.json (modified) matchesstatic/schemas/source/**; static/schemas/source/media-buy/control-media-buy-request.json (modified) matchesstatic/schemas/source/**; sta
…(truncated)…
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated schema paths require human/CODEOWNERS approval.
This PR modifies and adds files under static/schemas/source/**, which is a hard, non-overridable approval gate (gated_paths: true). The current GitHub review_decision is REVIEW_REQUIRED, not APPROVED, so decision-table row 2 fires and the outcome must be escalate — Ladon cannot auto-approve regardless of how clean the diff is.
The reviewer's delta pass is clean: the changes since the prior review are a wire-preserving DRY refactor of the 3.2 frequency-cap schemas (inline enums/strings extracted into shared $ref components, two new allOf wrappers reproducing prior control-mode const and suppression-unit restrictions exactly). Verified identical enum sets, no oneOf introduced, no required/type flips, no schema↔docs drift, and test byte/definition-count assertions updated to match. No critical/high/medium findings.
Because there are no blocking findings, this is not request-changes — it is a pure gate escalation pending human/CODEOWNERS approval. The prior decision was also escalate for the same gated-paths reason. Once review_decision becomes APPROVED, this clean diff falls through to an approve.
Escalation reasons
- PR modifies/adds files under
static/schemas/source/**(hard approval gate) whilereview_decisionisREVIEW_REQUIRED, notAPPROVED. Human/CODEOWNERS approval required before merge. Gated files includecanonical-product.json,media-buy.json,product.json,proposal.json, the new frequency-cap core/enum schemas, and the media-buy request/response schemas.
Why human review
- Gated paths: PR modifies/adds files under static/schemas/source/** while review_decision is REVIEW_REQUIRED (not APPROVED) — human/CODEOWNERS approval required before merge.
- Protocol schema surface change (static/schemas/source/**) is subject to a hard, non-overridable approval gate that only lifts on a recorded human/CODEOWNERS APPROVED review.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/applicable-package-id.json (added) matches
static/schemas/source/**; static/schemas/source/core/canonical-media-buy-action-fields.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/canonical-media-buy-action.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/canonical-product.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-constraints.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-requirements.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-available-action.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-frequency-cap-requirement.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-frequency-cap-support.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-frequency-cap.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-support-requirements.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-support.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/package.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/product-identity.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/product.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/proposal.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/targeting-overlay-requirements.json (modified) matches `static/schemas/source
…(truncated)…
There was a problem hiding this comment.
Ladon verdict: Request changes
Request changes — 1 blocking finding.
Blocking findings
- static/schemas/source/core/error-details/action-not-allowed.json —
attempted_actionstill$refs the flatmedia-buy-valid-actionenum afterupdate_media_buy_frequency_capwas relocated into the new structuredmedia-buy-available-action-idanyOf union. The requiredattempted_actionfield can no longer representupdate_media_buy_frequency_cap, breaking the documented root-capACTION_NOT_ALLOWEDpayload (schema↔docs / wire-shape drift, high). Fix: repoint it atmedia-buy-available-action-id.json.
This is a high-severity finding on a load-bearing protocol wire shape, so decision-table row 1 fires (request-changes) ahead of the gated-paths escalation. Reviewer verified oneOf/anyOf audit (anyOf not walked; scalar union — clean), valid_actions/available_actions split, const→enum control-mode change, schema↔docs coherence elsewhere, and changeset scope (minor, unreleased beta line — appropriate). Note: this PR also touches gated paths under static/schemas/source/** with review_decision: REVIEW_REQUIRED, so human/CODEOWNERS approval remains required before merge regardless of the fix.
Blocking findings
- static/schemas/source/core/error-details/action-not-allowed.json — required attempted_action still $refs flat media-buy-valid-action enum, can no longer represent update_media_buy_frequency_cap; breaks documented root-cap ACTION_NOT_ALLOWED payload (spec drift, high). Repoint at media-buy-available-action-id.json.
Superseded by a later Ladon review that rechecked and resolved its blocking findings.
There was a problem hiding this comment.
Ladon verdict: Request changes
Request changes — 1 blocking finding.
Blocking findings
static/schemas/source/core/action-not-allowed.json— The requiredattempted_actionfield still$refs the flatmedia-buy-valid-actionenum, which cannot represent the PR's new root-cap actionupdate_media_buy_frequency_cap. This makes the documented root-capACTION_NOT_ALLOWEDpayload unrepresentable — schema↔spec drift on a load-bearing error path (high).
Notes
- The delta this pass (relocating
frequency-cap-duration-unit.jsonfromenums/tocore/) is clean:$idand all four$refsites were updated in step, no dangling references or index gap. Nice iteration. - The prior high blocker remains unresolved and applies to the full PR, so the request-changes verdict stands.
Note: This PR also touches gated paths (static/schemas/source/**) with review_decision not APPROVED, and introduces new fields/enum values on the published protocol surface — a breaking/normative-class change that requires human/CODEOWNERS ratification before merge regardless of the schema fix above.
Blocking findings
- static/schemas/source/core/action-not-allowed.json — required attempted_action $refs the flat media-buy-valid-action enum, cannot represent new root-cap action update_media_buy_frequency_cap, making documented ACTION_NOT_ALLOWED payload unrepresentable (high, spec drift)
Superseded by a later Ladon review that rechecked and resolved its blocking findings.
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated paths touched without an approving review.
This PR modifies/adds 40+ files under static/schemas/source/**, which is a deterministic hard approval gate (gated_paths: true). review_decision is unknown/none — not APPROVED — so per decision-table row 2 the gate is not satisfied and the outcome must be escalate.
Reviewer findings: Clean pass. The prior high blocker (error-details/action-not-allowed.json's attempted_action now $refs core/media-buy-available-action-id.json, making the root-cap ACTION_NOT_ALLOWED payload representable) is resolved. Both description sites reworded in step and a schema test locks the $ref. No new critical/high/medium findings. This is a net improvement over the prior request-changes.
Despite the clean diff, human/CODEOWNERS review is required because the schema source-of-truth files are under a hard approval gate. This is a frequency-cap capability addition (new fields, new enums, new error handling on the published protocol surface) — a substantive wire-shape change that a human must ratify before merge.
Escalation reason: Gated files under static/schemas/source/** were changed and review_decision is not APPROVED. A human/CODEOWNERS approval is required to lift the gate.
Why human review
- Gated paths hard gate: PR changes 40+ files under
static/schemas/source/**(protocol source of truth) andreview_decisionis notAPPROVED. Human/CODEOWNERS review is required to lift the gate. - Substantive protocol surface change (frequency-cap capability: new fields, new enums, new error code / action-not-allowed handling) — ratification of the wire-shape change is a human act.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/applicable-package-id.json (added) matches
static/schemas/source/**; static/schemas/source/core/canonical-media-buy-action-fields.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/canonical-media-buy-action.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/canonical-product.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-constraints.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-duration-unit.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-requirements.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-available-action-id.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-available-action.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-frequency-cap-requirement.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-frequency-cap-support.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-frequency-cap.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-support-requirements.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-support.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/package.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/product-identity.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/product.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/proposal.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/targeting-overlay-requirements.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/targeting-overlay-support.json (modified) matches `static/
…(truncated)…
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated protocol source-of-truth change requires human/CODEOWNERS approval.
This PR touches 40+ files under static/schemas/source/**, which is under a hard, deterministic approval gate (gated_paths: true), and the current review_decision is not APPROVED (unknown/none). Per decision rule row 2, the outcome must be escalate until a human/CODEOWNERS approval is recorded.
Separately, this is a substantive protocol surface change (frequency-cap capability: new fields, new enums, new error code / action-not-allowed handling). Ratification of the wire-shape change is a human act per the repo's breaking-class hard gate.
The reviewer's clean delta pass found no Critical/High/Medium findings — schema↔docs coherence, changeset presence (.changeset/add-scoped-frequency-cap-support.md), allOf + additionalProperties:false composition, and the compliance scenarios were all verified. The diff is mechanically clean, but a clean diff cannot lift a deterministic path gate; only review_decision: APPROVED can.
Escalation reasons
- Gated paths hard gate: 40+ files under
static/schemas/source/**(protocol source of truth) changed andreview_decisionis notAPPROVED. Human/CODEOWNERS review required to lift the gate. - Substantive protocol surface change (frequency-cap capability additions) — ratification is a human act.
Note on iteration: prior decision was also escalate; the developer has pushed a new head. The prior run had no actionable findings and this run also has none — the escalation persists solely because the gated-paths gate remains unsatisfied, not because of any new defect.
Why human review
- Gated paths hard gate: PR changes 40+ files under
static/schemas/source/**(protocol source of truth) and review_decision is not APPROVED — human/CODEOWNERS review required to lift the gate. - Substantive protocol surface change (frequency-cap capability: new fields, new enums, new error code / action-not-allowed handling) — ratification of the wire-shape change is a human act per the breaking-class hard gate.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/applicable-package-id.json (added) matches
static/schemas/source/**; static/schemas/source/core/canonical-media-buy-action-fields.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/canonical-media-buy-action.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/canonical-product.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-constraints.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-duration-unit.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-impression-constraints.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-interval-constraints.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-requirements.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-available-action-id.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-available-action.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-frequency-cap-capability.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-frequency-cap-counter-group.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-frequency-cap-requirement.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-frequency-cap-support.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-frequency-cap.json (added) matches `static/schemas/source/*
…(truncated)…
01514a2 to
86d4717
Compare
|
Ladon cannot review this PR until merge conflicts are resolved. |
86d4717 to
0c8c4f8
Compare
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated protocol-surface change requires human/CODEOWNERS approval.
This PR makes an additive Normative change to the protocol source of truth: structured product frequency-cap constraints (frequency_cap_support), constraint-aware discovery, and package-qualified update_frequency_caps via applicable_package_ids, leaving legacy frequency_cap: true untouched. The reviewer's pass is clean — schema↔docs coherence verified across specification/get_products/get_media_buys/get_adcp_capabilities, correct minor changeset for the additive surface, disjoint-and-baselined new oneOf schemas, identity-absence parity, and correct per-package counter modeling in the new compliance scenario. No Critical/High/Medium findings.
However, the decision table stops before row 9: this PR touches many files under static/schemas/source/**, which is a hard, non-overridable approval gate (gated_paths: true), and review_decision is not APPROVED. Row 2 fires → escalate. Ratification of a wire-shape change on the protocol source of truth is a human act; Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is. This is consistent with the prior escalate decision — no blocking findings have been introduced, and the gate simply awaits human sign-off.
Escalation reasons
- Gated paths hard gate: PR modifies/adds ~18 files under
static/schemas/source/**(protocol source of truth) andreview_decisionis not APPROVED — human/CODEOWNERS review required to lift the gate. - Protocol-surface change (frequency-cap capability: new fields, new enums) — ratification of the wire-shape change is a human act.
Why human review
- Gated paths hard gate: PR modifies/adds ~18 files under static/schemas/source/** (protocol source of truth incl. applicable-package-id.json, canonical-product.json, product.json, frequency-cap-*.json, get-adcp-capabilities-response.json) and review_decision is not APPROVED — human/CODEOWNERS review required to lift the gate.
- Substantive protocol-surface change (frequency-cap capability: new fields, new enums, package-qualified update semantics) — ratification of the wire-shape change is a human act, not an auto-approvable event.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/applicable-package-id.json (added) matches
static/schemas/source/**; static/schemas/source/core/canonical-media-buy-action-fields.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/canonical-product.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-constraints.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-duration-unit.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-impression-constraints.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-interval-constraints.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-requirements.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-available-action.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/package.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/product-identity.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/product.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/targeting-overlay-requirements.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/targeting-overlay-support.json (modified) matchesstatic/schemas/source/**; static/schemas/source/enums/frequency-cap-control-mode.json (added) matchesstatic/schemas/source/**; static/schemas/source/enums/frequency-cap-mutable-field.json (added) matches `static/schemas/so
…(truncated)…
|
Issue #7478 proposes consolidating the duration-unit enum — same surface as this PR (
If scope expansion would delay review, a Generated by Claude Code |
0c8c4f8 to
2053cac
Compare
|
Follow-up (
The merge conflict (per Ladon's note above) is the more urgent step here. Adding Generated by Claude Code |
2053cac to
e5d04fc
Compare
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated protocol-source change requires human/CODEOWNERS review.
This PR adds a product frequency-cap capability to the AdCP protocol surface: new overlay_support.frequency_cap_support, package-qualified update_frequency_caps availability via applicable_package_ids, new duration/reach-unit/control-mode/mutable-field enums, and constraint-aware discovery schemas. The reviewer's pass is clean — schema↔docs coherence holds across all seven touched docs, the minor changeset is correct for additive optional fields, the two new oneOf constraint schemas are disjoint and correctly baselined, and the compliance scenario ordering (ACTION_NOT_ALLOWED vs UNSUPPORTED_FEATURE) plus per-package counter readback were verified. No Critical/High/Medium findings.
However, this PR modifies/adds ~18 files under static/schemas/source/** — the protocol source of truth, which is under a hard, deterministic approval gate (gated_paths: true). review_decision is REVIEW_REQUIRED, not APPROVED. Per decision-table row 2, the gate is not satisfied and I cannot auto-approve regardless of how clean the diff is. Ratification of a wire-shape change to the published protocol surface is a human act. This matches the prior escalate decision.
Escalation reasons
- Gated paths hard gate: ~18 files under
static/schemas/source/**(incl.applicable-package-id.json,canonical-product.json,product.json,frequency-cap-*.json,get-adcp-capabilities-response.json, and new enums) added/modified withreview_decision: REVIEW_REQUIRED. Human/CODEOWNERS approval required to lift the gate. - Substantive additive protocol-surface change (new frequency-cap capability, new fields/enums, package-qualified update semantics) — human ratification of the wire-shape change is required even though the diff is mechanically clean.
Why human review
- Gated paths hard gate: PR adds/modifies ~18 files under static/schemas/source/** (protocol source of truth, incl. applicable-package-id.json, canonical-product.json, product.json, frequency-cap-*.json, get-adcp-capabilities-response.json, new enums) and review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS review required to lift the gate.
- Substantive additive protocol-surface change (frequency-cap capability: new fields, new enums, package-qualified update semantics) — ratification of the wire-shape change is a human act, not auto-approvable.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/applicable-package-id.json (added) matches
static/schemas/source/**; static/schemas/source/core/canonical-media-buy-action-fields.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/canonical-product.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-constraints.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-duration-unit.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-impression-constraints.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-interval-constraints.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-requirements.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-available-action.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/package.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/product-identity.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/product.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/targeting-overlay-requirements.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/targeting-overlay-support.json (modified) matches `
…(truncated)…
e5d04fc to
051c2fa
Compare
Closes #7430. Adds `Product.overlay_support.frequency_cap_support`, a structured, independently positive declaration for products whose package frequency-cap support is constrained or create-only, without changing the type or meaning of the legacy `frequency_cap: true` boolean. - Constraints are exact: each count or duration constraint is either an exhaustive preset list or an inclusive range, never both. - `mutable_fields` is the single mutability representation; `[]` means create-only and omission leaves update support undeclared. - Product fields omitted from `frequency_cap_support` inherit the seller-wide `media_buy.frequency_capping` declaration; requested window and suppression units match against the resolved unit list. - `required_overlay_support.frequency_cap_support` makes discovery constraint-aware; legacy `frequency_cap: true` satisfies every requirement. - `available_actions[]` may carry `applicable_package_ids` so heterogeneous buys can name which packages accept `update_frequency_caps`. - Adds the `frequency_cap_capability_updates` compliance scenario covering inherited-unit discovery, create-only rejection, mutable update, and read-back of independent package caps. Shared MediaBuy-level caps (#4240) are deliberately left to a follow-up PR. Co-Authored-By: Claude Fable 5.1 <[email protected]>
051c2fa to
6b4056d
Compare
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated-path approval gate not satisfied.
This PR adds/modifies ~18 files under static/schemas/source/** (the protocol source of truth) — new frequency-cap capability (new fields, new enums, package-qualified update semantics) plus applicable-package-id.json, canonical-product.json, product.json, get-adcp-capabilities-response.json and related core/enum schemas. This is a substantive additive Normative-class protocol-surface change.
The reviewer's pass is clean: additivity verified, correct minor changeset, duration-unit enum coherence, mutual-exclusion/identity guards, disjoint new oneOf schemas registered in the baseline, and schema↔docs coherence across five doc pages. No critical/high/medium findings.
However, gated_paths: true and review_decision: REVIEW_REQUIRED (not APPROVED). Under decision-table row 2, the hard, non-overridable approval gate is not satisfied, so the outcome must be escalate regardless of how clean the diff is. Ratification of a wire-shape change is a human/CODEOWNERS act.
Escalation reasons
- Gated paths:
static/schemas/source/**protocol source-of-truth files added/modified withreview_decision: REVIEW_REQUIRED— human/CODEOWNERS approval required to lift the gate. - Additive Normative protocol-surface change (frequency-cap capability) requires human ratification.
No blocking findings — this is a governance gate, not a code-correctness block. Once a human/CODEOWNERS approval is recorded, the gate lifts and this clean diff can approve.
Why human review
- Gated paths hard gate: PR adds/modifies ~18 files under static/schemas/source/** (protocol source of truth, incl. applicable-package-id.json, canonical-product.json, product.json, frequency-cap-*.json, get-adcp-capabilities-response.json, new enums) and review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS review required to lift the gate.
- Substantive additive Normative-class protocol-surface change (frequency-cap capability: new fields, new enums, package-qualified update semantics) — ratification of the wire-shape change is a human act, not auto-approvable.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/applicable-package-id.json (added) matches
static/schemas/source/**; static/schemas/source/core/canonical-media-buy-action-fields.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/canonical-product.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-constraints.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-duration-unit.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-impression-constraints.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-interval-constraints.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/frequency-cap-requirements.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/media-buy-available-action.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/package.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/product-identity.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/product.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/targeting-overlay-requirements.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/targeting-overlay-support.json (modified) matchesstatic/schemas/source/**; static/schemas/source/enums/frequency-cap-control-mode.json (added) matchesstatic/schemas/source/**; static/schemas/source/enums/frequency-cap-mutable-field.json (added) matchesstatic/schemas/source/**; static/schemas/source/enums/media-buy-valid-action.
…(truncated)…
… caps (#7494) * feat(training-agent): implement package and shared MediaBuy frequency caps Closes #7488. The three frequency-cap compliance scenarios from #7438 and #7449 were gated on capabilities the reference seller never advertised, so they had never executed. The training agent now implements the spec section "Frequency-cap scope and product support": - Advertise media_buy.frequency_capping and the complete executable media_buy.aggregate_frequency_capping domain (sales tenant and legacy capabilities handler). - Resolve product support with seller-wide inheritance for overlay_support.frequency_cap / frequency_cap_support and media_buy_support.frequency_cap (+ frequency_cap_constraints); default catalog products declare both legacy package support and shared-counter participation. - Discovery honours required_overlay_support.frequency_cap_support, required_media_buy_support, and exact media_buy_frequency_cap; returned products carry media_buy_support regardless of fields; proposals echo the bound root cap. - Create, buy, update, and control validate package caps against resolved product constraints and root caps against seller-wide plus every product, rejecting with UNSUPPORTED_FEATURE before any mutation and never clamping. Root caps replace or clear (null) without resetting counters; new_packages are checked against the resulting state; ineligible packages and non-mutable root caps return ACTION_NOT_ALLOWED before capability checks. - available_actions carries update_frequency_caps with applicable_package_ids for heterogeneous buys and update_media_buy_frequency_cap when every active product can change the root cap. - Proposal refinement clears an inherited root cap through remove_media_buy_frequency_cap, replaces it through criteria.media_buy_frequency_cap, and is unable when the revised mix cannot share it. - Delivery totals report reach and frequency at or below the tightest enforced cap. - Requests addressing a synced account by account_id reach the same media buy and fixture catalog as natural-form requests. Compliance: add media_buy_frequency_cap_updates; give the multi-package frequency-cap scenarios explicit bids after the first package (the runner only injects a bid for the first) and use affected_package_ids[*] for membership checks. Spec: state that a root-cap change without update_media_buy_frequency_cap returns ACTION_NOT_ALLOWED ahead of the capability check, and that mutable_fields governs changes to an existing cap. Co-Authored-By: Claude Fable 5.1 <[email protected]> * docs(media-buy): state frequency-cap check order explicitly for both cap levels The package-cap paragraph never stated that available_actions authorization runs before the capability check, so the root-cap sentence added earlier referenced a rule the spec did not make. State the order once for package caps (authorization, then capability, then accepted commercial terms) and have the root-cap paragraph apply the same order. Make the training agent honour that order for package caps on control_media_buy as well: the cap gate now runs ahead of the accepted- envelope REQUOTE_REQUIRED checks, so a cap that is both outside capability and outside accepted terms reports UNSUPPORTED_FEATURE. Add unit coverage for authorization-before-capability (out-of-range count on a create-only package, mixed request) and capability-before-terms, and a frequency_cap_capability_updates step that sends an out-of-range count to the create-only package and expects ACTION_NOT_ALLOWED. Co-Authored-By: Claude Fable 5.1 <[email protected]> --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
Summary
Closes #7430. Adds a structured, independently positive product declaration for constrained or create-only package frequency-cap support, without changing the type or meaning of the legacy
overlay_support.frequency_cap: trueboolean.This PR was re-scoped after review. The earlier revision bundled shared MediaBuy-level caps (#4240) and a further layer of precision (counter groups, step ranges, preset-plus-range intersection, a second mutability field). That roughly doubled the surface for no named integrator. This revision keeps the architecture (sibling field, not a union; exact constraints; location-based scope) and cuts the breadth:
frequency_cap_supportwith control modes, per units, exact count and per-unit interval constraints, create-only, constraint-aware discovery, rejection, read-back, package-qualifiedupdate_frequency_caps.mutable(onlymutable_fieldsremains;[]means create-only),step, preset-plus-range intersection rules, counter groups.frequency_cap,media_buy_support,aggregate_frequency_capping,update_media_buy_frequency_cap, proposal-refinement removal.What changes
Product.overlay_support.frequency_cap_supportmedia_buy.frequency_capping.required_overlay_support.frequency_cap_supportsupported_window_units). Legacyfrequency_cap: truesatisfies every requirement.available_actions[].applicable_package_idsupdate_frequency_caps.frequency_cap_capability_updatesscenario: inherited-unit discovery, create-only rejection, mutable update, read-back of two independent package caps.Review follow-ups already applied
main; the two measured MCP schema-count tests were re-pinned on top of main's values.oneOf; they are accepted intoscripts/oneof-discriminators.baseline.json(diff limited to those two entries).reject_create_only_updatenow changes the count to a value the create-only product accepts, so immutability is the only violation under test.mutable_fieldsmatches and that omitted window or suppression constraints inherit seller-wide units with no interval restriction; the "which field" table gained a buyer row for keeping a cap editable.frequency_cap: trueandfrequency_cap_supportare now mutually exclusive in both the support and requirement schemas (not: required both), which removes the "legacy wins if both appear" precedence rule and makes structured constraints always binding. The compliance scenario gained a negative step (reject_out_of_range_update, count outsideallowed_valuesmust returnUNSUPPORTED_FEATURE), andapplicable_package_idshas a verifier constraint that each id belongs to this buy.frequency_cap_supportalone; the spec says legacytrueimplies update support and how a create-only seller migrates, that a change to a field outsidemutable_fieldsreturnsUNSUPPORTED_FEATURE, that product values outside the seller-wide declaration are invalid, that a weekly window is seven days, and that a non-emptymutable_fieldsshould be paired withupdate_frequency_capsinallowed_actions.Testing
tests/targeting-aware-discovery.test.cjs23/23 andnpm run test:oneof-discriminatorsclean, including new vectors formutable_fields: [], preset/range mutual exclusion, nostep, and the unit-inheritance rule text.node tests/schema-validation.test.cjs35/35; JSON schema block validation; enum drift, identity coherence, deprecation metadata.npm run test:mcp-schema-projection29/29 with re-measured graph counts.npm run build:complianceclean; storyboard lint suite 229/229.Risks and follow-ups
mutable: falseshould emitmutable_fields: [].frequency_cap_supportis invisible as cap-capable to buyers that only understand the legacy boolean. That is the honest trade-off the mutual exclusion enforces.supported_window_unitsitem type (tracked in chore: clean up local pre-commit/pre-push failures and stale test artifacts found while landing frequency-cap PRs #7478).🤖 Generated with Claude Code