Skip to content

compliance(media-buy): four scenarios use non-guaranteed fixtures so sales-non-guaranteed-only sellers can run them - #7755

Closed
fgranata wants to merge 1 commit into
adcontextprotocol:mainfrom
fgranata:fix/media-buy-storyboards-non-guaranteed-fixtures
Closed

fgranata wants to merge 1 commit into
adcontextprotocol:mainfrom
fgranata:fix/media-buy-storyboards-non-guaranteed-fixtures

Conversation

@fgranata

Copy link
Copy Markdown
Contributor

Closes #7754 (triaged P0, ready-to-implement, Fix A).

Problem

canonical_formats, billing_finality_delivery, measurement_accountability and vendor_metric_accountability seed guaranteed-only fixture products. A seller that declares only specialisms: ["sales-non-guaranteed"] correctly rejects the create step with a terminal DELIVERY_MODE_NOT_SUPPORTED, so field_present on /media_buy_id fails and every dependent phase cascades prerequisite_failed — unconditional products / reporting track failures on hosted grading for a conformant seller class. Nothing these storyboards grade depends on the delivery type (format declaration shapes, metric-capability filtering, vendor-metric reporting, provisional-vs-final billing rows). Same root cause and fix as #5703 (base media_buy_seller flow) and #5731 (available_actions).

Change

Per the triage notes:

  • delivery_type: "guaranteed" → "non_guaranteed" on every fixture product (6 in canonical_formats, 1 in each of the others), with the same comment the earlier fixes carry.
  • fixed_price → floor_price on the fixture pricing options; the create steps send bid_price at the floor (as the base flow does).
  • canonical_formats: the 7 sample_request.filters blocks that hard-coded delivery_type: "guaranteed" now ask for non_guaranteed, so discovery still returns the seeded products.
  • measurement_accountability / vendor_metric_accountability: filters.is_fixed_price: true → false, and the pricing_options[0].fixed_price validations read floor_price (description updated).
  • vendor_metric_accountability: the existing requires_capability: media_buy.features.committed_metrics_supported gate is untouched.
  • billing_finality_delivery: prerequisites wording follows the fixture; the report_usage record is unchanged.
  • Changeset: .changeset/fix-media-buy-storyboard-non-guaranteed-fixtures.md (adcontextprotocol: patch).

No schema or wire change; dist/compliance/ is generated from this source.

Verification

  • All four files parse; every remaining fixed_price occurrence is the is_fixed_price filter key.
  • Graded with @adcp/sdk 14.0.0-rc.49 (adcp storyboard run … --compliance-dir <3.1.24 bundle with these four files swapped in>) against a sales-non-guaranteed-only seller: the DELIVERY_MODE_NOT_SUPPORTED rejections and their cascades are gone and the create steps execute. (The steps that still fail on that seller are seller-side and unrelated to delivery type — being fixed on the seller.)
  • npm run build && npm run typecheck not run here (sparse checkout); happy to re-push if CI wants anything else.

Backport

All four storyboards exist in the published 3.1.24 bundle (canonical_formats and billing_finality_delivery carry introduced_in: "3.1"; the other two predate the field), so a straight 3.1.x cherry-pick applies once this lands — the same path as #7599 → #7646 — so the fix reaches hosted 3.1 grading.

…sales-non-guaranteed-only sellers can run them

canonical_formats, billing_finality_delivery, measurement_accountability and
vendor_metric_accountability seeded guaranteed-only products; a seller that
declares only sales-non-guaranteed correctly rejected the create step with a
terminal DELIVERY_MODE_NOT_SUPPORTED and every dependent phase cascaded.
Nothing these storyboards grade depends on the delivery type. Fixtures switch
to non_guaranteed with floor-priced options, the discovery filters and
validations that asked for fixed pricing follow, and the create steps send
bid_price at the floor — the same fix as the base media_buy_seller flow
(adcontextprotocol#5703) and available_actions (adcontextprotocol#5731). Closes adcontextprotocol#7754.

@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: Approve

Approve — clean compliance-fixture change with no blocking or medium findings.

What I checked

  • Four media-buy compliance storyboards switch guaranteed-only fixtures to non_guaranteed (fixed_price → floor_price, create steps send bid_price at the floor, discovery filters and fixed-price validations updated) so sales-non-guaranteed-only sellers stop cascading DELIVERY_MODE_NOT_SUPPORTED.
  • Reviewer verified all 7 canonical_formats discovery filters track the fixtures, pricing/create coherence across all four files, validation drift, and that the adcontextprotocol:patch changeset is correctly scoped with no schema/wire or dist artifact change.
  • No static/schemas/source/** changes → no schema↔docs coherence or oneOf-discriminator concern. No dist/** mutation. Changeset present and correctly scoped/typed.

Decision path: No critical/high findings (row 1 n/a). gated_paths false (row 2 n/a). Not high-risk, no deletions (rows 3–5 n/a). No prior decision (row 6 n/a). No no-auto-approve team match (row 7 n/a). Zero medium findings (row 8 n/a). Falls through to row 9 → approve.

Note: review_decision is REVIEW_REQUIRED, but since gated_paths is false and no prose hard gate applies (no breaking-class protocol change — fixtures only, correct patch changeset), the review-required status does not force escalation.

@fgranata

Copy link
Copy Markdown
Contributor Author

While grading this branch against a sales-non-guaranteed seller I hit one more authoring inconsistency in canonical_formats, now reachable because the creates execute: create_media_buy_with_direct_canonical_selector cannot pass for any seller. The fixture's canonical_formats_mrec_display image declaration constrains params.max_file_size_kb: 200, but the step's sample_request direct selector sends only format_kind: "image" with params: {width: 300, height: 250}. The runner's canonical_format_satisfaction check therefore reports local_satisfied: false ("Under-specified selector: product constrains params.max_file_size_kb, but the request selector omits max_file_size_kb", bug_class: directionality) while the create itself is accepted (accepted: true), and the step fails with expected: {accepted: true, local_satisfied: true}.

Either the selector should carry max_file_size_kb: 200 or the fixture should not constrain it; happy to add whichever you prefer to this PR, or leave it for a follow-up so this one stays a pure delivery-type change.

@bokelley

Copy link
Copy Markdown
Contributor

Good catch — please add max_file_size_kb: 200 to the selector rather than dropping it from the fixture.

The product constrains max_file_size_kb: 200; the canonical_format_satisfaction check is correctly flagging an omitted constrained param as directionality. A "complete" direct selector should carry all params the product declares, not just the spatial dimensions. Removing it from the fixture would make the test weaker without a compensating gain — it would hide coverage of the param-completeness semantics the satisfaction check is supposed to exercise.

Exact change needed in create_media_buy_with_direct_canonical_selector:

 format_kind: "image"
 params:
   width: 300
   height: 250
+  max_file_size_kb: 200

And update the check description from "Complete direct image dimensions satisfy the fixed canonical declaration" → "Complete direct image selector satisfies the fixed canonical declaration" (removing "dimensions" since the satisfying param is not a spatial one).

No other steps need touching: create_media_buy_with_equivalent_direct_legacy_emission uses the same {width, height} selector but also carries a format_ids entry, so the runner satisfies the canonical check via the legacy normalization route — you confirmed only the pure direct-selector step fails.


Generated by Claude Code

Copy link
Copy Markdown
Contributor

Thanks @fgranata. This is the same fix as #7756, which merged to main from your #7754 report and triage (non-guaranteed fixtures, same precedent as #5703/#5731) and was backported to 3.1.x in #7761; it ships in 3.1.25. Closing as a duplicate. Your write-up made both changes straightforward.

@bokelley bokelley closed this Sep 30, 2026
bokelley pushed a commit that referenced this pull request Sep 30, 2026
…file_size_kb (#7791)

The product's image declaration constrains max_file_size_kb: 200; the
direct canonical selector sent only width/height, so the runner's
canonical_format_satisfaction check reported local_satisfied: false
(directionality) and the step failed for every seller even when the create
was accepted. Add the constrained param to the selector and reword the check
description, as requested in review of #7755.
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.

Four media-buy protocol storyboards are unrunnable by sales-non-guaranteed-only sellers (guaranteed-only fixtures, no applicability gate)

2 participants