Skip to content

feat(media-buy): add composable delivery breakdowns to get_media_buy_delivery - #7958

Draft
bokelley wants to merge 5 commits into
mainfrom
feat/composable-delivery-breakdowns-6208
Draft

bokelley wants to merge 5 commits into
mainfrom
feat/composable-delivery-breakdowns-6208

Conversation

@bokelley

@bokelley bokelley commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Draft schema and normative-doc diff for #6208, scoped to a bounded, additive, experimental 3.3 slice (feature id media_buy.delivery_composition).

  • Request breakdown_composition: 2 to 3 of date, geo (country/region/metro; metro requires system), device_type, device_platform, placement, creative, property; limit, sort_by ($ref enums/sort-metric.json), sort_direction, cursor.
  • Response by_package[].by_composition: dimensions, rows[{key, metrics}], truncated, suppressed, sorted_by, sort_direction, pagination (shared core/pagination-response.json, as feat(media-buy): add cursor pagination for bounded delivery breakdowns #7298). Row key members reuse the by_* row identity names (creative_id, placement_id, geo_level+geo_code+system, publisher_domain+identifier, ...).
  • Capability reporting_capabilities.supports_breakdown_composition (max_dimensions 2..3, composable_dimensions).
  • Errors: BREAKDOWN_COMPOSITION_UNSUPPORTED, BREAKDOWN_DIMENSION_NOT_COMPOSABLE (both on enumDescriptions and enumMetadata, DR-0003); CURSOR_EXPIRED description widened to composition cursors; a changed cursor request is INVALID_REQUEST.
  • Consistency MUST is gated: it holds over the union of all pages of a completed cursor walk, only when nothing was suppressed, for additive metrics, against same-grain untruncated marginals.
  • Conformance vectors in static/compliance/source/test-vectors/breakdown-composition/ (6 positive, 17 negative) executed by tests/breakdown-composition-contract.test.cjs.
  • Docs: "Composed breakdowns" in get_media_buy_delivery.mdx, row in optimization-reporting.mdx, feature id in experimental-status.mdx. Changeset: minor.

Pre-vote fixlist from the triage is applied (sort enum ref, key vocabulary, truncated qualifier, SCREAMING_SNAKE codes).

WG decision brief: see the ## WG decision brief (3.3) comment on #6208.

Alternatives not picked

  • max_cells-only truncation (the RFC's original shape): a dead end like the pre-feat(media-buy): add cursor pagination for bounded delivery breakdowns #7298 *_truncated flags. Replaced by cursor.
  • Reserve next_cursor in 3.2 and populate in 3.3: moot; 3.2 is shipped.
  • Seller-declared max_dimensions only: raising a schema cap later is additive, lowering one is breaking, so the protocol caps at 3.
  • date always composable: rejected; listed explicitly like any dimension (some sellers have no daily data at cell grain; a lifetime_only product never lists it).
  • Geo excluded entirely, or postal_area allowed: the use case needs geo, so country/region/metro are in; postal grain is a bulk-export shape and waits for export work.
  • Flat rows (identity fields beside metrics, like by_* rows) instead of key/metrics: composition keys are dynamic.
  • Stable-additive instead of experimental: the cursor/snapshot and per-package paging semantics are unproven with sellers.
  • Deferred dimensions: audience, keyword, catalog_item (overlapping membership, non-partitioning), demographic, format, collection, installment; the fixed *_property intersections are unchanged.
  • Capability field for unsupported pairs: a seller rejects a pair with BREAKDOWN_DIMENSION_NOT_COMPOSABLE and names it in error.details; a declared unsupported_combinations list can be added later.

Notes for reviewers

Test plan

  • node --test tests/breakdown-composition-contract.test.cjs
  • npm run test:schemas, npm run test:mcp-schema-projection, npm run build:compliance -- --check pass locally

🤖 Generated with Claude Code

Draft disposition — 2026-10-09

This draft is retained for the stated workstream. Continue on this existing branch; no parallel PR is needed. This disposition does not waive CI, review, migration, or release gates.

…delivery

Adds experimental breakdown_composition (request), by_package[].by_composition
(response), and reporting_capabilities.supports_breakdown_composition for
cross-tabulated delivery cells, with cursor pagination, truncated/suppressed
flags, a gated marginal-consistency rule, two BREAKDOWN_* error codes, and
conformance vectors. Draft for WG review of #6208.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@bokelley bokelley added the needs-wg-review Blocked on a working-group decision — surface in WG meeting agendas label Oct 9, 2026 — with conductor.build App
@bokelley

Copy link
Copy Markdown
Contributor Author

A seller-side use case and commitment for ["creative", "date"] is now on #6208: #6208 (comment). It covers the creative-testing read from #8897, which we're folding into this draft rather than adding a separate include_creative_daily_breakdown flag.

It raises two small points for this diff:

  • Composed date cells. Say what a cell's reach and frequency cover. A one-day reach_window (kind: "period", one day) fits.
  • Under Keys. A composed creative_id follows the by_creative rule: the buyer's ID for a creative it synced, or the seller-assigned ID that list_creatives returns for a creative that entered the library outside sync_creatives.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-wg-review Blocked on a working-group decision — surface in WG meeting agendas

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant