Skip to content

Sync canonical schemas post-3.0.2-beta.0: aliases.py drift on 38 *1 codegen artifacts #306

@bokelley

Description

@bokelley

Context

Upstream adcontextprotocol/adcp shipped two refactors that the Python SDK hasn't synced yet:

  1. adcp#3459 (asset-union refactor, 3.0.2-beta.0) — promoted the inline asset-variant oneOf to canonical core/assets/asset-union.json. This eliminates the *Asset1 codegen artifacts that json-schema-to-typescript (and our datamodel-code-generator) were emitting from inline duplication.
  2. adcp#3493 (version-negotiation, merged 2026-04-29) — adds adcp_version (release-precision string) to every request/response schema via allOf composition against core/version-envelope.json, deprecates adcp_major_version (integer).

When python scripts/sync_schemas.py is run against latest.tgz and types are regenerated, src/adcp/types/aliases.py fails to import because 38 *1 discriminator artifacts no longer exist:

  • 4 asset-union artifacts (DaastAsset1, VastAsset1, etc.) — eliminated by #3459.
  • 34 oneOf-response-discriminator artifacts (AcquireRightsResponse1, SyncCreativesResponse1, etc.) — likely affected by the schema layout change but root cause not yet investigated.

Repro

mv src/adcp/ADCP_VERSION src/adcp/ADCP_VERSION.bak
python scripts/sync_schemas.py --no-skills      # falls back to latest.tgz
python scripts/generate_types.py                 # ImportError on AcquireRightsResponse1
mv src/adcp/ADCP_VERSION.bak src/adcp/ADCP_VERSION

Full list of broken aliases

AccountReference1, AcquireRightsResponse1, ActivateSignalResponse1, ActivationKey1,
Assets1, AuthorizedAgents1, BuildCreativeResponse1, CalibrateContentResponse1,
CatalogFieldBinding1, ComplyTestControllerResponse1, CreateContentStandardsResponse1,
CreateMediaBuyResponse1, DaastAsset1, Deployment1, Destination1, Field1,
GetAccountFinancialsResponse1, GetBrandIdentityResponse1, GetContentStandardsResponse1,
GetCreativeFeaturesResponse1, GetMediaBuyArtifactsResponse1, GetRightsResponse1,
ListContentStandardsResponse1, LogEventResponse1, PreviewCreativeResponse1,
PreviewRender1, ProvidePerformanceFeedbackResponse1, PublisherPropertySelector1,
Response1, SyncAccountsResponse1, SyncAudiencesResponse1, SyncCatalogsResponse1,
SyncCreativesResponse1, SyncEventSourcesResponse1, UpdateContentStandardsResponse1,
UpdateMediaBuyResponse1, ValidateContentDeliveryResponse1, VastAsset1

Suggested fix path

Each old *1 name maps to either:

  • A new canonical type (e.g. VastAsset1AssetUnion member, or kept as inner type via the new core/assets/asset-union.json $ref).
  • A renamed branch of a discriminated oneOf (e.g. AcquireRightsResponse1 → likely AcquireRightsAcquiredResponse or similar named branch).

Concrete steps:

  1. Sync schemas (scripts/sync_schemas.py against latest.tgz or 3.0.2-beta.0+).
  2. Run scripts/generate_types.py and inspect src/adcp/types/_generated.py for the new exported names.
  3. Map each broken alias in src/adcp/types/aliases.py to its new canonical name. Use git-blame on the original alias additions to recover semantic intent for the discriminated branches.
  4. Update tests that may depend on the old names.
  5. Bump src/adcp/ADCP_VERSION to the synced version once stable.

Why this is its own PR

This is independent of the version-negotiation work (PR #294) and shouldn't bundle with it. The aliases drift affects every consumer using union types from the public surface; needs careful review and probably a CHANGELOG entry for the rename.

Cross-refs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions