Repository navigation
chore(contracts): vendor only the parts of the upstream contract the SDK consumes - #105
Merged
Merged
Conversation
…SDK consumes The refresh script now writes a public projection of the upstream filter/shape contract, dropping server-side implementation details: filter and paginator class names, docs-coverage bookkeeping, and the generator path. The vendored contract is re-generated through the projection at API 5.13.0; everything the conformance and shape-coverage gates read is unchanged. The CI staleness notice compares against a fresh projection of the upstream contract instead of the raw file. A new test pins the projection so a future refresh cannot reintroduce the dropped keys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The projection now also removes each resource's server view path and its swagger audit flag; the public Swagger parameter list stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vdavez
marked this pull request as ready for review
October 29, 2026 20:15
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.
What
scripts/refresh_contract.pynow writes a public projection of the upstream filter/shape contract: it drops server-side implementation details (filter, paginator and view class names, docs and Swagger audit bookkeeping, generator path) and keeps everything the SDK's gates read.contracts/filter_shape_contract.jsonis re-vendored through the projection at API 5.13.0. The diff is deletions only.lint.ymlnow projects the upstream file before comparing, so it doesn't warn on every run.tests/test_refresh_contract.pypins the projection and asserts the committed contract is already projected.Why
The vendored contract is only an input to the conformance and shape-coverage gates. Server-side implementation details in it aren't used by the SDK, so they don't need to be published.
Testing
ruff format --check,ruff check,mypy tango/: clean.check_filter_shape_conformance.py: passes.--list-unmappedstill emitspagination_class(now empty).check_shape_coverage.py: 0 new gaps.pytest: 699 passed, 1 skipped.No CHANGELOG entry: only
scripts/,tests/,contracts/and CI change, and none of them ship in the package.🤖 Generated with Claude Code