Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: adcontextprotocol/adcp-client-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v9.1.1
Choose a base ref
...
head repository: adcontextprotocol/adcp-client-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v9.2.0
Choose a head ref
  • 10 commits
  • 350 files changed
  • 3 contributors

Commits on Oct 26, 2026

  1. fix(testing): stop build_all_models hanging after a generated_poc ali…

    …as import (#1626)
    
    The deprecated adcp.types.generated_poc.* alias registers the canonical
    adcp.types.domains.* module object under a second sys.modules key.
    _realize_lazy_exports filtered its snapshot on the sys.modules key but marked
    module.__name__ visited, so the alias key was never retired and the walk
    never terminated.
    
    Mark the key the snapshot filtered on and walk each module object once by
    identity, so an alias and its target are the same module. As a backstop the
    walk is capped at 100 passes (the SDK surface stabilizes in about 4); if it
    still finds newly imported modules after that it raises RuntimeError naming
    them instead of spinning.
    
    Fixes #1619
    
    Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
    bokelley and claude authored Oct 26, 2026
    Configuration menu
    Copy the full SHA
    6f61234 View commit details
    Browse the repository at this point in the history
  2. fix(adagents): strip surrounding whitespace in normalize_url (#1629)

    normalize_url(" https://interchange.io ") returned "interchange.io " because
    urlparse drops leading whitespace but keeps trailing whitespace in the path,
    so an adagents.json entry with a padded url did not match its agent. Strip
    before parsing; _normalize_domain already does the same.
    
    Signing paths keep byte-exact canonicalization: canonicalize_target_uri is a
    signature-base canonicalizer, and the brand.json / adagents entry matches in
    signing select keys or the signer identity and fail closed.
    
    Fixes #1624
    
    Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
    bokelley and claude authored Oct 26, 2026
    Configuration menu
    Copy the full SHA
    4e2ae8f View commit details
    Browse the repository at this point in the history
  3. fix(compat): infer display_tag and every 3.2 asset type from the asse…

    …t key (#1628)
    
    coerce_legacy_assets() / infer_asset_type() let an exact type-name key win
    over field presence, but the type names came from a hand-kept list of 14 that
    predated AdCP 3.2. An untyped asset under `display_tag` was inferred as
    text, url or image from its other keys.
    
    Derive the vocabulary from the generated AssetVariant union instead, so the
    key list is the 21 asset types the pinned schema declares (adds display_tag,
    zip, card, published_post, pixel_tracker, vast_tracker, daast_tracker) and a
    schema bump extends it in the same regeneration. Imported lazily on first use.
    
    Fixes #1624
    
    Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
    bokelley and claude authored Oct 26, 2026
    Configuration menu
    Copy the full SHA
    88cf04a View commit details
    Browse the repository at this point in the history
  4. fix(compat): never downgrade into a payload the older schema refuses (#…

    …1630)
    
    * fix(compat): never downgrade into a payload the older schema refuses
    
    Projection dropped what the target release could not hold but never
    checked that the parent it left behind was still valid. A notification
    config whose event types were all 3.2-only kept event_types: [] below
    3.1's minItems: 1, and a structured 3.2 geo_regions capability became {}
    where 3.1 allows only a boolean.
    
    When a node loses or coarsens a direct child, its own shape keywords
    (required, minItems, minProperties, unions, if/then) are now checked
    against the older schema. If the newer schema accepted the original and
    the older one refuses the remainder:
    
    - a boolean | object capability whose older contract is boolean maps to
      true when the structure declares any support (coarsened_to_boolean)
    - an optional field is omitted (unrepresentable_in_target)
    - a response array item is omitted (unrepresentable_in_target)
    - a request array item is never dropped: a shortened sync list can read
      as removal under delete_missing, so the nearest optional field holding
      it is omitted instead
    - a required chain to the root raises ADCPVersionConversionError at the
      refused value
    
    Every downgrade then validates against the older bundled schema and
    raises a structured error for anything still refused, such as a required
    enum member the older release cannot spell. Payloads already invalid in
    their own release are projected but neither repaired nor rejected.
    
    Also fixes a crash resolving $ref pointers that index into a list
    (#/oneOf/N, comply_test_controller).
    
    A new sweep converts every bundled 3.2 schema example, the canonical
    parity cases, the audience-evidence vectors and new fixtures down to 3.1
    and 3.0. Before: 21 of 168 conversions failed (19 refused by the target
    schema, 2 crashes). After: 0; 10 are listed, intentional structured errors.
    
    Fixes #1621
    
    Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
    
    * fix(compat): blame only drops that cause a refusal; never repair requests
    
    Review follow-ups:
    
    - A node is dropped only when the drop caused the refusal: the target must
      accept it with the dropped children restored. Otherwise the final check
      raises, so a 3.1 delivery row missing spend is not silently discarded
      just because a 3.2-only sibling was also dropped.
    - Requests are never repaired by omission: an absent filter widens the
      search and a shortened sync list can read as removal. They fail with a
      structured error instead.
    - The final check validates against the same portable schemas the
      projection used, without the validator's payload size cap.
    - Structured-error reasons are value-free; pointers from the final check
      locate the value in the converted payload.
    - Chained $ref nodes resolve fully for the shape checks.
    - convert_payload(require_valid_target=False) for evidence reconstruction,
      used by the negotiated catalog purchase round-trip.
    
    Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
    
    * fix(compat): keep the final check on for status-less responses
    
    The SDK validators default a missing status envelope; the final check now
    does the same, so a direct caller converting a status-less 3.2 response
    still gets the guarantee. Also restore only removed (not coarsened) list
    items when attributing a refusal, and word false-schema refusals.
    
    Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
    
    ---------
    
    Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
    bokelley and claude authored Oct 26, 2026
    Configuration menu
    Copy the full SHA
    b5234e2 View commit details
    Browse the repository at this point in the history
  5. feat(server): let PrincipalResolverError carry a stable error code (#…

    …1633)
    
    PrincipalResolverError(403, code="identity_org_mismatch") answers
    403 {"error": "identity_org_mismatch"} on MCP and A2A. Codes must match
    ^[a-z][a-z0-9_]{0,63}$; anything else falls back to the generic body.
    Exception text is never sent, and the default bodies are unchanged.
    
    Fixes #1623
    
    Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
    bokelley and claude authored Oct 26, 2026
    Configuration menu
    Copy the full SHA
    cf96d57 View commit details
    Browse the repository at this point in the history
  6. fix(reporting): classify pending status and owed history as transient…

    …, unresolved references as REFERENCE_NOT_FOUND (#1631)
    
    installed_reporting_call projected STATUS_PROJECTION_UNAVAILABLE,
    HISTORY_UNAVAILABLE and LOOKUP_UNAVAILABLE as terminal. A pending status
    lifecycle and retained history the seller still owes resolve on the seller
    side, so they are transient. A reporting reference that does not resolve for
    the caller answers the standard, nondisclosing REFERENCE_NOT_FOUND
    (correctable) with a generic message.
    
    Fixes #1618
    
    Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
    bokelley and claude authored Oct 26, 2026
    Configuration menu
    Copy the full SHA
    a2ec81c View commit details
    Browse the repository at this point in the history
  7. fix(decisioning): project ADCPTaskError from platform methods to its …

    …own wire error (#1632)
    
    _invoke_platform_method caught only AdcpError and pydantic ValidationError,
    so IdempotencyConflictError raised by IdempotencyStore.wrap reached the buyer
    as INTERNAL_ERROR / terminal. ADCPTaskError subclasses now keep their code and
    recovery through the same field extraction serve() uses, on the sync path and
    in handoff tasks.
    
    Fixes #1622
    
    Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
    bokelley and claude authored Oct 26, 2026
    Configuration menu
    Copy the full SHA
    7b95b26 View commit details
    Browse the repository at this point in the history
  8. fix(types): inherit the generated field on every hand-written redecla…

    …ration (#1625)
    
    Fixes #1620. Same class as #1587/#1610; a mechanical extension of #1548, #1579 and #1591.
    
    ## The defect
    
    Optional fields that `adcp.types.canonical_creative` redeclares did not carry the never-null marker (`_RefuseJsonNull` plus `exclude_if`) their generated counterparts do, so a nested dump through a plain Pydantic parent emitted `null` for them (`Product.placements`, `Placement.format_options`, `CreateMediaBuyRequest.packages`, `UpdateMediaBuyRequest.packages` / `new_packages`, `GetProductsResponse.products`, `GetProductsRequest.filters`, `ListCreativesRequest.filters`). Root cause: hand redeclarations that narrow the annotation used a bare `Field(...)` instead of inheriting the generated `FieldInfo`. The same redeclarations had also dropped descriptions and, on `CreateMediaBuyRequest.packages` / `UpdateMediaBuyRequest.packages`, the generated `min_length=1`.
    
    ## The fix
    
    - `adcp.types.base.inherit_field(source, name, *, required=False)` — the former `canonical_creative._inherit`, moved to `base` so every hand-written layer can use it; `required=True` drops the default for a subclass that makes an optional generated field mandatory (`Product.format_options`, `CreativeAsset.format_kind`, `Creative.format_kind`). `_inherit` remains as the alias `canonical_creative` has used since #1548.
    - Every redeclaration of a generated field now goes through it: 17 in `canonical_creative.py`, `capabilities.MediaBuy.reporting_delivery`, and `projections` (`AccountResponse.billing_entity`, `AccountResponse.notification_configs` — whose `max_length=16` is now inherited rather than restated — and `_NotificationConfigResponse.authentication`).
    - `_forward_compat.py` was checked: its only redeclarations (`adcp_version`, `adcp_major_version` on the readback models) already match their generated parent.
    
    ## Guard test
    
    `tests/test_redeclared_fields_inherit.py` imports every `adcp` module, finds every hand-written subclass of a generated model, and asserts each redeclared field keeps its generated parent's never-null marker, constraints, description and alias. Defaults may differ (narrowing to required is the point). Two exemptions, each with a reason: `BusinessEntityResponse.bank` and `_NotificationAuthenticationResponse.credentials` are write-only projections — excluded from every dump, any value refused — so the marker and the generated `min_length` have nothing to apply to. A stale exemption fails the suite. The issue's reproduction and the eight listed fields are tested directly.
    
    `make lint`, `make typecheck-all` pass; the related suites (canonical subclasses, capabilities, composability, account projections, public API) pass. Pre-commit cannot build its python3.11 hook environment in this sandbox, so the commit skipped hooks; black, ruff and mypy were run directly.
    
    Squash-merge only.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    <!-- conductor-workspace-link -->
    
    ---
    
    [Open workspace in Conductor](https://app.conductor.build/pro-user-232ad008-36c5-45c0-b430-d68f028abd4b/w/851)
    bokelley authored Oct 26, 2026
    Configuration menu
    Copy the full SHA
    6e0ed68 View commit details
    Browse the repository at this point in the history
  9. feat(types): keep wire bytes on parsed URLs, datetimes, UUIDs and ema…

    …ils so digests round-trip (#1617)
    
    AnyUrl, AwareDatetime, UUID and EmailStr rewrite what they parse (a
    trailing slash on a bare origin, +00:00 to Z, dropped .000), so a
    digest-covered object such as AudienceEvidence could not reproduce its
    own content_digest after parse and dump. Generated uri, date-time, uuid
    and email fields now use wire-preserving subclasses that keep the input
    text when it is strictly valid wire syntax naming the same host, and
    normalize otherwise. AudienceEvidence and its pin, selection and
    canonical variants are exported from adcp.types, and
    AdCPBaseModel.model_dump_as_received() dumps an object as received.
    
    Behaviour change: parsed URLs, datetimes, UUIDs and emails keep their
    received spelling in str() and JSON output (no added trailing slash, +00:00
    kept). Runtime values are subclasses, so type(x) is datetime is false while
    isinstance holds, and str(url)-keyed caches see different spellings of the
    same URL as different. Strings that are not strict wire syntax are still
    normalized. The JSON Schema is unchanged.
    
    Fixes #1610
    
    Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
    bokelley and claude authored Oct 26, 2026
    Configuration menu
    Copy the full SHA
    a7f5acd View commit details
    Browse the repository at this point in the history
  10. chore(main): release 9.2.0 (#1627)

    Co-authored-by: aao-ipr-bot[bot] <279263549+aao-ipr-bot[bot]@users.noreply.github.com>
    aao-ipr-bot[bot] authored Oct 26, 2026
    Configuration menu
    Copy the full SHA
    5314faa View commit details
    Browse the repository at this point in the history
Loading