Commit 65e4368
feat(protocol): support AdCP 3.1.0-rc.10 (#944)
* feat(protocol): support AdCP 3.1.0-rc.10
Bump the spec pin from 3.1.0-rc.9 to 3.1.0-rc.10 and regenerate types
from the rc.10 bundle.
rc.9 -> rc.10 schema delta:
- Postal-area targeting restructured: geo_postal_areas items move from the
inline {system, values} form (GeoPostalArea) to the standalone
core/postal-area.json (PostalArea: native country + system + values, plus
a deprecated LegacyPostalArea arm). New supporting schemas
postal-country-system.json and postal-area-support.json. The postal-system
enum now holds native tokens; legacy country-fused tokens (us_zip,
gb_outward, ...) move to the new legacy-postal-system.json enum.
- TaskType gains build_creative (and the creative task domain).
- BuildCreativeRequest gains push_notification_config.
- CreateMediaBuyRequest gains paused.
- recipe_hash added to BuildCreativeResponse / Variant.
- country added across geo dimensions, delivery metrics, forecast, and
required geo targeting.
- Capabilities: the GeoPostalAreas block is replaced by the country-keyed
PostalAreaSupport map; the build_creative evaluator gains a
CREDENTIAL_IN_ARGS rejection clause.
Type-layer fixes for the delta:
- adcp.types: PostalArea (the public RootModel union over the rc.10
postal-area.json) is the spec-current export. GeoPostalArea is retained as
a deprecated alias to the PostalArea legacy arm (PostalArea5), which is
shape-compatible with the removed inline {system, values} type and accepts
the same country-fused tokens, so old import and construction code keeps
working and the value still validates against the PostalArea union.
- collision_allowlist.json: +System (two identical postal-system enums in
core.postal_area / core.postal_country_system; first-seen resolution is
safe), -PostalArea (now single-source via core/postal-area.json).
- post_generate_fixes.fix_allof_merge_field_override_conflicts: collapse the
allOf-merge classes the rc.10 postal schema makes datamodel-codegen emit
with two incompatible bases (a narrow per-country arm and a loose
own-props arm). Inherit only the narrow arm and keep the loose arm's
unique fields locally — the correct allOf intersection — clearing strict
mypy's base-incompatibility and field-override errors without weakening
validation.
Tests bumped to the current pin (test_schema_validation start-timing cases,
test_upstream_recorder compliance-schema cache path). Historical
back-compat version-routing tests left unchanged. Pure variant-renumber
churn discarded per CLAUDE.md.
Closes #943
Deprecated: AdCP 3.1.0-rc.10 restructures postal-area targeting. GeoPostalArea is deprecated in favor of PostalArea (an anyOf of a native per-country arm and a legacy arm). GeoPostalArea is retained as a deprecated alias to the PostalArea legacy arm — old `from adcp.types import GeoPostalArea` imports and `{system, values}` construction keep working (with a DeprecationWarning) and still validate against the PostalArea union. The legacy alias is removed in a future major.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(protocol): align rc.10 codegen artifacts and the build_creative task type
Follow-ups surfaced by the full test gate after the rc.10 regen:
- post_generate_fixes.restore_format_asset_numbered_aliases: detect the
repeatable asset group by its Literal['repeatable_group'] annotation, not
only by an already-injected default. The fix runs before
inject_literal_discriminator_defaults, and rc.10's codegen emits the
discriminator without a default — so the prior Constant-value check missed
the class and the Assets94 back-compat alias was dropped, breaking
tests/test_forward_compat_assets.py.
- decisioning.webhook_emit.SPEC_WEBHOOK_TASK_TYPES: add build_creative. The
rc.10 task-type enum widened to include it and BuildCreativeRequest now
carries push_notification_config, so it is an async webhook-emitting task.
The constant is pinned to the on-disk enum by a CI test.
- tests/fixtures/public_api_snapshot.json: regenerate for the intended
GeoPostalArea -> PostalArea public rename.
Note for the TS SDK: bump its SPEC_WEBHOOK_TASK_TYPES for build_creative in
lockstep (cross-repo, out of scope here).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(types): retain GeoPostalArea as deprecated alias to PostalArea legacy arm
AdCP 3.1.0-rc.10 removed the inline {system, values} GeoPostalArea type in
favor of the PostalArea union (native per-country arm + legacy arm). The
legacy arm (PostalArea5) is shape-compatible with the removed GeoPostalArea
and accepts the same country-fused tokens (us_zip, gb_outward, ...), so the
removal can be a graceful deprecation rather than a hard break.
Add a PEP 562 module-level __getattr__ to adcp.types that resolves the
removed GeoPostalArea name to the PostalArea legacy arm, emitting a
DeprecationWarning that names the PostalArea migration target. Old import
and construction code keeps working, and the constructed value validates
against the PostalArea union via the legacy arm with no spurious country
injection. The alias stays out of __all__, so the public-API snapshot is
unaffected.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 5ca5758 commit 65e4368
808 files changed
Lines changed: 965549 additions & 639 deletions
File tree
- schemas/cache/3.1.0-rc.10
- a2ui
- aao
- account
- brand
- bundled
- content-standards
- core
- creative
- media-buy
- property
- protocol
- signals
- sponsored-intelligence
- collection
- compliance
- content-standards
- core
- assets
- async-response-refs
- creative
- media-buy
- signals
- requirements
- creative
- asset-types
- enums
- error-details
- extensions
- formats/canonical
- governance
- media-buy
- pricing-options
- property
- protocol
- registries
- signals
- sponsored-intelligence
- tmp
- scripts
- src/adcp
- decisioning
- types
- generated_poc
- account
- brand
- bundled
- core
- media_buy
- protocol
- signals
- core
- enums
- media_buy
- protocol
- tests
- fixtures
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
0 commit comments