chore(types): pin AdCP spec to 3.0.1 and regenerate#292
Open
chore(types): pin AdCP spec to 3.0.1 and regenerate#292
Conversation
3.0.1 is a stable-surface no-op for handlers — no new fields, no renamed fields, no new enum values on stable schemas. Adopter action per the 3.0.1 release notes is just to bump ADCP_VERSION; this commit also ships the regenerated cache, types, and the new canonical skill bundles that 3.0.1 ships in the protocol tarball (the original driver for cutting 3.0.1). Schema deltas worth knowing: - Every schema now carries a $id pointing at /schemas/3.0.1/... and internal $refs are absolute. Source of the large file churn. - Seven new top-level enums + one new core type (seller-agent-ref). All additive. - core/format-id.json's title was polished from "Format ID" to "Format Reference (Structured Object)". The generator picks up the new class name (FormatReferenceStructuredObject), but the public surface keeps `FormatId` — re-bound in aliases.py to the canonical core class. Before this change, public FormatId resolved to a stale bundled-content-standards per-message duplicate that didn't match what Format.format_id actually expected, so user code constructing Format(format_id=FormatId(...)) would have raised at validation. Tests previously importing FormatId from adcp.types._generated are moved to the public adcp.types path (the layering rule documented in CLAUDE.md). New canonical skills bundled by 3.0.1: adcp-brand, adcp-creative, adcp-governance, adcp-media-buy, adcp-si, adcp-signals, call-adcp-agent. Tracked alongside the existing build-* SDK-local skills. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Acting on python-expert + dx-expert review of this PR: - ``scripts/consolidate_exports.py``: list ``FormatId`` in ``known_collisions`` keyed to all 25 bundled-message modules that inline a stale per-message duplicate. ``_generated.py`` no longer re-exports the bare ``FormatId`` name; the canonical class is exposed only through ``aliases.py``'s rebind. Fix the qualified-name generator to include the bundled subdir (``Bundled<Subdir><Stem>``) so duplicates that exist under both ``bundled/creative/`` and ``bundled/media_buy/`` produce distinct mypy-compatible aliases. - ``tests/test_import_layering.py``: enforce CLAUDE.md's layering rule (only ``aliases.py`` / ``_ergonomic.py`` / ``_generated.py`` / the public composer ``adcp.types/__init__.py`` may import from ``generated_poc/``). Frozen baseline of 9 pre-existing violators is listed in ``_KNOWN_VIOLATIONS``; new files or new imports trip the test, stale entries also trip it. Pre-existing violators get cleaned up in follow-up PRs without blocking this release. - ``adcp/__init__.py`` + ``adcp/types/__init__.py``: export ``SellerAgentReference`` (new core type added by AdCP 3.0.1) on the public surface — was generated but not re-exported. - ``.pre-commit-config.yaml``: add the same ``^src/adcp/types/generated_poc/`` exclude to black that was already on ruff. Without it every regen reformats ~200 codegen files for no benefit, masking real changes in the diff. - ``tests/fixtures/public_api_snapshot.json``: regenerate to capture ``SellerAgentReference``. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pin the SDK to AdCP 3.0.1 (released 2026-04-28). Per the 3.0.1 release notes, it's a stable-surface no-op for handlers — adopter action is just bumping `ADCP_VERSION`. This PR also picks up:
Compatibility note (4.1.0-bound, not 4.0.x)
This naturally rides into the 4.1.0 release that #257 already stages, not a 4.0.1 patch. The schema title polish on `core/format-id.json` ("Format ID" → "Format Reference (Structured Object)") changes the canonical class's `name` and `qualname`. That's invisible for typical user code (you construct via dict or via the public `FormatId` alias and don't notice), but it crosses the SemVer line for two niche cases:
Public `FormatId` keeps working (re-bound in `aliases.py` to the canonical class), and `isinstance` checks against the public alias on either version are consistent. Just not 4.0.1 territory.
Why so many files changed
Most churn is mechanical:
Review additions (commit 707cdb1)
After python-expert + dx-expert review:
What was tested
Out of scope
🤖 Generated with Claude Code