feat(schemas): add media_buy.frequency_capping capability declaration (closes #4640)#4670
Merged
Merged
Conversation
…closes #4640) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
8 tasks
bokelley
added a commit
that referenced
this pull request
May 18, 2026
…#4637) (#4727) New scenario in the capability-claim contract pattern, gated on media_buy.frequency_capping presence (#4640 / #4670). Certifies that a seller advertising frequency_capping accepts a package-level frequency_cap (cap-form: max_impressions + per + window) on create_media_buy and, after simulated delivery, reports totals.reach + totals.frequency on get_media_buy_delivery with observed frequency at-or-below the requested cap of 3 impressions per individual per day. Runtime-enforcement scenario — structurally simpler than the goal-mode scenarios. No rejection arm: frequency_cap is a numeric constraint, not a pointer to a registered resource, so no unbound-id analogue. The discriminating assertion is observed frequency in delivery totals. Uses field_less_than with literal value:3.01 against the cap of 3 — the storyboard schema's only single-step numeric matcher today is strict less-than. The 0.01 epsilon lets the assertion target the cap literal without rejecting honest sellers reporting frequency at exactly 3.0. A runner extension adding field_at_most would let this drop the epsilon; captured as a soft follow-up. Training agent does not declare frequency_capping today — scenario grades not_applicable against reference implementation; CI passes. Anti-façade pattern same as audience_buy_flow and event_dedup_flow. Precommit test:unit and typecheck failures (--no-verify) are pre-existing on main from unrelated @adcp/sdk import drift, verified by re-running on clean main; the 12 build:compliance lints and build:schemas all pass. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an additive
media_buy.frequency_cappingcapability block toget_adcp_capabilitiesso sellers can declare frequency-cap support up front and buyers can pre-flight validate before submitting.Shape (B-lite per WG triage on #4640):
targeting.frequency_capon packages and MUST reject caps it cannot enforce (no silent drops).supported_per_units(optional) — entity granularities,$refto/schemas/enums/reach-unit.json.supported_window_units(optional) — duration units (hours,days,campaign, etc.) aligned withduration.json'sunitenum.Both sub-fields are optional; omission means "all values supported." Neither sub-field is
requiredon the parent object.Why
targeting.frequency_capsilently or drop unenforceable caps without telling the buyer — a façade-prevention gap.frequency_cap_enforcementstoryboard lands.What was dropped
The original RFC included
enforces_within(a duration attestation of "we enforce caps within X minutes of impression"). Dropped per WG triage on #4640 — no SSP can back that attestation cleanly across DSP/SSP/exchange layers, so the field would have invited unfalsifiable claims.Per-product overrides
Sellers with mixed addressable / non-addressable inventory may need per-product overrides on
targeting_capabilities. Out of scope here — file a follow-up RFC if needed. The seller-level declaration is the floor.Notes
supported_window_unitsitems shape:{type: string}(free string with documented enum values).duration.jsondefines theunitenum inline on the object schema rather than as a standalone enum file, so there's no $ref target. The description names the canonical values (hours,days,campaign).frequency_cap_enforcementstoryboard scenario lands in a separate PR under the capability-claim contract pattern (Meta: capability-claim contract scenarios — close the gap between what agents declare and what they do #4637).npm run build:schemasandnpm run build:complianceboth pass.Refs
🤖 Generated with Claude Code