Commit 046b15e
Closes #319.
Storyboard CI on examples/seller_agent.py was failing with persistent
schema-validation errors against products seeded by the storyboard
runner. The seller's `seed_product` controller blindly appended
fixture-shaped skeletons to the PRODUCTS list without filling
schema-required defaults; subsequent `get_products` responses then
failed AdCP 3.0.1 validation.
Fixes:
* `publisher_properties` defaulted to `[]` (violates schema's
`minItems: 1`) — now defaults to
`[{"publisher_domain": "example.com", "selection_type": "all"}]`.
* `format_ids[].agent_url` was missing on caller-supplied fixtures
shaped as `[{"id": "..."}]` — now normalized to fill in the local
`AGENT_URL` when absent; existing values preserved.
* `reporting_capabilities.available_reporting_frequencies` defaulted
to `[]` (violates `minItems: 1`) — now defaults to
`["hourly", "daily"]` matching the static PRODUCTS template.
* TERMS_REJECTED gate narrowed: per-package measurement_terms
inspection accepts seller-vendor terms (own domain, "internal"
indicator) and tightens rejection criteria so only buyer-imposed
unworkable terms trip the rejection path.
* Persists round-trip fields (`targeting_overlay`,
`creative_assignments`, `creatives`, `measurement_terms`, `budget`)
through `create_media_buy` / `update_media_buy` so storyboard
scenarios can verify state transitions.
* Wires context echo on adcp_error responses.
Tests:
* `test_seed_product_minimal_fixture_satisfies_schema_requirements` —
asserts the minimal-fixture path produces a product satisfying every
`minItems: 1` constraint and `format_ids[].agent_url`.
* `test_seed_product_normalizes_format_ids_missing_agent_url` —
asserts the fill-when-missing AND preserve-when-present semantics
for caller-supplied `format_ids`.
* All 10 storyboard tests pass: tests/test_seller_agent_storyboard.py
* Full suite: 2398 passed.
Supersedes #320.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 4de648e commit 046b15e
4 files changed
Lines changed: 599 additions & 5 deletions
File tree
- examples
- src/adcp/server
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
373 | 380 | | |
374 | 381 | | |
375 | 382 | | |
| |||
382 | 389 | | |
383 | 390 | | |
384 | 391 | | |
| 392 | + | |
385 | 393 | | |
386 | 394 | | |
387 | 395 | | |
| |||
761 | 769 | | |
762 | 770 | | |
763 | 771 | | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
764 | 815 | | |
765 | 816 | | |
766 | 817 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
659 | 659 | | |
660 | 660 | | |
661 | 661 | | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
662 | 672 | | |
663 | 673 | | |
664 | 674 | | |
| |||
0 commit comments