Repository navigation
feat(media-buy): spot lifecycle, makegood linkage and break position in by_spot - #8017
Conversation
…in by_spot Adds experimental spot_status, scheduled_at, replaces_spot_id and break_position to by_spot[] rows, plus available_statuses and supports_break_position on supports_spot_breakdown. Relaxes aired_at to aired/makegood rows. Refs #5683 (report-time half), #8009 (reporting half). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated schema paths require human/CODEOWNERS approval.
This PR modifies the published protocol surface under static/schemas/source/** (spot-reporting-capability.json, enums/spot-status.json [added], index.json, get-media-buy-delivery-request.json, get-media-buy-delivery-response.json), which is under a hard, path-based approval gate (gated_paths: true). review_decision is REVIEW_REQUIRED, not APPROVED, so the gate is not satisfied (decision table row 2).
The change itself looks clean on review: additive/experimental spot-lifecycle fields with sound conditional logic (aired_at required/forbidden by status, replaces_spot_id gated to makegood, break_position bounds), a matching minor changeset, no new undiscriminated oneOf, and docs↔schema coherence holds. Tests also validate backward-compat against dist 3.2.3. No critical/high findings.
Medium findings
- docs/media-buy/media-buys/optimization-reporting.mdx:1505 — Example 2 scheduled row (dated 2026-11-17) falls outside its own reporting_period (ends 2026-11-16), contradicting the PR's own aired_at-else-scheduled_at row-selection rule.
Escalation reasons
- Gated paths touched without an approving review:
static/schemas/source/core/spot-reporting-capability.json,static/schemas/source/enums/spot-status.json,static/schemas/source/index.json,static/schemas/source/media-buy/get-media-buy-delivery-request.json,static/schemas/source/media-buy/get-media-buy-delivery-response.json. Human/CODEOWNERS approval (review_decision: APPROVED) is required before merge.
Medium findings
- docs/media-buy/media-buys/optimization-reporting.mdx:1505 — Example 2 scheduled row falls outside its own reporting_period, contradicting the selection rule
Why human review
- Gated paths touched without APPROVED review (review_decision: REVIEW_REQUIRED): static/schemas/source/core/spot-reporting-capability.json, static/schemas/source/enums/spot-status.json, static/schemas/source/index.json, static/schemas/source/media-buy/get-media-buy-delivery-request.json, static/schemas/source/media-buy/get-media-buy-delivery-response.json — human/CODEOWNERS review required
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/spot-reporting-capability.json (modified) matches
static/schemas/source/**; static/schemas/source/enums/spot-status.json (added) matchesstatic/schemas/source/**; static/schemas/source/index.json (modified) matchesstatic/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-request.json (modified) matchesstatic/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-response.json (modified) matchesstatic/schemas/source/**) and the current GitHub review decision is 'REVIEW_REQUIRED', 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.
…ema link Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated-path hard approval gate not satisfied.
This PR touches multiple files under static/schemas/source/**, which fall under a hard, non-overridable approval gate (gated_paths: true). The current review_decision is unknown/none — not APPROVED — so per decision rule row 2, the outcome must be escalate regardless of how clean the diff is. A human/CODEOWNERS approval must be recorded before this can merge.
Gated files requiring review:
- static/schemas/source/core/spot-reporting-capability.json (modified)
- static/schemas/source/enums/spot-status.json (added)
- static/schemas/source/index.json (modified)
- static/schemas/source/media-buy/get-media-buy-delivery-request.json (modified)
- static/schemas/source/media-buy/get-media-buy-delivery-response.json (modified)
Prior decision was also escalate for the same gate. Net improvement this pass: the earlier Medium (Example 2 scheduled row falling outside its reporting_period) has been RESOLVED — the end bound moved 2026-11-16 → 2026-11-18 so spot_pinnacle_009 now falls inside the window, consistent with the aired_at-else-scheduled_at selection rule. The $schema latest → v3 edit matches repo convention. No new blocking or Medium findings; only a cosmetic Low (three delivery-response examples still read schemas/latest/, both paths resolve, not in delta).
No current blocking findings — the escalation is driven solely by the unsatisfied gated-path approval gate. Once a human/CODEOWNERS APPROVED review is recorded, a re-run on a clean diff can approve.
Why human review
- Gated paths touched without APPROVED review (review_decision: unknown/none): static/schemas/source/core/spot-reporting-capability.json, static/schemas/source/enums/spot-status.json, static/schemas/source/index.json, static/schemas/source/media-buy/get-media-buy-delivery-request.json, static/schemas/source/media-buy/get-media-buy-delivery-response.json — human/CODEOWNERS review required (decision rule row 2).
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/spot-reporting-capability.json (modified) matches
static/schemas/source/**; static/schemas/source/enums/spot-status.json (added) matchesstatic/schemas/source/**; static/schemas/source/index.json (modified) matchesstatic/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-request.json (modified) matchesstatic/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-response.json (modified) 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.
…amples Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Fixed in the follow-up commits: the example's |
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated schema paths touched without an APPROVED review.
This PR adds spot-delivery reporting to the protocol surface, modifying/adding five files under static/schemas/source/** (a hard, deterministic approval gate) plus corresponding docs, a changeset, and a contract test. The reviewer found no Critical/High/Medium issues: schema↔docs coherence holds, a changeset is present, and the delta since the prior pass is three $schema corrections in optimization-reporting.mdx aligning examples from /schemas/latest/ to the canonical /schemas/v3/.
Despite the clean diff, gated_paths: true and review_decision: REVIEW_REQUIRED (not APPROVED). Decision rule row 2 forces escalation: Ladon cannot auto-approve schema-source changes until a human/CODEOWNERS approval is recorded. The prior decision was also escalate for the same reason.
Escalation reasons
- Gated paths touched without APPROVED review:
static/schemas/source/core/spot-reporting-capability.json,static/schemas/source/enums/spot-status.json(added),static/schemas/source/index.json,static/schemas/source/media-buy/get-media-buy-delivery-request.json,static/schemas/source/media-buy/get-media-buy-delivery-response.json— human/CODEOWNERS review required.
No blocking findings; the hold is purely the gate. Once a human/CODEOWNERS approval lands, this is a clean approve.
Why human review
- Gated paths touched without APPROVED review (review_decision: REVIEW_REQUIRED): static/schemas/source/core/spot-reporting-capability.json, static/schemas/source/enums/spot-status.json, static/schemas/source/index.json, static/schemas/source/media-buy/get-media-buy-delivery-request.json, static/schemas/source/media-buy/get-media-buy-delivery-response.json — human/CODEOWNERS review required (decision rule row 2).
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/spot-reporting-capability.json (modified) matches
static/schemas/source/**; static/schemas/source/enums/spot-status.json (added) matchesstatic/schemas/source/**; static/schemas/source/index.json (modified) matchesstatic/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-request.json (modified) matchesstatic/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-response.json (modified) matchesstatic/schemas/source/**) and the current GitHub review decision is 'REVIEW_REQUIRED', 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.
…pected_confirmation_at Update the broadcast TV guide for #8016, #8017 and #8025: spot_status, scheduled_at, replaces_spot_id and break_position on by_spot (marked experimental, media_buy.spot_lifecycle), minute-resolution dayparts (experimental, media_buy.daypart_granularity), and expected_confirmation_at on submitted accept_proposal. Rewrites the makegoods section and the did-it-air reconciliation step, and extends the worked example with a preempted spot and its makegood replacement. Docs only. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…t and CPM demo example (#8006) * docs(creative): expand broadcast TV guide with reconciliation contract and CPM demo example Bring the linear TV channel guide up to the shape of the radio guide: :15/:30/:60 video_hosted reference declarations, Ad-ID/ISCI identifiers, no-VAST section, networks/stations/dayparts, demo notation and currency providers, C3/C7 maturation, and a reconciliation contract that reports as-run evidence (by_spot) separately from audience measurement. Adds a worked CPM impression guarantee on a demo through :15/:30 spots (product, request_proposals outcome_target, proposal, delivery with by_spot and by_demographic), states today's limits honestly (demo not bound on CPM pricing, no :30 equivalization; #8001), and notes the makegood menu with #5683 for 3.4. Docs only; no schema changes. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * docs(creative): point TV guide at spot lifecycle, minute dayparts, expected_confirmation_at Update the broadcast TV guide for #8016, #8017 and #8025: spot_status, scheduled_at, replaces_spot_id and break_position on by_spot (marked experimental, media_buy.spot_lifecycle), minute-resolution dayparts (experimental, media_buy.daypart_granularity), and expected_confirmation_at on submitted accept_proposal. Rewrites the makegoods section and the did-it-air reconciliation step, and extends the worked example with a preempted spot and its makegood replacement. Docs only. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> --------- Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Summary
Report-time half of #5683 plus the reporting half of #8009, both on the same
by_spot[]item inget-media-buy-delivery-response.json. All new surface isx-status: experimental(cluster idmedia_buy.spot_lifecycle, added to the experimental registry) so 3.4 can adjust it without a breaking change.spot_status:scheduled | aired | preempted | makegood(newenums/spot-status.json). Ascheduledrow becomesaired(samespot_id) orpreempted.scheduled_at, required onscheduledandpreemptedrows. Metrics on ascheduledrow (for examplegrps) are stated plainly as expectations, not actuals, and are not part of totals.makegoodrows are real delivery.replaces_spot_id(x-entity: spot_airing): required onmakegood, allowed onscheduled/preemptedso a planned makegood is linked before it airs and the chain survives a preempted replacement, forbidden onaired/no-status rows.break_position(Linear TV: book and report position in break (first/last in break) #8009):position_in_break(1-based),spots_in_break, optionalbreak_id.supports_spot_breakdown:available_statusesandsupports_break_position, so a buyer can tell "not reported" from "not delivered".Compatibility
aired_atis required only onaired/makegoodrows and rows with nospot_status(which meanaired). It MUST be absent onscheduled/preempted.scheduled/preemptedrows, or the new capability fields (spot-reporting-capability.jsonis closed in 3.2), to callers pinned below 3.3. A caller with no declared pin counts as below 3.3.aired_at, elsescheduled_at. Updated the stale "ordered byaired_at" text in the request schema and task reference too.dist/schemas/3.2.3spot item to prove aired/makegood/no-status rows validate there and scheduled/preempted rows do not (which is why the MUST NOT exists).Docs
New "Spot lifecycle, makegoods, and break position" section in
optimization-reporting.mdxwith schema-valid examples (scheduled → aired, scheduled → preempted → makegood incl. a planned makegood, and the capability declaration), and a summary inget_media_buy_delivery.mdx.Testing
node --test tests/spot-delivery-reporting-contract.test.cjs(15 pass, including if/then/else negatives asserting the failing field)node tests/json-schema-validation.test.cjs --fileon both docs: all$schemablocks passtests/schema-validation.test.cjs(35/35),npm run test:mcp-schema-projection(36/36,PARITY_COMPILE_LIMIT1_280_000 untouched and not exceeded),build:compliance --checkminor) passes the scope and status checks. The local precommit hook ran green; no--no-verifywas needed.Follow-ups / not in this PR
static/compliance(spot reporting is covered only by the schema contract test), so adding one is not cheap. Noted as a follow-up.preemption_criteriaand the interactive offer flow (Linear TV: preemption notice + replacement offer / accept-reject workflow #5683), and booking/position pricing (Linear TV: book and report position in break (first/last in break) #8009, blocked on RFC: declare price adjustments for buyer-selectable product dimensions #7659).original_scheduled_at(buyers diff reports), no planning-horizon declaration, no status filter onreporting_dimensions.spot(scope withreporting_period).Refs #8009 (reporting half only; booking stays open). Partially addresses #5683.
🤖 Generated with Claude Code
Open workspace in Conductor