Skip to content

feat(media-buy): spot lifecycle, makegood linkage and break position in by_spot - #8017

Merged
bokelley merged 3 commits into
mainfrom
conductor/33-tv-spot-status-break-position-5683-8009
Oct 8, 2026
Merged

bokelley merged 3 commits into
mainfrom
conductor/33-tv-spot-status-break-position-5683-8009

Conversation

@bokelley

@bokelley bokelley commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Report-time half of #5683 plus the reporting half of #8009, both on the same by_spot[] item in get-media-buy-delivery-response.json. All new surface is x-status: experimental (cluster id media_buy.spot_lifecycle, added to the experimental registry) so 3.4 can adjust it without a breaking change.

  • spot_status: scheduled | aired | preempted | makegood (new enums/spot-status.json). A scheduled row becomes aired (same spot_id) or preempted.
  • scheduled_at, required on scheduled and preempted rows. Metrics on a scheduled row (for example grps) are stated plainly as expectations, not actuals, and are not part of totals. makegood rows are real delivery.
  • replaces_spot_id (x-entity: spot_airing): required on makegood, allowed on scheduled/preempted so a planned makegood is linked before it airs and the chain survives a preempted replacement, forbidden on aired/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, optional break_id.
  • Seller capability on supports_spot_breakdown: available_statuses and supports_break_position, so a buyer can tell "not reported" from "not delivered".

Compatibility

  • aired_at is required only on aired/makegood rows and rows with no spot_status (which mean aired). It MUST be absent on scheduled/preempted.
  • Normative: sellers MUST NOT send scheduled/preempted rows, or the new capability fields (spot-reporting-capability.json is closed in 3.2), to callers pinned below 3.3. A caller with no declared pin counts as below 3.3.
  • Ordering: ascending by aired_at, else scheduled_at. Updated the stale "ordered by aired_at" text in the request schema and task reference too.
  • 3.2 documents stay valid. The contract test compiles the dist/schemas/3.2.3 spot 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.mdx with schema-valid examples (scheduled → aired, scheduled → preempted → makegood incl. a planned makegood, and the capability declaration), and a summary in get_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 --file on both docs: all $schema blocks pass
  • tests/schema-validation.test.cjs (35/35), npm run test:mcp-schema-projection (36/36, PARITY_COMPILE_LIMIT 1_280_000 untouched and not exceeded), build:compliance --check
  • Changeset (minor) passes the scope and status checks. The local precommit hook ran green; no --no-verify was needed.
  • Reviewed by the ad-tech-protocol-expert and code-reviewer subagents; Must Fix items (planned/chained makegood linkage, stale ordering text) and the Should Fix items were addressed.

Follow-ups / not in this PR

Refs #8009 (reporting half only; booking stays open). Partially addresses #5683.

🤖 Generated with Claude Code


Open workspace in Conductor

…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]>

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) matches static/schemas/source/**; static/schemas/source/index.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-response.json (modified) matches static/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.

@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Oct 8, 2026

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) matches static/schemas/source/**; static/schemas/source/index.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-response.json (modified) matches static/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.

bokelley commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in the follow-up commits: the example's reporting_period now ends 2026-11-18, so the scheduled 2026-11-17 row is inside it. Schema links also moved to the v3 alias.

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) matches static/schemas/source/**; static/schemas/source/index.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-response.json (modified) matches static/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.

@bokelley
bokelley merged commit be785cf into main Oct 8, 2026
109 of 111 checks passed
@bokelley
bokelley deleted the conductor/33-tv-spot-status-break-position-5683-8009 branch October 8, 2026 14:35
bokelley added a commit that referenced this pull request Oct 8, 2026
…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]>
bokelley added a commit that referenced this pull request Oct 8, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ladon/needs-human-review Ladon has escalated this PR for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant