Skip to content

Comments

feat: upgrade to ADCP 3.5.0 with catalog support#48

Merged
bokelley merged 6 commits intomainfrom
bokelley/universal-ad-format
Feb 22, 2026
Merged

feat: upgrade to ADCP 3.5.0 with catalog support#48
bokelley merged 6 commits intomainfrom
bokelley/universal-ad-format

Conversation

@bokelley
Copy link
Contributor

@bokelley bokelley commented Feb 19, 2026

Summary

  • Upgrade adcp SDK from 3.4.0 to 3.5.0
  • Replace promoted_offerings with catalog_requirements on all 8 generative formats per ADCP 3.5.0 Catalog model
  • Add catalog validation in validate_catalog(): type enum, feed_format, content_id_type, update_frequency, conversion_events, items/required_fields, min_items, offering_asset_constraints
  • Add feed_format compatibility check between catalog and CatalogRequirements.feed_formats
  • Add brand parameter to build_creative tool (accepts domain string or BrandReference dict)
  • Remove universal format (redundant now that catalogs handle multi-channel asset pools)
  • Delete 8 unused modules: api_server.py, http_server.py, compat.py, schemas/preview.py, schemas/brand_card.py, schemas/library.py, schemas/build.py, schemas/format_helpers.py
  • Remove fastapi dependency (MCP server doesn't need it)
  • Fix validate_url security: remove misplaced data URI bypass, fix exception swallowing
  • Clean up .bak files from test directory

Net: -1,038 lines, coverage 76.93%, 300 tests passing.

Test plan

  • All 300 tests pass (uv run pytest -x)
  • Ruff lint clean (uv run ruff check src/ tests/)
  • Mypy passes (pre-commit hook)
  • 49 formats load correctly (8 generative with catalog_requirements, no promoted_offerings)
  • Catalog enum validation works for all 4 fields (feed_format, content_id_type, update_frequency, conversion_events)
  • Feed format compatibility check validates catalog against requirements
  • build_creative accepts brand parameter
  • Deleted modules confirmed absent from filesystem
  • Code review addressed (security fixes, mypy errors, .bak cleanup)

🤖 Generated with Claude Code

bokelley and others added 3 commits February 19, 2026 06:25
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>
@github-actions
Copy link

github-actions bot commented Feb 22, 2026

All contributors have agreed to the IPR Policy. Thank you!
Posted by the CLA Assistant Lite bot.

@bokelley bokelley changed the title feat: add universal creative format (multi-channel asset pool) feat: upgrade to ADCP 3.5.0 with catalog support Feb 22, 2026
bokelley and others added 3 commits February 21, 2026 21:35
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>
@bokelley
Copy link
Contributor Author

I have read the IPR Policy

@bokelley bokelley merged commit 4eccbca into main Feb 22, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant