Skip to content

feat(schema): add optional delivery projection to get_media_buy_delivery packages - #8043

Merged
bokelley merged 14 commits into
mainfrom
conductor/33-5850-media-buy-optional-forward-looking-proj
Oct 21, 2026
Merged

bokelley merged 14 commits into
mainfrom
conductor/33-5850-media-buy-optional-forward-looking-proj

Conversation

@bokelley

@bokelley bokelley commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Closes #5850

Merge timing: this is the 3.3 consent outcome for #5850. The WG has until Fri 2026-10-16 23:59 UTC to object to the brief's recommendations. This PR merges after that deadline unless objections land; absent objections it proceeds as recommended.

Summary

  • New optional projection on top-level by_package[] rows of get_media_buy_delivery (core/delivery-projection.json): projected_impressions, projected_spend (optional lifetime totals), required projected_end_state, basis, and as_of.
  • enums/delivery-projection-end-state.json (on_pace | complete | underdelivery | early_exhaustion, with enumDescriptions) and enums/delivery-projection-basis.json (trailing_daily_avg | trailing_hourly_avg | platform_model | seller_defined). Window length and model name go in ext. basis is the sampling method, distinct from the commitment tier in forecast_method; delivery-projection.json says so.
  • Advisory wording as ratified in Q4: projections are advisory forecasts, not delivery records. They carry no contractual meaning on their own, and any commercial use is governed by the parties' terms. Reported actuals remain the delivery record.
  • Docs: "Delivery projection" section in get_media_buy_delivery.mdx (schema-validated example) and a cross-reference from indicators.mdx explaining how projection composes with the 3.2 pacing_risk indicator and pacing_index.
  • minor changeset; tests/delivery-projection.test.cjs wired into test:schemas; proposed decision record governance/decisions/DR-XXXX-delivery-projection-advisory.md (number assigned at merge).

Experimental

Marked x-status: experimental (schema root, the by_package[].projection property, and both enums) with x-added-in: "3.3.0", and registered as media_buy.delivery_projection in docs/reference/experimental-status.mdx. Reasons: one production adopter so far, and the complete / early_exhaustion materiality split was authored in this PR rather than ratified in the brief. Sellers declare the feature id in experimental_features. There is no experimental_features conditional in get_adcp_capabilities, because the object appears only on delivery responses and there is no capability field to condition on (same as media_buy.product_identity).

Other decisions to check

  • End-state boundaries: split complete vs early_exhaustion on the undelivered share of the flight against the seller's materiality threshold; judged against the package's binding constraint (goal or budget, whichever is reached first). No over-delivery state.
  • Lifetime totals are counted from package start, not reporting_period.start.
  • Scope kept to the brief: not part of windows[].by_package, exact revision reads, or the get_media_buys snapshot; webhook use is not defined here. No buy-level roll-up, confidence ranges, or pacing controls (Delivery shaping on Package — pacing_mode + optional bid_modifiers (narrow follow-up after #4548 close) #4585).

Testing

  • node --test tests/delivery-projection.test.cjs (9 pass); tests/schema-validation.test.cjs 36/36; lint-schema-enum-drift, mcp-schema-projection, schema-deprecation-metadata pass; build:compliance --check clean for this PR's files.
  • Docs example validates with json-schema-validation --file; the one reported invalid-JSON block is a pre-existing test=false block.
  • Changeset scope check passes. Local pre-commit and pre-push hooks ran in full; no --no-verify.
  • No dist/ output committed. PARITY_COMPILE_LIMIT untouched.
  • The Generate Python SDK check fails repo-wide for reasons outside this PR (the SDK default branch rejects ADCP_SKIP_SIGNATURE); not a required check.

🤖 Generated with Claude Code

Updated 2026-10-09: the consent window was extended by a week to Fri 2026-10-16 23:59 UTC, to align with the live working-group session.


Open workspace in Conductor

@aao-secretariat

Copy link
Copy Markdown
Contributor

Ladon cannot review this PR until merge conflicts are resolved.

@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 touches static/schemas/source/** (gated paths), which is under a hard, deterministic approval gate. review_decision is REVIEW_REQUIRED (not APPROVED), so the gate is not satisfied. Per decision rule row 2, the outcome must be escalate.

The reviewer found the change clean and additive: an optional projection object added to top-level by_package[] rows on get_media_buy_delivery, with new core/delivery-projection.json and enums/delivery-projection-basis.json. Schema↔docs coherence holds, the minor changeset is correct for a non-breaking optional field, no new undiscriminated oneOf, source-only (no dist mutation), and the field is scoped to top-level by_package only (asserted by tests). No Critical/High/Medium findings.

Escalation is purely because of the unsatisfied path gate, not any code defect. Once a human/CODEOWNERS approval lands (review_decision: APPROVED), this can fall through to a normal approve.

Escalation reasons:

  • Gated files require human/CODEOWNERS review: static/schemas/source/core/delivery-projection.json, static/schemas/source/enums/delivery-projection-basis.json, static/schemas/source/index.json, static/schemas/source/media-buy/get-media-buy-delivery-response.json — review_decision is REVIEW_REQUIRED, not APPROVED.

Why human review

  • Gated paths touched (static/schemas/source/**) with review_decision=REVIEW_REQUIRED (not APPROVED) — human/CODEOWNERS approval required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/delivery-projection.json (added) matches static/schemas/source/**; static/schemas/source/enums/delivery-projection-basis.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-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 approval required.

This PR adds a new delivery-projection core schema plus a delivery-projection-basis enum and wires them into get-media-buy-delivery-response.json and index.json, with matching docs and a correct minor changeset. The reviewer found no Critical/High/Medium issues: schema↔docs coherence holds, the changeset type/scope is correct, no released dist artifact was mutated.

However, the diff touches files under the hard, non-overridable approval gate (static/schemas/source/**) and the current GitHub review decision is REVIEW_REQUIRED, not APPROVED. Per decision-table row 2, this must escalate until a human/CODEOWNERS approval is recorded — regardless of how clean the diff is. The prior decision was also escalate for the same gate reason.

Escalation reasons

  • Gated paths touched (static/schemas/source/**) with review_decision=REVIEW_REQUIRED — human/CODEOWNERS approval required before merge.
    • static/schemas/source/core/delivery-projection.json (added)
    • static/schemas/source/enums/delivery-projection-basis.json (added)
    • static/schemas/source/index.json (modified)
    • static/schemas/source/media-buy/get-media-buy-delivery-response.json (modified)

No blocking findings on the code itself; the hold is purely the approval gate.

Why human review

  • Gated paths touched (static/schemas/source/**) with review_decision=REVIEW_REQUIRED (not APPROVED) — human/CODEOWNERS approval required before merge. Affected files: static/schemas/source/core/delivery-projection.json (added), static/schemas/source/enums/delivery-projection-basis.json (added), static/schemas/source/index.json (modified), static/schemas/source/media-buy/get-media-buy-delivery-response.json (modified).
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/delivery-projection.json (added) matches static/schemas/source/**; static/schemas/source/enums/delivery-projection-basis.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-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 and others added 3 commits October 9, 2026 01:03
…ery packages

Adds an optional advisory projection block on top-level by_package[] rows
(core/delivery-projection.json, enums/delivery-projection-basis.json).

Closes #5850

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… end-state enum

Adds x-status experimental and x-added-in 3.3.0 markers, the
media_buy.delivery_projection registry row, enums/delivery-projection-end-state.json,
a basis vs forecast_method note, and a proposed decision record.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@bokelley
bokelley force-pushed the conductor/33-5850-media-buy-optional-forward-looking-proj branch from 5b18850 to 6bd2b5c Compare October 9, 2026 03:55

@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-paths approval gate not satisfied.

This PR touches files under the hard, non-overridable approval gate (static/schemas/source/**) and the current GitHub review decision is REVIEW_REQUIRED, not APPROVED. Per decision table row 2, the outcome must be escalate until a human/CODEOWNERS approval is recorded.

Review quality: Clean pass. The change adds an optional, experimental, additive projection object to top-level by_package[] rows of get_media_buy_delivery (new core/delivery-projection.json plus delivery-projection-basis/delivery-projection-end-state enums). Schema↔docs coherence verified (field names, both enum value sets, scope claims all match), correct placement on the top-level by_package allOf with windows[].by_package deliberately excluded, a minor changeset matching the additive/non-breaking change, no new undiscriminated oneOf, no dist mutation, and proper registration in index.json, the experimental-status registry, and tests. No Critical/High/Medium findings.

Escalation reasons:

  • Gated path(s) under static/schemas/source/** touched (delivery-projection.json added, delivery-projection-basis.json added, delivery-projection-end-state.json added, index.json modified, get-media-buy-delivery-response.json modified) with review_decision: REVIEW_REQUIRED — human/CODEOWNERS approval required before merge.

This repeats the prior escalate on the same ground; the gate lifts once review_decision becomes APPROVED. No code-level blockers remain — the diff is clean and additive.

Why human review

  • Gated paths touched (static/schemas/source/**) with review_decision=REVIEW_REQUIRED (not APPROVED) — human/CODEOWNERS approval required before merge. Affected files: static/schemas/source/core/delivery-projection.json (added), static/schemas/source/enums/delivery-projection-basis.json (added), static/schemas/source/enums/delivery-projection-end-state.json (added), static/schemas/source/index.json (modified), static/schemas/source/media-buy/get-media-buy-delivery-response.json (modified).
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/delivery-projection.json (added) matches static/schemas/source/**; static/schemas/source/enums/delivery-projection-basis.json (added) matches static/schemas/source/**; static/schemas/source/enums/delivery-projection-end-state.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-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 and others added 11 commits October 19, 2026 16:21
…ia-buy-optional-forward-looking-proj

# Conflicts:
#	docs/reference/experimental-status.mdx
#	package.json
…ia-buy-optional-forward-looking-proj

# Conflicts:
#	package.json
…ia-buy-optional-forward-looking-proj

# Conflicts:
#	docs/reference/experimental-status.mdx
@bokelley
bokelley merged commit 1d40034 into main Oct 21, 2026
67 checks passed
@bokelley
bokelley deleted the conductor/33-5850-media-buy-optional-forward-looking-proj branch October 21, 2026 12:14
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.

media-buy: optional forward-looking projection block on delivery reporting

1 participant