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.3.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.4.0
Choose a head ref
  • 6 commits
  • 87 files changed
  • 3 contributors

Commits on Oct 29, 2026

  1. fix(types): defer the import-time model rebuilds that cost adcp.clien…

    …t 560 MiB RSS (#1704)
    
    Importing adcp.client, adcp.server, adcp.decisioning or adcp.compat.versions
    realizes the type surface through adcp.types._eager, and on 9.3.0 that peaked
    at ~495 MiB RSS (~560 MiB for adcp.client) against ~130 MiB on 6.6. Two
    things built pydantic-core validators at import for models a process may
    never use:
    
    - The import-time patchers (_ergonomic, _forward_compat, canonical_creative,
      aliases) edited model_fields and then called model_rebuild(force=True) on
      ~35 request/response roots. Pydantic does not share nested defer_build
      schemas between parents, so each forced rebuild walked the model's whole
      subtree into a fresh validator and serializer: ~300 MiB and ~7 s of the
      import. They now call adcp.types.base.defer_model_rebuild(), which puts the
      model back into the defer_build placeholder state so the patched fields
      take effect on first use. Same outcome, later moment.
    
    - A generated `class X(RootModel[A | B])` built the union's validator at the
      RootModel[...] expression, before X or any config it declares existed;
      adagents.AdcpAgentsAuthorization and core.format.CanonicalParameters alone
      cost ~60 MiB. Generated composing roots now parametrize
      adcp.types.base.AdCPRootModel, which carries defer_build=True, via the new
      post-generate fixer defer_rootmodel_builds.
    
    Peak RSS of `python -I -c "import <module>"` (Linux, CPython 3.12):
    
      adcp.types._eager            495 -> 114 MiB  (import 14.5 s -> 4.1 s)
      adcp.client                  561 -> 175 MiB
      adcp.server                  565 -> 183 MiB
      adcp.server.test_controller  562 -> 183 MiB
      adcp.decisioning             573 -> 187 MiB
      adcp.compat.versions         498 -> 118 MiB
    
    The cost moves to first use: the first validation of a deferred root builds
    its schema (90-330 ms for the request models, ~2.4 s for McpWebhookPayload's
    JSON schema), and a process that has used every one of them sits at ~215 MiB
    instead of ~520 MiB. build_all_models() still realizes everything eagerly for
    freezegun callers.
    
    Deferring more models exposed a pydantic limitation that already applied to
    every defer_build model: pydantic-core reaches a serializer by reading
    instance.__pydantic_serializer__ when it dumps by inference (an Any-typed
    field, serialize_as_any, a plain-pydantic parent), and a placeholder there
    raised TypeError instead of building. Every deferred SDK model now carries
    placeholders that are also descriptors (_DeferredValSer), installed by
    AdCPBaseModel/AdCPRootModel.__pydantic_init_subclass__ and by
    defer_model_rebuild, so that read builds the model and returns the real
    serializer. This also fixes the pre-existing TypeError for an unvalidated or
    parent-built instance of any generated model dumped through such a parent.
    
    tests/test_import_memory.py imports each entry module in a subprocess and
    fails when its peak RSS exceeds 320 MiB; tests/test_lazy_rebuild.py grades
    the deferral contract, including that a canonical subclass may forward-
    reference a model defined later in its module (supersedes #1690).
    
    Fixes #1694
    
    Co-authored-by: Claude Fable 5.1 <[email protected]>
    bokelley and claude authored Oct 29, 2026
    Configuration menu
    Copy the full SHA
    aac52ca View commit details
    Browse the repository at this point in the history
  2. feat(signing): accept any well-formed adcp_use purpose in keygen (#1710)

    generate_signing_keypair, pem_to_adcp_jwk and adcp-keygen --purpose took a
    closed Literal["request-signing", "webhook-signing"] and refused every other
    value, so the SDK could not mint or publish a key for response-signing (the
    designated-task response JWS profile, core/response-payload-jws-envelope.json),
    governance-signing (which governance.py already verifies), or a surface the
    vocabulary does not name yet. The helpers they delegate to already took a str.
    
    purpose is now validated by syntax instead of membership: a lowercase
    hyphenated token of at most 64 characters. Malformed values (empty, upper
    case, underscores, whitespace, leading/trailing/double hyphens, non-str)
    still raise ValueError, and the CLI exits 2 before writing a file. An open
    vocabulary is safe because purpose matching is fail-closed: a verifier
    accepts a key only when adcp_use equals the purpose of the surface it
    verifies, so a key under any other purpose verifies nothing there. A test
    pins that against the request and webhook verifiers.
    
    adcp.signing exports ADCP_USE_REQUEST, ADCP_USE_WEBHOOK (marked deprecated
    upstream), and the new ADCP_USE_RESPONSE and ADCP_USE_GOVERNANCE, so callers
    need not retype literals. The docstrings no
    longer say request- and webhook-signing keys must be distinct for every
    verifier: 3.3 webhook verifiers accept request-signing keys, and new webhook
    signers publish request-signing.
    
    Backport of #1708 to 9.x. Closes #1677 on main.
    
    Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
    bokelley and claude authored Oct 29, 2026
    Configuration menu
    Copy the full SHA
    787cfb2 View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2026

  1. feat(server): seller helper for wholesale feed versions (#1718)

    Backport of #1706 to SDK 9.x (AdCP 3.2), whose get_products / get_signals
    wholesale fields, if_wholesale_feed_version / if_pricing_version rules and
    unchanged: true response are the same as 3.3's.
    
    adcp.server gains wholesale_feed_version and pricing_version (RFC 8785
    canonical, SHA-256, order-independent across items, path-addressed freshness
    fields ignored, keyed on cache_scope), check_feed_preconditions (the mode and
    pairing rules, INVALID_REQUEST with field) and feed_unchanged.
    products_response / signals_response no longer write unchanged: false, and
    refuse unchanged=True with items or without wholesale_feed_version, both of
    which the schema already rejects.
    
    Differences from #1706: the extra= docs no longer name the 3.3-only
    collections / signal_pricing_group_rules, and one test compares a model with
    its own wire form, since SDK 9 dumps unset schema defaults.
    
    Refs #1676
    
    Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
    bokelley and claude authored Oct 30, 2026
    Configuration menu
    Copy the full SHA
    7088ebf View commit details
    Browse the repository at this point in the history
  2. feat(adagents): attribute and verify publisher property claims (#1719)

    * feat(adagents): attribute and verify publisher property claims
    
    * fix(adagents): explain invalid publisher claim exclusions
    bokelley authored Oct 30, 2026
    Configuration menu
    Copy the full SHA
    0c0ef92 View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2026

  1. ci: pin pypa/gh-action-pypi-publish to v1.14.3 for GHSA-5xjx-3w67-w9x9 (

    #1752)
    
    The advisory, critical, covers every version up to 1.14.2, after
    revocation of a CA in the Sigstore chain used for Trusted Publishing and
    PyPI attestations. Same change as #1748 on next.
    
    Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
    bokelley and claude authored Oct 31, 2026
    Configuration menu
    Copy the full SHA
    8635115 View commit details
    Browse the repository at this point in the history
  2. chore(main): release 9.4.0 (#1714)

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