Skip to content

feat(schemas): plays scalar — close forecast↔delivery asymmetry - #3583

Merged
bokelley merged 1 commit into
mainfrom
bokelley/plays-scalar
Apr 30, 2026
Merged

feat(schemas): plays scalar — close forecast↔delivery asymmetry#3583
bokelley merged 1 commit into
mainfrom
bokelley/plays-scalar

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

Add plays to delivery-metrics.json (top-level, type: number) and available-metric.json enum. Closes the forecast↔delivery asymmetry where plays was 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)

  • Cross-side reconciliation: forecast side declares plays at the same level as impressions/views on forecast-point. Mirroring placement on the delivery side makes forecast↔delivery reconciliation a 1:1 pairing.
  • Broadcast inventory uses this too, not just DOOH. Confining to dooh_metrics would force a separate field for broadcast plays.
  • Type matches other top-level scalarsnumber, not the integer used inside dooh_metrics.

Distinct from neighbors

  • dooh_metrics.loop_plays — per-screen rotation count (a screen plays the same creative N times in a loop). plays is the campaign-level total across all screens.
  • impressions — multiplied audience figure (one play × screen audience = many impressions). plays is 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 plays stay conformant.

Test plan

  • npm run build:schemas — clean
  • npm run test:schemas — 7/7
  • npm run test:examples — 34/34
  • npm run typecheck — clean

Closes #3516.

🤖 Generated with Claude Code

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>
@bokelley
bokelley merged commit 3f7c461 into main Apr 30, 2026
18 checks passed
@bokelley
bokelley deleted the bokelley/plays-scalar branch April 30, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add scalar to delivery-metrics (forecast-side declared, delivery-side missing)

1 participant