Commit 6f3faa0
fix(decisioning): handle Specialism|str union in create_media_buy_store
Post-rebase fix. ``create_media_buy_store`` (added in adcontextprotocol#474, landed
after this branch was originally cut) intersects
``capabilities.specialisms`` against a string set to gate
``targeting_overlay`` echo on the seller's ``property-lists`` /
``collection-lists`` claim.
Per adcontextprotocol#479, ``capabilities.specialisms`` is now ``list[Specialism | str]``
— spec-known slugs are coerced to ``Specialism`` enum members at
construction. The naive ``set(capabilities.specialisms) &
_OVERLAY_ECHO_SPECIALISMS`` was an empty intersection because
``Specialism.property_lists != "property-lists"``, silently routing
every adopter to the no-op wrapper regardless of their declaration.
Fix: extract slug uniformly via ``.value`` (with the same hasattr
pattern other readers use) before intersecting. The wrapper now
correctly activates when the seller declares either spec slug,
whether passed as enum or string.
10 ``test_media_buy_store.py`` tests pass; 3,469 unit tests overall.
Refs adcontextprotocol#479
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b72b744 commit 6f3faa0
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
192 | 199 | | |
193 | 200 | | |
194 | 201 | | |
0 commit comments