feat: upgrade to ADCP 3.5.0 with catalog support#48
Merged
Conversation
Adds a 'universal' format similar to Google's Performance Max asset groups. Publishers receive a pool of assets and assemble placements themselves -- this is a submission container, not a generative format. Asset pools use repeatable_group from the adcp library, supporting: - headlines (1-15, 30 chars), long_headlines (0-5, 90 chars) - descriptions (1-5, 90 chars) - images_landscape/square/portrait (1-20 each) - logos_square/landscape (0-5 each) - videos_landscape/portrait (0-15), videos_square (0-5) - Individual: brand_name, cta, promoted_offerings, click_url, impression_tracker Also fixes: - _format_to_human_readable now includes repeatable group IDs for LLMs - assets_required backward compat excludes repeatable groups (old clients don't understand item_type=repeatable_group) - filter_formats has_asset_type handles repeatable groups via getattr Known limitation (deferred): validate_manifest_assets does not yet enforce required repeatable groups. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
validate_manifest_assets now handles Assets5 (repeatable_group) entries: - Required groups (headlines, descriptions, images_landscape, images_square) are checked for presence using asset_group_id - min_count and max_count are enforced on submitted lists - Each item in a group list is validated using the inner asset type (e.g. each headline item is validated as a text asset) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace promoted_offerings with catalog_requirements on generative formats per ADCP 3.5.0. Add catalog validation (type, enum fields, feed_format compatibility, offering_asset_constraints). Add brand parameter to build_creative. Remove universal format (redundant with catalogs). Delete 8 unused modules and .bak files. Fix validate_url exception handling and remove misplaced data URI bypass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
All contributors have agreed to the IPR Policy. Thank you! |
Annotate COMMON_MACROS as list[str | Any] to satisfy list[UniversalMacro | str] invariance. Add None guards for FormatCategory | None on fmt.type.value accesses. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove traceback strings from client-facing error responses, log server-side with logger.exception() instead - Validate output_format parameter early in preview_creative - Remove dead try/except ValidationError around f-string - Move inline imports (re) to top level - Simplify redundant emptiness check in _handle_batch_preview - Fix enum comparison to use .value for FormatCategory - Add regression tests for data URI rejection in validate_url - Clarify data URI size limit comment Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The adcp package is installed from a git URL which requires git to be available in the Docker build environment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
I have read the IPR Policy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
validate_catalog(): type enum, feed_format, content_id_type, update_frequency, conversion_events, items/required_fields, min_items, offering_asset_constraintsbuild_creativetool (accepts domain string or BrandReference dict)Net: -1,038 lines, coverage 76.93%, 300 tests passing.
Test plan
uv run pytest -x)uv run ruff check src/ tests/)🤖 Generated with Claude Code