chore(types): regenerate schemas from upstream spec#252
Merged
Conversation
Pulled latest schemas via `make regenerate-schemas`. Spec drift includes: - protocol.get_adcp_capabilities_response.idempotency is now a discriminated oneOf (IdempotencySupported / IdempotencyUnsupported) with a new `account_id_is_opaque` field — lets code generators that can't lower draft-07 if/then constructs produce correct named types with the replay_ttl_seconds invariant at the type level. - Other files: refreshed descriptions, enum reorderings that reshuffle numbered discriminated-union variants, minor field tightening. 296 generated files changed, ~24K lines in / ~20K lines out. validate-generated passes. mypy clean across 678 source files. Full suite: 2079 tests passing (no regressions — PR #251's A2A contextId integration suite lands cleanly against the refreshed types). No source changes outside generated_poc/ + _generated.py + _ergonomic.py + schemas/cache/. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Running black on src/adcp/types/generated_poc/ during pre-commit after make regenerate-schemas causes a stash conflict — the hook reformats the just-regenerated files, tries to re-apply over the seller's modifications, and rolls back. The regen script already runs black on the consolidated _generated.py at generation time; individual generated_poc/ files don't need per-commit formatting. Mirrors the ruff extend-exclude list for the same set. After this, a fresh make regenerate-schemas + git commit succeeds without the pre-commit roll-back. 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
make regenerate-schemas— deterministic output from the upstream spec. Largest visible change is capabilities-response idempotency becoming a discriminated union.Spec-level changes captured
get_adcp_capabilities_response.idempotencyis nowoneOf(IdempotencySupported, IdempotencyUnsupported)with a newaccount_id_is_opaquefield. Unblocks code generators that can't lower draft-07if/thenconstructs — thereplay_ttl_secondsinvariant is now enforced at the type level. Sellers declaring opaqueaccount_ids can now signal that in capabilities.schemas/cache/core/x-entity-types.json+ generatedx_entity_types.py.adcp/types/aliases.pycontinue to pin the stable names), minor field tightening.Also ran black over
generated_poc/to match pre-commit's formatting expectations on generated files (currently the only reason pre-commit stalls on regen commits — follow-up to add an exclude there).Tested
make validate-generated— passesmypy src/adcp/— clean across 678 source filespytest tests/— 2079 tests passing (no regressions; this includes PR feat(a2a): auto-retain contextId + taskId across multi-turn calls #251's +22 new A2A contextId integration tests which land cleanly against the refreshed types)Test plan
get_adcp_capabilities_responsediff — this is the one type where the shape genuinely changed (union vs flat object). Downstream consumers matching oncapabilities.idempotency.supportedstill work becausesupportedis the discriminator; anything switching on presence ofreplay_ttl_secondsas a sentinel for "supported" needs to migrate to the discriminated shape.src/adcp/types/generated_poc/to[tool.black] extend-excludeso future regens don't hit the pre-commit stash conflict.🤖 Generated with Claude Code