Skip to content

examples/seller_agent.py: storyboard content gaps exposed by #296 transport fix #304

@bokelley

Description

@bokelley

Context

Once #296 fixes the ASGI transport so the storyboard runner can connect, running

```
npx -y -p @adcp/client@latest adcp storyboard run http://localhost:3001/mcp media_buy_seller --json --allow-http
```

against `examples/seller_agent.py` produces `overall_status: partial` — 29/47 steps pass, 10 fail, 8 skipped, and `controller_detected: false`. Every failure is content-side in the example seller (or its `DemoStore`); none are SDK regressions from this round of releases.

This issue tracks the punch list. Each item is a separate seller-agent fix and can land independently.

Failures

  1. `adcp.idempotency` not declared in capabilities — `get_adcp_capabilities` returns `compliance_testing` without an `idempotency` block. PR fix(server): fix streamable-http ASGI error, host binding, and AdCP 3.0.1 scenario gaps #296 added a runtime WARNING log for exactly this case; the example just doesn't follow its own advice. Fix: pass `idempotency=store.capability()` (or `idempotency={"supported": False}`) to `capabilities_response()`.

  2. `get_media_buys` response missing `total_budget` — schema validation: `/media_buys/0/total_budget: must have required property 'total_budget'`. The reference `media_buys_response()` either doesn't populate it or the example's seed data drops it.

  3. Status returned as `active` instead of `pending_creatives` when no creatives supplied — runner sends `create_media_buy` with no creatives and expects `status=pending_creatives`. The example seller jumps straight to `active`. Fix: branch on `creatives_present` and return `pending_creatives` per the AdCP v3 lifecycle.

  4. `list_creative_formats` renders missing required fields — schema validation: each render must have `role`, `dimensions`, and `parameters_from_format_id`, OR match the alternate variant of the discriminated union. Likely a 3.0.1-related schema tightening on the format-render type. Fix: populate render objects with the AdCP 3.0.1-required fields.

  5. `list_creative_formats` filter ignored — runner filters for `format_id.id = display_970x250` but the seller returns `display_300x250`. Either the filter parameter isn't honored or the format catalog's primary format is just the wrong one for this storyboard.

  6. `update_media_buy` with bogus package_id doesn't return `PACKAGE_NOT_FOUND` — the example doesn't validate package existence; runner expects a structured `PACKAGE_NOT_FOUND` adcp_error.

  7. `create_media_buy` for storyboard fixture product fails with "Product 'sports_preroll_q2' not found" — the storyboard pre-populates a product fixture via a `seed_product` controller call. `DemoStore` doesn't override `seed_product` (it's a `NotImplementedError` stub from PR fix(server): fix streamable-http ASGI error, host binding, and AdCP 3.0.1 scenario gaps #296). Without a working `seed_*` controller on the example, every storyboard that needs fixtures skips. Related: the `controller_detected: false` outcome.

Why `controller_detected: false`?

The runner discovers the `comply_test_controller` tool but doesn't grade the controller as detected. `DemoStore` overrides 5 `force_`/`simulate_` scenarios but none of the AdCP 3.0.1 `seed_*` or `force_create_media_buy_arm`/`force_task_completion` ones (the latter come from PR #282, in flight). When PR #282 lands and `DemoStore` overrides at least `force_task_completion` and `seed_creative_format`, controller detection should flip.

Out of scope

Verification

```
ADCP_PORT=3001 python examples/seller_agent.py &
sleep 2
npx -y -p @adcp/client@latest adcp storyboard run \
http://localhost:3001/mcp media_buy_seller --json --allow-http \
| jq '{overall_status, controller_detected, summary, failures}'
```

Target on completion of this punch list: `overall_status: pass`, `controller_detected: true`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions