Repository navigation
DID-9473: [QA-SDK-PYTHON] Python server SDK release contract - #15
Merged
Merged
Conversation
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.
Problem
Two release promises had no check behind them.
auth.*andinvestigator.*), but the fixture suite exercises 12. Nothing proved a correctly signed delivery for the other 19 verifies, keeps itswebhook_type, and preserves the body.pyproject.toml,.release-please-manifest.jsonanduv.lockmatchesdidit.__version__.release.ymlrefuses a tag that disagrees, so a stale file turns a release red only after the tag exists.Solution
tests/test_release_contract.py, parametrised over everyWebhookEventvalue inopenapi/verification.json: sign a body with both signature schemes, verify it, and assert the event type, authentication and payload. Events outside the DESIGN 9.4 typed set must arrive asUnknownEventwith the whole body.__version__, the project version, the release-please manifest and the lockeddidit-sdkversion agree.No runtime behaviour changes.
Verification
uv run pytest(890 passed, 4 live tests skipped withoutDIDIT_SANDBOX_API_KEY), the 90% coverage gate,ruff check,ruff format --check,mypy,pyright, andcodegen/generate.py --check. The new tests also pass on Python 3.10 and 3.14. Staging session creation could not run: this checkout has no staging API key.