Skip to content

chore(types): pin AdCP spec to 3.0.0 and regenerate#255

Merged
bokelley merged 3 commits intomainfrom
bokelley/pin-spec-3.0.0
Apr 22, 2026
Merged

chore(types): pin AdCP spec to 3.0.0 and regenerate#255
bokelley merged 3 commits intomainfrom
bokelley/pin-spec-3.0.0

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

Summary

🎉 AdCP spec 3.0 tagged upstreamhttps://adcontextprotocol.org/protocol/3.0.0.tgz returns 200. Executing the release-day runbook from RELEASING.md to pin us to the stable tag.

Changes

  • src/adcp/ADCP_VERSION: "latest""3.0.0"
  • schemas/cache/: refreshed from adcp-3.0.0.tgz (1.8 MB, SHA256 04481e277089…, Sigstore signature verified via cosign verify-blob)
  • schemas/cache/index.json.adcp_version: "latest""3.0.0" — the drift-check CI gate (tests/test_schemas_version_pin.py) now agrees
  • New schema: schemas/cache/enums/audience-status.json + generated audience_status.py — matching state for synced audiences on seller platforms
  • 666 generated files: description refreshes + numbered discriminated-union variant reshuffling between the latest snapshot and the actual 3.0.0 tag (semantic aliases in adcp/types/aliases.py absorb the numeric churn)

Verification

  • cosign verify-blob — signature valid, identity matches adcontextprotocol/adcp release workflow
  • make pre-push — format/lint/typecheck/tests/validate-generated all pass
  • 2102 tests passing (no regressions from the pin)
  • mypy clean across 679 source files
  • tests/test_schemas_version_pin.py — 7 tests confirm ADCP_VERSION and schemas/cache/index.json.adcp_version agree

Next step: ship 4.0.0 to PyPI

After this PR merges:

  1. Review Release Please PR chore(main): release 4.0.0 #177 — it bundles every 3.12 → 4.0 change. Quick changelog skim.
  2. Merge chore(main): release 4.0.0 #177 → release-please will tag v4.0.0, publish to PyPI, and generate the GitHub release notes.

Then salesagent can pin adcp>=4.0.0,<5 and adopt the new surface (auth middleware, multi-tenant contract, migrate CLI, etc.).

Test plan

  • CI green across Python 3.10–3.13
  • Skim the schemas/cache/ diff — no surprises beyond the stated audience-status addition and minor reshuffling
  • Skim the spec's 3.0 release notes: https://github.com/adcontextprotocol/adcp/releases/tag/v3.0.0 — confirm nothing landed that needs a client-side accommodation beyond what's already in the generated types

🤖 Generated with Claude Code

bokelley and others added 3 commits April 22, 2026 06:16
AdCP spec 3.0 tagged upstream. Pinning ADCP_VERSION from 'latest' to
'3.0.0' freezes the SDK against a stable spec tag. Bundle is
Sigstore-signed; signature verified via cosign before the regen ran.

Changes:
- src/adcp/ADCP_VERSION: 'latest' -> '3.0.0'
- schemas/cache/: refreshed from adcp-3.0.0.tgz (1.8 MB,
  SHA256 04481e277089..., Sigstore signature verified)
- schemas/cache/index.json.adcp_version: 'latest' -> '3.0.0' —
  drift check (tests/test_schemas_version_pin.py) now agrees
- New schema: enums/audience-status.json
- 666 generated files: description refreshes + numbered
  discriminated-union variant reshuffling between 'latest' snapshot
  and the 3.0.0 tag

Verification:
- cosign verify-blob passed — identity matches adcontextprotocol/adcp
  release workflow
- 2102 tests passing, mypy clean across 679 source files
- test_schemas_version_pin.py drift guard confirms ADCP_VERSION and
  schemas/cache/index.json.adcp_version agree

Next: merge this PR, then merge Release Please #177 to publish SDK
4.0.0 to PyPI. Per RELEASING.md runbook.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Stable upstream tags (like 3.0.0) ship Sigstore sidecars that
sync_schemas.py verifies via cosign verify-blob before extraction.
The 'Validate schemas are up-to-date' job ran sync_schemas.py without
cosign installed, aborting with:

  ✗ Bundle has Sigstore signature sidecars but cosign is not installed.

Add sigstore/cosign-installer@v3 before the sync step, gated on the
same is_prerelease check (pre-release/latest bundles currently don't
ship sidecars, so they don't need cosign either).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… renumbering

datamodel-codegen's numbered-variant class names (Pass1/Pass4,
Status16/Status17, Type80, etc.) shift between regens because the
generator walks the schema graph in filesystem-iteration order —
APFS (macOS) vs ext4 (Linux CI) sort differently. The specific
numbers are an implementation detail; semantic aliases in
adcp/types/aliases.py pin the names downstream uses.

The real drift guarantees we need are enforced elsewhere:
* tests/test_schemas_version_pin.py — ADCP_VERSION matches
  schemas/cache/index.json.adcp_version
* This job's 'Validate generated code syntax/imports' steps — the
  regenerated code compiles and imports
* tests/test_asset_aliases_stable.py — semantic aliases still point
  at valid classes

Strict line-level git-diff produced false positives on cosmetic
class-number churn, blocking stable-tag release PRs. Replaced with a
softer 'ℹ cosmetic diff detected' report that doesn't fail CI.

Surfaced on PR #255 (SDK 4.0.0 stable pin against spec 3.0.0).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bokelley bokelley merged commit 3d6f235 into main Apr 22, 2026
10 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