Repository navigation
Conversation
This branch has not been deployed
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
openapi.public.jsondeclares the optionalauditsquery parameter ("only"or"none") on bothGET /api/v1/organizations/{org_id}/reviewsandGET /api/v1/organizations/{org_id}/reviews/pr/{repository}/{pull_request_number}, and both generated endpoint modules (list_reviewsandlist_pull_request_reviews) as well as@proofline/sdkexpose it.In
proofline/client.py, the hand-writtenReviewFiltersTypedDictused bylist_reviews,iter_reviews, andlist_pull_request_reviewsonProoflineClientandAsyncProoflineClientomittedaudits: str | None. Typed callers usingmypycould not passaudits="none"(for example alongsidekind="REVISION_SCAN"to list plain revision scans) oraudits="only"without static type errors.scripts/contracts.pychecked operation names againstopenapi.public.jsonbut did not checkReviewFiltersagainst the declared review-list query parameters.Changes
audits: str | NonetoReviewFiltersinproofline/client.py.scripts/contracts.pyto verify thatReviewFilterskeys and field types match the query parameters declared on both review-list endpoints inopenapi.public.json.tests/test_http.pycoveringaudits="none",audits="only", andaudits=Noneacrosslist_reviews,list_pull_request_reviews, and multi-pageiter_reviewsfor both sync and async clients, plus amypycheck against public consumer calls.Verification
scripts/contracts.pyand themypyconsumer test fail before addingauditstoReviewFiltersand pass after.python scripts/check.py --artifacts artifactson Ubuntu 24.04 / Python 3.13.12 (GitHub Actions run): generation check,scripts/contracts.py, Ruff lint and format,mypy proofline scripts(214 source files),pytest -q(221 passed, 8 subtests passed), and wheel/sdistscripts/install_smoke.pyall passed.