feat(schemas): plays scalar — close forecast↔delivery asymmetry - #3583
Merged
Conversation
Add `plays` to delivery-metrics.json (top-level, type:number) and available-metric.json enum. Mirrors the forecastable-metric.plays declaration so buyers reconciling DOOH/broadcast delivery against forecast have a 1:1 metric pairing. Distinct from dooh_metrics.loop_plays (per-screen rotation count) and impressions (multiplied audience figure). Top-level placement (Option A from the triage discussion) instead of nesting in dooh_metrics — the forecast side declares plays at the same level as impressions/views, broadcast inventory uses it too (not DOOH-only), and the type matches other top-level count scalars (number, not the integer used inside dooh_metrics). Closes #3516. 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
Add
playstodelivery-metrics.json(top-level,type: number) andavailable-metric.jsonenum. Closes the forecast↔delivery asymmetry whereplayswas declared as a forecastable metric (forecastable-metric.json:23,forecast-point.json:38) but absent from delivery reporting. Closes #3516.Why top-level (Option A)
playsat the same level asimpressions/viewsonforecast-point. Mirroring placement on the delivery side makes forecast↔delivery reconciliation a 1:1 pairing.dooh_metricswould force a separate field for broadcast plays.number, not theintegerused insidedooh_metrics.Distinct from neighbors
dooh_metrics.loop_plays— per-screen rotation count (a screen plays the same creative N times in a loop).playsis the campaign-level total across all screens.impressions— multiplied audience figure (one play × screen audience = many impressions).playsis the raw play count before any audience multiplier.Both distinctions are spelled out in the schema description.
Backwards compatibility
Optional and additive. Existing reports without
playsstay conformant.Test plan
npm run build:schemas— cleannpm run test:schemas— 7/7npm run test:examples— 34/34npm run typecheck— cleanCloses #3516.
🤖 Generated with Claude Code