feat(reporting): add time_based_views with a basis discriminator - #6621
feat(reporting): add time_based_views with a basis discriminator#6621bokelley wants to merge 2 commits into
Conversation
Autoplay/skippable video inventory (social, olv, in-feed, retail media video) counts views on a time basis that delivery reporting could not represent — quartile_data is percentage-based and views is a single billable-threshold scalar. time_based_views reports one entry per (threshold_seconds, basis). The view-threshold-basis enum separates play-time counting (platform 2s/6s video views) from in-view counting (IAB/MRC viewable video): materially different numbers at the same threshold that must not be conflated or summed. Capability-gated via the time_based_views token in available-metric. Implements RFC #6430. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated-path change requires human/CODEOWNERS approval.
This PR is an additive Normative change: it adds time_based_views (array of {threshold_seconds, basis, views}) to core/delivery-metrics.json, introduces a new view-threshold-basis enum (play_time|in_view), and adds an available-metric token. The reviewer found the schema, both media-buy delivery docs pages, the minor changeset, the $ref-based enum, and the new contract test all cohere — no oneOf regression, no breaking wire change, no schema↔docs drift. No Medium-or-worse findings.
However, this PR modifies/adds files under static/schemas/source/**, which is a deterministic hard approval gate (gated_paths: true). review_decision is not APPROVED, so the gate is not satisfied and the outcome cannot be approve (decision table row 2). Because the diff is otherwise clean with no blocking findings, this escalates for explicit human/CODEOWNERS sign-off rather than requesting changes.
Escalation reasons
gated_pathshard gate unsatisfied: PR touchesstatic/schemas/source/core/delivery-metrics.json,static/schemas/source/enums/available-metric.json, and addsstatic/schemas/source/enums/view-threshold-basis.json, andreview_decisionis notAPPROVED. Human/CODEOWNERS review of the protocol source-of-truth change is required before merge.
Why human review
- Gated path (static/schemas/source/**) modified/added with review_decision not APPROVED — human/CODEOWNERS review required for the protocol schema change (delivery-metrics.json, available-metric.json, new view-threshold-basis.json).
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/delivery-metrics.json (modified) matches
static/schemas/source/**; static/schemas/source/enums/available-metric.json (modified) matchesstatic/schemas/source/**; static/schemas/source/enums/view-threshold-basis.json (added) matchesstatic/schemas/source/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.
…ased-views # Conflicts: # docs/media-buy/media-buys/optimization-reporting.mdx # static/schemas/source/enums/available-metric.json
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — protocol schema change under a hard approval gate with no recorded human/CODEOWNERS approval.
This PR modifies and adds files under static/schemas/source/** (delivery-metrics.json, available-metric.json, sort-metric.json, and the new view-threshold-basis.json), which are gated paths. gated_paths is true and review_decision is not APPROVED (unknown/none), so the hard approval gate (decision-table row 2) is not satisfied and I cannot auto-approve.
The reviewer found no critical/high/medium findings in this delta: the added standard field is optional/RECOMMENDED-only (not a required/rename/retype/enum-value change), schema↔docs coherence holds, sort-metric correctly excludes time_based_views, and a changeset is present. The change appears clean and non-breaking — but the gate lifts only on a real human/CODEOWNERS approval, not because the diff looks safe.
Escalation reasons
- Gated path (
static/schemas/source/**) modified/added withreview_decisionnot APPROVED — human/CODEOWNERS review required for the protocol schema change (delivery-metrics.json, available-metric.json, sort-metric.json, new view-threshold-basis.json). - Sticky: prior decision was escalate for the same gate; the gate remains unsatisfied.
Why human review
- Gated path static/schemas/source/** modified/added (delivery-metrics.json, available-metric.json, sort-metric.json, new view-threshold-basis.json) with review_decision not APPROVED — human/CODEOWNERS approval required before this protocol schema change can merge.
- Prior decision was escalate for the same hard approval gate and the gate condition still holds (review_decision unknown/none).
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/delivery-metrics.json (modified) matches
static/schemas/source/**; static/schemas/source/enums/available-metric.json (modified) matchesstatic/schemas/source/**; static/schemas/source/enums/sort-metric.json (modified) matchesstatic/schemas/source/**; static/schemas/source/enums/view-threshold-basis.json (added) matchesstatic/schemas/source/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.
Summary
Stacked on #6618 (base retargets to
mainautomatically when it merges). Implements RFC #6430.Adds
time_based_viewstodelivery-metrics: an array of time-threshold video view counts, one entry per(threshold_seconds, basis). This is the primary view currency for autoplay/skippable video (social, olv, in-feed display video, retail media video) that delivery reporting could not represent —quartile_datais percentage-based andviewsis a single billable-threshold scalar.The semantic fix beyond the RFC
The RFC's shape (
{threshold_seconds, views}) conflated metrics that are not interchangeable: Meta's 2-second video view is continuous play time with no viewport requirement, while IAB/MRC viewable video is continuous in-view time (50% of pixels). Same threshold, materially different numbers. The newview-threshold-basisenum (play_time|in_view) is a required per-entry discriminator, with normative MUST NOT sum/conflate language — the same class of incompatible-definition protection thecommitted_metricsqualifier system provides elsewhere. The enum is deliberately extensible (an audible-playback basis for audio verified-listen thresholds can ship later without reshaping the array), resolving RFC open question 4 in favor of video-only-now without foreclosing audio.Design decisions
(threshold_seconds, basis), seller MUST de-duplicate, buyers MAY treat duplicates as a conformance bug (mirrors thevendor_metric_valuesrule; draft-07uniqueItemscan't enforce tuple-level uniqueness). Resolves RFC open question 3.sort_byby design; per-threshold sorting would need the qualified-selector mechanism and can ride a later minor if demand materializes (noted in the schema description).Capability-gated via the
time_based_viewstoken inavailable-metric. Contract test covers shape validation, enum membership (in available-metric, not in sort-metric), and the normative-language anchors.🤖 Generated with Claude Code