You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The authoritative AdCP 3.1.1 list-creative-formats-request.json schema defines:
type — enum [audio, video, display, dooh]
disclosure_positions — uniqueItems: true
disclosure_persistence — uniqueItems: true
The generated Python model in adcp-client-python==6.6.0 omits the type field and the uniqueItems validations, so a client cannot send the type filter and duplicate disclosure_positions / disclosure_persistence entries aren't rejected.
Repro: inspect the generated ListCreativeFormatsRequest model in 6.6.0. Expected:type field + uniqueItems validation present, per the 3.1.1 schema. Actual: absent.
Impact: downstream servers pinning 6.6.0 cannot honor these spec-defined filters/constraints and must suppress the corresponding conformance scenarios until codegen is fixed.
Classification: Bug (partial — one of two claims confirmed) Bucket(s): validation (no matching label in repo — noted in run summary) Status: ready-to-implement
What the experts said:
ad-tech-protocol-expert: type omission is intentional — the media-buy and creative schemas are distinct role boundaries in AdCP 3.1; the uniqueItems gap is a real codegen omission affecting both generated models; fix belongs in _ergonomic.py via BeforeValidator.
code-reviewer: type claim is a misidentified bug (reporter referenced the creative schema, not the media-buy one); uniqueItems confirmed on both models; coerce_to_unique_enum_list in scripts/generate_ergonomic_coercion.py is the correct fix layer.
My take: The type field (audio | video | display | dooh) is intentionally absent from ListCreativeFormatsRequest — it lives in ListCreativeFormatsRequestCreativeAgent, which is generated from the creative-agent schema. The uniqueItems gap is real: both source JSON schemas define uniqueItems: true for disclosure_positions and disclosure_persistence, but datamodel-code-generator silently drops it.
Implementation scope:
Add coerce_to_unique_enum_list (order-preserving dedup via dict.fromkeys) to src/adcp/types/coercion.py.
Update scripts/generate_ergonomic_coercion.py to use it for disclosure_positions and disclosure_persistence on both ListCreativeFormatsRequest (media-buy) and ListCreativeFormatsRequestCreativeAgent (creative); regenerate src/adcp/types/_ergonomic.py.
Add test cases in tests/test_type_coercion.py asserting duplicate enum values on both fields are silently deduplicated.
Non-breaking: silent dedup preserves all valid callers; duplicates were always spec-violating per uniqueItems: true in the source schemas. No action needed on type.
Activity
bokelley commentedon Jul 16, 2026
Triage
Thanks for filing!
Classification: Bug (partial — one of two claims confirmed)
Bucket(s): validation (no matching label in repo — noted in run summary)
Status: ready-to-implement
What the experts said:
typeomission is intentional — the media-buy and creative schemas are distinct role boundaries in AdCP 3.1; theuniqueItemsgap is a real codegen omission affecting both generated models; fix belongs in_ergonomic.pyviaBeforeValidator.typeclaim is a misidentified bug (reporter referenced the creative schema, not the media-buy one);uniqueItemsconfirmed on both models;coerce_to_unique_enum_listinscripts/generate_ergonomic_coercion.pyis the correct fix layer.My take: The
typefield (audio | video | display | dooh) is intentionally absent fromListCreativeFormatsRequest— it lives inListCreativeFormatsRequestCreativeAgent, which is generated from the creative-agent schema. TheuniqueItemsgap is real: both source JSON schemas defineuniqueItems: truefordisclosure_positionsanddisclosure_persistence, butdatamodel-code-generatorsilently drops it.Implementation scope:
coerce_to_unique_enum_list(order-preserving dedup viadict.fromkeys) tosrc/adcp/types/coercion.py.scripts/generate_ergonomic_coercion.pyto use it fordisclosure_positionsanddisclosure_persistenceon bothListCreativeFormatsRequest(media-buy) andListCreativeFormatsRequestCreativeAgent(creative); regeneratesrc/adcp/types/_ergonomic.py.tests/test_type_coercion.pyasserting duplicate enum values on both fields are silently deduplicated.uniqueItems: truein the source schemas. No action needed ontype.pytest tests/test_type_coercion.py,mypy src/,ruff check .Triaged by Claude Code. Session: https://claude.ai/code/session_019f2K7fyr3Me24q4MZpB4A3
Generated by Claude Code
docs: correct inverted UC-005 conftest rationale for type/disclosure …
fix: mark UC-005 xfails owner-approved, correct SDK-codegen narrative…
fix: correct UC-005 type/disclosure disposition per SDK prebid#971 tr…