Skip to content

compliance(media-buy): available_actions should be runnable by sales-non-guaranteed-only sellers#5731

Open
fgranata wants to merge 1 commit into
adcontextprotocol:mainfrom
fgranata:fix/available-actions-non-guaranteed
Open

compliance(media-buy): available_actions should be runnable by sales-non-guaranteed-only sellers#5731
fgranata wants to merge 1 commit into
adcontextprotocol:mainfrom
fgranata:fix/available-actions-non-guaranteed

Conversation

@fgranata

Copy link
Copy Markdown
Contributor

Problem

Follows the same root cause as the base media_buy_seller flow fix (recently merged): available_actions.yaml seeds a guaranteed-only product fixture (available_actions_display, delivery_type: guaranteed). A seller declaring only specialisms: ["sales-non-guaranteed"] correctly rejects a guaranteed buy with a terminal DELIVERY_MODE_NOT_SUPPORTED, so create_buy_from_product fails and the whole enforcement flow (read_persisted_buy_actions, enforce_available_actions) cascades as prerequisite_failed.

Change

Switch the fixture to non_guaranteed (fixed_pricefloor_price). The allowed_actions behavior this scenario actually grades (self-serve vs requires-approval action enforcement) is delivery-type-agnostic, so nothing about the test's intent changes. The create steps reference the product/pricing by id, unchanged.

Reproduction

Against a live sales-non-guaranteed seller, media_buy_seller/available_actionscreate_buy_from_product returns DELIVERY_MODE_NOT_SUPPORTED (terminal) → downstream steps prerequisite_failed.

Scope note for maintainers

This is the second incidental guaranteed-only fixture (after the base flow). I found 8 other media-buy scenarios that also seed delivery_type: guaranteed (billing_finality_delivery, create_media_buy_async, measurement_accountability, vendor_metric_accountability, delivery_reporting, canonical_formats, get_products_async, governance_approved). I deliberately did not touch those — some likely test guaranteed-specific behavior on purpose (e.g. governance_approved's IO-approval, the async arms) and should stay guaranteed + be capability-gated rather than flipped. Happy to follow up per your guidance on which are incidental vs intentional.

Source-only change; the packaged dist/compliance/ cache is generated by the build.

🤖 Generated with Claude Code

…e (runnable by sales-non-guaranteed-only sellers)

The available_actions scenario seeded a guaranteed-only product fixture, so its
create_buy_from_product step failed with a terminal DELIVERY_MODE_NOT_SUPPORTED
for sellers declaring only specialisms: ["sales-non-guaranteed"], cascading the
whole available-actions enforcement flow (read_persisted_buy_actions +
enforce_available_actions all prerequisite_failed).

The allowed_actions behavior this scenario grades is delivery-type-agnostic, so
the fixture switches to non_guaranteed (fixed_price → floor_price). Same fix as
the base media_buy_seller flow; the create steps reference the product/pricing by
id, unchanged.

The packaged dist/compliance/ cache is generated from this source.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@aao-release-bot aao-release-bot 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.

⚠️ Argus review could not complete

The automated review encountered an issue (possibly reached max turns, timed out, or failed to post the final gh pr review). A human reviewer should take this PR.

View workflow run

This is an automated message from the Argus AI review workflow.

@fgranata

fgranata commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Gentle nudge on this one. The sibling fix for the base media_buy_seller flow (#5703, same root cause and rationale — an incidental delivery_type: guaranteed fixture) merged on 2026-06-26, but this available_actions counterpart is still open.

On the current graded cache (3.1.1, @adcp/sdk@latest = 9.6.2), media_buy_seller/available_actions stays red for sales-non-guaranteed-only sellers for exactly the reason in the description: the guaranteed-only product fixture makes create_buy_from_product reject with a terminal DELIVERY_MODE_NOT_SUPPORTED, cascading read_persisted_buy_actions + enforce_available_actions as prerequisite_failed. The allowed_actions behavior the scenario actually grades is delivery-type-agnostic, so the non_guaranteed switch doesn't change the test's intent.

Happy to rebase if it's drifted from main, or to fold in the other 8 guaranteed-only scenarios from the scope note as a single sweep if you'd rather review one PR than several — whichever is easier on your side.

@fgranata

fgranata commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

@bokelley checking in on this one — the sibling base-flow fix (#5703) merged on 2026-06-26, but this available_actions counterpart is still open, and on the current graded cache (3.1.1) it remains the last blocker for the guaranteed-fixture cluster (available_actions plus the same-class scenarios flagged in the scope note): sales-non-guaranteed-only sellers still fail create_buy_from_product with a terminal DELIVERY_MODE_NOT_SUPPORTED cascade. The allowed_actions enforcement this scenario grades is delivery-type-agnostic, so the non_guaranteed fixture switch doesn't change the test's intent. Anything you need from my side — rebase, or folding the other 8 guaranteed-only scenarios into this PR as a single sweep?

@fgranata

fgranata commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@bokelley — one more check-in on this one. On the current graded 3.1.x cache it remains the last blocker for the guaranteed-fixture cluster on sales-non-guaranteed-only sellers (available_actions + the same-class scenarios): our latest full run still shows exactly these three reds and nothing else. It's the same one-line fixture class as #5703, which you merged on 2026-06-26.

cc @EmmaLouise2018 @nastassiafulconis — in case Brian's queue is deep: this is a two-line compliance-fixture change (guaranteed → non_guaranteed seed, sibling of merged #5703), CI is green, and it needs no seller-side coordination — any maintainer can land it.

While I have you: #5783 is in the same boat — it's the contract-documentation PR Brian green-lit in #5337 ("Go ahead with the contract PR"), scoped exactly to his implementation notes there, all checks green since 2026-07-01. Landing both closes out the whole runner-contract thread (#5337 can then close too).

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.

1 participant