From 953df1fd5bc17975aae5c7897c319232f9491bba Mon Sep 17 00:00:00 2001 From: Elijah Goh Date: Wed, 4 Nov 2026 21:11:03 +0800 Subject: [PATCH 01/38] Enable Dependabot for pip and GitHub Actions Adds a weekly Dependabot configuration so advisories such as the revoked eMudhra intermediates in the certifi bundle reach this repository as pull requests instead of waiting for a manual audit. --- .github/dependabot.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..f2938905 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +version: 2 +updates: + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 5 + groups: + python-dev-dependencies: + patterns: + - "*" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 3 From f31df28047613428f82b6aaa40ec35fac0459ae3 Mon Sep 17 00:00:00 2001 From: Mohsen Azimi <543633+mohsen1@users.noreply.github.com> Date: Wed, 4 Nov 2026 17:39:52 +0100 Subject: [PATCH 02/38] Document how to contribute --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 0a471192..dbb1716b 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,10 @@ coroutines. The [SDK guide](https://proofline.sh/docs/sdks/) and Licensed under the Apache License, Version 2.0. The generated models under `proofline/_generated` carry the MIT license of the generator templates. +## Contributing + +This repository distributes the Proofline Python SDK. The public OpenAPI contract generates the client and models in `proofline/_generated/`. Open an issue for changes to the contract or generated code. Pull requests are welcome for the hand-written client in `proofline/client.py`, transport and helpers outside `_generated/`, and tests in `tests/`. + ## Exports `export_reviews` reads one CSV or NDJSON page through the existing bounded transport. From d9673d6db8066e72c5d70291e56989d781d77b90 Mon Sep 17 00:00:00 2001 From: Mohsen Azimi <543633+mohsen1@users.noreply.github.com> Date: Wed, 4 Nov 2026 17:51:03 +0100 Subject: [PATCH 03/38] Resume publication of missing PyPI files --- .github/workflows/release.yml | 16 +++++++-- scripts/release-files.py | 68 +++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 scripts/release-files.py diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index afaec532..30ca1992 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,12 @@ jobs: timeout-minutes: 30 outputs: version: ${{ steps.version.outputs.version }} + env: + VERSION: ${{ needs.build.outputs.version }} steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 @@ -49,7 +54,14 @@ jobs: with: name: package path: artifacts - - uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 + - id: select + run: | + count=$(python3 scripts/release-files.py "$VERSION" artifacts --pending pending) + echo "count=$count" >> "$GITHUB_OUTPUT" + - if: steps.select.outputs.count != '0' + uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 with: - packages-dir: artifacts/ + packages-dir: pending/ attestations: true + - name: Verify both distributions on PyPI + run: python3 scripts/release-files.py "$VERSION" artifacts diff --git a/scripts/release-files.py b/scripts/release-files.py new file mode 100644 index 00000000..d08ca21a --- /dev/null +++ b/scripts/release-files.py @@ -0,0 +1,68 @@ +"""Verify PyPI release files and select the missing distributions for publication.""" + +import argparse +import hashlib +import json +import re +import shutil +import sys +import time +import urllib.error +import urllib.request +from pathlib import Path + +PACKAGE = "proofline-sdk" + + +def published(version: str) -> dict[str, str]: + try: + url = f"https://pypi.org/pypi/{PACKAGE}/{version}/json" + with urllib.request.urlopen(url, timeout=30) as response: + release = json.load(response) + except urllib.error.HTTPError as error: + if error.code == 404: + return {} + raise + if release["info"]["name"] != PACKAGE or release["info"]["version"] != version: + raise ValueError("PyPI returned a different distribution") + return {file["filename"]: file["digests"]["sha256"] for file in release["urls"]} + + +def missing(expected: dict[str, str], released: dict[str, str]) -> list[str]: + for name, digest in released.items(): + if expected.get(name) != digest: + raise ValueError(f"PyPI has unexpected content for {name}") + return sorted(expected.keys() - released.keys()) + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("version") + parser.add_argument("artifacts", type=Path) + parser.add_argument("--pending", type=Path, help="copy only missing files to a new directory") + args = parser.parse_args() + if not re.fullmatch(r"(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*)){2}", args.version): + raise ValueError("expected a stable package version") + files = sorted(args.artifacts.iterdir()) + prefix = f"proofline_sdk-{args.version}" + if {file.name for file in files} != {prefix + ".tar.gz", prefix + "-py3-none-any.whl"}: + raise ValueError("expected the wheel and source distribution for this version") + expected = {file.name: hashlib.sha256(file.read_bytes()).hexdigest() for file in files} + if args.pending: + names = missing(expected, published(args.version)) + args.pending.mkdir() + for name in names: + shutil.copyfile(args.artifacts / name, args.pending / name) + print(len(names)) + return + for attempt in range(6): + names = missing(expected, published(args.version)) + if not names: + return + if attempt < 5: + time.sleep(5) + sys.exit("PyPI is missing " + ", ".join(names)) + + +if __name__ == "__main__": + main() From 768f971db06c8d4f309a56a13c9ca4b0fb75adaf Mon Sep 17 00:00:00 2001 From: Mohsen Azimi <543633+mohsen1@users.noreply.github.com> Date: Wed, 4 Nov 2026 18:55:29 +0100 Subject: [PATCH 04/38] Fix the publish job checkout --- .github/workflows/release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 30ca1992..b3899e86 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,12 +19,7 @@ jobs: timeout-minutes: 30 outputs: version: ${{ steps.version.outputs.version }} - env: - VERSION: ${{ needs.build.outputs.version }} steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 @@ -49,7 +44,12 @@ jobs: permissions: contents: read id-token: write + env: + VERSION: ${{ needs.build.outputs.version }} steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: name: package From 16a1ab124ed68833af98bc1bfcc79981d61fd89b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 6 Nov 2026 02:22:42 +0000 Subject: [PATCH 05/38] Update distribution --- README.md | 120 +++++++----------- openapi.public.json | 68 +++++++++- proofline/_generated/api/operations.py | 11 ++ proofline/_generated/models/__init__.py | 2 + proofline/_generated/models/check_file.py | 109 ++++++++++++++++ proofline/_generated/models/customer_check.py | 19 +++ .../models/customer_code_assessment.py | 13 ++ .../_generated/models/routing_finding_view.py | 32 +++++ proofline/_transport.py | 29 ++++- proofline/client.py | 45 ++----- pyproject.toml | 2 +- scripts/contracts.py | 40 +++--- scripts/generate.py | 86 ++++++++----- scripts/install_smoke.py | 6 +- templates/operations.py.jinja | 45 +++++++ tests/test_generated_operation.py | 83 ++++++++++++ tests/test_http.py | 64 +++++++--- 17 files changed, 590 insertions(+), 184 deletions(-) create mode 100644 proofline/_generated/api/operations.py create mode 100644 proofline/_generated/models/check_file.py create mode 100644 templates/operations.py.jinja create mode 100644 tests/test_generated_operation.py diff --git a/README.md b/README.md index dbb1716b..29a9220b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ # proofline-sdk -Typed synchronous and asynchronous Python clients for the [Proofline](https://proofline.sh) -review API. They read and request reviews with a scoped API token, and add pagination, -waiting for a review, retries and typed errors. The import package is `proofline`. -Python 3.11 or newer is required. +`proofline-sdk` provides typed synchronous (`ProoflineClient`) and asynchronous (`AsyncProoflineClient`) Python clients for the [Proofline](https://proofline.sh) review API. The clients read and request reviews with a scoped API token, and include pagination, waiting for a review, retries, and typed errors. The import package is `proofline`. Python 3.11 or newer is required. + +This repository is the published distribution of the Proofline Python SDK. The public OpenAPI contract in `openapi.public.json` generates the client and models in `proofline/_generated/`. [Open an issue](https://github.com/prooflinedev/sdk-python/issues) for changes to the OpenAPI contract, generated code, or workflows. Pull requests are welcome for the hand-written client in `proofline/client.py`, transport and helpers outside `proofline/_generated/`, and tests in `tests/`. + +## Installation and authentication ```sh pip install proofline-sdk @@ -17,26 +18,11 @@ with ProoflineClient(os.environ["PROOFLINE_TOKEN"]) as client: ... ``` -The clients read `PROOFLINE_TOKEN` when no token is passed, keep the token in memory -and redact it from diagnostic output. `AsyncProoflineClient` has the same methods as -coroutines. The [SDK guide](https://proofline.sh/docs/sdks/) and -[API reference](https://proofline.sh/docs/api/) cover every operation. - -Licensed under the Apache License, Version 2.0. The generated models under -`proofline/_generated` carry the MIT license of the generator templates. - -## Contributing +When no token is passed, the clients read `PROOFLINE_TOKEN` from the environment, keep the token in memory, and redact it from diagnostic output. `AsyncProoflineClient` exposes the same methods as coroutines that you call with `await`. The [SDK guide](https://proofline.sh/docs/sdks/) and [API reference](https://proofline.sh/docs/api/) cover every operation. -This repository distributes the Proofline Python SDK. The public OpenAPI contract generates the client and models in `proofline/_generated/`. Open an issue for changes to the contract or generated code. Pull requests are welcome for the hand-written client in `proofline/client.py`, transport and helpers outside `_generated/`, and tests in `tests/`. +## Review exports -## Exports - -`export_reviews` reads one CSV or NDJSON page through the existing bounded transport. -It returns the original text, decoded rows, dataset version, settled horizon and -optional next cursor. CSV cells remain strings, including nested JSON cells; -NDJSON retains JSON values. Export tokens need `analytics:read`. -Repeat with the returned cursor and the same dataset, window, format and grouping. -A missing next cursor marks the last page. Each CSV page includes its own header. +`export_reviews` reads one CSV or NDJSON page over the bounded transport. Export tokens require `analytics:read`. ```python from uuid import UUID @@ -51,11 +37,11 @@ with ProoflineClient() as client: # Continue with cursor=page.next_cursor when it is not None. ``` +Each response returns the original text, decoded rows, dataset version, settled horizon, and an optional next cursor. Each CSV page includes its own header and keeps cells as strings, including nested JSON cells. NDJSON pages retain JSON values. To read additional pages, repeat the call with the returned cursor and the same dataset, window, format, and grouping. A missing next cursor marks the last page. + ## Coverage uploads -Use a repository-restricted token with `coverage:write` and current repository write -access to upload reports from your CI. Name the full commit SHA the tests ran on. -Reports may use LCOV, Cobertura XML, JaCoCo XML or Go cover profiles. +To upload coverage reports from CI, use a repository-restricted token with `coverage:write` and current repository write access. Name the full commit SHA that the tests ran on. Reports may use LCOV, Cobertura XML, JaCoCo XML, or Go cover profiles. ```python import os @@ -77,38 +63,21 @@ with ProoflineClient() as client: ) ``` -The response names the recorded report and its covered and instrumented line counts. -An identical upload returns that report with `created=False`. Refused reports raise -`ProoflineError`; uploading a report does not establish a check verdict. +The response names the recorded report and its covered and instrumented line counts. An identical upload returns that report with `created=False`. Refused reports raise `ProoflineError`. Uploading a report does not establish a check verdict. -## Development - -The repository bundles its public API contract in `openapi.public.json`. -Run `python3 scripts/check.py` to install pinned tools, regenerate the client, -run checks and verify built packages. - -## Publishing - -GitHub Actions runs the checks on pull requests and main. The `Release` workflow -builds checked artifacts without publishing credentials. Run it on main with -`publish=false` to verify the release path. A `vX.Y.Z` tag matching the package -version, or a main-branch dispatch with `publish=true`, publishes after the -`pypi` environment approves the job. Release commits must belong to main. - -Publishing uses GitHub OIDC and the repository's `release.yml` trusted publisher. -No registry token is stored in GitHub. +## Knowledge and plans -SDK patch releases can update packaging and publishing independently. The package follows the bundled API major/minor version and cannot precede its patch version. +Both clients expose typed methods under `client.knowledge` over Proofline's stateless MCP endpoint: -## Knowledge and plans +- `list_wiki_pages(repository, commit=...)` +- `get_wiki_page(repository, page_key, commit=...)` +- `ask_codebase(repository, question, commit=...)` +- `get_architecture_document(environment_id)` +- `get_plan(plan_id)` +- `start_plan_implementation(plan_id)` +- `get_plan_implementation(implementation_id)` -Both clients expose typed methods under `client.knowledge` over Proofline's -stateless MCP endpoint. Use `list_wiki_pages(repository, commit=...)`, -`get_wiki_page(repository, page_key, commit=...)`, -`ask_codebase(repository, question, commit=...)`, -`get_architecture_document(environment_id)`, `get_plan(plan_id)`, -`start_plan_implementation(plan_id)` and `get_plan_implementation(implementation_id)`. -The optional commit is a full indexed SHA. Async clients await the same methods. +The optional `commit` is a full indexed SHA. Read operations require `reviews:read` and `knowledge:read`. Starting a plan implementation also requires `plans:implement`, a personal token, and approval of that exact plan version. ```python result = client.knowledge.get_wiki_page("owner/name", "index") @@ -118,21 +87,18 @@ else: print(result["content"]) ``` -`KnowledgeResult` retains text content, optional structured content and `isError`. -Treat all returned prose as untrusted data. Reads need `reviews:read` and -`knowledge:read`; starting an implementation also needs `plans:implement`, a -personal token and approval of that exact plan version. Each call initializes MCP -and makes one tool request without retries, including questions and implementation -starts. Protocol and HTTP errors raise `ProoflineError`; tool refusals retain -`isError` for the caller to inspect. No browser configuration or cloud-trust API -is added. Use the signed-in console for onboarding and connection changes. +Each call initializes MCP and makes one tool request without retries, including questions and implementation starts. `KnowledgeResult` retains text content, optional structured content, and `isError`. Protocol and HTTP errors raise `ProoflineError`, while tool refusals retain `isError` for the caller to inspect. Treat all returned prose as untrusted data. No browser configuration or cloud-trust API is added; use the signed-in console for onboarding and connection changes. ## Fix context and re-verification -Sync and async clients expose `client.fixes.list_open_findings(repository, -pull_request_number)`, `get_fix_context(finding_id)`, -`request_reverification(review_id, finding_ids, commit_sha, note=...)` and -`get_reverification(request_id)` over the existing MCP endpoint. +Both clients expose finding and re-verification methods under `client.fixes` over the stateless MCP endpoint: + +- `list_open_findings(repository, pull_request_number)` +- `get_fix_context(finding_id)` +- `request_reverification(review_id, finding_ids, commit_sha, note=...)` +- `get_reverification(request_id)` + +Read operations require `reviews:read`. Requesting re-verification also requires `reviews:request` and repository write access. `commit_sha` must be the live pushed head, which the server confirms. `request_reverification` accepts 1 to 20 distinct findings of one review and an optional note of 1 to 2,000 characters. ```python result = client.fixes.request_reverification( @@ -143,10 +109,20 @@ if result.get("isError"): raise RuntimeError("Re-verification was refused.") ``` -Use `await` with `AsyncProoflineClient`. The commit must be the live pushed head; -the server confirms it. The request accepts 1–20 distinct findings of one review -and an optional 1–2,000-character note. Reads need `reviews:read`; requesting -verification also needs `reviews:request` and repository write access. -Calls never retry. Results retain untrusted-text wrappers, availability, -assessment gaps and `isError`. `PENDING` and `NOT_VERIFIED` do not establish a fix. -A tool request never records a human disposition. +Calls under `client.fixes` never retry. Results retain untrusted-text wrappers, availability, assessment gaps, and `isError`. `PENDING` and `NOT_VERIFIED` do not establish a fix, and a tool request never records a human disposition. + +## Development + +The repository bundles its public API contract in `openapi.public.json`. New public operations generate typed methods on both `ProoflineClient` and `AsyncProoflineClient` along with the code in `proofline/_generated/`. + +Run `python3 scripts/check.py` to install pinned tools, regenerate the client, run checks, and verify built packages. GitHub Actions runs the checks on pull requests and `main`. + +## Publishing + +The `Release` workflow builds checked artifacts without publishing credentials. Run it on `main` with `publish=false` to verify the release path. A `vX.Y.Z` tag matching the package version, or a `main`-branch dispatch with `publish=true`, publishes after the `pypi` environment approves the job. Release commits must belong to `main`. + +Publishing uses GitHub OIDC and the repository's `release.yml` trusted publisher. No registry token is stored in GitHub. The package follows the bundled API major and minor version and cannot precede its patch version. SDK patch releases can update packaging and publishing independently. + +## License + +Licensed under the Apache License, Version 2.0. The generated models under `proofline/_generated` carry the MIT license of the generator templates. diff --git a/openapi.public.json b/openapi.public.json index 2641819b..b3bd96c0 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -763,6 +763,47 @@ ], "type": "object" }, + "CheckFile": { + "description": "One file World cited for a check's result.", + "properties": { + "path": { + "allOf": [ + { + "$ref": "#/components/schemas/UntrustedText" + } + ], + "description": "The repository-relative path. It is repository text." + }, + "revision": { + "allOf": [ + { + "$ref": "#/components/schemas/CheckFileRevision" + } + ], + "description": "The revision World read the file at." + } + }, + "required": [ + "revision", + "path" + ], + "type": "object" + }, + "CheckFileRevision": { + "description": "The revision a cited file was read at.", + "oneOf": [ + { + "const": "PROPOSED_CODE_REVISION", + "description": "The reviewed commit.", + "type": "string" + }, + { + "const": "BASE_CODE_REVISION", + "description": "Its merge base.", + "type": "string" + } + ] + }, "CheckLifecycle": { "description": "World's lifecycle disclosure for the evaluator version that answered, as\n the receipt recorded it. A deployment gate counts only `GATING` results\n (`DeterministicCoverage::gate_effective_status`), and only when it\n evaluates a deployment; the lifecycle alone permits or blocks nothing.", "oneOf": [ @@ -1405,6 +1446,13 @@ "null" ] }, + "files": { + "description": "The files World cited as evidence for this result, once each in\n World's order, with the revision World read each at. Empty when World\n cited no file, and on results recorded before World cited files.", + "items": { + "$ref": "#/components/schemas/CheckFile" + }, + "type": "array" + }, "lifecycle": { "allOf": [ { @@ -1436,7 +1484,8 @@ "required": [ "name", "outcome", - "lifecycle" + "lifecycle", + "files" ], "type": "object" }, @@ -1480,6 +1529,13 @@ "null" ] }, + "coverage_details": { + "description": "Recorded check coverage counts and fixed cancellation causes, without source text.\n Absent coverage does not establish that every check ran.", + "items": { + "type": "string" + }, + "type": "array" + }, "findings": { "description": "The code-only findings the code assessment recorded, `SERIOUS` first.\n An empty list does not establish deployment safety.", "items": { @@ -5656,6 +5712,14 @@ ], "description": "Human override beside the original decision, when one was requested." }, + "publication_group": { + "description": "The finding that represents this finding's publication group, when an\n applied group publishes it in one comment with other findings. Every\n member names the same finding, the representative included.", + "format": "uuid", + "type": [ + "string", + "null" + ] + }, "reason_codes": { "description": "Recognized safe reason codes; unknown values are represented as `UNRECOGNIZED`.", "items": { @@ -6660,7 +6724,7 @@ }, "info": { "title": "Proofline Review API", - "version": "1.0.0" + "version": "2.0.0" }, "openapi": "3.1.0", "paths": { diff --git a/proofline/_generated/api/operations.py b/proofline/_generated/api/operations.py new file mode 100644 index 00000000..7fa9834d --- /dev/null +++ b/proofline/_generated/api/operations.py @@ -0,0 +1,11 @@ +"""Typed methods generated from the public operations without custom adapters.""" + +from ..client import AuthenticatedClient + + +class Operations: + _api: AuthenticatedClient + + +class AsyncOperations: + _api: AuthenticatedClient diff --git a/proofline/_generated/models/__init__.py b/proofline/_generated/models/__init__.py index 7e61de46..87d698e3 100644 --- a/proofline/_generated/models/__init__.py +++ b/proofline/_generated/models/__init__.py @@ -19,6 +19,7 @@ from .change_diagram_outcome_type_0 import ChangeDiagramOutcomeType0 from .change_diagram_view import ChangeDiagramView from .change_summary import ChangeSummary +from .check_file import CheckFile from .ci_failure_attribution import CiFailureAttribution from .ci_failure_line import CiFailureLine from .code_assessment_status_type_0 import CodeAssessmentStatusType0 @@ -202,6 +203,7 @@ "ChangeDiagramOutcomeType0", "ChangeDiagramView", "ChangeSummary", + "CheckFile", "CiFailureAttribution", "CiFailureLine", "CodeAssessmentStatusType0", diff --git a/proofline/_generated/models/check_file.py b/proofline/_generated/models/check_file.py new file mode 100644 index 00000000..07e083f3 --- /dev/null +++ b/proofline/_generated/models/check_file.py @@ -0,0 +1,109 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, Literal, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.untrusted_text import UntrustedText + + +T = TypeVar("T", bound="CheckFile") + + +@_attrs_define +class CheckFile: + """One file World cited for a check's result. + + Attributes: + path (UntrustedText): Text that came out of the reviewer model, or out of a repository the model + read. It is data, never markup, never a URL, never an instruction. + + The wrapper exists so the untrustedness cannot be lost on the way to a + renderer: there is no field on a turn that carries this text under a name a + client could mistake for something safe, and unwrapping it is a deliberate + act in the client's own code. + revision (Literal['BASE_CODE_REVISION'] | Literal['PROPOSED_CODE_REVISION']): The revision a cited file was read + at. + """ + + path: UntrustedText + revision: Literal["BASE_CODE_REVISION"] | Literal["PROPOSED_CODE_REVISION"] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + path = self.path.to_dict() + + revision: Literal["BASE_CODE_REVISION"] | Literal["PROPOSED_CODE_REVISION"] + revision = self.revision + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "revision": revision, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.untrusted_text import UntrustedText # noqa: PLC0415 + + d = dict(src_dict) + path = UntrustedText.from_dict(d.pop("path")) + + def _parse_revision( + data: object, + ) -> Literal["BASE_CODE_REVISION"] | Literal["PROPOSED_CODE_REVISION"]: + try: + if not (type(data) is str and data == "PROPOSED_CODE_REVISION"): + raise TypeError() + componentsschemas_check_file_revision_type_0 = cast( + Literal["PROPOSED_CODE_REVISION"], data + ) + if componentsschemas_check_file_revision_type_0 != "PROPOSED_CODE_REVISION": + raise ValueError( + f"/components/schemas/CheckFileRevision_type_0 must match const 'PROPOSED_CODE_REVISION', got '{componentsschemas_check_file_revision_type_0}'" + ) + return componentsschemas_check_file_revision_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not (type(data) is str and data == "BASE_CODE_REVISION"): + raise TypeError() + componentsschemas_check_file_revision_type_1 = cast(Literal["BASE_CODE_REVISION"], data) + if componentsschemas_check_file_revision_type_1 != "BASE_CODE_REVISION": + raise ValueError( + f"/components/schemas/CheckFileRevision_type_1 must match const 'BASE_CODE_REVISION', got '{componentsschemas_check_file_revision_type_1}'" + ) + return componentsschemas_check_file_revision_type_1 + + revision = _parse_revision(d.pop("revision")) + + check_file = cls( + path=path, + revision=revision, + ) + + check_file.additional_properties = d + return check_file + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/proofline/_generated/models/customer_check.py b/proofline/_generated/models/customer_check.py index 20c8056c..31e3300a 100644 --- a/proofline/_generated/models/customer_check.py +++ b/proofline/_generated/models/customer_check.py @@ -10,6 +10,7 @@ if TYPE_CHECKING: from ..models.change_attribution_view import ChangeAttributionView + from ..models.check_file import CheckFile T = TypeVar("T", bound="CustomerCheck") @@ -19,6 +20,9 @@ class CustomerCheck: """ Attributes: + files (list[CheckFile]): The files World cited as evidence for this result, once each in + World's order, with the revision World read each at. Empty when World + cited no file, and on results recorded before World cited files. lifecycle (Literal['GATING'] | Literal['QUARANTINED'] | Literal['RETIRED'] | Literal['SHADOW'] | Literal['UNKNOWN']): World's lifecycle disclosure for the evaluator version that answered, as the receipt recorded it. A deployment gate counts only `GATING` results @@ -43,6 +47,7 @@ class CustomerCheck: verdict names none of these reasons. """ + files: list[CheckFile] lifecycle: ( Literal["GATING"] | Literal["QUARANTINED"] @@ -67,6 +72,11 @@ class CustomerCheck: def to_dict(self) -> dict[str, Any]: from ..models.change_attribution_view import ChangeAttributionView # noqa: PLC0415 + files = [] + for files_item_data in self.files: + files_item = files_item_data.to_dict() + files.append(files_item) + lifecycle: ( Literal["GATING"] | Literal["QUARANTINED"] @@ -116,6 +126,7 @@ def to_dict(self) -> dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { + "files": files, "lifecycle": lifecycle, "name": name, "outcome": outcome, @@ -135,8 +146,15 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.change_attribution_view import ChangeAttributionView # noqa: PLC0415 + from ..models.check_file import CheckFile # noqa: PLC0415 d = dict(src_dict) + files = [] + _files = d.pop("files") + for files_item_data in _files: + files_item = CheckFile.from_dict(files_item_data) + + files.append(files_item) def _parse_lifecycle( data: object, @@ -301,6 +319,7 @@ def _parse_unresolved_reason( unresolved_reason = _parse_unresolved_reason(d.pop("unresolved_reason", UNSET)) customer_check = cls( + files=files, lifecycle=lifecycle, name=name, outcome=outcome, diff --git a/proofline/_generated/models/customer_code_assessment.py b/proofline/_generated/models/customer_code_assessment.py index 72c38480..a920ddf6 100644 --- a/proofline/_generated/models/customer_code_assessment.py +++ b/proofline/_generated/models/customer_code_assessment.py @@ -33,6 +33,9 @@ class CustomerCodeAssessment: never a verdict on the change: only `COMPLETED` says the assessment covered what it read. completed_at (datetime.datetime | None | Unset): When the code assessment ended. Null while it has not. + coverage_details (list[str] | Unset): Recorded check coverage counts and fixed cancellation causes, without + source text. + Absent coverage does not establish that every check ran. incompleteness_kind (None | str | Unset): Why an `INCOMPLETE` code assessment is incomplete: `NOT_CONFIGURED`, `POLICY_EXCLUDED`, `EVIDENCE_UNAVAILABLE`, `HYPOTHESES_UNRESOLVED` or `MODEL_BUDGET_EXHAUSTED`. Null otherwise. @@ -45,6 +48,7 @@ class CustomerCodeAssessment: id: UUID status: CodeAssessmentStatusType0 | Literal["EXCLUDED"] completed_at: datetime.datetime | None | Unset = UNSET + coverage_details: list[str] | Unset = UNSET incompleteness_kind: None | str | Unset = UNSET started_at: datetime.datetime | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -75,6 +79,10 @@ def to_dict(self) -> dict[str, Any]: else: completed_at = self.completed_at + coverage_details: list[str] | Unset = UNSET + if not isinstance(self.coverage_details, Unset): + coverage_details = self.coverage_details + incompleteness_kind: None | str | Unset if isinstance(self.incompleteness_kind, Unset): incompleteness_kind = UNSET @@ -102,6 +110,8 @@ def to_dict(self) -> dict[str, Any]: ) if completed_at is not UNSET: field_dict["completed_at"] = completed_at + if coverage_details is not UNSET: + field_dict["coverage_details"] = coverage_details if incompleteness_kind is not UNSET: field_dict["incompleteness_kind"] = incompleteness_kind if started_at is not UNSET: @@ -164,6 +174,8 @@ def _parse_completed_at(data: object) -> datetime.datetime | None | Unset: completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) + coverage_details = cast(list[str], d.pop("coverage_details", UNSET)) + def _parse_incompleteness_kind(data: object) -> None | str | Unset: if data is None: return data @@ -197,6 +209,7 @@ def _parse_started_at(data: object) -> datetime.datetime | None | Unset: id=id, status=status, completed_at=completed_at, + coverage_details=coverage_details, incompleteness_kind=incompleteness_kind, started_at=started_at, ) diff --git a/proofline/_generated/models/routing_finding_view.py b/proofline/_generated/models/routing_finding_view.py index d9f29e1a..4fee4078 100644 --- a/proofline/_generated/models/routing_finding_view.py +++ b/proofline/_generated/models/routing_finding_view.py @@ -31,6 +31,9 @@ class RoutingFindingView: retained. promotion (FindingPromotionView | None | Unset): Human override beside the original decision, when one was requested. + publication_group (None | Unset | UUID): The finding that represents this finding's publication group, when an + applied group publishes it in one comment with other findings. Every + member names the same finding, the representative included. """ finding_id: UUID @@ -42,6 +45,7 @@ class RoutingFindingView: floor_reason: None | str | Unset = UNSET inline_reason: None | str | Unset = UNSET promotion: FindingPromotionView | None | Unset = UNSET + publication_group: None | Unset | UUID = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -83,6 +87,14 @@ def to_dict(self) -> dict[str, Any]: else: promotion = self.promotion + publication_group: None | str | Unset + if isinstance(self.publication_group, Unset): + publication_group = UNSET + elif isinstance(self.publication_group, UUID): + publication_group = str(self.publication_group) + else: + publication_group = self.publication_group + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -102,6 +114,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["inline_reason"] = inline_reason if promotion is not UNSET: field_dict["promotion"] = promotion + if publication_group is not UNSET: + field_dict["publication_group"] = publication_group return field_dict @@ -164,6 +178,23 @@ def _parse_promotion(data: object) -> FindingPromotionView | None | Unset: promotion = _parse_promotion(d.pop("promotion", UNSET)) + def _parse_publication_group(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + publication_group_type_0 = UUID(data) + + return publication_group_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + publication_group = _parse_publication_group(d.pop("publication_group", UNSET)) + routing_finding_view = cls( finding_id=finding_id, inline_limit_exceeded=inline_limit_exceeded, @@ -174,6 +205,7 @@ def _parse_promotion(data: object) -> FindingPromotionView | None | Unset: floor_reason=floor_reason, inline_reason=inline_reason, promotion=promotion, + publication_group=publication_group, ) routing_finding_view.additional_properties = d diff --git a/proofline/_transport.py b/proofline/_transport.py index 52bbf880..371b2f29 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -8,6 +8,7 @@ import re from asyncio import sleep as async_sleep from collections.abc import AsyncIterator, Generator, Iterator +from contextlib import contextmanager from contextvars import ContextVar from datetime import UTC, datetime from email.utils import parsedate_to_datetime @@ -21,7 +22,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "1.0.3" +VERSION = "2.0.0" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" @@ -98,6 +99,32 @@ def base_url(value: str) -> str: return value.rstrip("/") +def invalid_response() -> ProoflineError: + return ProoflineError( + 0, "urn:proofline:sdk:invalid-response", "Proofline returned an invalid API response." + ) + + +def network_error(error: httpx.HTTPError) -> ProoflineError: + if isinstance(error, httpx.TimeoutException): + return timeout_error() + return ProoflineError( + 0, "urn:proofline:sdk:transport-unavailable", "Could not reach the Proofline API." + ) + + +@contextmanager +def operation_errors() -> Iterator[None]: + try: + yield + except ProoflineError: + raise + except httpx.HTTPError as error: + raise network_error(error) from None + except Exception: + raise invalid_response() from None + + def timeout_error() -> ProoflineError: return ProoflineError(0, "urn:proofline:sdk:timeout", "The request deadline expired.") diff --git a/proofline/client.py b/proofline/client.py index de6b5251..3c18828b 100644 --- a/proofline/client.py +++ b/proofline/client.py @@ -38,6 +38,7 @@ stop_review, upload_coverage_reports, ) +from ._generated.api.operations import AsyncOperations, Operations from ._generated.client import AuthenticatedClient from ._generated.models.agent_session import AgentSession from ._generated.models.agent_session_prompt_type_0 import AgentSessionPromptType0 @@ -118,24 +119,10 @@ def _decoded( expected: type[T] | _ReviewRoutingModels | _FindingFixPromptModels | _AgentSessionPromptModels, ) -> T: if not isinstance(response.parsed, expected): - raise _malformed() + raise _transport.invalid_response() return cast(T, response.parsed) -def _malformed() -> ProoflineError: - return ProoflineError( - 0, "urn:proofline:sdk:invalid-response", "Proofline returned an invalid API response." - ) - - -def _network(error: httpx.HTTPError) -> ProoflineError: - if isinstance(error, httpx.TimeoutException): - return _transport.timeout_error() - return ProoflineError( - 0, "urn:proofline:sdk:transport-unavailable", "Could not reach the Proofline API." - ) - - def _configuration( token: str | SecretStr | None, base_url: str, timeout: float ) -> AuthenticatedClient: @@ -164,10 +151,10 @@ def _page_limits(page_size: int, max_pages: int, max_items: int) -> None: def _next_cursor(page: ReviewPage, seen: set[str]) -> str | None: if not isinstance(page.truncated, bool): - raise _malformed() + raise _transport.invalid_response() if not page.truncated: if isinstance(page.next_cursor, str) and page.next_cursor: - raise _malformed() + raise _transport.invalid_response() return None cursor = page.next_cursor if not isinstance(cursor, str) or not cursor or cursor in seen: @@ -186,7 +173,7 @@ def _pagination_limit() -> ProoflineError: ) -class ProoflineClient: +class ProoflineClient(Operations): """Synchronous typed HTTP operations. Name resolution, connection, TLS and socket operations stop at the configured @@ -242,14 +229,8 @@ def _call( *args: object, **kwargs: object, ) -> T: - try: + with _transport.operation_errors(): return _decoded(operation(*args, client=self._api, **kwargs), expected) - except ProoflineError: - raise - except httpx.HTTPError as error: - raise _network(error) from None - except Exception: - raise _malformed() from None def export_reviews( self, @@ -286,7 +267,7 @@ def export_reviews( ) return decode_export(response, format) except httpx.HTTPError as error: - raise _network(error) from None + raise _transport.network_error(error) from None def list_reviews(self, organization_id: UUID, **filters: Unpack[ReviewFilters]) -> ReviewPage: return self._call(list_reviews.sync_detailed, ReviewPage, organization_id, **filters) @@ -526,7 +507,7 @@ def wait_for_review( _transport.DEADLINE.reset(deadline) -class AsyncProoflineClient: +class AsyncProoflineClient(AsyncOperations): def __init__( self, token: str | SecretStr | None = None, @@ -576,14 +557,8 @@ async def _call( *args: object, **kwargs: object, ) -> T: - try: + with _transport.operation_errors(): return _decoded(await operation(*args, client=self._api, **kwargs), expected) - except ProoflineError: - raise - except httpx.HTTPError as error: - raise _network(error) from None - except Exception: - raise _malformed() from None async def export_reviews( self, @@ -620,7 +595,7 @@ async def export_reviews( ) return decode_export(response, format) except httpx.HTTPError as error: - raise _network(error) from None + raise _transport.network_error(error) from None async def list_reviews( self, organization_id: UUID, **filters: Unpack[ReviewFilters] diff --git a/pyproject.toml b/pyproject.toml index 144a8386..536622b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "1.0.3" +version = "2.0.0" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" diff --git a/scripts/contracts.py b/scripts/contracts.py index e681909c..d34ba64a 100644 --- a/scripts/contracts.py +++ b/scripts/contracts.py @@ -4,9 +4,10 @@ import ast import json +import sys from pathlib import Path -from generate import json_operations +from generate import HTTP_METHODS, json_operations ROOT = Path(__file__).resolve().parents[1] @@ -17,34 +18,27 @@ def main() -> None: operation["operationId"] for item in json_operations(document)["paths"].values() for method, operation in item.items() - if method in {"get", "post", "put", "patch", "delete"} + if method in HTTP_METHODS } generated = { path.stem - for path in (ROOT / "proofline/_generated/api/default").glob("*.py") + for path in (ROOT / "proofline/_generated/api").glob("*/*.py") if path.name != "__init__.py" } - if declared != generated or len(declared) != 21: - raise SystemExit( - "The generated JSON operations must match the twenty-one public JSON token routes." - ) - tree = ast.parse((ROOT / "proofline/client.py").read_text()) - helpers = {"close", "aclose", "iter_reviews", "wait_for_review"} - clients = { - node.name: { - member.name - for member in node.body - if isinstance(member, (ast.FunctionDef, ast.AsyncFunctionDef)) - and not member.name.startswith("_") - and member.name not in helpers + if declared != generated: + raise SystemExit("Generated JSON operations differ from the public contract.") + sys.path.insert(0, str(ROOT)) + from proofline import AsyncProoflineClient, ProoflineClient + + for client in (ProoflineClient, AsyncProoflineClient): + helpers = {"close", "aclose", "iter_reviews", "wait_for_review"} + exposed = { + name + for name in dir(client) + if not name.startswith("_") and name not in helpers and callable(getattr(client, name)) } - for node in tree.body - if isinstance(node, ast.ClassDef) - and node.name in {"ProoflineClient", "AsyncProoflineClient"} - } - public = declared | {"export_reviews"} - if clients != {"ProoflineClient": public, "AsyncProoflineClient": public}: - raise SystemExit("Both client facades must expose the JSON operations and metadata export.") + if exposed != declared | {"export_reviews"}: + raise SystemExit(f"{client.__name__} operations differ from the public contract.") prohibited = {"safe", "passed", "clean"} for path in (ROOT / "proofline").rglob("*.py"): for node in ast.walk(ast.parse(path.read_text())): diff --git a/scripts/generate.py b/scripts/generate.py index 4f246ea8..1f0bae1b 100644 --- a/scripts/generate.py +++ b/scripts/generate.py @@ -3,9 +3,9 @@ from __future__ import annotations import argparse +import ast import importlib.metadata import json -import os import shutil import subprocess import sys @@ -18,6 +18,7 @@ ROOT = Path(__file__).resolve().parents[1] DOCUMENT = ROOT / "openapi.public.json" OUTPUT = ROOT / "proofline" / "_generated" +HTTP_METHODS = {"get", "put", "post", "delete", "options", "head", "patch", "trace"} def json_operations(document: dict) -> dict: @@ -26,6 +27,8 @@ def json_operations(document: dict) -> dict: for path, item in document["paths"].items(): operations = {} for method, operation in item.items(): + if method not in HTTP_METHODS: + continue success: dict = next( ( response @@ -73,7 +76,7 @@ def json_operations(document: dict) -> dict: raise SystemExit("JSON convenience generation requires a named JSON response") operations[method] = operation if operations: - paths[path] = operations + paths[path] = {**{k: v for k, v in item.items() if k not in HTTP_METHODS}, **operations} return {**document, "paths": paths} @@ -82,45 +85,65 @@ def generate(destination: Path) -> None: raise SystemExit(f"Generation requires openapi-python-client=={VERSION}.") if importlib.metadata.version("ruff") != RUFF_VERSION: raise SystemExit(f"Generation requires ruff=={RUFF_VERSION}.") - version = tomllib.loads((ROOT / "pyproject.toml").read_text())["project"]["version"] document = json.loads(DOCUMENT.read_text()) + with tempfile.TemporaryDirectory(prefix="proofline-json-contract-") as temporary: + json_document = Path(temporary) / "openapi.json" + json_document.write_text(json.dumps(json_operations(document))) + generate_json(destination, json_document) + + +def check_version() -> None: + document = json.loads(DOCUMENT.read_text()) + version = tomllib.loads((ROOT / "pyproject.toml").read_text())["project"]["version"] package_version = tuple(map(int, version.split("."))) api_version = tuple(map(int, document["info"]["version"].split("."))) if package_version[:2] != api_version[:2] or package_version[2] < api_version[2]: raise SystemExit( "The SDK must follow the public API major/minor and not precede its patch." ) - env = dict(os.environ) - env["PATH"] = str(Path(sys.executable).parent) + os.pathsep + env.get("PATH", "") - with tempfile.TemporaryDirectory(prefix="proofline-json-contract-") as temporary: - json_document = Path(temporary) / "openapi.json" - json_document.write_text(json.dumps(json_operations(document))) - generate_json(destination, json_document, env) -def generate_json(destination: Path, document: Path, env: dict) -> None: - subprocess.run( - [ - sys.executable, - "-c", - "from openapi_python_client.cli import app; app()", - "generate", - "--path", - str(document), - "--config", - str(ROOT / "generator.json"), - "--custom-template-path", - str(ROOT / "templates"), - "--meta", - "none", - "--fail-on-warning", - "--output-path", - str(destination), - ], - check=True, - cwd=ROOT, - env=env, +def generate_json(destination: Path, document: Path) -> None: + from openapi_python_client import Config, GeneratorData, GeneratorError, MetaType, Project + from openapi_python_client.config import ConfigFile + + config = Config.from_sources( + ConfigFile.load_from_path(ROOT / "generator.json"), + MetaType.NONE, + document, + "utf-8", + False, + destination, + ) + data = GeneratorData.from_dict(json.loads(document.read_bytes()), config=config) + if isinstance(data, GeneratorError): + raise SystemExit(data) + project = Project(openapi=data, config=config, custom_template_path=ROOT / "templates") + if errors := project.build(): + raise SystemExit(errors) + + # Existing public adapters keep their signatures, pagination and stream behavior. + clients = ast.parse((ROOT / "proofline/client.py").read_bytes()) + custom = { + cls.name: { + method.name + for method in cls.body + if isinstance(method, (ast.FunctionDef, ast.AsyncFunctionDef)) + } + for cls in clients.body + if isinstance(cls, ast.ClassDef) + } + endpoints = [ + (tag, endpoint) + for tag, group in sorted(data.endpoint_collections_by_tag.items()) + for endpoint in sorted(group.endpoints, key=lambda operation: operation.name) + ] + facade = project.env.get_template("operations.py.jinja").render( + endpoints=endpoints, + sync=custom["ProoflineClient"], + asynchronous=custom["AsyncProoflineClient"], ) + (destination / "api/operations.py").write_text(facade) body = json.loads(document.read_text())["paths"][ "/api/v1/organizations/{org_id}/repositories/{repo_id}/pull-requests/{number}/review" ]["post"].get("requestBody") @@ -184,6 +207,7 @@ def main() -> None: generated = Path(temporary) / "generated" generate(generated) if args.check: + check_version() if files(generated) != files(OUTPUT): raise SystemExit("The generated Python API differs; run scripts/generate.py.") else: diff --git a/scripts/install_smoke.py b/scripts/install_smoke.py index 541f2ef3..e42fed3e 100644 --- a/scripts/install_smoke.py +++ b/scripts/install_smoke.py @@ -24,8 +24,8 @@ def main() -> None: if not Path(proofline.__file__).resolve().is_relative_to(Path(sys.prefix).resolve()): raise SystemExit("The smoke test must import the installed artifact, not checkout source.") - assert importlib.metadata.version("proofline-sdk") == "1.0.3" - assert proofline.__version__ == "1.0.3" + package_version = importlib.metadata.version("proofline-sdk") + assert proofline.__version__ == package_version calls: list[str] = [] finding = { "id": str(FINDING), @@ -79,7 +79,7 @@ def log_message(self, format: str, *args: object) -> None: def do_GET(self) -> None: assert self.headers["Authorization"] == f"Bearer {TOKEN}" - assert self.headers["User-Agent"] == "proofline-python/1.0.3" + assert self.headers["User-Agent"] == f"proofline-python/{package_version}" calls.append(self.path) body = finding if "/findings/" in self.path else review payload = json.dumps(body).encode() diff --git a/templates/operations.py.jinja b/templates/operations.py.jinja new file mode 100644 index 00000000..d7e36887 --- /dev/null +++ b/templates/operations.py.jinja @@ -0,0 +1,45 @@ +"""Typed methods generated from the public operations without custom adapters.""" + +from typing import Any, cast +from ..client import AuthenticatedClient +from ..types import UNSET, Unset +from ... import _transport +{% from "endpoint_macros.py.jinja" import arguments, kwargs %} +{% for tag, endpoint in endpoints %} +{% if endpoint.name not in sync or endpoint.name not in asynchronous %} +from .{{ tag }} import {{ endpoint.name }} as operation_{{ endpoint.name }} +{% for line in endpoint.relative_imports | sort %} +{{ line | replace("from ...", "from ..") }} +{% endfor %} +{% endif %} +{% endfor %} + +{% for prefix, function, custom in [("", "sync_detailed", sync), ("Async", "asyncio_detailed", asynchronous)] %} +class {{ prefix }}Operations: + _api: AuthenticatedClient + +{% for tag, endpoint in endpoints if endpoint.name not in custom %} +{% set success = namespace(types=[], statuses=[]) %} +{% for response in endpoint.responses.patterns %} +{% if 200 <= response.status_code.range[0] and response.status_code.range[1] < 300 %} +{% set success.types = success.types + [response.prop.get_type_string() | as_unembedded_code] %} +{% set lo, hi = response.status_code.range %} +{% set check = ("response.status_code == " ~ lo) if lo == hi else (lo ~ " <= response.status_code <= " ~ hi) %} +{% set success.statuses = success.statuses + [check] %} +{% endif %} +{% endfor %} +{% set result = success.types | unique | join(" | ") %} + {{ "async " if prefix else "" }}def {{ endpoint.name }}(self, + {{ arguments(endpoint, include_client=False) | indent(8) }} + ) -> {{ result }}: + with _transport.operation_errors(): + response = {{ "await " if prefix else "" }}operation_{{ endpoint.name }}.{{ function }}( + client=self._api, + {{ kwargs(endpoint, include_client=False) | indent(16) }} + ) + if not ({{ success.statuses | join(" or ") }}): + raise _transport.invalid_response() + return cast({{ result }}, response.parsed) + +{% endfor %} +{% endfor %} diff --git a/tests/test_generated_operation.py b/tests/test_generated_operation.py new file mode 100644 index 00000000..85ce47b1 --- /dev/null +++ b/tests/test_generated_operation.py @@ -0,0 +1,83 @@ +"""A compatible schema addition must produce callable sync and async SDK methods.""" + +import json +import os +import shutil +import subprocess +import sys +from pathlib import Path + +from .http_server import Reply, Server + +SDK = Path(__file__).resolve().parents[1] + + +def test_new_public_operation(tmp_path: Path) -> None: + for name in ("proofline", "scripts", "templates"): + shutil.copytree(SDK / name, tmp_path / name, ignore=shutil.ignore_patterns("__pycache__")) + for name in ("generator.json", "pyproject.toml"): + shutil.copyfile(SDK / name, tmp_path / name) + spec = json.loads((SDK / "openapi.public.json").read_bytes()) + spec["components"]["schemas"]["ExampleResult"] = { + "type": "object", + "required": ["answer"], + "properties": {"answer": {"type": "string"}}, + } + spec["paths"]["/api/example/{item}"] = { + "parameters": [ + {"name": "item", "in": "path", "required": True, "schema": {"type": "integer"}} + ], + "get": { + "operationId": "read_example", + "tags": ["samples"], + "responses": { + "200": { + "description": "Example", + "content": { + "application/json": { + "schema": {"$ref": "#/components/schemas/ExampleResult"} + } + }, + } + }, + }, + } + (tmp_path / "openapi.public.json").write_text(json.dumps(spec)) + subprocess.run([sys.executable, "scripts/generate.py"], cwd=tmp_path, check=True) + # Import both clients from the newly generated package in a fresh interpreter. + probe = """ +import asyncio, sys +from proofline import ProoflineClient, AsyncProoflineClient, ProoflineError + +async def run(): + with ProoflineClient("sample-token", base_url=sys.argv[1]) as client: + assert client.read_example(7).answer == "seven" + async with AsyncProoflineClient("sample-token", base_url=sys.argv[1]) as client: + assert (await client.read_example(7)).answer == "seven" + try: + await client.read_example(8) + except ProoflineError as error: + assert error.status == 403 + else: + raise AssertionError("the generated client accepted a forbidden response") +asyncio.run(run()) +""" + with Server( + lambda r, _: ( + Reply(body={"answer": "seven"}) + if r.path.endswith("/7") + else Reply(status=403, body={"type": "forbidden", "detail": "Unavailable"}) + ) + ) as peer: + subprocess.run( + [sys.executable, "-c", probe, peer.url], + cwd=tmp_path, + env={**os.environ, "PYTHONPATH": str(tmp_path)}, + check=True, + ) + assert [r.path for r in peer.requests] == [ + "/api/example/7", + "/api/example/7", + "/api/example/8", + ] + assert all(r.headers.get("Authorization") == "Bearer sample-token" for r in peer.requests) diff --git a/tests/test_http.py b/tests/test_http.py index eba316e7..613ca297 100644 --- a/tests/test_http.py +++ b/tests/test_http.py @@ -8,10 +8,12 @@ import socket import threading import time +import tomllib import traceback from collections.abc import AsyncIterator from contextlib import asynccontextmanager from datetime import UTC, datetime, timedelta +from pathlib import Path from typing import Any from urllib.parse import parse_qs, urlsplit @@ -124,6 +126,8 @@ async def async_sleep(self, delay: float) -> None: async def test_all_public_operations_use_generated_models_and_scoped_paths( mode: str, terraform: Any ) -> None: + metadata = Path(__file__).resolve().parents[1] / "pyproject.toml" + package_version = tomllib.loads(metadata.read_text())["project"]["version"] prefix = f"/api/v1/organizations/{ORG}" paths = [ ("GET", f"{prefix}/reviews", page(), ReviewPage), @@ -281,7 +285,7 @@ def respond(request: Request, index: int) -> Reply: assert len({request.peer_port for request in server.requests}) == 1 for request in server.requests: assert request.headers["Authorization"] == f"Bearer {TOKEN}" - assert request.headers["User-Agent"] == "proofline-python/1.0.3" + assert request.headers["User-Agent"] == f"proofline-python/{package_version}" assert request.headers["Accept-Encoding"] == "identity" assert "Cookie" not in request.headers assert "Content-Type" not in request.headers @@ -606,9 +610,11 @@ async def test_retry_after_waits_for_server_then_returns_typed_success( mode: str, monkeypatch: pytest.MonkeyPatch ) -> None: with Server( - lambda request, index: Reply(429, {"detail": "Rate limit."}, {"Retry-After": "2"}) - if index == 0 - else Reply(body=finding()) + lambda request, index: ( + Reply(429, {"detail": "Rate limit."}, {"Retry-After": "2"}) + if index == 0 + else Reply(body=finding()) + ) ) as server: started = time.monotonic() async with session(mode, server.url) as client: @@ -627,9 +633,11 @@ def now(cls, tz: Any = None) -> datetime: monkeypatch.setattr(_transport, "datetime", Calendar) header = (instant + timedelta(seconds=2)).strftime("%A, %d-%b-%y %H:%M:%S GMT") with Server( - lambda request, index: Reply(429, {"detail": "Rate limit."}, {"Retry-After": header}) - if index == 0 - else Reply(body=finding()) + lambda request, index: ( + Reply(429, {"detail": "Rate limit."}, {"Retry-After": header}) + if index == 0 + else Reply(body=finding()) + ) ) as server: started = time.monotonic() async with session(mode, server.url) as client: @@ -710,9 +718,11 @@ def now(cls, tz: Any = None) -> datetime: "Sun, 06 Nov 1994 08:49:37 GMT", ]: with Server( - lambda request, index: Reply(429, {"detail": "Rate limit."}, {"Retry-After": header}) - if index == 0 - else Reply(body=finding()) + lambda request, index: ( + Reply(429, {"detail": "Rate limit."}, {"Retry-After": header}) + if index == 0 + else Reply(body=finding()) + ) ) as server: async with session(mode, server.url) as client: assert (await call(client, "get_finding", ORG, FINDING)).id == FINDING @@ -792,6 +802,16 @@ async def test_wait_retains_evidence_gaps_after_running_review( "name": "synthetic-check", "outcome": "UNRESOLVED", "lifecycle": "SHADOW", + "files": [ + { + "revision": "PROPOSED_CODE_REVISION", + "path": {"untrusted_text": "deploy.yml"}, + }, + { + "revision": "BASE_CODE_REVISION", + "path": {"untrusted_text": "deploy.yml"}, + }, + ], "unresolved_reason": "UNSUPPORTED", "detail": PRIVATE, } @@ -812,6 +832,11 @@ async def test_wait_retains_evidence_gaps_after_running_review( assert gap.checks[0].unresolved_reason == "UNSUPPORTED" assert gap.checks[0].detail == PRIVATE assert gap.checks[0].lifecycle == "SHADOW" + files = result.review.assessments[0].checks.families[0].files + assert [(file.revision, file.path.untrusted_text) for file in files] == [ + ("PROPOSED_CODE_REVISION", "deploy.yml"), + ("BASE_CODE_REVISION", "deploy.yml"), + ] assert PRIVATE not in repr(result) + repr(gap) assert clock.delays == [5, 10] @@ -927,7 +952,12 @@ async def test_completion_uses_all_declared_lifecycles_and_recorded_checks( body = review() body["finding_count"] = 1 body["assessments"][0]["findings"] = [finding()] - check = {"name": "family", "outcome": check_outcome, "lifecycle": lifecycle} + check = { + "name": "family", + "outcome": check_outcome, + "lifecycle": lifecycle, + "files": [], + } if check_outcome == "UNRESOLVED": check["unresolved_reason"] = "REGENERATE_SCENARIO" body["assessments"][0]["checks"]["families"] = [check] @@ -1054,17 +1084,19 @@ async def test_polling_backoff_and_timeout_keep_review_url_and_last_record( @MODES -async def test_retry_after_is_bounded_by_wait_deadline(mode: str) -> None: +async def test_retry_after_is_bounded_by_wait_deadline( + mode: str, monkeypatch: pytest.MonkeyPatch +) -> None: + clock = Clock(monkeypatch) with Server( - lambda request, index: Reply(503, {"detail": "Unavailable."}, {"Retry-After": "2"}) + lambda request, index: Reply(503, {"detail": "Unavailable."}, {"Retry-After": "20"}) ) as server: async with session(mode, server.url) as client: - started = time.monotonic() - result = await call(client, "wait_for_review", ORG, REVIEW, timeout=0.05) + result = await call(client, "wait_for_review", ORG, REVIEW, timeout=10) assert result.status == "TIMED_OUT" assert result.review_url == f"{server.url}/orgs/by-id/{ORG}/reviews/{REVIEW}" - assert time.monotonic() - started < 0.5 assert len(server.requests) == 1 + assert clock.delays == [10] @MODES From 0e13a0510af17c297949838e12178882955faae7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 6 Nov 2026 22:53:26 +0000 Subject: [PATCH 06/38] Update distribution --- openapi.public.json | 1039 +---------------- proofline/_generated/models/__init__.py | 54 - proofline/_generated/models/approval_gap.py | 70 -- .../models/attributed_condition_view.py | 213 ---- proofline/_generated/models/authority.py | 9 - .../_generated/models/availability_type_0.py | 11 - .../models/change_attribution_view.py | 322 ----- .../_generated/models/change_count_view.py | 182 --- .../_generated/models/complete_record_view.py | 71 -- .../_generated/models/customer_assessment.py | 73 -- .../models/customer_assessment_detail.py | 73 -- proofline/_generated/models/customer_check.py | 38 - .../_generated/models/customer_decision.py | 168 --- .../models/customer_decision_basis.py | 80 -- .../models/customer_finding_validation.py | 21 + .../models/customer_review_detail.py | 24 + .../models/declared_reach_outcome.py | 11 - .../_generated/models/declared_reach_view.py | 204 ---- proofline/_generated/models/evidence_view.py | 10 - proofline/_generated/models/gate_state.py | 123 -- .../_generated/models/occurrence_capture.py | 221 ---- .../_generated/models/occurrence_question.py | 200 ---- proofline/_generated/models/override.py | 102 -- .../_generated/models/permission_view.py | 9 - proofline/_generated/models/reach_gap_view.py | 61 - .../_generated/models/reach_step_view.py | 79 -- .../_generated/models/reached_entity_view.py | 109 -- .../models/review_routing_view_type_2.py | 37 - proofline/_generated/models/review_summary.py | 24 + .../models/reviewed_tree_citation_view.py | 123 -- .../models/specialist_assessment_execution.py | 84 -- .../models/specialist_execution_view.py | 85 -- .../models/specialist_output_projection.py | 92 -- .../models/specialist_pass_execution.py | 122 -- .../_generated/models/terraform_plan_view.py | 12 - .../_generated/models/terraform_roots_view.py | 80 -- proofline/_transport.py | 2 +- pyproject.toml | 2 +- tests/test_http.py | 34 +- 39 files changed, 106 insertions(+), 4168 deletions(-) delete mode 100644 proofline/_generated/models/approval_gap.py delete mode 100644 proofline/_generated/models/attributed_condition_view.py delete mode 100644 proofline/_generated/models/authority.py delete mode 100644 proofline/_generated/models/availability_type_0.py delete mode 100644 proofline/_generated/models/change_attribution_view.py delete mode 100644 proofline/_generated/models/change_count_view.py delete mode 100644 proofline/_generated/models/complete_record_view.py delete mode 100644 proofline/_generated/models/customer_decision.py delete mode 100644 proofline/_generated/models/customer_decision_basis.py delete mode 100644 proofline/_generated/models/declared_reach_outcome.py delete mode 100644 proofline/_generated/models/declared_reach_view.py delete mode 100644 proofline/_generated/models/evidence_view.py delete mode 100644 proofline/_generated/models/gate_state.py delete mode 100644 proofline/_generated/models/occurrence_capture.py delete mode 100644 proofline/_generated/models/occurrence_question.py delete mode 100644 proofline/_generated/models/override.py delete mode 100644 proofline/_generated/models/permission_view.py delete mode 100644 proofline/_generated/models/reach_gap_view.py delete mode 100644 proofline/_generated/models/reach_step_view.py delete mode 100644 proofline/_generated/models/reached_entity_view.py delete mode 100644 proofline/_generated/models/reviewed_tree_citation_view.py delete mode 100644 proofline/_generated/models/specialist_assessment_execution.py delete mode 100644 proofline/_generated/models/specialist_execution_view.py delete mode 100644 proofline/_generated/models/specialist_output_projection.py delete mode 100644 proofline/_generated/models/specialist_pass_execution.py delete mode 100644 proofline/_generated/models/terraform_plan_view.py delete mode 100644 proofline/_generated/models/terraform_roots_view.py diff --git a/openapi.public.json b/openapi.public.json index b3bd96c0..eaa78d01 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -263,24 +263,6 @@ ], "type": "string" }, - "ApprovalGap": { - "properties": { - "assessment_id": { - "description": "Assessment whose approval could not supply deferred occurrence questions.", - "format": "uuid", - "type": "string" - }, - "code": { - "description": "Reason the assessment's approval could not supply deferred occurrence questions.", - "type": "string" - } - }, - "required": [ - "assessment_id", - "code" - ], - "type": "object" - }, "AssessmentProjection": { "properties": { "assessment_id": { @@ -325,111 +307,6 @@ ], "type": "object" }, - "AttributedChange": { - "description": "How one condition relates to the review's base revision.", - "oneOf": [ - { - "const": "INTRODUCED", - "description": "The proposed revision holds the condition and the base did not.", - "type": "string" - }, - { - "const": "CHANGED", - "description": "The site held a different condition at the base.", - "type": "string" - }, - { - "const": "UNCHANGED", - "description": "The base already held this condition at this site. Pre-existing,\n not safe.", - "type": "string" - }, - { - "const": "RESOLVED", - "description": "The base held this condition and the proposed revision no longer does.", - "type": "string" - }, - { - "const": "UNATTRIBUTED", - "description": "World could not match the condition with its predecessor, such as a\n declaration that may have moved; its origin is unknown.", - "type": "string" - } - ] - }, - "AttributedConditionView": { - "properties": { - "change": { - "allOf": [ - { - "$ref": "#/components/schemas/AttributedChange" - } - ], - "description": "How this condition relates to the review's base revision." - }, - "reviewed_tree_citations": { - "description": "The member that declares the site at each revision that declares it.", - "items": { - "$ref": "#/components/schemas/ReviewedTreeCitationView" - }, - "type": "array" - }, - "revision": { - "allOf": [ - { - "$ref": "#/components/schemas/AttributedRevision" - } - ], - "description": "The revision that holds the condition: the base for `RESOLVED`, the\n proposed revision for `INTRODUCED`, `CHANGED` and `UNCHANGED`, and\n either for `UNATTRIBUTED`." - }, - "subject": { - "allOf": [ - { - "$ref": "#/components/schemas/UntrustedText" - } - ], - "description": "World's label of the condition's site and what it declares, such as\n `.github/workflows/ci.yml jobs.test.steps[0].uses: actions/checkout@v4`.\n It quotes repository text." - } - }, - "required": [ - "change", - "revision", - "subject", - "reviewed_tree_citations" - ], - "type": "object" - }, - "AttributedRevision": { - "oneOf": [ - { - "const": "PROPOSED_CODE_REVISION", - "description": "The reviewed commit.", - "type": "string" - }, - { - "const": "BASE_CODE_REVISION", - "description": "Its merge base.", - "type": "string" - } - ] - }, - "AttributionStatus": { - "oneOf": [ - { - "const": "COMPARED", - "description": "World read the complete set of conditions at both revisions.", - "type": "string" - }, - { - "const": "UNAVAILABLE", - "description": "World could not read one revision's conditions, so no condition is\n called new or old.", - "type": "string" - }, - { - "const": "UNREADABLE", - "description": "The receipt carries an attribution this build cannot read. No\n condition is called new or old.", - "type": "string" - } - ] - }, "AuthorChoice": { "properties": { "id": { @@ -450,180 +327,6 @@ ], "type": "object" }, - "Authority": { - "enum": [ - "ADVISORY", - "DEPLOYMENT_POLICY" - ], - "type": "string" - }, - "Availability": { - "oneOf": [ - { - "enum": [ - "RECORDED", - "NOT_RECORDED", - "LEGACY", - "OPERATIONAL_FAILURE" - ], - "type": "string" - }, - { - "const": "LIMITED", - "description": "The record is verified but too large for this projection to carry.\n Siblings still render; nothing is inferred from the omitted detail.", - "type": "string" - } - ] - }, - "CaptureState": { - "description": "How the capture ended.", - "oneOf": [ - { - "const": "PENDING", - "description": "Still waiting for an authorized execution or a decidable look.", - "type": "string" - }, - { - "const": "RECORDED", - "description": "World recorded every deferred question.", - "type": "string" - }, - { - "const": "UNBOUND", - "description": "At least one deferred question is not bound to the execution.", - "type": "string" - }, - { - "const": "NOT_EXECUTED", - "description": "The gate never authorized the execution.", - "type": "string" - }, - { - "const": "INCOMPLETE", - "description": "The capture failed before it wrote its receipt. The gate is\n unchanged; nothing is inferred about the deferred questions.", - "type": "string" - } - ] - }, - "ChangeAttributionView": { - "description": "Which conditions behind a check's result the change brought, and which\n World found at the review's base revision. It sits beside the result and\n never changes it: a condition already at the base is still a condition.", - "properties": { - "complete_record": { - "anyOf": [ - { - "$ref": "#/components/schemas/CompleteRecordView" - }, - { - "type": "null" - } - ], - "description": "Where every condition is recorded when some are omitted. Absent when\n `conditions` lists them all." - }, - "condition_count": { - "description": "How many conditions World attributed, listed or not. Zero unless\n `status` is `COMPARED`.", - "format": "uint32", - "minimum": 0, - "type": "integer" - }, - "conditions": { - "description": "Every condition, each once, in World's order, never netted against\n another. Empty unless `status` is `COMPARED`, and empty when some are\n omitted: it never lists only some of them.", - "items": { - "$ref": "#/components/schemas/AttributedConditionView" - }, - "type": "array" - }, - "counts": { - "description": "How many conditions there are of each change at each revision, over\n every condition, listed or not. Changes with none are left out.", - "items": { - "$ref": "#/components/schemas/ChangeCountView" - }, - "type": "array" - }, - "detail_code": { - "description": "World's code for why it could not read that revision, such as\n `BASE_REVIEWED_TREE_NOT_DECLARED`. Present exactly when `status` is\n `UNAVAILABLE`.", - "type": [ - "string", - "null" - ] - }, - "listed_conditions": { - "description": "The conditions a summary lists when some are omitted: the first ones\n in the order `counts` gives, each whole, at most 50 and always fewer\n than `condition_count`. Present exactly when `omitted_condition_count`\n is not zero.", - "items": { - "$ref": "#/components/schemas/AttributedConditionView" - }, - "type": [ - "array", - "null" - ] - }, - "omitted_condition_count": { - "description": "How many of those conditions this response does not list. Zero when\n the result kept World's attribution whole. Otherwise the result kept a\n summary: `listed_conditions` lists the first ones, `counts` is still\n exact, and World's recorded evaluation holds every condition.", - "format": "uint32", - "minimum": 0, - "type": "integer" - }, - "revision": { - "anyOf": [ - { - "$ref": "#/components/schemas/AttributedRevision" - }, - { - "type": "null" - } - ], - "description": "The revision World could not read. Present exactly when `status` is\n `UNAVAILABLE`." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/AttributionStatus" - } - ], - "description": "Whether World compared both revisions, could not read one, or recorded\n an attribution this build cannot read." - } - }, - "required": [ - "status", - "condition_count", - "omitted_condition_count", - "counts", - "conditions" - ], - "type": "object" - }, - "ChangeCountView": { - "description": "How many conditions are of one change at one revision.", - "properties": { - "change": { - "allOf": [ - { - "$ref": "#/components/schemas/AttributedChange" - } - ], - "description": "How the counted conditions relate to the review's base revision." - }, - "count": { - "description": "How many conditions have this `change` at this `revision`, over every\n condition, listed or not.", - "format": "uint32", - "minimum": 0, - "type": "integer" - }, - "revision": { - "allOf": [ - { - "$ref": "#/components/schemas/AttributedRevision" - } - ], - "description": "The revision that holds the counted conditions." - } - }, - "required": [ - "change", - "revision", - "count" - ], - "type": "object" - }, "ChangeDiagramKindView": { "enum": [ "FLOWCHART", @@ -1073,24 +776,6 @@ ], "type": "object" }, - "CompleteRecordView": { - "description": "World's immutable record of the complete answer an omitted list comes\n from.", - "properties": { - "attribution_digest": { - "description": "The `sha256:` digest of the complete attribution in that record.", - "type": "string" - }, - "world_evaluation_id": { - "description": "The evaluation World recorded, which holds every condition.", - "type": "string" - } - }, - "required": [ - "world_evaluation_id", - "attribution_digest" - ], - "type": "object" - }, "CoverageRefused": { "description": "An upload refused for its content: a symbolic or unknown commit, or a\n report that cannot be read. Nothing is stored.", "properties": { @@ -1203,28 +888,6 @@ "null" ] }, - "decision_presentation": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomerDecision" - }, - { - "type": "null" - } - ], - "description": "The retained decision disclosure, which grants no deployment\n authorization. Absent when none is recorded and the review kind\n records no decision basis." - }, - "declared_reach": { - "anyOf": [ - { - "$ref": "#/components/schemas/DeclaredReachView" - }, - { - "type": "null" - } - ], - "description": "What World declares depends on what this change deploys in this\n environment, at the assessment's pinned snapshot. Absent when the\n assessment's kind records no declared reach." - }, "domains": { "description": "The risk domains the assessment evaluated, each with its status and\n reason, ordered by domain.", "items": { @@ -1313,28 +976,6 @@ "null" ] }, - "decision_presentation": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomerDecision" - }, - { - "type": "null" - } - ], - "description": "The retained decision disclosure, which grants no deployment\n authorization. Absent when none is recorded and the review kind\n records no decision basis." - }, - "declared_reach": { - "anyOf": [ - { - "$ref": "#/components/schemas/DeclaredReachView" - }, - { - "type": "null" - } - ], - "description": "What World declares depends on what this change deploys in this\n environment, at the assessment's pinned snapshot. Absent when the\n assessment's kind records no declared reach." - }, "domains": { "description": "The risk domains the assessment evaluated, each with its status and\n reason, ordered by domain.", "items": { @@ -1421,17 +1062,6 @@ }, "CustomerCheck": { "properties": { - "change_attribution": { - "anyOf": [ - { - "$ref": "#/components/schemas/ChangeAttributionView" - }, - { - "type": "null" - } - ], - "description": "Which conditions behind the outcome the change brought and which were\n already at the review's base revision. It never changes the outcome:\n a condition already at the base is pre-existing, not safe. Absent for\n a check whose evaluator does not compare the two revisions." - }, "detail": { "description": "Why World refused the check, or otherwise World's recorded explanation\n of the result. Null when neither is recorded.", "type": [ @@ -1585,83 +1215,6 @@ ], "type": "object" }, - "CustomerDecision": { - "properties": { - "authority": { - "allOf": [ - { - "$ref": "#/components/schemas/Authority" - } - ], - "description": "Whether the decision is `ADVISORY` or comes from a `DEPLOYMENT_POLICY`." - }, - "availability": { - "allOf": [ - { - "$ref": "#/components/schemas/Availability" - } - ], - "description": "Whether a verified decision record is present, absent, legacy, failed,\n or too large for this projection." - }, - "basis": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomerDecisionBasis" - }, - { - "type": "null" - } - ], - "description": "The permission, evidence classification and reason code of the\n verified recorded basis. Null when no verified basis is recorded." - }, - "gate_state": { - "anyOf": [ - { - "$ref": "#/components/schemas/GateState" - }, - { - "type": "null" - } - ], - "description": "The local deployment gate state and any recorded override. Null unless\n the decision belongs to a deployment gate." - } - }, - "required": [ - "availability", - "authority" - ], - "type": "object" - }, - "CustomerDecisionBasis": { - "properties": { - "evidence": { - "allOf": [ - { - "$ref": "#/components/schemas/EvidenceView" - } - ], - "description": "How the recorded basis classified its evidence." - }, - "permission": { - "allOf": [ - { - "$ref": "#/components/schemas/PermissionView" - } - ], - "description": "The permission the recorded basis reached: `PERMIT` or `BLOCK`." - }, - "reason_code": { - "description": "The reason code the recorded basis gives for its permission.", - "type": "string" - } - }, - "required": [ - "permission", - "evidence", - "reason_code" - ], - "type": "object" - }, "CustomerEvidenceRef": { "properties": { "commit_sha": { @@ -1959,6 +1512,13 @@ "null" ] }, + "actor_name": { + "description": "The actor's GitHub profile name, when known. Lead with it; the login\n is the fallback. Null for the automatic decision.", + "type": [ + "string", + "null" + ] + }, "covering_author_kind": { "description": "For `ALREADY_COVERED`, `HUMAN` or `BOT`. Null for every other decision.", "type": [ @@ -2275,6 +1835,13 @@ "null" ] }, + "pull_request_author_name": { + "description": "The author's GitHub profile name, when known. Lead with it; the login\n is the fallback. Display metadata, never identity.", + "type": [ + "string", + "null" + ] + }, "pull_request_author_url": { "description": "The author's profile on the deployment's GitHub host. Absent when no author login is known.", "type": [ @@ -2497,79 +2064,6 @@ ], "type": "string" }, - "DeclaredReachOutcome": { - "enum": [ - "READ", - "NO_ROOTS", - "ROOTS_UNKNOWN", - "UNAVAILABLE" - ], - "type": "string" - }, - "DeclaredReachView": { - "description": "One assessment's declared reach receipt. A reached entity declares a\n dependency on what the change deploys; it is never a claim that the change\n breaks it.", - "properties": { - "complete": { - "description": "Whether World's walk ended with no gap. An empty, incomplete reach\n says nothing about what depends on the change.", - "type": "boolean" - }, - "entities": { - "description": "Every reached entity, shorter paths first, then by kind.", - "items": { - "$ref": "#/components/schemas/ReachedEntityView" - }, - "type": "array" - }, - "gaps": { - "description": "Where World's walk or its evidence stopped.", - "items": { - "$ref": "#/components/schemas/ReachGapView" - }, - "type": "array" - }, - "outcome": { - "allOf": [ - { - "$ref": "#/components/schemas/DeclaredReachOutcome" - } - ], - "description": "`READ` when World answered, `NO_ROOTS` when no evidence bound a\n deployed artifact or workload to the repository, `ROOTS_UNKNOWN` when\n World's evidence does not establish which revision runs, and\n `UNAVAILABLE` when World gave no answer. Only `READ` carries entities or gaps." - }, - "receipt_digest": { - "description": "World's digest of its full answer. Null unless `READ`.", - "type": [ - "string", - "null" - ] - }, - "snapshot_id": { - "description": "The World snapshot the reach was read at. Null unless `READ`.", - "format": "uuid", - "type": [ - "string", - "null" - ] - }, - "terraform": { - "anyOf": [ - { - "$ref": "#/components/schemas/TerraformRootsView" - }, - { - "type": "null" - } - ], - "description": "The Terraform addresses the reach also started from, or why it took\n none. Absent when the assessment read reach only from the deployed\n revision." - } - }, - "required": [ - "outcome", - "complete", - "entities", - "gaps" - ], - "type": "object" - }, "DeepReviewEscalation": { "properties": { "reason": { @@ -2659,14 +2153,6 @@ ], "type": "object" }, - "EvidenceView": { - "enum": [ - "REQUIRED_PROPERTIES_ESTABLISHED", - "INCOMPLETE", - "NO_APPLICABLE_OBLIGATIONS" - ], - "type": "string" - }, "ExportEvidenceKind": { "enum": [ "repository_file", @@ -3749,37 +3235,6 @@ ], "type": "object" }, - "GateState": { - "properties": { - "occurrence_captures": { - "description": "The occurrence questions the gate's approval deferred, as each\n observed execution of its deployment answered them. Outcome-only\n records: none of them changes the gate or grades a prediction.", - "items": { - "$ref": "#/components/schemas/OccurrenceCapture" - }, - "type": "array" - }, - "override_record": { - "anyOf": [ - { - "$ref": "#/components/schemas/Override" - }, - { - "type": "null" - } - ], - "description": "Recorded override authorization, not confirmation of provider delivery." - }, - "status": { - "description": "Local gate state. ALLOWED/BLOCKED can precede provider delivery.\n This field does not confirm that GitHub released or blocked a run.", - "type": "string" - } - }, - "required": [ - "status", - "occurrence_captures" - ], - "type": "object" - }, "GateStatus": { "enum": [ "REQUESTED", @@ -3855,129 +3310,27 @@ }, "required": [ "review_id", - "finding_id", - "created_at" - ], - "type": "object" - }, - "NotAssessedView": { - "properties": { - "environment_display_name": { - "description": "The display name of the environment whose assessment is not\n `COMPLETED`.", - "type": "string" - }, - "incompleteness_kind": { - "description": "The assessment's recorded gap class. Absent is an unclassified gap,\n never a complete assessment.", - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "environment_display_name" - ], - "type": "object" - }, - "OccurrenceCapture": { - "description": "The capture of one observed execution of a gate's deployment.", - "properties": { - "approval_gaps": { - "description": "Assessments whose approval could defer nothing, with the reason.", - "items": { - "$ref": "#/components/schemas/ApprovalGap" - }, - "type": "array" - }, - "detail": { - "description": "Explanation of the capture's outcome, when available.", - "type": [ - "string", - "null" - ] - }, - "occurrence_key": { - "description": "Retained identity of the deployment occurrence, when available.", - "type": [ - "string", - "null" - ] - }, - "questions": { - "description": "Deferred questions and their binding or observed results for this occurrence.", - "items": { - "$ref": "#/components/schemas/OccurrenceQuestion" - }, - "type": "array" - }, - "state": { - "allOf": [ - { - "$ref": "#/components/schemas/CaptureState" - } - ], - "description": "Whether the capture is pending, recorded, unbound, not executed, or incomplete." - } - }, - "required": [ - "state", - "approval_gaps", - "questions" - ], - "type": "object" - }, - "OccurrenceQuestion": { - "description": "One deferred question as the gate presents it.", - "properties": { - "assessment_id": { - "description": "Assessment whose approval deferred this question.", - "format": "uuid", - "type": "string" - }, - "code": { - "description": "World's binding or refusal code, or the control plane's own gap.", - "type": [ - "string", - "null" - ] - }, - "family_key": { - "description": "Hypothesis family key for the deferred question.", + "finding_id", + "created_at" + ], + "type": "object" + }, + "NotAssessedView": { + "properties": { + "environment_display_name": { + "description": "The display name of the environment whose assessment is not\n `COMPLETED`.", "type": "string" }, - "family_version": { - "description": "Hypothesis family version for the deferred question.", - "format": "int32", - "type": "integer" - }, - "observed_result": { - "description": "World's observed result once it recorded the question.", - "type": [ - "string", - "null" - ] - }, - "outcome_id": { - "description": "World outcome record identifier, when an observed result was recorded.", + "incompleteness_kind": { + "description": "The assessment's recorded gap class. Absent is an unclassified gap,\n never a complete assessment.", "type": [ "string", "null" ] - }, - "state": { - "allOf": [ - { - "$ref": "#/components/schemas/QuestionState" - } - ], - "description": "Whether the question is pending, recorded, unbound, or not executed." } }, "required": [ - "assessment_id", - "family_key", - "family_version", - "state" + "environment_display_name" ], "type": "object" }, @@ -4186,37 +3539,6 @@ ], "type": "string" }, - "Override": { - "properties": { - "comment": { - "description": "The comment recorded with the approval, truncated past 8000\n characters.", - "type": [ - "string", - "null" - ] - }, - "github_environment_id": { - "description": "The GitHub environment ID the approval applied to.", - "format": "int64", - "type": "integer" - }, - "github_user_id": { - "description": "The GitHub user ID of the person whose GitHub deployment approval\n overrode the gate.", - "format": "int64", - "type": "integer" - }, - "github_user_login": { - "description": "That person's GitHub login as recorded with the approval, a display\n label truncated past 128 characters.", - "type": "string" - } - }, - "required": [ - "github_user_id", - "github_user_login", - "github_environment_id" - ], - "type": "object" - }, "PassProjection": { "properties": { "model_binding": { @@ -4334,13 +3656,6 @@ ], "type": "object" }, - "PermissionView": { - "enum": [ - "PERMIT", - "BLOCK" - ], - "type": "string" - }, "PlanProjection": { "properties": { "assessments": { @@ -4623,105 +3938,6 @@ ], "type": "object" }, - "QuestionState": { - "description": "Where one deferred question stands.", - "oneOf": [ - { - "const": "PENDING", - "description": "World has stored no record yet: the execution is not yet decidable\n inside the question's window.", - "type": "string" - }, - { - "const": "RECORDED", - "description": "World recorded what the execution was observed to do.", - "type": "string" - }, - { - "const": "UNBOUND", - "description": "The question is not bound to the execution: World's binding code, its\n refusal of the replay, or the control plane's own gap says why.", - "type": "string" - }, - { - "const": "NOT_EXECUTED", - "description": "The gate never authorized the execution, so nothing ran to observe.", - "type": "string" - } - ] - }, - "ReachGapView": { - "properties": { - "code": { - "description": "`COVERAGE_INCOMPLETE`, `SOURCE_CAPABILITY_MISSING` or `BOUND_REACHED`.", - "type": "string" - } - }, - "required": [ - "code" - ], - "type": "object" - }, - "ReachStepView": { - "properties": { - "assertion_id": { - "description": "The World relation assertion behind this step.", - "format": "uuid", - "type": "string" - }, - "direction": { - "description": "`OUT` when the step follows the relation from its subject, `IN` when\n it follows it back to the subject.", - "type": "string" - }, - "relation": { - "description": "The relation key, such as `proofline.relation.consumes_api`.", - "type": "string" - } - }, - "required": [ - "assertion_id", - "relation", - "direction" - ], - "type": "object" - }, - "ReachedEntityView": { - "properties": { - "entity_id": { - "description": "World's entity ID.", - "format": "uuid", - "type": "string" - }, - "kind": { - "description": "The entity's kind, such as `service` or `queue`.", - "type": "string" - }, - "label": { - "description": "World's display label for the entity: environment evidence for\n readers of this organization, never published to GitHub.", - "type": "string" - }, - "path": { - "description": "The recorded relation assertions from the deployed root to the entity.", - "items": { - "$ref": "#/components/schemas/ReachStepView" - }, - "type": "array" - }, - "type_keys": { - "description": "World's registry type keys for the entity.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "entity_id", - "kind", - "type_keys", - "label", - "path" - ], - "type": "object" - }, "RefreshView": { "description": "A recorded refresh decision, as the console shows it.", "properties": { @@ -5268,17 +4484,6 @@ ], "description": "Safe routing projection bound to this review's retained inputs." }, - "specialist_execution": { - "anyOf": [ - { - "$ref": "#/components/schemas/SpecialistExecutionView" - }, - { - "type": "null" - } - ], - "description": "Actual specialist selection and pass receipts for the applied workflow." - }, "status": { "const": "SUPPORTED", "type": "string" @@ -5397,6 +4602,13 @@ "null" ] }, + "pull_request_author_name": { + "description": "The author's GitHub profile name, when known. Lead with it; the login\n is the fallback. Display metadata, never identity.", + "type": [ + "string", + "null" + ] + }, "pull_request_author_url": { "description": "The author's profile on the deployment's GitHub host. Absent when no author login is known.", "type": [ @@ -5504,45 +4716,6 @@ ], "type": "object" }, - "ReviewedTreeCitationView": { - "description": "One member of a review's declared tree that World cited.", - "properties": { - "content_sha256": { - "description": "The member's content hash. Absent for a member a `REJECTED`\n population refused, because such a population keeps no members.", - "type": [ - "string", - "null" - ] - }, - "overlay_digest": { - "description": "The overlay World read the member from.", - "type": "string" - }, - "path": { - "allOf": [ - { - "$ref": "#/components/schemas/UntrustedText" - } - ], - "description": "The member's path in the repository at that revision. Repository\n text, so it can hold bidirectional controls that reorder what the\n reader sees." - }, - "population_kind": { - "description": "The population the member belongs to, such as\n `WORKFLOW_DEFINITIONS`.", - "type": "string" - }, - "role": { - "description": "`PROPOSED_CODE_REVISION` (the reviewed commit) or\n `BASE_CODE_REVISION` (its merge base).", - "type": "string" - } - }, - "required": [ - "role", - "population_kind", - "path", - "overlay_digest" - ], - "type": "object" - }, "ReviewsExportRow": { "description": "The NDJSON row and CSV column contract. Repository names are display data;\n the stable repository ID and recorded commit identify the reviewed input.", "properties": { @@ -6047,108 +5220,6 @@ ], "type": "object" }, - "SpecialistAssessmentExecution": { - "properties": { - "assessment_id": { - "description": "The immutable assessment whose specialist execution is reported.", - "format": "uuid", - "type": "string" - }, - "passes": { - "description": "Selected specialist passes and their retained execution outputs.", - "items": { - "$ref": "#/components/schemas/SpecialistPassExecution" - }, - "type": "array" - } - }, - "required": [ - "assessment_id", - "passes" - ], - "type": "object" - }, - "SpecialistExecutionView": { - "properties": { - "assessments": { - "description": "The applied specialist roster per exact assessment execution.", - "items": { - "$ref": "#/components/schemas/SpecialistAssessmentExecution" - }, - "type": "array" - }, - "selection_recorded": { - "description": "False until the applied parent captures its specialist choices.", - "type": "boolean" - } - }, - "required": [ - "selection_recorded", - "assessments" - ], - "type": "object" - }, - "SpecialistOutputProjection": { - "description": "A pass receipt's bounded operational facts, without its proposals or prose.", - "properties": { - "gap_kind": { - "description": "Closed evidence-gap class, absent when the pass produced output.", - "type": [ - "string", - "null" - ] - }, - "output_sha256": { - "description": "Verified digest of the retained output bytes.", - "type": "string" - }, - "status": { - "description": "`PRODUCED`, `UNAVAILABLE`, `INCOMPLETE` or `MALFORMED`.", - "type": "string" - } - }, - "required": [ - "status", - "output_sha256" - ], - "type": "object" - }, - "SpecialistPassExecution": { - "properties": { - "files": { - "description": "Exact selected paths from the validated captured change.", - "items": { - "type": "string" - }, - "type": "array" - }, - "floor": { - "description": "Whether captured file facts required this pass.", - "type": "boolean" - }, - "name": { - "description": "Closed registry key of the selected specialist.", - "type": "string" - }, - "output": { - "anyOf": [ - { - "$ref": "#/components/schemas/SpecialistOutputProjection" - }, - { - "type": "null" - } - ], - "description": "Missing means selected, with no retained output. It never means success." - } - }, - "required": [ - "name", - "files", - "floor" - ], - "type": "object" - }, "SpendAccountKind": { "enum": [ "DEPLOYMENT", @@ -6419,48 +5490,6 @@ ], "type": "string" }, - "TerraformPlanView": { - "enum": [ - "TAKEN", - "NOT_DECLARED", - "NOT_PINNED", - "HEAD_DIFFERS", - "ADDRESSES_UNREPORTED" - ], - "type": "string" - }, - "TerraformRootsView": { - "description": "The Terraform roots of one declared reach read.", - "properties": { - "addresses": { - "description": "The changed resource instance addresses taken as roots.", - "items": { - "type": "string" - }, - "type": "array" - }, - "omitted": { - "description": "Changed addresses left out at World's limit of 100 roots per read.", - "format": "uint", - "minimum": 0, - "type": "integer" - }, - "plan": { - "allOf": [ - { - "$ref": "#/components/schemas/TerraformPlanView" - } - ], - "description": "`TAKEN` when the plan pinned for the reviewed commit named the roots,\n `NOT_DECLARED` when the environment captures no Terraform plan for this\n review, `NOT_PINNED` when it declares one and none was pinned,\n `HEAD_DIFFERS` when the pinned plan is for another commit, and\n `ADDRESSES_UNREPORTED` when the pinned plan records no changed\n addresses because it was pinned before World reported them." - } - }, - "required": [ - "plan", - "addresses", - "omitted" - ], - "type": "object" - }, "ThreadObservationFreshness": { "enum": [ "FRESH", @@ -6724,7 +5753,7 @@ }, "info": { "title": "Proofline Review API", - "version": "2.0.0" + "version": "3.0.0" }, "openapi": "3.1.0", "paths": { diff --git a/proofline/_generated/models/__init__.py b/proofline/_generated/models/__init__.py index 87d698e3..59e11473 100644 --- a/proofline/_generated/models/__init__.py +++ b/proofline/_generated/models/__init__.py @@ -7,14 +7,8 @@ from .agent_session_prompt_type_1 import AgentSessionPromptType1 from .agent_session_target import AgentSessionTarget from .agent_vendor import AgentVendor -from .approval_gap import ApprovalGap from .assessment_projection import AssessmentProjection -from .attributed_condition_view import AttributedConditionView from .author_choice import AuthorChoice -from .authority import Authority -from .availability_type_0 import AvailabilityType0 -from .change_attribution_view import ChangeAttributionView -from .change_count_view import ChangeCountView from .change_diagram_kind_view import ChangeDiagramKindView from .change_diagram_outcome_type_0 import ChangeDiagramOutcomeType0 from .change_diagram_view import ChangeDiagramView @@ -29,7 +23,6 @@ from .comment_reaction_view import CommentReactionView from .commit_review_request import CommitReviewRequest from .commit_review_response import CommitReviewResponse -from .complete_record_view import CompleteRecordView from .coverage_refused import CoverageRefused from .coverage_upload_request import CoverageUploadRequest from .coverage_upload_response import CoverageUploadResponse @@ -38,20 +31,15 @@ from .customer_check import CustomerCheck from .customer_checks import CustomerChecks from .customer_code_assessment import CustomerCodeAssessment -from .customer_decision import CustomerDecision -from .customer_decision_basis import CustomerDecisionBasis from .customer_evidence_ref import CustomerEvidenceRef from .customer_finding import CustomerFinding from .customer_finding_validation import CustomerFindingValidation from .customer_review_detail import CustomerReviewDetail from .dataset import Dataset -from .declared_reach_outcome import DeclaredReachOutcome -from .declared_reach_view import DeclaredReachView from .deep_review_escalation import DeepReviewEscalation from .deep_review_escalation_status import DeepReviewEscalationStatus from .domain_view import DomainView from .earlier_open_finding import EarlierOpenFinding -from .evidence_view import EvidenceView from .export_evidence_kind import ExportEvidenceKind from .export_evidence_ref import ExportEvidenceRef from .export_finding_lifecycle import ExportFindingLifecycle @@ -90,14 +78,11 @@ from .finding_support import FindingSupport from .finding_validations_export_row import FindingValidationsExportRow from .findings_export_row import FindingsExportRow -from .gate_state import GateState from .gate_status import GateStatus from .local_reverification import LocalReverification from .local_reverification_outcome import LocalReverificationOutcome from .matched_local_finding import MatchedLocalFinding from .not_assessed_view import NotAssessedView -from .occurrence_capture import OccurrenceCapture -from .occurrence_question import OccurrenceQuestion from .open_finding_counts import OpenFindingCounts from .open_item_environment import OpenItemEnvironment from .open_items_gap_reason import OpenItemsGapReason @@ -108,21 +93,16 @@ from .open_items_threads_type_1 import OpenItemsThreadsType1 from .open_items_view import OpenItemsView from .outcome import Outcome -from .override import Override from .pass_projection import PassProjection from .patch_review_request import PatchReviewRequest from .patch_review_response import PatchReviewResponse from .patch_trigger_source import PatchTriggerSource from .patch_verification import PatchVerification -from .permission_view import PermissionView from .plan_projection import PlanProjection from .problem import Problem from .prose import Prose from .prose_outcome_type_0 import ProseOutcomeType0 from .pull_request_merge_gate import PullRequestMergeGate -from .reach_gap_view import ReachGapView -from .reach_step_view import ReachStepView -from .reached_entity_view import ReachedEntityView from .refresh_view import RefreshView from .refused_environment import RefusedEnvironment from .related_review import RelatedReview @@ -140,7 +120,6 @@ from .review_routing_view_type_1 import ReviewRoutingViewType1 from .review_routing_view_type_2 import ReviewRoutingViewType2 from .review_summary import ReviewSummary -from .reviewed_tree_citation_view import ReviewedTreeCitationView from .reviews_export_row import ReviewsExportRow from .routing_finding_view import RoutingFindingView from .rule_source import RuleSource @@ -160,10 +139,6 @@ from .run_now_refused import RunNowRefused from .run_now_request import RunNowRequest from .run_now_response import RunNowResponse -from .specialist_assessment_execution import SpecialistAssessmentExecution -from .specialist_execution_view import SpecialistExecutionView -from .specialist_output_projection import SpecialistOutputProjection -from .specialist_pass_execution import SpecialistPassExecution from .spend_account_kind import SpendAccountKind from .spend_export_row import SpendExportRow from .start_session import StartSession @@ -171,8 +146,6 @@ from .subject_authorization import SubjectAuthorization from .subject_view import SubjectView from .summary_route import SummaryRoute -from .terraform_plan_view import TerraformPlanView -from .terraform_roots_view import TerraformRootsView from .thread_observation_freshness import ThreadObservationFreshness from .thread_observation_view import ThreadObservationView from .thread_provider_state import ThreadProviderState @@ -191,14 +164,8 @@ "AgentSessionPromptType1", "AgentSessionTarget", "AgentVendor", - "ApprovalGap", "AssessmentProjection", - "AttributedConditionView", "AuthorChoice", - "Authority", - "AvailabilityType0", - "ChangeAttributionView", - "ChangeCountView", "ChangeDiagramKindView", "ChangeDiagramOutcomeType0", "ChangeDiagramView", @@ -213,7 +180,6 @@ "CommentReactionView", "CommitReviewRequest", "CommitReviewResponse", - "CompleteRecordView", "CoverageRefused", "CoverageUploadRequest", "CoverageUploadResponse", @@ -222,20 +188,15 @@ "CustomerCheck", "CustomerChecks", "CustomerCodeAssessment", - "CustomerDecision", - "CustomerDecisionBasis", "CustomerEvidenceRef", "CustomerFinding", "CustomerFindingValidation", "CustomerReviewDetail", "Dataset", - "DeclaredReachOutcome", - "DeclaredReachView", "DeepReviewEscalation", "DeepReviewEscalationStatus", "DomainView", "EarlierOpenFinding", - "EvidenceView", "ExportEvidenceKind", "ExportEvidenceRef", "ExportFindingLifecycle", @@ -274,14 +235,11 @@ "FindingsExportRow", "FindingSupport", "FindingValidationsExportRow", - "GateState", "GateStatus", "LocalReverification", "LocalReverificationOutcome", "MatchedLocalFinding", "NotAssessedView", - "OccurrenceCapture", - "OccurrenceQuestion", "OpenFindingCounts", "OpenItemEnvironment", "OpenItemsGapReason", @@ -292,21 +250,16 @@ "OpenItemsThreadUnknown", "OpenItemsView", "Outcome", - "Override", "PassProjection", "PatchReviewRequest", "PatchReviewResponse", "PatchTriggerSource", "PatchVerification", - "PermissionView", "PlanProjection", "Problem", "Prose", "ProseOutcomeType0", "PullRequestMergeGate", - "ReachedEntityView", - "ReachGapView", - "ReachStepView", "RefreshView", "RefusedEnvironment", "RelatedReview", @@ -317,7 +270,6 @@ "ReviewActions", "ReviewDepth", "ReviewDiffStats", - "ReviewedTreeCitationView", "ReviewFilters", "ReviewOpenItems", "ReviewPage", @@ -344,10 +296,6 @@ "RunNowRefused", "RunNowRequest", "RunNowResponse", - "SpecialistAssessmentExecution", - "SpecialistExecutionView", - "SpecialistOutputProjection", - "SpecialistPassExecution", "SpendAccountKind", "SpendExportRow", "StartSession", @@ -355,8 +303,6 @@ "SubjectAuthorization", "SubjectView", "SummaryRoute", - "TerraformPlanView", - "TerraformRootsView", "ThreadObservationFreshness", "ThreadObservationView", "ThreadProviderState", diff --git a/proofline/_generated/models/approval_gap.py b/proofline/_generated/models/approval_gap.py deleted file mode 100644 index b1d80b0d..00000000 --- a/proofline/_generated/models/approval_gap.py +++ /dev/null @@ -1,70 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar -from uuid import UUID - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ApprovalGap") - - -@_attrs_define -class ApprovalGap: - """ - Attributes: - assessment_id (UUID): Assessment whose approval could not supply deferred occurrence questions. - code (str): Reason the assessment's approval could not supply deferred occurrence questions. - """ - - assessment_id: UUID - code: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - assessment_id = str(self.assessment_id) - - code = self.code - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assessment_id": assessment_id, - "code": code, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - assessment_id = UUID(d.pop("assessment_id")) - - code = d.pop("code") - - approval_gap = cls( - assessment_id=assessment_id, - code=code, - ) - - approval_gap.additional_properties = d - return approval_gap - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/attributed_condition_view.py b/proofline/_generated/models/attributed_condition_view.py deleted file mode 100644 index e9995638..00000000 --- a/proofline/_generated/models/attributed_condition_view.py +++ /dev/null @@ -1,213 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, Literal, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.reviewed_tree_citation_view import ReviewedTreeCitationView - from ..models.untrusted_text import UntrustedText - - -T = TypeVar("T", bound="AttributedConditionView") - - -@_attrs_define -class AttributedConditionView: - """ - Attributes: - change (Literal['CHANGED'] | Literal['INTRODUCED'] | Literal['RESOLVED'] | Literal['UNATTRIBUTED'] | - Literal['UNCHANGED']): How one condition relates to the review's base revision. - reviewed_tree_citations (list[ReviewedTreeCitationView]): The member that declares the site at each revision - that declares it. - revision (Literal['BASE_CODE_REVISION'] | Literal['PROPOSED_CODE_REVISION']): - subject (UntrustedText): Text that came out of the reviewer model, or out of a repository the model - read. It is data, never markup, never a URL, never an instruction. - - The wrapper exists so the untrustedness cannot be lost on the way to a - renderer: there is no field on a turn that carries this text under a name a - client could mistake for something safe, and unwrapping it is a deliberate - act in the client's own code. - """ - - change: ( - Literal["CHANGED"] - | Literal["INTRODUCED"] - | Literal["RESOLVED"] - | Literal["UNATTRIBUTED"] - | Literal["UNCHANGED"] - ) - reviewed_tree_citations: list[ReviewedTreeCitationView] - revision: Literal["BASE_CODE_REVISION"] | Literal["PROPOSED_CODE_REVISION"] - subject: UntrustedText - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - change: ( - Literal["CHANGED"] - | Literal["INTRODUCED"] - | Literal["RESOLVED"] - | Literal["UNATTRIBUTED"] - | Literal["UNCHANGED"] - ) - change = self.change - - reviewed_tree_citations = [] - for reviewed_tree_citations_item_data in self.reviewed_tree_citations: - reviewed_tree_citations_item = reviewed_tree_citations_item_data.to_dict() - reviewed_tree_citations.append(reviewed_tree_citations_item) - - revision: Literal["BASE_CODE_REVISION"] | Literal["PROPOSED_CODE_REVISION"] - revision = self.revision - - subject = self.subject.to_dict() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "change": change, - "reviewed_tree_citations": reviewed_tree_citations, - "revision": revision, - "subject": subject, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.reviewed_tree_citation_view import ReviewedTreeCitationView # noqa: PLC0415 - from ..models.untrusted_text import UntrustedText # noqa: PLC0415 - - d = dict(src_dict) - - def _parse_change( - data: object, - ) -> ( - Literal["CHANGED"] - | Literal["INTRODUCED"] - | Literal["RESOLVED"] - | Literal["UNATTRIBUTED"] - | Literal["UNCHANGED"] - ): - try: - if not (type(data) is str and data == "INTRODUCED"): - raise TypeError() - componentsschemas_attributed_change_type_0 = cast(Literal["INTRODUCED"], data) - if componentsschemas_attributed_change_type_0 != "INTRODUCED": - raise ValueError( - f"/components/schemas/AttributedChange_type_0 must match const 'INTRODUCED', got '{componentsschemas_attributed_change_type_0}'" - ) - return componentsschemas_attributed_change_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not (type(data) is str and data == "CHANGED"): - raise TypeError() - componentsschemas_attributed_change_type_1 = cast(Literal["CHANGED"], data) - if componentsschemas_attributed_change_type_1 != "CHANGED": - raise ValueError( - f"/components/schemas/AttributedChange_type_1 must match const 'CHANGED', got '{componentsschemas_attributed_change_type_1}'" - ) - return componentsschemas_attributed_change_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not (type(data) is str and data == "UNCHANGED"): - raise TypeError() - componentsschemas_attributed_change_type_2 = cast(Literal["UNCHANGED"], data) - if componentsschemas_attributed_change_type_2 != "UNCHANGED": - raise ValueError( - f"/components/schemas/AttributedChange_type_2 must match const 'UNCHANGED', got '{componentsschemas_attributed_change_type_2}'" - ) - return componentsschemas_attributed_change_type_2 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not (type(data) is str and data == "RESOLVED"): - raise TypeError() - componentsschemas_attributed_change_type_3 = cast(Literal["RESOLVED"], data) - if componentsschemas_attributed_change_type_3 != "RESOLVED": - raise ValueError( - f"/components/schemas/AttributedChange_type_3 must match const 'RESOLVED', got '{componentsschemas_attributed_change_type_3}'" - ) - return componentsschemas_attributed_change_type_3 - except (TypeError, ValueError, AttributeError, KeyError): - pass - if not (type(data) is str and data == "UNATTRIBUTED"): - raise TypeError() - componentsschemas_attributed_change_type_4 = cast(Literal["UNATTRIBUTED"], data) - if componentsschemas_attributed_change_type_4 != "UNATTRIBUTED": - raise ValueError( - f"/components/schemas/AttributedChange_type_4 must match const 'UNATTRIBUTED', got '{componentsschemas_attributed_change_type_4}'" - ) - return componentsschemas_attributed_change_type_4 - - change = _parse_change(d.pop("change")) - - reviewed_tree_citations = [] - _reviewed_tree_citations = d.pop("reviewed_tree_citations") - for reviewed_tree_citations_item_data in _reviewed_tree_citations: - reviewed_tree_citations_item = ReviewedTreeCitationView.from_dict( - reviewed_tree_citations_item_data - ) - - reviewed_tree_citations.append(reviewed_tree_citations_item) - - def _parse_revision( - data: object, - ) -> Literal["BASE_CODE_REVISION"] | Literal["PROPOSED_CODE_REVISION"]: - try: - if not (type(data) is str and data == "PROPOSED_CODE_REVISION"): - raise TypeError() - componentsschemas_attributed_revision_type_0 = cast( - Literal["PROPOSED_CODE_REVISION"], data - ) - if componentsschemas_attributed_revision_type_0 != "PROPOSED_CODE_REVISION": - raise ValueError( - f"/components/schemas/AttributedRevision_type_0 must match const 'PROPOSED_CODE_REVISION', got '{componentsschemas_attributed_revision_type_0}'" - ) - return componentsschemas_attributed_revision_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - if not (type(data) is str and data == "BASE_CODE_REVISION"): - raise TypeError() - componentsschemas_attributed_revision_type_1 = cast(Literal["BASE_CODE_REVISION"], data) - if componentsschemas_attributed_revision_type_1 != "BASE_CODE_REVISION": - raise ValueError( - f"/components/schemas/AttributedRevision_type_1 must match const 'BASE_CODE_REVISION', got '{componentsschemas_attributed_revision_type_1}'" - ) - return componentsschemas_attributed_revision_type_1 - - revision = _parse_revision(d.pop("revision")) - - subject = UntrustedText.from_dict(d.pop("subject")) - - attributed_condition_view = cls( - change=change, - reviewed_tree_citations=reviewed_tree_citations, - revision=revision, - subject=subject, - ) - - attributed_condition_view.additional_properties = d - return attributed_condition_view - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/authority.py b/proofline/_generated/models/authority.py deleted file mode 100644 index 1f34e57c..00000000 --- a/proofline/_generated/models/authority.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import StrEnum - - -class Authority(StrEnum): - ADVISORY = "ADVISORY" - DEPLOYMENT_POLICY = "DEPLOYMENT_POLICY" - - def __str__(self) -> str: - return str(self.value) diff --git a/proofline/_generated/models/availability_type_0.py b/proofline/_generated/models/availability_type_0.py deleted file mode 100644 index 3141fbce..00000000 --- a/proofline/_generated/models/availability_type_0.py +++ /dev/null @@ -1,11 +0,0 @@ -from enum import StrEnum - - -class AvailabilityType0(StrEnum): - LEGACY = "LEGACY" - NOT_RECORDED = "NOT_RECORDED" - OPERATIONAL_FAILURE = "OPERATIONAL_FAILURE" - RECORDED = "RECORDED" - - def __str__(self) -> str: - return str(self.value) diff --git a/proofline/_generated/models/change_attribution_view.py b/proofline/_generated/models/change_attribution_view.py deleted file mode 100644 index 5a82ac20..00000000 --- a/proofline/_generated/models/change_attribution_view.py +++ /dev/null @@ -1,322 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, Literal, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.attributed_condition_view import AttributedConditionView - from ..models.change_count_view import ChangeCountView - from ..models.complete_record_view import CompleteRecordView - - -T = TypeVar("T", bound="ChangeAttributionView") - - -@_attrs_define -class ChangeAttributionView: - """Which conditions behind a check's result the change brought, and which - World found at the review's base revision. It sits beside the result and - never changes it: a condition already at the base is still a condition. - - Attributes: - condition_count (int): How many conditions World attributed, listed or not. Zero unless - `status` is `COMPARED`. - conditions (list[AttributedConditionView]): Every condition, each once, in World's order, never netted against - another. Empty unless `status` is `COMPARED`, and empty when some are - omitted: it never lists only some of them. - counts (list[ChangeCountView]): How many conditions there are of each change at each revision, over - every condition, listed or not. Changes with none are left out. - omitted_condition_count (int): How many of those conditions this response does not list. Zero when - the result kept World's attribution whole. Otherwise the result kept a - summary: `listed_conditions` lists the first ones, `counts` is still - exact, and World's recorded evaluation holds every condition. - status (Literal['COMPARED'] | Literal['UNAVAILABLE'] | Literal['UNREADABLE']): - complete_record (CompleteRecordView | None | Unset): Where every condition is recorded when some are omitted. - Absent when - `conditions` lists them all. - detail_code (None | str | Unset): World's code for why it could not read that revision, such as - `BASE_REVIEWED_TREE_NOT_DECLARED`. Present exactly when `status` is - `UNAVAILABLE`. - listed_conditions (list[AttributedConditionView] | None | Unset): The conditions a summary lists when some are - omitted: the first ones - in the order `counts` gives, each whole, at most 50 and always fewer - than `condition_count`. Present exactly when `omitted_condition_count` - is not zero. - revision (Literal['BASE_CODE_REVISION'] | Literal['PROPOSED_CODE_REVISION'] | None | Unset): The revision World - could not read. Present exactly when `status` is - `UNAVAILABLE`. - """ - - condition_count: int - conditions: list[AttributedConditionView] - counts: list[ChangeCountView] - omitted_condition_count: int - status: Literal["COMPARED"] | Literal["UNAVAILABLE"] | Literal["UNREADABLE"] - complete_record: CompleteRecordView | None | Unset = UNSET - detail_code: None | str | Unset = UNSET - listed_conditions: list[AttributedConditionView] | None | Unset = UNSET - revision: Literal["BASE_CODE_REVISION"] | Literal["PROPOSED_CODE_REVISION"] | None | Unset = ( - UNSET - ) - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.complete_record_view import CompleteRecordView # noqa: PLC0415 - - condition_count = self.condition_count - - conditions = [] - for conditions_item_data in self.conditions: - conditions_item = conditions_item_data.to_dict() - conditions.append(conditions_item) - - counts = [] - for counts_item_data in self.counts: - counts_item = counts_item_data.to_dict() - counts.append(counts_item) - - omitted_condition_count = self.omitted_condition_count - - status: Literal["COMPARED"] | Literal["UNAVAILABLE"] | Literal["UNREADABLE"] - status = self.status - - complete_record: dict[str, Any] | None | Unset - if isinstance(self.complete_record, Unset): - complete_record = UNSET - elif isinstance(self.complete_record, CompleteRecordView): - complete_record = self.complete_record.to_dict() - else: - complete_record = self.complete_record - - detail_code: None | str | Unset - if isinstance(self.detail_code, Unset): - detail_code = UNSET - else: - detail_code = self.detail_code - - listed_conditions: list[dict[str, Any]] | None | Unset - if isinstance(self.listed_conditions, Unset): - listed_conditions = UNSET - elif isinstance(self.listed_conditions, list): - listed_conditions = [] - for listed_conditions_type_0_item_data in self.listed_conditions: - listed_conditions_type_0_item = listed_conditions_type_0_item_data.to_dict() - listed_conditions.append(listed_conditions_type_0_item) - - else: - listed_conditions = self.listed_conditions - - revision: Literal["BASE_CODE_REVISION"] | Literal["PROPOSED_CODE_REVISION"] | None | Unset - if isinstance(self.revision, Unset): - revision = UNSET - else: - revision = self.revision - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "condition_count": condition_count, - "conditions": conditions, - "counts": counts, - "omitted_condition_count": omitted_condition_count, - "status": status, - } - ) - if complete_record is not UNSET: - field_dict["complete_record"] = complete_record - if detail_code is not UNSET: - field_dict["detail_code"] = detail_code - if listed_conditions is not UNSET: - field_dict["listed_conditions"] = listed_conditions - if revision is not UNSET: - field_dict["revision"] = revision - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.attributed_condition_view import AttributedConditionView # noqa: PLC0415 - from ..models.change_count_view import ChangeCountView # noqa: PLC0415 - from ..models.complete_record_view import CompleteRecordView # noqa: PLC0415 - - d = dict(src_dict) - condition_count = d.pop("condition_count") - - conditions = [] - _conditions = d.pop("conditions") - for conditions_item_data in _conditions: - conditions_item = AttributedConditionView.from_dict(conditions_item_data) - - conditions.append(conditions_item) - - counts = [] - _counts = d.pop("counts") - for counts_item_data in _counts: - counts_item = ChangeCountView.from_dict(counts_item_data) - - counts.append(counts_item) - - omitted_condition_count = d.pop("omitted_condition_count") - - def _parse_status( - data: object, - ) -> Literal["COMPARED"] | Literal["UNAVAILABLE"] | Literal["UNREADABLE"]: - try: - if not (type(data) is str and data == "COMPARED"): - raise TypeError() - componentsschemas_attribution_status_type_0 = cast(Literal["COMPARED"], data) - if componentsschemas_attribution_status_type_0 != "COMPARED": - raise ValueError( - f"/components/schemas/AttributionStatus_type_0 must match const 'COMPARED', got '{componentsschemas_attribution_status_type_0}'" - ) - return componentsschemas_attribution_status_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not (type(data) is str and data == "UNAVAILABLE"): - raise TypeError() - componentsschemas_attribution_status_type_1 = cast(Literal["UNAVAILABLE"], data) - if componentsschemas_attribution_status_type_1 != "UNAVAILABLE": - raise ValueError( - f"/components/schemas/AttributionStatus_type_1 must match const 'UNAVAILABLE', got '{componentsschemas_attribution_status_type_1}'" - ) - return componentsschemas_attribution_status_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - if not (type(data) is str and data == "UNREADABLE"): - raise TypeError() - componentsschemas_attribution_status_type_2 = cast(Literal["UNREADABLE"], data) - if componentsschemas_attribution_status_type_2 != "UNREADABLE": - raise ValueError( - f"/components/schemas/AttributionStatus_type_2 must match const 'UNREADABLE', got '{componentsschemas_attribution_status_type_2}'" - ) - return componentsschemas_attribution_status_type_2 - - status = _parse_status(d.pop("status")) - - def _parse_complete_record(data: object) -> CompleteRecordView | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - complete_record_type_0 = CompleteRecordView.from_dict(data) - - return complete_record_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(CompleteRecordView | None | Unset, data) - - complete_record = _parse_complete_record(d.pop("complete_record", UNSET)) - - def _parse_detail_code(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - detail_code = _parse_detail_code(d.pop("detail_code", UNSET)) - - def _parse_listed_conditions(data: object) -> list[AttributedConditionView] | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, list): - raise TypeError() - listed_conditions_type_0 = [] - _listed_conditions_type_0 = data - for listed_conditions_type_0_item_data in _listed_conditions_type_0: - listed_conditions_type_0_item = AttributedConditionView.from_dict( - listed_conditions_type_0_item_data - ) - - listed_conditions_type_0.append(listed_conditions_type_0_item) - - return listed_conditions_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(list[AttributedConditionView] | None | Unset, data) - - listed_conditions = _parse_listed_conditions(d.pop("listed_conditions", UNSET)) - - def _parse_revision( - data: object, - ) -> Literal["BASE_CODE_REVISION"] | Literal["PROPOSED_CODE_REVISION"] | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not (type(data) is str and data == "PROPOSED_CODE_REVISION"): - raise TypeError() - componentsschemas_attributed_revision_type_0 = cast( - Literal["PROPOSED_CODE_REVISION"], data - ) - if componentsschemas_attributed_revision_type_0 != "PROPOSED_CODE_REVISION": - raise ValueError( - f"/components/schemas/AttributedRevision_type_0 must match const 'PROPOSED_CODE_REVISION', got '{componentsschemas_attributed_revision_type_0}'" - ) - return componentsschemas_attributed_revision_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not (type(data) is str and data == "BASE_CODE_REVISION"): - raise TypeError() - componentsschemas_attributed_revision_type_1 = cast( - Literal["BASE_CODE_REVISION"], data - ) - if componentsschemas_attributed_revision_type_1 != "BASE_CODE_REVISION": - raise ValueError( - f"/components/schemas/AttributedRevision_type_1 must match const 'BASE_CODE_REVISION', got '{componentsschemas_attributed_revision_type_1}'" - ) - return componentsschemas_attributed_revision_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast( - Literal["BASE_CODE_REVISION"] | Literal["PROPOSED_CODE_REVISION"] | None | Unset, - data, - ) - - revision = _parse_revision(d.pop("revision", UNSET)) - - change_attribution_view = cls( - condition_count=condition_count, - conditions=conditions, - counts=counts, - omitted_condition_count=omitted_condition_count, - status=status, - complete_record=complete_record, - detail_code=detail_code, - listed_conditions=listed_conditions, - revision=revision, - ) - - change_attribution_view.additional_properties = d - return change_attribution_view - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/change_count_view.py b/proofline/_generated/models/change_count_view.py deleted file mode 100644 index 7fd4a626..00000000 --- a/proofline/_generated/models/change_count_view.py +++ /dev/null @@ -1,182 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, Literal, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ChangeCountView") - - -@_attrs_define -class ChangeCountView: - """How many conditions are of one change at one revision. - - Attributes: - change (Literal['CHANGED'] | Literal['INTRODUCED'] | Literal['RESOLVED'] | Literal['UNATTRIBUTED'] | - Literal['UNCHANGED']): How one condition relates to the review's base revision. - count (int): How many conditions have this `change` at this `revision`, over every - condition, listed or not. - revision (Literal['BASE_CODE_REVISION'] | Literal['PROPOSED_CODE_REVISION']): - """ - - change: ( - Literal["CHANGED"] - | Literal["INTRODUCED"] - | Literal["RESOLVED"] - | Literal["UNATTRIBUTED"] - | Literal["UNCHANGED"] - ) - count: int - revision: Literal["BASE_CODE_REVISION"] | Literal["PROPOSED_CODE_REVISION"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - change: ( - Literal["CHANGED"] - | Literal["INTRODUCED"] - | Literal["RESOLVED"] - | Literal["UNATTRIBUTED"] - | Literal["UNCHANGED"] - ) - change = self.change - - count = self.count - - revision: Literal["BASE_CODE_REVISION"] | Literal["PROPOSED_CODE_REVISION"] - revision = self.revision - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "change": change, - "count": count, - "revision": revision, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - - def _parse_change( - data: object, - ) -> ( - Literal["CHANGED"] - | Literal["INTRODUCED"] - | Literal["RESOLVED"] - | Literal["UNATTRIBUTED"] - | Literal["UNCHANGED"] - ): - try: - if not (type(data) is str and data == "INTRODUCED"): - raise TypeError() - componentsschemas_attributed_change_type_0 = cast(Literal["INTRODUCED"], data) - if componentsschemas_attributed_change_type_0 != "INTRODUCED": - raise ValueError( - f"/components/schemas/AttributedChange_type_0 must match const 'INTRODUCED', got '{componentsschemas_attributed_change_type_0}'" - ) - return componentsschemas_attributed_change_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not (type(data) is str and data == "CHANGED"): - raise TypeError() - componentsschemas_attributed_change_type_1 = cast(Literal["CHANGED"], data) - if componentsschemas_attributed_change_type_1 != "CHANGED": - raise ValueError( - f"/components/schemas/AttributedChange_type_1 must match const 'CHANGED', got '{componentsschemas_attributed_change_type_1}'" - ) - return componentsschemas_attributed_change_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not (type(data) is str and data == "UNCHANGED"): - raise TypeError() - componentsschemas_attributed_change_type_2 = cast(Literal["UNCHANGED"], data) - if componentsschemas_attributed_change_type_2 != "UNCHANGED": - raise ValueError( - f"/components/schemas/AttributedChange_type_2 must match const 'UNCHANGED', got '{componentsschemas_attributed_change_type_2}'" - ) - return componentsschemas_attributed_change_type_2 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not (type(data) is str and data == "RESOLVED"): - raise TypeError() - componentsschemas_attributed_change_type_3 = cast(Literal["RESOLVED"], data) - if componentsschemas_attributed_change_type_3 != "RESOLVED": - raise ValueError( - f"/components/schemas/AttributedChange_type_3 must match const 'RESOLVED', got '{componentsschemas_attributed_change_type_3}'" - ) - return componentsschemas_attributed_change_type_3 - except (TypeError, ValueError, AttributeError, KeyError): - pass - if not (type(data) is str and data == "UNATTRIBUTED"): - raise TypeError() - componentsschemas_attributed_change_type_4 = cast(Literal["UNATTRIBUTED"], data) - if componentsschemas_attributed_change_type_4 != "UNATTRIBUTED": - raise ValueError( - f"/components/schemas/AttributedChange_type_4 must match const 'UNATTRIBUTED', got '{componentsschemas_attributed_change_type_4}'" - ) - return componentsschemas_attributed_change_type_4 - - change = _parse_change(d.pop("change")) - - count = d.pop("count") - - def _parse_revision( - data: object, - ) -> Literal["BASE_CODE_REVISION"] | Literal["PROPOSED_CODE_REVISION"]: - try: - if not (type(data) is str and data == "PROPOSED_CODE_REVISION"): - raise TypeError() - componentsschemas_attributed_revision_type_0 = cast( - Literal["PROPOSED_CODE_REVISION"], data - ) - if componentsschemas_attributed_revision_type_0 != "PROPOSED_CODE_REVISION": - raise ValueError( - f"/components/schemas/AttributedRevision_type_0 must match const 'PROPOSED_CODE_REVISION', got '{componentsschemas_attributed_revision_type_0}'" - ) - return componentsschemas_attributed_revision_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - if not (type(data) is str and data == "BASE_CODE_REVISION"): - raise TypeError() - componentsschemas_attributed_revision_type_1 = cast(Literal["BASE_CODE_REVISION"], data) - if componentsschemas_attributed_revision_type_1 != "BASE_CODE_REVISION": - raise ValueError( - f"/components/schemas/AttributedRevision_type_1 must match const 'BASE_CODE_REVISION', got '{componentsschemas_attributed_revision_type_1}'" - ) - return componentsschemas_attributed_revision_type_1 - - revision = _parse_revision(d.pop("revision")) - - change_count_view = cls( - change=change, - count=count, - revision=revision, - ) - - change_count_view.additional_properties = d - return change_count_view - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/complete_record_view.py b/proofline/_generated/models/complete_record_view.py deleted file mode 100644 index 4c6a23ab..00000000 --- a/proofline/_generated/models/complete_record_view.py +++ /dev/null @@ -1,71 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="CompleteRecordView") - - -@_attrs_define -class CompleteRecordView: - """World's immutable record of the complete answer an omitted list comes - from. - - Attributes: - attribution_digest (str): The `sha256:` digest of the complete attribution in that record. - world_evaluation_id (str): The evaluation World recorded, which holds every condition. - """ - - attribution_digest: str - world_evaluation_id: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - attribution_digest = self.attribution_digest - - world_evaluation_id = self.world_evaluation_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "attribution_digest": attribution_digest, - "world_evaluation_id": world_evaluation_id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - attribution_digest = d.pop("attribution_digest") - - world_evaluation_id = d.pop("world_evaluation_id") - - complete_record_view = cls( - attribution_digest=attribution_digest, - world_evaluation_id=world_evaluation_id, - ) - - complete_record_view.additional_properties = d - return complete_record_view - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/customer_assessment.py b/proofline/_generated/models/customer_assessment.py index d4def2cd..24de41ad 100644 --- a/proofline/_generated/models/customer_assessment.py +++ b/proofline/_generated/models/customer_assessment.py @@ -12,9 +12,7 @@ if TYPE_CHECKING: from ..models.customer_checks import CustomerChecks - from ..models.customer_decision import CustomerDecision from ..models.customer_finding import CustomerFinding - from ..models.declared_reach_view import DeclaredReachView from ..models.domain_view import DomainView @@ -34,14 +32,6 @@ class CustomerAssessment: status (str): The assessment's recorded status, such as `RUNNING`, `COMPLETED` or `INCOMPLETE`. completed_at (datetime.datetime | None | Unset): When the assessment completed. Null while it has not. - decision_presentation (CustomerDecision | None | Unset): The retained decision disclosure, which grants no - deployment - authorization. Absent when none is recorded and the review kind - records no decision basis. - declared_reach (DeclaredReachView | None | Unset): What World declares depends on what this change deploys in - this - environment, at the assessment's pinned snapshot. Absent when the - assessment's kind records no declared reach. incompleteness_kind (None | str | Unset): Why an `INCOMPLETE` assessment is incomplete: `NOT_CONFIGURED`, `POLICY_EXCLUDED`, `EVIDENCE_UNAVAILABLE`, `HYPOTHESES_UNRESOLVED` or `MODEL_BUDGET_EXHAUSTED`. Absent otherwise; an unclassified gap is not a @@ -61,8 +51,6 @@ class CustomerAssessment: id: UUID status: str completed_at: datetime.datetime | None | Unset = UNSET - decision_presentation: CustomerDecision | None | Unset = UNSET - declared_reach: DeclaredReachView | None | Unset = UNSET incompleteness_kind: None | str | Unset = UNSET reason_codes: list[str] | None | Unset = UNSET release_evidence_gap: None | str | Unset = UNSET @@ -70,9 +58,6 @@ class CustomerAssessment: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.customer_decision import CustomerDecision # noqa: PLC0415 - from ..models.declared_reach_view import DeclaredReachView # noqa: PLC0415 - checks = self.checks.to_dict() domains = [] @@ -99,22 +84,6 @@ def to_dict(self) -> dict[str, Any]: else: completed_at = self.completed_at - decision_presentation: dict[str, Any] | None | Unset - if isinstance(self.decision_presentation, Unset): - decision_presentation = UNSET - elif isinstance(self.decision_presentation, CustomerDecision): - decision_presentation = self.decision_presentation.to_dict() - else: - decision_presentation = self.decision_presentation - - declared_reach: dict[str, Any] | None | Unset - if isinstance(self.declared_reach, Unset): - declared_reach = UNSET - elif isinstance(self.declared_reach, DeclaredReachView): - declared_reach = self.declared_reach.to_dict() - else: - declared_reach = self.declared_reach - incompleteness_kind: None | str | Unset if isinstance(self.incompleteness_kind, Unset): incompleteness_kind = UNSET @@ -158,10 +127,6 @@ def to_dict(self) -> dict[str, Any]: ) if completed_at is not UNSET: field_dict["completed_at"] = completed_at - if decision_presentation is not UNSET: - field_dict["decision_presentation"] = decision_presentation - if declared_reach is not UNSET: - field_dict["declared_reach"] = declared_reach if incompleteness_kind is not UNSET: field_dict["incompleteness_kind"] = incompleteness_kind if reason_codes is not UNSET: @@ -176,9 +141,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.customer_checks import CustomerChecks # noqa: PLC0415 - from ..models.customer_decision import CustomerDecision # noqa: PLC0415 from ..models.customer_finding import CustomerFinding # noqa: PLC0415 - from ..models.declared_reach_view import DeclaredReachView # noqa: PLC0415 from ..models.domain_view import DomainView # noqa: PLC0415 d = dict(src_dict) @@ -221,40 +184,6 @@ def _parse_completed_at(data: object) -> datetime.datetime | None | Unset: completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) - def _parse_decision_presentation(data: object) -> CustomerDecision | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - decision_presentation_type_0 = CustomerDecision.from_dict(data) - - return decision_presentation_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(CustomerDecision | None | Unset, data) - - decision_presentation = _parse_decision_presentation(d.pop("decision_presentation", UNSET)) - - def _parse_declared_reach(data: object) -> DeclaredReachView | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - declared_reach_type_0 = DeclaredReachView.from_dict(data) - - return declared_reach_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(DeclaredReachView | None | Unset, data) - - declared_reach = _parse_declared_reach(d.pop("declared_reach", UNSET)) - def _parse_incompleteness_kind(data: object) -> None | str | Unset: if data is None: return data @@ -315,8 +244,6 @@ def _parse_started_at(data: object) -> datetime.datetime | None | Unset: id=id, status=status, completed_at=completed_at, - decision_presentation=decision_presentation, - declared_reach=declared_reach, incompleteness_kind=incompleteness_kind, reason_codes=reason_codes, release_evidence_gap=release_evidence_gap, diff --git a/proofline/_generated/models/customer_assessment_detail.py b/proofline/_generated/models/customer_assessment_detail.py index c8c32bdf..4c2198a0 100644 --- a/proofline/_generated/models/customer_assessment_detail.py +++ b/proofline/_generated/models/customer_assessment_detail.py @@ -12,9 +12,7 @@ if TYPE_CHECKING: from ..models.customer_checks import CustomerChecks - from ..models.customer_decision import CustomerDecision from ..models.customer_finding import CustomerFinding - from ..models.declared_reach_view import DeclaredReachView from ..models.domain_view import DomainView from ..models.subject_view import SubjectView @@ -38,14 +36,6 @@ class CustomerAssessmentDetail: subjects (list[SubjectView]): The review subjects this assessment's own release set authorized, plus each `PRIMARY` subject that carries no release authorization. completed_at (datetime.datetime | None | Unset): When the assessment completed. Null while it has not. - decision_presentation (CustomerDecision | None | Unset): The retained decision disclosure, which grants no - deployment - authorization. Absent when none is recorded and the review kind - records no decision basis. - declared_reach (DeclaredReachView | None | Unset): What World declares depends on what this change deploys in - this - environment, at the assessment's pinned snapshot. Absent when the - assessment's kind records no declared reach. incompleteness_kind (None | str | Unset): Why an `INCOMPLETE` assessment is incomplete: `NOT_CONFIGURED`, `POLICY_EXCLUDED`, `EVIDENCE_UNAVAILABLE`, `HYPOTHESES_UNRESOLVED` or `MODEL_BUDGET_EXHAUSTED`. Absent otherwise; an unclassified gap is not a @@ -67,8 +57,6 @@ class CustomerAssessmentDetail: status: str subjects: list[SubjectView] completed_at: datetime.datetime | None | Unset = UNSET - decision_presentation: CustomerDecision | None | Unset = UNSET - declared_reach: DeclaredReachView | None | Unset = UNSET incompleteness_kind: None | str | Unset = UNSET reason_codes: list[str] | None | Unset = UNSET release_evidence_gap: None | str | Unset = UNSET @@ -76,9 +64,6 @@ class CustomerAssessmentDetail: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.customer_decision import CustomerDecision # noqa: PLC0415 - from ..models.declared_reach_view import DeclaredReachView # noqa: PLC0415 - checks = self.checks.to_dict() domains = [] @@ -112,22 +97,6 @@ def to_dict(self) -> dict[str, Any]: else: completed_at = self.completed_at - decision_presentation: dict[str, Any] | None | Unset - if isinstance(self.decision_presentation, Unset): - decision_presentation = UNSET - elif isinstance(self.decision_presentation, CustomerDecision): - decision_presentation = self.decision_presentation.to_dict() - else: - decision_presentation = self.decision_presentation - - declared_reach: dict[str, Any] | None | Unset - if isinstance(self.declared_reach, Unset): - declared_reach = UNSET - elif isinstance(self.declared_reach, DeclaredReachView): - declared_reach = self.declared_reach.to_dict() - else: - declared_reach = self.declared_reach - incompleteness_kind: None | str | Unset if isinstance(self.incompleteness_kind, Unset): incompleteness_kind = UNSET @@ -173,10 +142,6 @@ def to_dict(self) -> dict[str, Any]: ) if completed_at is not UNSET: field_dict["completed_at"] = completed_at - if decision_presentation is not UNSET: - field_dict["decision_presentation"] = decision_presentation - if declared_reach is not UNSET: - field_dict["declared_reach"] = declared_reach if incompleteness_kind is not UNSET: field_dict["incompleteness_kind"] = incompleteness_kind if reason_codes is not UNSET: @@ -191,9 +156,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.customer_checks import CustomerChecks # noqa: PLC0415 - from ..models.customer_decision import CustomerDecision # noqa: PLC0415 from ..models.customer_finding import CustomerFinding # noqa: PLC0415 - from ..models.declared_reach_view import DeclaredReachView # noqa: PLC0415 from ..models.domain_view import DomainView # noqa: PLC0415 from ..models.subject_view import SubjectView # noqa: PLC0415 @@ -246,40 +209,6 @@ def _parse_completed_at(data: object) -> datetime.datetime | None | Unset: completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) - def _parse_decision_presentation(data: object) -> CustomerDecision | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - decision_presentation_type_0 = CustomerDecision.from_dict(data) - - return decision_presentation_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(CustomerDecision | None | Unset, data) - - decision_presentation = _parse_decision_presentation(d.pop("decision_presentation", UNSET)) - - def _parse_declared_reach(data: object) -> DeclaredReachView | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - declared_reach_type_0 = DeclaredReachView.from_dict(data) - - return declared_reach_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(DeclaredReachView | None | Unset, data) - - declared_reach = _parse_declared_reach(d.pop("declared_reach", UNSET)) - def _parse_incompleteness_kind(data: object) -> None | str | Unset: if data is None: return data @@ -342,8 +271,6 @@ def _parse_started_at(data: object) -> datetime.datetime | None | Unset: status=status, subjects=subjects, completed_at=completed_at, - decision_presentation=decision_presentation, - declared_reach=declared_reach, incompleteness_kind=incompleteness_kind, reason_codes=reason_codes, release_evidence_gap=release_evidence_gap, diff --git a/proofline/_generated/models/customer_check.py b/proofline/_generated/models/customer_check.py index 31e3300a..c6293414 100644 --- a/proofline/_generated/models/customer_check.py +++ b/proofline/_generated/models/customer_check.py @@ -9,7 +9,6 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.change_attribution_view import ChangeAttributionView from ..models.check_file import CheckFile @@ -32,11 +31,6 @@ class CustomerCheck: outcome (str): The outcome the receipt recorded, which is the outcome a deployment gate weighed: `READY`, `BLOCKED`, `UNRESOLVED`, `UNAVAILABLE`, `NOT_APPLICABLE` or `NOT_ASKED`. A verdict never rewrites it. - change_attribution (ChangeAttributionView | None | Unset): Which conditions behind the outcome the change - brought and which were - already at the review's base revision. It never changes the outcome: - a condition already at the base is pre-existing, not safe. Absent for - a check whose evaluator does not compare the two revisions. detail (None | str | Unset): Why World refused the check, or otherwise World's recorded explanation of the result. Null when neither is recorded. evaluated_at (None | str | Unset): When World evaluated this answer. A reused answer is evidence from @@ -57,7 +51,6 @@ class CustomerCheck: ) name: str outcome: str - change_attribution: ChangeAttributionView | None | Unset = UNSET detail: None | str | Unset = UNSET evaluated_at: None | str | Unset = UNSET unresolved_reason: ( @@ -70,8 +63,6 @@ class CustomerCheck: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.change_attribution_view import ChangeAttributionView # noqa: PLC0415 - files = [] for files_item_data in self.files: files_item = files_item_data.to_dict() @@ -90,14 +81,6 @@ def to_dict(self) -> dict[str, Any]: outcome = self.outcome - change_attribution: dict[str, Any] | None | Unset - if isinstance(self.change_attribution, Unset): - change_attribution = UNSET - elif isinstance(self.change_attribution, ChangeAttributionView): - change_attribution = self.change_attribution.to_dict() - else: - change_attribution = self.change_attribution - detail: None | str | Unset if isinstance(self.detail, Unset): detail = UNSET @@ -132,8 +115,6 @@ def to_dict(self) -> dict[str, Any]: "outcome": outcome, } ) - if change_attribution is not UNSET: - field_dict["change_attribution"] = change_attribution if detail is not UNSET: field_dict["detail"] = detail if evaluated_at is not UNSET: @@ -145,7 +126,6 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.change_attribution_view import ChangeAttributionView # noqa: PLC0415 from ..models.check_file import CheckFile # noqa: PLC0415 d = dict(src_dict) @@ -224,23 +204,6 @@ def _parse_lifecycle( outcome = d.pop("outcome") - def _parse_change_attribution(data: object) -> ChangeAttributionView | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - change_attribution_type_0 = ChangeAttributionView.from_dict(data) - - return change_attribution_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(ChangeAttributionView | None | Unset, data) - - change_attribution = _parse_change_attribution(d.pop("change_attribution", UNSET)) - def _parse_detail(data: object) -> None | str | Unset: if data is None: return data @@ -323,7 +286,6 @@ def _parse_unresolved_reason( lifecycle=lifecycle, name=name, outcome=outcome, - change_attribution=change_attribution, detail=detail, evaluated_at=evaluated_at, unresolved_reason=unresolved_reason, diff --git a/proofline/_generated/models/customer_decision.py b/proofline/_generated/models/customer_decision.py deleted file mode 100644 index 516be9b2..00000000 --- a/proofline/_generated/models/customer_decision.py +++ /dev/null @@ -1,168 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, Literal, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.authority import Authority -from ..models.availability_type_0 import AvailabilityType0 -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.customer_decision_basis import CustomerDecisionBasis - from ..models.gate_state import GateState - - -T = TypeVar("T", bound="CustomerDecision") - - -@_attrs_define -class CustomerDecision: - """ - Attributes: - authority (Authority): - availability (AvailabilityType0 | Literal['LIMITED']): - basis (CustomerDecisionBasis | None | Unset): The permission, evidence classification and reason code of the - verified recorded basis. Null when no verified basis is recorded. - gate_state (GateState | None | Unset): The local deployment gate state and any recorded override. Null unless - the decision belongs to a deployment gate. - """ - - authority: Authority - availability: AvailabilityType0 | Literal["LIMITED"] - basis: CustomerDecisionBasis | None | Unset = UNSET - gate_state: GateState | None | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.customer_decision_basis import CustomerDecisionBasis # noqa: PLC0415 - from ..models.gate_state import GateState # noqa: PLC0415 - - authority = self.authority.value - - availability: Literal["LIMITED"] | str - if isinstance(self.availability, AvailabilityType0): - availability = self.availability.value - else: - availability = self.availability - - basis: dict[str, Any] | None | Unset - if isinstance(self.basis, Unset): - basis = UNSET - elif isinstance(self.basis, CustomerDecisionBasis): - basis = self.basis.to_dict() - else: - basis = self.basis - - gate_state: dict[str, Any] | None | Unset - if isinstance(self.gate_state, Unset): - gate_state = UNSET - elif isinstance(self.gate_state, GateState): - gate_state = self.gate_state.to_dict() - else: - gate_state = self.gate_state - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "authority": authority, - "availability": availability, - } - ) - if basis is not UNSET: - field_dict["basis"] = basis - if gate_state is not UNSET: - field_dict["gate_state"] = gate_state - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.customer_decision_basis import CustomerDecisionBasis # noqa: PLC0415 - from ..models.gate_state import GateState # noqa: PLC0415 - - d = dict(src_dict) - authority = Authority(d.pop("authority")) - - def _parse_availability(data: object) -> AvailabilityType0 | Literal["LIMITED"]: - try: - if not isinstance(data, str): - raise TypeError() - componentsschemas_availability_type_0 = AvailabilityType0(data) - - return componentsschemas_availability_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - if not (type(data) is str and data == "LIMITED"): - raise TypeError() - componentsschemas_availability_type_1 = cast(Literal["LIMITED"], data) - if componentsschemas_availability_type_1 != "LIMITED": - raise ValueError( - f"/components/schemas/Availability_type_1 must match const 'LIMITED', got '{componentsschemas_availability_type_1}'" - ) - return componentsschemas_availability_type_1 - - availability = _parse_availability(d.pop("availability")) - - def _parse_basis(data: object) -> CustomerDecisionBasis | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - basis_type_0 = CustomerDecisionBasis.from_dict(data) - - return basis_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(CustomerDecisionBasis | None | Unset, data) - - basis = _parse_basis(d.pop("basis", UNSET)) - - def _parse_gate_state(data: object) -> GateState | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - gate_state_type_0 = GateState.from_dict(data) - - return gate_state_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(GateState | None | Unset, data) - - gate_state = _parse_gate_state(d.pop("gate_state", UNSET)) - - customer_decision = cls( - authority=authority, - availability=availability, - basis=basis, - gate_state=gate_state, - ) - - customer_decision.additional_properties = d - return customer_decision - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/customer_decision_basis.py b/proofline/_generated/models/customer_decision_basis.py deleted file mode 100644 index 828770ef..00000000 --- a/proofline/_generated/models/customer_decision_basis.py +++ /dev/null @@ -1,80 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.evidence_view import EvidenceView -from ..models.permission_view import PermissionView - -T = TypeVar("T", bound="CustomerDecisionBasis") - - -@_attrs_define -class CustomerDecisionBasis: - """ - Attributes: - evidence (EvidenceView): - permission (PermissionView): - reason_code (str): The reason code the recorded basis gives for its permission. - """ - - evidence: EvidenceView - permission: PermissionView - reason_code: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - evidence = self.evidence.value - - permission = self.permission.value - - reason_code = self.reason_code - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "evidence": evidence, - "permission": permission, - "reason_code": reason_code, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - evidence = EvidenceView(d.pop("evidence")) - - permission = PermissionView(d.pop("permission")) - - reason_code = d.pop("reason_code") - - customer_decision_basis = cls( - evidence=evidence, - permission=permission, - reason_code=reason_code, - ) - - customer_decision_basis.additional_properties = d - return customer_decision_basis - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/customer_finding_validation.py b/proofline/_generated/models/customer_finding_validation.py index 8cfc35ca..226cc225 100644 --- a/proofline/_generated/models/customer_finding_validation.py +++ b/proofline/_generated/models/customer_finding_validation.py @@ -25,6 +25,8 @@ class CustomerFindingValidation: actor_github_user_id (int | None | Unset): The actor's stable GitHub user ID. Null for the automatic decision. actor_login (None | str | Unset): The actor's GitHub login, a display label to render as text. Null for the automatic decision. + actor_name (None | str | Unset): The actor's GitHub profile name, when known. Lead with it; the login + is the fallback. Null for the automatic decision. covering_author_kind (None | str | Unset): For `ALREADY_COVERED`, `HUMAN` or `BOT`. Null for every other decision. covering_author_login (None | str | Unset): For `ALREADY_COVERED`, the login of whoever wrote the covering @@ -42,6 +44,7 @@ class CustomerFindingValidation: validation: str actor_github_user_id: int | None | Unset = UNSET actor_login: None | str | Unset = UNSET + actor_name: None | str | Unset = UNSET covering_author_kind: None | str | Unset = UNSET covering_author_login: None | str | Unset = UNSET covering_comment_created_at: datetime.datetime | None | Unset = UNSET @@ -67,6 +70,12 @@ def to_dict(self) -> dict[str, Any]: else: actor_login = self.actor_login + actor_name: None | str | Unset + if isinstance(self.actor_name, Unset): + actor_name = UNSET + else: + actor_name = self.actor_name + covering_author_kind: None | str | Unset if isinstance(self.covering_author_kind, Unset): covering_author_kind = UNSET @@ -106,6 +115,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["actor_github_user_id"] = actor_github_user_id if actor_login is not UNSET: field_dict["actor_login"] = actor_login + if actor_name is not UNSET: + field_dict["actor_name"] = actor_name if covering_author_kind is not UNSET: field_dict["covering_author_kind"] = covering_author_kind if covering_author_login is not UNSET: @@ -144,6 +155,15 @@ def _parse_actor_login(data: object) -> None | str | Unset: actor_login = _parse_actor_login(d.pop("actor_login", UNSET)) + def _parse_actor_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + actor_name = _parse_actor_name(d.pop("actor_name", UNSET)) + def _parse_covering_author_kind(data: object) -> None | str | Unset: if data is None: return data @@ -196,6 +216,7 @@ def _parse_github_comment_url(data: object) -> None | str | Unset: validation=validation, actor_github_user_id=actor_github_user_id, actor_login=actor_login, + actor_name=actor_name, covering_author_kind=covering_author_kind, covering_author_login=covering_author_login, covering_comment_created_at=covering_comment_created_at, diff --git a/proofline/_generated/models/customer_review_detail.py b/proofline/_generated/models/customer_review_detail.py index 12034d25..9b44ab10 100644 --- a/proofline/_generated/models/customer_review_detail.py +++ b/proofline/_generated/models/customer_review_detail.py @@ -137,6 +137,9 @@ class CustomerReviewDetail: never display text. Absent when GitHub named no author. pull_request_author_login (None | str | Unset): Provider display metadata for the pull request author, not the rerun requester. + pull_request_author_name (None | str | Unset): The author's GitHub profile name, when known. Lead with it; the + login + is the fallback. Display metadata, never identity. pull_request_author_url (None | str | Unset): The author's profile on the deployment's GitHub host. Absent when no author login is known. pull_request_number (int | None | Unset): The pull request number. Absent for a deployment or patch review. @@ -225,6 +228,7 @@ class CustomerReviewDetail: pull_request_author_avatar_url: None | str | Unset = UNSET pull_request_author_github_user_id: int | None | Unset = UNSET pull_request_author_login: None | str | Unset = UNSET + pull_request_author_name: None | str | Unset = UNSET pull_request_author_url: None | str | Unset = UNSET pull_request_number: int | None | Unset = UNSET pull_request_state: None | str | Unset = UNSET @@ -466,6 +470,12 @@ def to_dict(self) -> dict[str, Any]: else: pull_request_author_login = self.pull_request_author_login + pull_request_author_name: None | str | Unset + if isinstance(self.pull_request_author_name, Unset): + pull_request_author_name = UNSET + else: + pull_request_author_name = self.pull_request_author_name + pull_request_author_url: None | str | Unset if isinstance(self.pull_request_author_url, Unset): pull_request_author_url = UNSET @@ -677,6 +687,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["pull_request_author_github_user_id"] = pull_request_author_github_user_id if pull_request_author_login is not UNSET: field_dict["pull_request_author_login"] = pull_request_author_login + if pull_request_author_name is not UNSET: + field_dict["pull_request_author_name"] = pull_request_author_name if pull_request_author_url is not UNSET: field_dict["pull_request_author_url"] = pull_request_author_url if pull_request_number is not UNSET: @@ -1093,6 +1105,17 @@ def _parse_pull_request_author_login(data: object) -> None | str | Unset: d.pop("pull_request_author_login", UNSET) ) + def _parse_pull_request_author_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pull_request_author_name = _parse_pull_request_author_name( + d.pop("pull_request_author_name", UNSET) + ) + def _parse_pull_request_author_url(data: object) -> None | str | Unset: if data is None: return data @@ -1391,6 +1414,7 @@ def _parse_walkthrough(data: object) -> None | Unset | WalkthroughView: pull_request_author_avatar_url=pull_request_author_avatar_url, pull_request_author_github_user_id=pull_request_author_github_user_id, pull_request_author_login=pull_request_author_login, + pull_request_author_name=pull_request_author_name, pull_request_author_url=pull_request_author_url, pull_request_number=pull_request_number, pull_request_state=pull_request_state, diff --git a/proofline/_generated/models/declared_reach_outcome.py b/proofline/_generated/models/declared_reach_outcome.py deleted file mode 100644 index 1279c6ef..00000000 --- a/proofline/_generated/models/declared_reach_outcome.py +++ /dev/null @@ -1,11 +0,0 @@ -from enum import StrEnum - - -class DeclaredReachOutcome(StrEnum): - NO_ROOTS = "NO_ROOTS" - READ = "READ" - ROOTS_UNKNOWN = "ROOTS_UNKNOWN" - UNAVAILABLE = "UNAVAILABLE" - - def __str__(self) -> str: - return str(self.value) diff --git a/proofline/_generated/models/declared_reach_view.py b/proofline/_generated/models/declared_reach_view.py deleted file mode 100644 index e211a035..00000000 --- a/proofline/_generated/models/declared_reach_view.py +++ /dev/null @@ -1,204 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast -from uuid import UUID - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.declared_reach_outcome import DeclaredReachOutcome -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.reach_gap_view import ReachGapView - from ..models.reached_entity_view import ReachedEntityView - from ..models.terraform_roots_view import TerraformRootsView - - -T = TypeVar("T", bound="DeclaredReachView") - - -@_attrs_define -class DeclaredReachView: - """One assessment's declared reach receipt. A reached entity declares a - dependency on what the change deploys; it is never a claim that the change - breaks it. - - Attributes: - complete (bool): Whether World's walk ended with no gap. An empty, incomplete reach - says nothing about what depends on the change. - entities (list[ReachedEntityView]): Every reached entity, shorter paths first, then by kind. - gaps (list[ReachGapView]): Where World's walk or its evidence stopped. - outcome (DeclaredReachOutcome): - receipt_digest (None | str | Unset): World's digest of its full answer. Null unless `READ`. - snapshot_id (None | Unset | UUID): The World snapshot the reach was read at. Null unless `READ`. - terraform (None | TerraformRootsView | Unset): The Terraform addresses the reach also started from, or why it - took - none. Absent when the assessment read reach only from the deployed - revision. - """ - - complete: bool - entities: list[ReachedEntityView] - gaps: list[ReachGapView] - outcome: DeclaredReachOutcome - receipt_digest: None | str | Unset = UNSET - snapshot_id: None | Unset | UUID = UNSET - terraform: None | TerraformRootsView | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.terraform_roots_view import TerraformRootsView # noqa: PLC0415 - - complete = self.complete - - entities = [] - for entities_item_data in self.entities: - entities_item = entities_item_data.to_dict() - entities.append(entities_item) - - gaps = [] - for gaps_item_data in self.gaps: - gaps_item = gaps_item_data.to_dict() - gaps.append(gaps_item) - - outcome = self.outcome.value - - receipt_digest: None | str | Unset - if isinstance(self.receipt_digest, Unset): - receipt_digest = UNSET - else: - receipt_digest = self.receipt_digest - - snapshot_id: None | str | Unset - if isinstance(self.snapshot_id, Unset): - snapshot_id = UNSET - elif isinstance(self.snapshot_id, UUID): - snapshot_id = str(self.snapshot_id) - else: - snapshot_id = self.snapshot_id - - terraform: dict[str, Any] | None | Unset - if isinstance(self.terraform, Unset): - terraform = UNSET - elif isinstance(self.terraform, TerraformRootsView): - terraform = self.terraform.to_dict() - else: - terraform = self.terraform - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "complete": complete, - "entities": entities, - "gaps": gaps, - "outcome": outcome, - } - ) - if receipt_digest is not UNSET: - field_dict["receipt_digest"] = receipt_digest - if snapshot_id is not UNSET: - field_dict["snapshot_id"] = snapshot_id - if terraform is not UNSET: - field_dict["terraform"] = terraform - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.reach_gap_view import ReachGapView # noqa: PLC0415 - from ..models.reached_entity_view import ReachedEntityView # noqa: PLC0415 - from ..models.terraform_roots_view import TerraformRootsView # noqa: PLC0415 - - d = dict(src_dict) - complete = d.pop("complete") - - entities = [] - _entities = d.pop("entities") - for entities_item_data in _entities: - entities_item = ReachedEntityView.from_dict(entities_item_data) - - entities.append(entities_item) - - gaps = [] - _gaps = d.pop("gaps") - for gaps_item_data in _gaps: - gaps_item = ReachGapView.from_dict(gaps_item_data) - - gaps.append(gaps_item) - - outcome = DeclaredReachOutcome(d.pop("outcome")) - - def _parse_receipt_digest(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - receipt_digest = _parse_receipt_digest(d.pop("receipt_digest", UNSET)) - - def _parse_snapshot_id(data: object) -> None | Unset | UUID: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - snapshot_id_type_0 = UUID(data) - - return snapshot_id_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | Unset | UUID, data) - - snapshot_id = _parse_snapshot_id(d.pop("snapshot_id", UNSET)) - - def _parse_terraform(data: object) -> None | TerraformRootsView | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - terraform_type_0 = TerraformRootsView.from_dict(data) - - return terraform_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | TerraformRootsView | Unset, data) - - terraform = _parse_terraform(d.pop("terraform", UNSET)) - - declared_reach_view = cls( - complete=complete, - entities=entities, - gaps=gaps, - outcome=outcome, - receipt_digest=receipt_digest, - snapshot_id=snapshot_id, - terraform=terraform, - ) - - declared_reach_view.additional_properties = d - return declared_reach_view - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/evidence_view.py b/proofline/_generated/models/evidence_view.py deleted file mode 100644 index 7413a271..00000000 --- a/proofline/_generated/models/evidence_view.py +++ /dev/null @@ -1,10 +0,0 @@ -from enum import StrEnum - - -class EvidenceView(StrEnum): - INCOMPLETE = "INCOMPLETE" - NO_APPLICABLE_OBLIGATIONS = "NO_APPLICABLE_OBLIGATIONS" - REQUIRED_PROPERTIES_ESTABLISHED = "REQUIRED_PROPERTIES_ESTABLISHED" - - def __str__(self) -> str: - return str(self.value) diff --git a/proofline/_generated/models/gate_state.py b/proofline/_generated/models/gate_state.py deleted file mode 100644 index 7aad04c2..00000000 --- a/proofline/_generated/models/gate_state.py +++ /dev/null @@ -1,123 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.occurrence_capture import OccurrenceCapture - from ..models.override import Override - - -T = TypeVar("T", bound="GateState") - - -@_attrs_define -class GateState: - """ - Attributes: - occurrence_captures (list[OccurrenceCapture]): The occurrence questions the gate's approval deferred, as each - observed execution of its deployment answered them. Outcome-only - records: none of them changes the gate or grades a prediction. - status (str): Local gate state. ALLOWED/BLOCKED can precede provider delivery. - This field does not confirm that GitHub released or blocked a run. - override_record (None | Override | Unset): Recorded override authorization, not confirmation of provider - delivery. - """ - - occurrence_captures: list[OccurrenceCapture] - status: str - override_record: None | Override | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.override import Override # noqa: PLC0415 - - occurrence_captures = [] - for occurrence_captures_item_data in self.occurrence_captures: - occurrence_captures_item = occurrence_captures_item_data.to_dict() - occurrence_captures.append(occurrence_captures_item) - - status = self.status - - override_record: dict[str, Any] | None | Unset - if isinstance(self.override_record, Unset): - override_record = UNSET - elif isinstance(self.override_record, Override): - override_record = self.override_record.to_dict() - else: - override_record = self.override_record - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "occurrence_captures": occurrence_captures, - "status": status, - } - ) - if override_record is not UNSET: - field_dict["override_record"] = override_record - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.occurrence_capture import OccurrenceCapture # noqa: PLC0415 - from ..models.override import Override # noqa: PLC0415 - - d = dict(src_dict) - occurrence_captures = [] - _occurrence_captures = d.pop("occurrence_captures") - for occurrence_captures_item_data in _occurrence_captures: - occurrence_captures_item = OccurrenceCapture.from_dict(occurrence_captures_item_data) - - occurrence_captures.append(occurrence_captures_item) - - status = d.pop("status") - - def _parse_override_record(data: object) -> None | Override | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - override_record_type_0 = Override.from_dict(data) - - return override_record_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | Override | Unset, data) - - override_record = _parse_override_record(d.pop("override_record", UNSET)) - - gate_state = cls( - occurrence_captures=occurrence_captures, - status=status, - override_record=override_record, - ) - - gate_state.additional_properties = d - return gate_state - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/occurrence_capture.py b/proofline/_generated/models/occurrence_capture.py deleted file mode 100644 index d065b861..00000000 --- a/proofline/_generated/models/occurrence_capture.py +++ /dev/null @@ -1,221 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, Literal, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.approval_gap import ApprovalGap - from ..models.occurrence_question import OccurrenceQuestion - - -T = TypeVar("T", bound="OccurrenceCapture") - - -@_attrs_define -class OccurrenceCapture: - """The capture of one observed execution of a gate's deployment. - - Attributes: - approval_gaps (list[ApprovalGap]): Assessments whose approval could defer nothing, with the reason. - questions (list[OccurrenceQuestion]): Deferred questions and their binding or observed results for this - occurrence. - state (Literal['INCOMPLETE'] | Literal['NOT_EXECUTED'] | Literal['PENDING'] | Literal['RECORDED'] | - Literal['UNBOUND']): How the capture ended. - detail (None | str | Unset): Explanation of the capture's outcome, when available. - occurrence_key (None | str | Unset): Retained identity of the deployment occurrence, when available. - """ - - approval_gaps: list[ApprovalGap] - questions: list[OccurrenceQuestion] - state: ( - Literal["INCOMPLETE"] - | Literal["NOT_EXECUTED"] - | Literal["PENDING"] - | Literal["RECORDED"] - | Literal["UNBOUND"] - ) - detail: None | str | Unset = UNSET - occurrence_key: None | str | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - approval_gaps = [] - for approval_gaps_item_data in self.approval_gaps: - approval_gaps_item = approval_gaps_item_data.to_dict() - approval_gaps.append(approval_gaps_item) - - questions = [] - for questions_item_data in self.questions: - questions_item = questions_item_data.to_dict() - questions.append(questions_item) - - state: ( - Literal["INCOMPLETE"] - | Literal["NOT_EXECUTED"] - | Literal["PENDING"] - | Literal["RECORDED"] - | Literal["UNBOUND"] - ) - state = self.state - - detail: None | str | Unset - if isinstance(self.detail, Unset): - detail = UNSET - else: - detail = self.detail - - occurrence_key: None | str | Unset - if isinstance(self.occurrence_key, Unset): - occurrence_key = UNSET - else: - occurrence_key = self.occurrence_key - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "approval_gaps": approval_gaps, - "questions": questions, - "state": state, - } - ) - if detail is not UNSET: - field_dict["detail"] = detail - if occurrence_key is not UNSET: - field_dict["occurrence_key"] = occurrence_key - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.approval_gap import ApprovalGap # noqa: PLC0415 - from ..models.occurrence_question import OccurrenceQuestion # noqa: PLC0415 - - d = dict(src_dict) - approval_gaps = [] - _approval_gaps = d.pop("approval_gaps") - for approval_gaps_item_data in _approval_gaps: - approval_gaps_item = ApprovalGap.from_dict(approval_gaps_item_data) - - approval_gaps.append(approval_gaps_item) - - questions = [] - _questions = d.pop("questions") - for questions_item_data in _questions: - questions_item = OccurrenceQuestion.from_dict(questions_item_data) - - questions.append(questions_item) - - def _parse_state( - data: object, - ) -> ( - Literal["INCOMPLETE"] - | Literal["NOT_EXECUTED"] - | Literal["PENDING"] - | Literal["RECORDED"] - | Literal["UNBOUND"] - ): - try: - if not (type(data) is str and data == "PENDING"): - raise TypeError() - componentsschemas_capture_state_type_0 = cast(Literal["PENDING"], data) - if componentsschemas_capture_state_type_0 != "PENDING": - raise ValueError( - f"/components/schemas/CaptureState_type_0 must match const 'PENDING', got '{componentsschemas_capture_state_type_0}'" - ) - return componentsschemas_capture_state_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not (type(data) is str and data == "RECORDED"): - raise TypeError() - componentsschemas_capture_state_type_1 = cast(Literal["RECORDED"], data) - if componentsschemas_capture_state_type_1 != "RECORDED": - raise ValueError( - f"/components/schemas/CaptureState_type_1 must match const 'RECORDED', got '{componentsschemas_capture_state_type_1}'" - ) - return componentsschemas_capture_state_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not (type(data) is str and data == "UNBOUND"): - raise TypeError() - componentsschemas_capture_state_type_2 = cast(Literal["UNBOUND"], data) - if componentsschemas_capture_state_type_2 != "UNBOUND": - raise ValueError( - f"/components/schemas/CaptureState_type_2 must match const 'UNBOUND', got '{componentsschemas_capture_state_type_2}'" - ) - return componentsschemas_capture_state_type_2 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not (type(data) is str and data == "NOT_EXECUTED"): - raise TypeError() - componentsschemas_capture_state_type_3 = cast(Literal["NOT_EXECUTED"], data) - if componentsschemas_capture_state_type_3 != "NOT_EXECUTED": - raise ValueError( - f"/components/schemas/CaptureState_type_3 must match const 'NOT_EXECUTED', got '{componentsschemas_capture_state_type_3}'" - ) - return componentsschemas_capture_state_type_3 - except (TypeError, ValueError, AttributeError, KeyError): - pass - if not (type(data) is str and data == "INCOMPLETE"): - raise TypeError() - componentsschemas_capture_state_type_4 = cast(Literal["INCOMPLETE"], data) - if componentsschemas_capture_state_type_4 != "INCOMPLETE": - raise ValueError( - f"/components/schemas/CaptureState_type_4 must match const 'INCOMPLETE', got '{componentsschemas_capture_state_type_4}'" - ) - return componentsschemas_capture_state_type_4 - - state = _parse_state(d.pop("state")) - - def _parse_detail(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - detail = _parse_detail(d.pop("detail", UNSET)) - - def _parse_occurrence_key(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - occurrence_key = _parse_occurrence_key(d.pop("occurrence_key", UNSET)) - - occurrence_capture = cls( - approval_gaps=approval_gaps, - questions=questions, - state=state, - detail=detail, - occurrence_key=occurrence_key, - ) - - occurrence_capture.additional_properties = d - return occurrence_capture - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/occurrence_question.py b/proofline/_generated/models/occurrence_question.py deleted file mode 100644 index b76e745d..00000000 --- a/proofline/_generated/models/occurrence_question.py +++ /dev/null @@ -1,200 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, Literal, TypeVar, cast -from uuid import UUID - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="OccurrenceQuestion") - - -@_attrs_define -class OccurrenceQuestion: - """One deferred question as the gate presents it. - - Attributes: - assessment_id (UUID): Assessment whose approval deferred this question. - family_key (str): Hypothesis family key for the deferred question. - family_version (int): Hypothesis family version for the deferred question. - state (Literal['NOT_EXECUTED'] | Literal['PENDING'] | Literal['RECORDED'] | Literal['UNBOUND']): Where one - deferred question stands. - code (None | str | Unset): World's binding or refusal code, or the control plane's own gap. - observed_result (None | str | Unset): World's observed result once it recorded the question. - outcome_id (None | str | Unset): World outcome record identifier, when an observed result was recorded. - """ - - assessment_id: UUID - family_key: str - family_version: int - state: Literal["NOT_EXECUTED"] | Literal["PENDING"] | Literal["RECORDED"] | Literal["UNBOUND"] - code: None | str | Unset = UNSET - observed_result: None | str | Unset = UNSET - outcome_id: None | str | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - assessment_id = str(self.assessment_id) - - family_key = self.family_key - - family_version = self.family_version - - state: ( - Literal["NOT_EXECUTED"] | Literal["PENDING"] | Literal["RECORDED"] | Literal["UNBOUND"] - ) - state = self.state - - code: None | str | Unset - if isinstance(self.code, Unset): - code = UNSET - else: - code = self.code - - observed_result: None | str | Unset - if isinstance(self.observed_result, Unset): - observed_result = UNSET - else: - observed_result = self.observed_result - - outcome_id: None | str | Unset - if isinstance(self.outcome_id, Unset): - outcome_id = UNSET - else: - outcome_id = self.outcome_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assessment_id": assessment_id, - "family_key": family_key, - "family_version": family_version, - "state": state, - } - ) - if code is not UNSET: - field_dict["code"] = code - if observed_result is not UNSET: - field_dict["observed_result"] = observed_result - if outcome_id is not UNSET: - field_dict["outcome_id"] = outcome_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - assessment_id = UUID(d.pop("assessment_id")) - - family_key = d.pop("family_key") - - family_version = d.pop("family_version") - - def _parse_state( - data: object, - ) -> ( - Literal["NOT_EXECUTED"] | Literal["PENDING"] | Literal["RECORDED"] | Literal["UNBOUND"] - ): - try: - if not (type(data) is str and data == "PENDING"): - raise TypeError() - componentsschemas_question_state_type_0 = cast(Literal["PENDING"], data) - if componentsschemas_question_state_type_0 != "PENDING": - raise ValueError( - f"/components/schemas/QuestionState_type_0 must match const 'PENDING', got '{componentsschemas_question_state_type_0}'" - ) - return componentsschemas_question_state_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not (type(data) is str and data == "RECORDED"): - raise TypeError() - componentsschemas_question_state_type_1 = cast(Literal["RECORDED"], data) - if componentsschemas_question_state_type_1 != "RECORDED": - raise ValueError( - f"/components/schemas/QuestionState_type_1 must match const 'RECORDED', got '{componentsschemas_question_state_type_1}'" - ) - return componentsschemas_question_state_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not (type(data) is str and data == "UNBOUND"): - raise TypeError() - componentsschemas_question_state_type_2 = cast(Literal["UNBOUND"], data) - if componentsschemas_question_state_type_2 != "UNBOUND": - raise ValueError( - f"/components/schemas/QuestionState_type_2 must match const 'UNBOUND', got '{componentsschemas_question_state_type_2}'" - ) - return componentsschemas_question_state_type_2 - except (TypeError, ValueError, AttributeError, KeyError): - pass - if not (type(data) is str and data == "NOT_EXECUTED"): - raise TypeError() - componentsschemas_question_state_type_3 = cast(Literal["NOT_EXECUTED"], data) - if componentsschemas_question_state_type_3 != "NOT_EXECUTED": - raise ValueError( - f"/components/schemas/QuestionState_type_3 must match const 'NOT_EXECUTED', got '{componentsschemas_question_state_type_3}'" - ) - return componentsschemas_question_state_type_3 - - state = _parse_state(d.pop("state")) - - def _parse_code(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - code = _parse_code(d.pop("code", UNSET)) - - def _parse_observed_result(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - observed_result = _parse_observed_result(d.pop("observed_result", UNSET)) - - def _parse_outcome_id(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - outcome_id = _parse_outcome_id(d.pop("outcome_id", UNSET)) - - occurrence_question = cls( - assessment_id=assessment_id, - family_key=family_key, - family_version=family_version, - state=state, - code=code, - observed_result=observed_result, - outcome_id=outcome_id, - ) - - occurrence_question.additional_properties = d - return occurrence_question - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/override.py b/proofline/_generated/models/override.py deleted file mode 100644 index 1757ccfe..00000000 --- a/proofline/_generated/models/override.py +++ /dev/null @@ -1,102 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="Override") - - -@_attrs_define -class Override: - """ - Attributes: - github_environment_id (int): The GitHub environment ID the approval applied to. - github_user_id (int): The GitHub user ID of the person whose GitHub deployment approval - overrode the gate. - github_user_login (str): That person's GitHub login as recorded with the approval, a display - label truncated past 128 characters. - comment (None | str | Unset): The comment recorded with the approval, truncated past 8000 - characters. - """ - - github_environment_id: int - github_user_id: int - github_user_login: str - comment: None | str | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - github_environment_id = self.github_environment_id - - github_user_id = self.github_user_id - - github_user_login = self.github_user_login - - comment: None | str | Unset - if isinstance(self.comment, Unset): - comment = UNSET - else: - comment = self.comment - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "github_environment_id": github_environment_id, - "github_user_id": github_user_id, - "github_user_login": github_user_login, - } - ) - if comment is not UNSET: - field_dict["comment"] = comment - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - github_environment_id = d.pop("github_environment_id") - - github_user_id = d.pop("github_user_id") - - github_user_login = d.pop("github_user_login") - - def _parse_comment(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - comment = _parse_comment(d.pop("comment", UNSET)) - - override = cls( - github_environment_id=github_environment_id, - github_user_id=github_user_id, - github_user_login=github_user_login, - comment=comment, - ) - - override.additional_properties = d - return override - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/permission_view.py b/proofline/_generated/models/permission_view.py deleted file mode 100644 index 3bbb22b1..00000000 --- a/proofline/_generated/models/permission_view.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import StrEnum - - -class PermissionView(StrEnum): - BLOCK = "BLOCK" - PERMIT = "PERMIT" - - def __str__(self) -> str: - return str(self.value) diff --git a/proofline/_generated/models/reach_gap_view.py b/proofline/_generated/models/reach_gap_view.py deleted file mode 100644 index 9dde73a8..00000000 --- a/proofline/_generated/models/reach_gap_view.py +++ /dev/null @@ -1,61 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ReachGapView") - - -@_attrs_define -class ReachGapView: - """ - Attributes: - code (str): `COVERAGE_INCOMPLETE`, `SOURCE_CAPABILITY_MISSING` or `BOUND_REACHED`. - """ - - code: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - code = self.code - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code": code, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - code = d.pop("code") - - reach_gap_view = cls( - code=code, - ) - - reach_gap_view.additional_properties = d - return reach_gap_view - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/reach_step_view.py b/proofline/_generated/models/reach_step_view.py deleted file mode 100644 index 038cbca8..00000000 --- a/proofline/_generated/models/reach_step_view.py +++ /dev/null @@ -1,79 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar -from uuid import UUID - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ReachStepView") - - -@_attrs_define -class ReachStepView: - """ - Attributes: - assertion_id (UUID): The World relation assertion behind this step. - direction (str): `OUT` when the step follows the relation from its subject, `IN` when - it follows it back to the subject. - relation (str): The relation key, such as `proofline.relation.consumes_api`. - """ - - assertion_id: UUID - direction: str - relation: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - assertion_id = str(self.assertion_id) - - direction = self.direction - - relation = self.relation - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assertion_id": assertion_id, - "direction": direction, - "relation": relation, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - assertion_id = UUID(d.pop("assertion_id")) - - direction = d.pop("direction") - - relation = d.pop("relation") - - reach_step_view = cls( - assertion_id=assertion_id, - direction=direction, - relation=relation, - ) - - reach_step_view.additional_properties = d - return reach_step_view - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/reached_entity_view.py b/proofline/_generated/models/reached_entity_view.py deleted file mode 100644 index a31436c9..00000000 --- a/proofline/_generated/models/reached_entity_view.py +++ /dev/null @@ -1,109 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast -from uuid import UUID - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.reach_step_view import ReachStepView - - -T = TypeVar("T", bound="ReachedEntityView") - - -@_attrs_define -class ReachedEntityView: - """ - Attributes: - entity_id (UUID): World's entity ID. - kind (str): The entity's kind, such as `service` or `queue`. - label (str): World's display label for the entity: environment evidence for - readers of this organization, never published to GitHub. - path (list[ReachStepView]): The recorded relation assertions from the deployed root to the entity. - type_keys (list[str]): World's registry type keys for the entity. - """ - - entity_id: UUID - kind: str - label: str - path: list[ReachStepView] - type_keys: list[str] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - entity_id = str(self.entity_id) - - kind = self.kind - - label = self.label - - path = [] - for path_item_data in self.path: - path_item = path_item_data.to_dict() - path.append(path_item) - - type_keys = self.type_keys - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "entity_id": entity_id, - "kind": kind, - "label": label, - "path": path, - "type_keys": type_keys, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.reach_step_view import ReachStepView # noqa: PLC0415 - - d = dict(src_dict) - entity_id = UUID(d.pop("entity_id")) - - kind = d.pop("kind") - - label = d.pop("label") - - path = [] - _path = d.pop("path") - for path_item_data in _path: - path_item = ReachStepView.from_dict(path_item_data) - - path.append(path_item) - - type_keys = cast(list[str], d.pop("type_keys")) - - reached_entity_view = cls( - entity_id=entity_id, - kind=kind, - label=label, - path=path, - type_keys=type_keys, - ) - - reached_entity_view.additional_properties = d - return reached_entity_view - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/review_routing_view_type_2.py b/proofline/_generated/models/review_routing_view_type_2.py index 4594eef5..2c4b4b06 100644 --- a/proofline/_generated/models/review_routing_view_type_2.py +++ b/proofline/_generated/models/review_routing_view_type_2.py @@ -6,12 +6,9 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - if TYPE_CHECKING: from ..models.plan_projection import PlanProjection from ..models.routing_finding_view import RoutingFindingView - from ..models.specialist_execution_view import SpecialistExecutionView T = TypeVar("T", bound="ReviewRoutingViewType2") @@ -26,20 +23,15 @@ class ReviewRoutingViewType2: plan (PlanProjection): status (Literal['SUPPORTED']): version (str): Version of the validated routing plan. - specialist_execution (None | SpecialistExecutionView | Unset): Actual specialist selection and pass receipts for - the applied workflow. """ findings: list[RoutingFindingView] plan: PlanProjection status: Literal["SUPPORTED"] version: str - specialist_execution: None | SpecialistExecutionView | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.specialist_execution_view import SpecialistExecutionView # noqa: PLC0415 - findings = [] for findings_item_data in self.findings: findings_item = findings_item_data.to_dict() @@ -51,14 +43,6 @@ def to_dict(self) -> dict[str, Any]: version = self.version - specialist_execution: dict[str, Any] | None | Unset - if isinstance(self.specialist_execution, Unset): - specialist_execution = UNSET - elif isinstance(self.specialist_execution, SpecialistExecutionView): - specialist_execution = self.specialist_execution.to_dict() - else: - specialist_execution = self.specialist_execution - field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -69,8 +53,6 @@ def to_dict(self) -> dict[str, Any]: "version": version, } ) - if specialist_execution is not UNSET: - field_dict["specialist_execution"] = specialist_execution return field_dict @@ -78,7 +60,6 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.plan_projection import PlanProjection # noqa: PLC0415 from ..models.routing_finding_view import RoutingFindingView # noqa: PLC0415 - from ..models.specialist_execution_view import SpecialistExecutionView # noqa: PLC0415 d = dict(src_dict) findings = [] @@ -96,29 +77,11 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: version = d.pop("version") - def _parse_specialist_execution(data: object) -> None | SpecialistExecutionView | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - specialist_execution_type_0 = SpecialistExecutionView.from_dict(data) - - return specialist_execution_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | SpecialistExecutionView | Unset, data) - - specialist_execution = _parse_specialist_execution(d.pop("specialist_execution", UNSET)) - review_routing_view_type_2 = cls( findings=findings, plan=plan, status=status, version=version, - specialist_execution=specialist_execution, ) review_routing_view_type_2.additional_properties = d diff --git a/proofline/_generated/models/review_summary.py b/proofline/_generated/models/review_summary.py index a3f7d500..89de8d4d 100644 --- a/proofline/_generated/models/review_summary.py +++ b/proofline/_generated/models/review_summary.py @@ -57,6 +57,9 @@ class ReviewSummary: never display text. Absent when GitHub named no author. pull_request_author_login (None | str | Unset): Provider display metadata for the pull request author, not the rerun requester. + pull_request_author_name (None | str | Unset): The author's GitHub profile name, when known. Lead with it; the + login + is the fallback. Display metadata, never identity. pull_request_author_url (None | str | Unset): The author's profile on the deployment's GitHub host. Absent when no author login is known. pull_request_number (int | None | Unset): The pull request number. Absent for a deployment or patch review. @@ -99,6 +102,7 @@ class ReviewSummary: pull_request_author_avatar_url: None | str | Unset = UNSET pull_request_author_github_user_id: int | None | Unset = UNSET pull_request_author_login: None | str | Unset = UNSET + pull_request_author_name: None | str | Unset = UNSET pull_request_author_url: None | str | Unset = UNSET pull_request_number: int | None | Unset = UNSET pull_request_state: None | str | Unset = UNSET @@ -185,6 +189,12 @@ def to_dict(self) -> dict[str, Any]: else: pull_request_author_login = self.pull_request_author_login + pull_request_author_name: None | str | Unset + if isinstance(self.pull_request_author_name, Unset): + pull_request_author_name = UNSET + else: + pull_request_author_name = self.pull_request_author_name + pull_request_author_url: None | str | Unset if isinstance(self.pull_request_author_url, Unset): pull_request_author_url = UNSET @@ -287,6 +297,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["pull_request_author_github_user_id"] = pull_request_author_github_user_id if pull_request_author_login is not UNSET: field_dict["pull_request_author_login"] = pull_request_author_login + if pull_request_author_name is not UNSET: + field_dict["pull_request_author_name"] = pull_request_author_name if pull_request_author_url is not UNSET: field_dict["pull_request_author_url"] = pull_request_author_url if pull_request_number is not UNSET: @@ -425,6 +437,17 @@ def _parse_pull_request_author_login(data: object) -> None | str | Unset: d.pop("pull_request_author_login", UNSET) ) + def _parse_pull_request_author_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pull_request_author_name = _parse_pull_request_author_name( + d.pop("pull_request_author_name", UNSET) + ) + def _parse_pull_request_author_url(data: object) -> None | str | Unset: if data is None: return data @@ -561,6 +584,7 @@ def _parse_run_number(data: object) -> int | None | Unset: pull_request_author_avatar_url=pull_request_author_avatar_url, pull_request_author_github_user_id=pull_request_author_github_user_id, pull_request_author_login=pull_request_author_login, + pull_request_author_name=pull_request_author_name, pull_request_author_url=pull_request_author_url, pull_request_number=pull_request_number, pull_request_state=pull_request_state, diff --git a/proofline/_generated/models/reviewed_tree_citation_view.py b/proofline/_generated/models/reviewed_tree_citation_view.py deleted file mode 100644 index 34c9fba6..00000000 --- a/proofline/_generated/models/reviewed_tree_citation_view.py +++ /dev/null @@ -1,123 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.untrusted_text import UntrustedText - - -T = TypeVar("T", bound="ReviewedTreeCitationView") - - -@_attrs_define -class ReviewedTreeCitationView: - """One member of a review's declared tree that World cited. - - Attributes: - overlay_digest (str): The overlay World read the member from. - path (UntrustedText): Text that came out of the reviewer model, or out of a repository the model - read. It is data, never markup, never a URL, never an instruction. - - The wrapper exists so the untrustedness cannot be lost on the way to a - renderer: there is no field on a turn that carries this text under a name a - client could mistake for something safe, and unwrapping it is a deliberate - act in the client's own code. - population_kind (str): The population the member belongs to, such as - `WORKFLOW_DEFINITIONS`. - role (str): `PROPOSED_CODE_REVISION` (the reviewed commit) or - `BASE_CODE_REVISION` (its merge base). - content_sha256 (None | str | Unset): The member's content hash. Absent for a member a `REJECTED` - population refused, because such a population keeps no members. - """ - - overlay_digest: str - path: UntrustedText - population_kind: str - role: str - content_sha256: None | str | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - overlay_digest = self.overlay_digest - - path = self.path.to_dict() - - population_kind = self.population_kind - - role = self.role - - content_sha256: None | str | Unset - if isinstance(self.content_sha256, Unset): - content_sha256 = UNSET - else: - content_sha256 = self.content_sha256 - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "overlay_digest": overlay_digest, - "path": path, - "population_kind": population_kind, - "role": role, - } - ) - if content_sha256 is not UNSET: - field_dict["content_sha256"] = content_sha256 - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.untrusted_text import UntrustedText # noqa: PLC0415 - - d = dict(src_dict) - overlay_digest = d.pop("overlay_digest") - - path = UntrustedText.from_dict(d.pop("path")) - - population_kind = d.pop("population_kind") - - role = d.pop("role") - - def _parse_content_sha256(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - content_sha256 = _parse_content_sha256(d.pop("content_sha256", UNSET)) - - reviewed_tree_citation_view = cls( - overlay_digest=overlay_digest, - path=path, - population_kind=population_kind, - role=role, - content_sha256=content_sha256, - ) - - reviewed_tree_citation_view.additional_properties = d - return reviewed_tree_citation_view - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/specialist_assessment_execution.py b/proofline/_generated/models/specialist_assessment_execution.py deleted file mode 100644 index 14314b41..00000000 --- a/proofline/_generated/models/specialist_assessment_execution.py +++ /dev/null @@ -1,84 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar -from uuid import UUID - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.specialist_pass_execution import SpecialistPassExecution - - -T = TypeVar("T", bound="SpecialistAssessmentExecution") - - -@_attrs_define -class SpecialistAssessmentExecution: - """ - Attributes: - assessment_id (UUID): The immutable assessment whose specialist execution is reported. - passes (list[SpecialistPassExecution]): Selected specialist passes and their retained execution outputs. - """ - - assessment_id: UUID - passes: list[SpecialistPassExecution] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - assessment_id = str(self.assessment_id) - - passes = [] - for passes_item_data in self.passes: - passes_item = passes_item_data.to_dict() - passes.append(passes_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assessment_id": assessment_id, - "passes": passes, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.specialist_pass_execution import SpecialistPassExecution # noqa: PLC0415 - - d = dict(src_dict) - assessment_id = UUID(d.pop("assessment_id")) - - passes = [] - _passes = d.pop("passes") - for passes_item_data in _passes: - passes_item = SpecialistPassExecution.from_dict(passes_item_data) - - passes.append(passes_item) - - specialist_assessment_execution = cls( - assessment_id=assessment_id, - passes=passes, - ) - - specialist_assessment_execution.additional_properties = d - return specialist_assessment_execution - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/specialist_execution_view.py b/proofline/_generated/models/specialist_execution_view.py deleted file mode 100644 index 2bed655c..00000000 --- a/proofline/_generated/models/specialist_execution_view.py +++ /dev/null @@ -1,85 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.specialist_assessment_execution import SpecialistAssessmentExecution - - -T = TypeVar("T", bound="SpecialistExecutionView") - - -@_attrs_define -class SpecialistExecutionView: - """ - Attributes: - assessments (list[SpecialistAssessmentExecution]): The applied specialist roster per exact assessment execution. - selection_recorded (bool): False until the applied parent captures its specialist choices. - """ - - assessments: list[SpecialistAssessmentExecution] - selection_recorded: bool - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - assessments = [] - for assessments_item_data in self.assessments: - assessments_item = assessments_item_data.to_dict() - assessments.append(assessments_item) - - selection_recorded = self.selection_recorded - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "assessments": assessments, - "selection_recorded": selection_recorded, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.specialist_assessment_execution import ( - SpecialistAssessmentExecution, # noqa: PLC0415 - ) - - d = dict(src_dict) - assessments = [] - _assessments = d.pop("assessments") - for assessments_item_data in _assessments: - assessments_item = SpecialistAssessmentExecution.from_dict(assessments_item_data) - - assessments.append(assessments_item) - - selection_recorded = d.pop("selection_recorded") - - specialist_execution_view = cls( - assessments=assessments, - selection_recorded=selection_recorded, - ) - - specialist_execution_view.additional_properties = d - return specialist_execution_view - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/specialist_output_projection.py b/proofline/_generated/models/specialist_output_projection.py deleted file mode 100644 index 02307276..00000000 --- a/proofline/_generated/models/specialist_output_projection.py +++ /dev/null @@ -1,92 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="SpecialistOutputProjection") - - -@_attrs_define -class SpecialistOutputProjection: - """A pass receipt's bounded operational facts, without its proposals or prose. - - Attributes: - output_sha256 (str): Verified digest of the retained output bytes. - status (str): `PRODUCED`, `UNAVAILABLE`, `INCOMPLETE` or `MALFORMED`. - gap_kind (None | str | Unset): Closed evidence-gap class, absent when the pass produced output. - """ - - output_sha256: str - status: str - gap_kind: None | str | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - output_sha256 = self.output_sha256 - - status = self.status - - gap_kind: None | str | Unset - if isinstance(self.gap_kind, Unset): - gap_kind = UNSET - else: - gap_kind = self.gap_kind - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "output_sha256": output_sha256, - "status": status, - } - ) - if gap_kind is not UNSET: - field_dict["gap_kind"] = gap_kind - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - output_sha256 = d.pop("output_sha256") - - status = d.pop("status") - - def _parse_gap_kind(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - gap_kind = _parse_gap_kind(d.pop("gap_kind", UNSET)) - - specialist_output_projection = cls( - output_sha256=output_sha256, - status=status, - gap_kind=gap_kind, - ) - - specialist_output_projection.additional_properties = d - return specialist_output_projection - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/specialist_pass_execution.py b/proofline/_generated/models/specialist_pass_execution.py deleted file mode 100644 index 417f08c4..00000000 --- a/proofline/_generated/models/specialist_pass_execution.py +++ /dev/null @@ -1,122 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.specialist_output_projection import SpecialistOutputProjection - - -T = TypeVar("T", bound="SpecialistPassExecution") - - -@_attrs_define -class SpecialistPassExecution: - """ - Attributes: - files (list[str]): Exact selected paths from the validated captured change. - floor (bool): Whether captured file facts required this pass. - name (str): Closed registry key of the selected specialist. - output (None | SpecialistOutputProjection | Unset): Missing means selected, with no retained output. It never - means success. - """ - - files: list[str] - floor: bool - name: str - output: None | SpecialistOutputProjection | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.specialist_output_projection import ( - SpecialistOutputProjection, # noqa: PLC0415 - ) - - files = self.files - - floor = self.floor - - name = self.name - - output: dict[str, Any] | None | Unset - if isinstance(self.output, Unset): - output = UNSET - elif isinstance(self.output, SpecialistOutputProjection): - output = self.output.to_dict() - else: - output = self.output - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "files": files, - "floor": floor, - "name": name, - } - ) - if output is not UNSET: - field_dict["output"] = output - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.specialist_output_projection import ( - SpecialistOutputProjection, # noqa: PLC0415 - ) - - d = dict(src_dict) - files = cast(list[str], d.pop("files")) - - floor = d.pop("floor") - - name = d.pop("name") - - def _parse_output(data: object) -> None | SpecialistOutputProjection | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - output_type_0 = SpecialistOutputProjection.from_dict(data) - - return output_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | SpecialistOutputProjection | Unset, data) - - output = _parse_output(d.pop("output", UNSET)) - - specialist_pass_execution = cls( - files=files, - floor=floor, - name=name, - output=output, - ) - - specialist_pass_execution.additional_properties = d - return specialist_pass_execution - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/terraform_plan_view.py b/proofline/_generated/models/terraform_plan_view.py deleted file mode 100644 index 24cf8f61..00000000 --- a/proofline/_generated/models/terraform_plan_view.py +++ /dev/null @@ -1,12 +0,0 @@ -from enum import StrEnum - - -class TerraformPlanView(StrEnum): - ADDRESSES_UNREPORTED = "ADDRESSES_UNREPORTED" - HEAD_DIFFERS = "HEAD_DIFFERS" - NOT_DECLARED = "NOT_DECLARED" - NOT_PINNED = "NOT_PINNED" - TAKEN = "TAKEN" - - def __str__(self) -> str: - return str(self.value) diff --git a/proofline/_generated/models/terraform_roots_view.py b/proofline/_generated/models/terraform_roots_view.py deleted file mode 100644 index 2ef0ccc9..00000000 --- a/proofline/_generated/models/terraform_roots_view.py +++ /dev/null @@ -1,80 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.terraform_plan_view import TerraformPlanView - -T = TypeVar("T", bound="TerraformRootsView") - - -@_attrs_define -class TerraformRootsView: - """The Terraform roots of one declared reach read. - - Attributes: - addresses (list[str]): The changed resource instance addresses taken as roots. - omitted (int): Changed addresses left out at World's limit of 100 roots per read. - plan (TerraformPlanView): - """ - - addresses: list[str] - omitted: int - plan: TerraformPlanView - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - addresses = self.addresses - - omitted = self.omitted - - plan = self.plan.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "addresses": addresses, - "omitted": omitted, - "plan": plan, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - addresses = cast(list[str], d.pop("addresses")) - - omitted = d.pop("omitted") - - plan = TerraformPlanView(d.pop("plan")) - - terraform_roots_view = cls( - addresses=addresses, - omitted=omitted, - plan=plan, - ) - - terraform_roots_view.additional_properties = d - return terraform_roots_view - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_transport.py b/proofline/_transport.py index 371b2f29..b5d67c9c 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -22,7 +22,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "2.0.0" +VERSION = "3.0.0" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index 536622b2..334631d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "2.0.0" +version = "3.0.0" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" diff --git a/tests/test_http.py b/tests/test_http.py index 613ca297..fd7bfbf7 100644 --- a/tests/test_http.py +++ b/tests/test_http.py @@ -119,13 +119,7 @@ async def async_sleep(self, delay: float) -> None: @MODES -@pytest.mark.parametrize( - "terraform", - [UNSET, None, {"plan": "TAKEN", "addresses": ["aws_s3_bucket.synthetic"], "omitted": 1}], -) -async def test_all_public_operations_use_generated_models_and_scoped_paths( - mode: str, terraform: Any -) -> None: +async def test_all_public_operations_use_generated_models_and_scoped_paths(mode: str) -> None: metadata = Path(__file__).resolve().parents[1] / "pyproject.toml" package_version = tomllib.loads(metadata.read_text())["project"]["version"] prefix = f"/api/v1/organizations/{ORG}" @@ -206,19 +200,6 @@ async def test_all_public_operations_use_generated_models_and_scoped_paths( ), ] - for _, _, body, response_model in paths: - if response_model is CustomerReviewDetail: - assessments = body["assessments"] - elif response_model is CustomerAssessmentDetail: - assessments = [body] - else: - continue - for entry in assessments: - reach = {"complete": True, "entities": [], "gaps": [], "outcome": "READ"} - if terraform is not UNSET: - reach["terraform"] = terraform - entry["declared_reach"] = reach - def respond(request: Request, index: int) -> Reply: method, path, body, _ = paths[index] assert request.method == method @@ -250,19 +231,6 @@ def respond(request: Request, index: int) -> Reply: for index, (name, args, kwargs) in enumerate(calls): result = await call(client, name, *args, **kwargs) assert isinstance(result, paths[index][3]) - if isinstance(result, (CustomerReviewDetail, CustomerAssessmentDetail)): - entries = ( - result.assessments if isinstance(result, CustomerReviewDetail) else [result] - ) - for entry in entries: - roots = entry.declared_reach.terraform - if isinstance(terraform, dict): - assert isinstance(roots, models.TerraformRootsView) - assert roots.plan is models.TerraformPlanView.TAKEN - assert roots.addresses == ["aws_s3_bucket.synthetic"] - assert roots.omitted == 1 - else: - assert roots is terraform if isinstance(result, CustomerFinding): assert result.rule_refs[0].key == "no-sync-io-in-handlers" revision = result.rule_refs[0].revisions[0] From 383ad5cd87c7cc57406a8d6f50d8de9547071309 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 7 Nov 2026 10:06:32 +0000 Subject: [PATCH 07/38] Update distribution --- openapi.public.json | 22 ++++++++++++++++--- .../models/customer_review_detail.py | 21 ++++++++++++++++-- proofline/_generated/models/review_summary.py | 21 ++++++++++++++++-- proofline/_transport.py | 2 +- pyproject.toml | 2 +- 5 files changed, 59 insertions(+), 9 deletions(-) diff --git a/openapi.public.json b/openapi.public.json index eaa78d01..dedd730f 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -1755,7 +1755,7 @@ "type": "boolean" }, "kind": { - "description": "`PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, a review of local changes\n sent as a patch, `COMMIT`, a review of pushed commits, or `FILES`,\n complete selected files at one pushed commit.", + "description": "`PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, a review of local changes\n sent as a patch, `COMMIT`, a review of pushed commits, `FILES`,\n complete selected files at one pushed commit, or `MERGE_GROUP`, the\n commit GitHub's merge queue built for a group of pull requests.", "type": "string" }, "local_reverifications": { @@ -1776,6 +1776,14 @@ ], "description": "The deterministic policy for this exact repository/head, when opted in.\n Its captured review owner and GitHub bypass remain separate history." }, + "merge_group_pull_request_numbers": { + "description": "For a `MERGE_GROUP` review, the pull requests GitHub queued in the\n group, in number order. Absent for every other kind, and until\n Proofline has read the group's members.", + "items": { + "format": "int64", + "type": "integer" + }, + "type": "array" + }, "open_items": { "anyOf": [ { @@ -4562,9 +4570,17 @@ "type": "string" }, "kind": { - "description": "`PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, a review of local changes\n sent as a patch, `COMMIT`, a review of pushed commits, or `FILES`,\n complete selected files at one pushed commit.", + "description": "`PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, a review of local changes\n sent as a patch, `COMMIT`, a review of pushed commits, `FILES`,\n complete selected files at one pushed commit, or `MERGE_GROUP`, the\n commit GitHub's merge queue built for a group of pull requests.", "type": "string" }, + "merge_group_pull_request_numbers": { + "description": "For a `MERGE_GROUP` review, the pull requests GitHub queued in the\n group, in number order. Absent for every other kind, and until\n Proofline has read the group's members.", + "items": { + "format": "int64", + "type": "integer" + }, + "type": "array" + }, "public_key": { "description": "The review's stable public address: `rev_` followed by its identifier without hyphens.", "type": "string" @@ -5753,7 +5769,7 @@ }, "info": { "title": "Proofline Review API", - "version": "3.0.0" + "version": "3.1.0" }, "openapi": "3.1.0", "paths": { diff --git a/proofline/_generated/models/customer_review_detail.py b/proofline/_generated/models/customer_review_detail.py index 9b44ab10..b44a68d1 100644 --- a/proofline/_generated/models/customer_review_detail.py +++ b/proofline/_generated/models/customer_review_detail.py @@ -46,8 +46,9 @@ class CustomerReviewDetail: finding_count (int): How many findings this review's assessments recorded, across all of them. id (UUID): The review's identifier. kind (str): `PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, a review of local changes - sent as a patch, `COMMIT`, a review of pushed commits, or `FILES`, - complete selected files at one pushed commit. + sent as a patch, `COMMIT`, a review of pushed commits, `FILES`, + complete selected files at one pushed commit, or `MERGE_GROUP`, the + commit GitHub's merge queue built for a group of pull requests. public_key (str): The review's stable public address: `rev_` followed by its identifier without hyphens. publication (str): Whether the review reached the pull request: `PUBLISHED`, `WITHHELD`, `PUBLICATION_REQUESTED` or `PUBLICATION_REFUSED`. A review run from @@ -122,6 +123,10 @@ class CustomerReviewDetail: merge_gate (None | PullRequestMergeGate | Unset): The deterministic policy for this exact repository/head, when opted in. Its captured review owner and GitHub bypass remain separate history. + merge_group_pull_request_numbers (list[int] | Unset): For a `MERGE_GROUP` review, the pull requests GitHub + queued in the + group, in number order. Absent for every other kind, and until + Proofline has read the group's members. open_items (None | OpenItemsView | Unset): What Proofline still has open for the reviewed head, counted from the current finding decisions. Absent while the review is `PENDING` or `RUNNING`. @@ -222,6 +227,7 @@ class CustomerReviewDetail: is_deep_review: bool | Unset = UNSET local_reverifications: list[LocalReverification] | Unset = UNSET merge_gate: None | PullRequestMergeGate | Unset = UNSET + merge_group_pull_request_numbers: list[int] | Unset = UNSET open_items: None | OpenItemsView | Unset = UNSET open_items_observation: None | ReviewOpenItems | Unset = UNSET publication_detail: None | str | Unset = UNSET @@ -430,6 +436,10 @@ def to_dict(self) -> dict[str, Any]: else: merge_gate = self.merge_gate + merge_group_pull_request_numbers: list[int] | Unset = UNSET + if not isinstance(self.merge_group_pull_request_numbers, Unset): + merge_group_pull_request_numbers = self.merge_group_pull_request_numbers + open_items: dict[str, Any] | None | Unset if isinstance(self.open_items, Unset): open_items = UNSET @@ -675,6 +685,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["local_reverifications"] = local_reverifications if merge_gate is not UNSET: field_dict["merge_gate"] = merge_gate + if merge_group_pull_request_numbers is not UNSET: + field_dict["merge_group_pull_request_numbers"] = merge_group_pull_request_numbers if open_items is not UNSET: field_dict["open_items"] = open_items if open_items_observation is not UNSET: @@ -1027,6 +1039,10 @@ def _parse_merge_gate(data: object) -> None | PullRequestMergeGate | Unset: merge_gate = _parse_merge_gate(d.pop("merge_gate", UNSET)) + merge_group_pull_request_numbers = cast( + list[int], d.pop("merge_group_pull_request_numbers", UNSET) + ) + def _parse_open_items(data: object) -> None | OpenItemsView | Unset: if data is None: return data @@ -1408,6 +1424,7 @@ def _parse_walkthrough(data: object) -> None | Unset | WalkthroughView: is_deep_review=is_deep_review, local_reverifications=local_reverifications, merge_gate=merge_gate, + merge_group_pull_request_numbers=merge_group_pull_request_numbers, open_items=open_items, open_items_observation=open_items_observation, publication_detail=publication_detail, diff --git a/proofline/_generated/models/review_summary.py b/proofline/_generated/models/review_summary.py index 89de8d4d..dd4b483a 100644 --- a/proofline/_generated/models/review_summary.py +++ b/proofline/_generated/models/review_summary.py @@ -28,8 +28,9 @@ class ReviewSummary: finding_count (int): How many findings this review's assessments recorded, across all of them. id (UUID): The review's identifier. kind (str): `PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, a review of local changes - sent as a patch, `COMMIT`, a review of pushed commits, or `FILES`, - complete selected files at one pushed commit. + sent as a patch, `COMMIT`, a review of pushed commits, `FILES`, + complete selected files at one pushed commit, or `MERGE_GROUP`, the + commit GitHub's merge queue built for a group of pull requests. public_key (str): The review's stable public address: `rev_` followed by its identifier without hyphens. publication (str): Whether the review reached the pull request: `PUBLISHED`, `WITHHELD`, `PUBLICATION_REQUESTED` or `PUBLICATION_REFUSED`. A review run from @@ -48,6 +49,10 @@ class ReviewSummary: which is not a commit. Absent when the review recorded none. head_commit_url (None | str | Unset): The exact revision reviewed. A commit URL, never a branch URL: the branch moves, the reviewed input does not. Absent for a patch review. + merge_group_pull_request_numbers (list[int] | Unset): For a `MERGE_GROUP` review, the pull requests GitHub + queued in the + group, in number order. Absent for every other kind, and until + Proofline has read the group's members. publication_detail (None | str | Unset): Why a publication was refused, or how one failed. Server text. pull_request_author_avatar_url (None | str | Unset): Provider-supplied avatar URL. Login-derived `.png` URLs do not work for @@ -98,6 +103,7 @@ class ReviewSummary: current_head_commit_sha: None | str | Unset = UNSET head_commit_sha: None | str | Unset = UNSET head_commit_url: None | str | Unset = UNSET + merge_group_pull_request_numbers: list[int] | Unset = UNSET publication_detail: None | str | Unset = UNSET pull_request_author_avatar_url: None | str | Unset = UNSET pull_request_author_github_user_id: int | None | Unset = UNSET @@ -165,6 +171,10 @@ def to_dict(self) -> dict[str, Any]: else: head_commit_url = self.head_commit_url + merge_group_pull_request_numbers: list[int] | Unset = UNSET + if not isinstance(self.merge_group_pull_request_numbers, Unset): + merge_group_pull_request_numbers = self.merge_group_pull_request_numbers + publication_detail: None | str | Unset if isinstance(self.publication_detail, Unset): publication_detail = UNSET @@ -289,6 +299,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["head_commit_sha"] = head_commit_sha if head_commit_url is not UNSET: field_dict["head_commit_url"] = head_commit_url + if merge_group_pull_request_numbers is not UNSET: + field_dict["merge_group_pull_request_numbers"] = merge_group_pull_request_numbers if publication_detail is not UNSET: field_dict["publication_detail"] = publication_detail if pull_request_author_avatar_url is not UNSET: @@ -395,6 +407,10 @@ def _parse_head_commit_url(data: object) -> None | str | Unset: head_commit_url = _parse_head_commit_url(d.pop("head_commit_url", UNSET)) + merge_group_pull_request_numbers = cast( + list[int], d.pop("merge_group_pull_request_numbers", UNSET) + ) + def _parse_publication_detail(data: object) -> None | str | Unset: if data is None: return data @@ -580,6 +596,7 @@ def _parse_run_number(data: object) -> int | None | Unset: current_head_commit_sha=current_head_commit_sha, head_commit_sha=head_commit_sha, head_commit_url=head_commit_url, + merge_group_pull_request_numbers=merge_group_pull_request_numbers, publication_detail=publication_detail, pull_request_author_avatar_url=pull_request_author_avatar_url, pull_request_author_github_user_id=pull_request_author_github_user_id, diff --git a/proofline/_transport.py b/proofline/_transport.py index b5d67c9c..a0d81620 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -22,7 +22,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "3.0.0" +VERSION = "3.1.0" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index 334631d8..11a73d5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "3.0.0" +version = "3.1.0" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" From 0269a2607853b86726fcb82a44b2939ab9b24296 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 7 Nov 2026 13:59:32 +0000 Subject: [PATCH 08/38] Update distribution --- proofline/_transport.py | 2 +- pyproject.toml | 2 +- scripts/release-files.py | 27 ++++++++++++++++++++------- tests/test_http.py | 8 +++++--- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/proofline/_transport.py b/proofline/_transport.py index a0d81620..f9e4ef41 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -22,7 +22,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "3.1.0" +VERSION = "3.1.1" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index 11a73d5c..58536d03 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "3.1.0" +version = "3.1.1" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" diff --git a/scripts/release-files.py b/scripts/release-files.py index d08ca21a..4077e7b9 100644 --- a/scripts/release-files.py +++ b/scripts/release-files.py @@ -12,6 +12,10 @@ from pathlib import Path PACKAGE = "proofline-sdk" +# PyPI's CDN caches the version page for up to 15 minutes (Cache-Control: max-age=900), +# so a page fetched before or during the upload can stay stale that long. +PROPAGATION_SECONDS = 20 * 60 +POLL_SECONDS = 30 def published(version: str) -> dict[str, str]: @@ -55,13 +59,22 @@ def main() -> None: shutil.copyfile(args.artifacts / name, args.pending / name) print(len(names)) return - for attempt in range(6): - names = missing(expected, published(args.version)) - if not names: - return - if attempt < 5: - time.sleep(5) - sys.exit("PyPI is missing " + ", ".join(names)) + deadline = time.monotonic() + PROPAGATION_SECONDS + while True: + try: + names = missing(expected, published(args.version)) + except OSError as error: + # A server error, timeout or dropped connection means PyPI does not serve it yet. + if isinstance(error, urllib.error.HTTPError) and error.code < 500: + raise + problem = f"PyPI lookup failed: {error}" + else: + if not names: + return + problem = "PyPI is missing " + ", ".join(names) + if time.monotonic() >= deadline: + sys.exit(problem) + time.sleep(POLL_SECONDS) if __name__ == "__main__": diff --git a/tests/test_http.py b/tests/test_http.py index fd7bfbf7..94ec1043 100644 --- a/tests/test_http.py +++ b/tests/test_http.py @@ -1162,14 +1162,16 @@ async def expire_async( if status == 200: assert raised.value.type == "urn:proofline:sdk:invalid-response" - with Server(lambda request, index: Reply(status, body, header_pause=0.2)) as server: + # The deadline leaves a loaded worker time to deliver the request, and the + # server holds its headers well past the deadline. + with Server(lambda request, index: Reply(status, body, header_pause=1.0)) as server: async with session(mode, server.url) as client: started = time.monotonic() - result = await call(client, "wait_for_review", ORG, REVIEW, timeout=0.05) + result = await call(client, "wait_for_review", ORG, REVIEW, timeout=0.3) assert result.status == "TIMED_OUT" assert result.review is None assert result.review_url == f"{server.url}/orgs/by-id/{ORG}/reviews/{REVIEW}" - assert time.monotonic() - started < 0.5 + assert time.monotonic() - started < 0.8 assert len(server.requests) == 1 From 3a43a3cb85cf1773e5b68999f3395742067adc7e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 7 Nov 2026 19:10:59 +0000 Subject: [PATCH 09/38] Update distribution --- openapi.public.json | 146 +++++++++++- .../_generated/api/default/request_scan.py | 220 ++++++++++++++++++ proofline/_generated/api/operations.py | 43 ++++ proofline/_generated/models/__init__.py | 4 + .../models/customer_review_detail.py | 5 +- proofline/_generated/models/review_summary.py | 5 +- .../_generated/models/scan_request_body.py | 96 ++++++++ proofline/_generated/models/scan_response.py | 105 +++++++++ proofline/_transport.py | 2 +- pyproject.toml | 2 +- 10 files changed, 619 insertions(+), 9 deletions(-) create mode 100644 proofline/_generated/api/default/request_scan.py create mode 100644 proofline/_generated/models/scan_request_body.py create mode 100644 proofline/_generated/models/scan_response.py diff --git a/openapi.public.json b/openapi.public.json index dedd730f..e207603f 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -1755,7 +1755,7 @@ "type": "boolean" }, "kind": { - "description": "`PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, a review of local changes\n sent as a patch, `COMMIT`, a review of pushed commits, `FILES`,\n complete selected files at one pushed commit, or `MERGE_GROUP`, the\n commit GitHub's merge queue built for a group of pull requests.", + "description": "`PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, a review of local changes\n sent as a patch, `COMMIT`, a review of pushed commits, `FILES`,\n complete selected files at one pushed commit, `MERGE_GROUP`, the\n commit GitHub's merge queue built for a group of pull requests, or\n `REVISION_SCAN`, a scan of one captured commit.", "type": "string" }, "local_reverifications": { @@ -4570,7 +4570,7 @@ "type": "string" }, "kind": { - "description": "`PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, a review of local changes\n sent as a patch, `COMMIT`, a review of pushed commits, `FILES`,\n complete selected files at one pushed commit, or `MERGE_GROUP`, the\n commit GitHub's merge queue built for a group of pull requests.", + "description": "`PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, a review of local changes\n sent as a patch, `COMMIT`, a review of pushed commits, `FILES`,\n complete selected files at one pushed commit, `MERGE_GROUP`, the\n commit GitHub's merge queue built for a group of pull requests, or\n `REVISION_SCAN`, a scan of one captured commit.", "type": "string" }, "merge_group_pull_request_numbers": { @@ -5236,6 +5236,68 @@ ], "type": "object" }, + "ScanRequestBody": { + "additionalProperties": false, + "description": "One request to scan a ref or an exact commit of the repository.", + "properties": { + "budget_credits": { + "description": "The credits the whole scan may spend, at most the organization's\n on-demand ceiling.", + "format": "int64", + "type": "integer" + }, + "commit_sha": { + "description": "An exact commit. Name it or `ref`.", + "type": [ + "string", + "null" + ] + }, + "ref": { + "description": "A ref, resolved once when the request arrives. Name it or `commit_sha`.", + "type": [ + "string", + "null" + ] + }, + "request_id": { + "description": "The caller's identity for this request. Sending it again returns the\n first resolution instead of scanning again.", + "format": "uuid", + "type": "string" + } + }, + "required": [ + "request_id", + "budget_credits" + ], + "type": "object" + }, + "ScanResponse": { + "description": "What a scan request resolved to.", + "properties": { + "outcome": { + "description": "`CREATED`, `EXISTING` when this request id was already resolved, or\n `REPOSITORY_UNAVAILABLE` when GitHub could not resolve it.", + "type": "string" + }, + "resolution_id": { + "description": "The request's one resolution receipt.", + "format": "uuid", + "type": "string" + }, + "review_id": { + "description": "The scan review, readable through the review routes. Absent when\n GitHub could not resolve the request.", + "format": "uuid", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "resolution_id", + "outcome" + ], + "type": "object" + }, "SpendAccountKind": { "enum": [ "DEPLOYMENT", @@ -5769,7 +5831,7 @@ }, "info": { "title": "Proofline Review API", - "version": "3.1.0" + "version": "3.2.0" }, "openapi": "3.1.0", "paths": { @@ -6697,6 +6759,84 @@ "x-proofline-token-scope": "guidance:read" } }, + "/api/v1/organizations/{org_id}/repositories/{repo_id}/scans": { + "post": { + "description": "Scans the whole repository at one commit, resolved once from `ref` or named by `commit_sha`, and records that resolution. Requires live GitHub write access, and `budget_credits` at most the organization's on-demand scan limit; a limit of 0 turns on-demand scans off. Sending the same `request_id` again returns the first resolution. Results remain in Proofline and are never posted to GitHub.", + "operationId": "request_scan", + "parameters": [ + { + "in": "path", + "name": "org_id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + }, + "style": "simple" + }, + { + "in": "path", + "name": "repo_id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScanRequestBody" + } + } + }, + "description": "One request to scan a ref or an exact commit of the repository.", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScanResponse" + } + } + }, + "description": "What a scan request resolved to." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunNowRefused" + } + } + }, + "description": "A run-now request that created nothing, as the 400 it is answered with.\n\n The refusal is a configuration fact, not a failure, and it is still sent\n as an RFC 9457 problem: `title`, `status` and `detail` are what a client\n that knows only problems shows, and `repository_name` and `refusal` are\n the extension members a client that knows refusals links from. During a\n rollout a page loaded from the previous bundle keeps working against\n this server, because a refusal was a 400 with a `detail` before too." + }, + "default": { + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + }, + "description": "An RFC 9457 problem; the HTTP status remains authoritative." + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Scan a repository revision", + "x-proofline-token-scope": "scans:request" + } + }, "/api/v1/organizations/{org_id}/repository-names": { "get": { "description": "Returns the ID and full name of each connected repository inside the token's repository restriction, including repositories with no review, so a client can resolve `owner/name` to an ID.", diff --git a/proofline/_generated/api/default/request_scan.py b/proofline/_generated/api/default/request_scan.py new file mode 100644 index 00000000..81e30628 --- /dev/null +++ b/proofline/_generated/api/default/request_scan.py @@ -0,0 +1,220 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.problem import Problem +from ...models.run_now_refused import RunNowRefused +from ...models.scan_request_body import ScanRequestBody +from ...models.scan_response import ScanResponse +from ...types import Response + + +def _get_kwargs( + org_id: UUID, + repo_id: UUID, + *, + body: ScanRequestBody, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/api/v1/organizations/{org_id}/repositories/{repo_id}/scans".format( + org_id=quote(str(org_id), safe=""), + repo_id=quote(str(repo_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Problem | RunNowRefused | ScanResponse: + if response.status_code == 200: + response_200 = ScanResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = RunNowRefused.from_dict(response.json()) + + return response_400 + + response_default = Problem.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Problem | RunNowRefused | ScanResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + org_id: UUID, + repo_id: UUID, + *, + client: AuthenticatedClient, + body: ScanRequestBody, +) -> Response[Problem | RunNowRefused | ScanResponse]: + """Scan a repository revision + + Scans the whole repository at one commit, resolved once from `ref` or named by `commit_sha`, and + records that resolution. Requires live GitHub write access, and `budget_credits` at most the + organization's on-demand scan limit; a limit of 0 turns on-demand scans off. Sending the same + `request_id` again returns the first resolution. Results remain in Proofline and are never posted to + GitHub. + + Args: + org_id (UUID): + repo_id (UUID): + body (ScanRequestBody): One request to scan a ref or an exact commit of the repository. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Problem | RunNowRefused | ScanResponse] + """ + + kwargs = _get_kwargs( + org_id=org_id, + repo_id=repo_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + org_id: UUID, + repo_id: UUID, + *, + client: AuthenticatedClient, + body: ScanRequestBody, +) -> Problem | RunNowRefused | ScanResponse | None: + """Scan a repository revision + + Scans the whole repository at one commit, resolved once from `ref` or named by `commit_sha`, and + records that resolution. Requires live GitHub write access, and `budget_credits` at most the + organization's on-demand scan limit; a limit of 0 turns on-demand scans off. Sending the same + `request_id` again returns the first resolution. Results remain in Proofline and are never posted to + GitHub. + + Args: + org_id (UUID): + repo_id (UUID): + body (ScanRequestBody): One request to scan a ref or an exact commit of the repository. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Problem | RunNowRefused | ScanResponse + """ + + return sync_detailed( + org_id=org_id, + repo_id=repo_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + org_id: UUID, + repo_id: UUID, + *, + client: AuthenticatedClient, + body: ScanRequestBody, +) -> Response[Problem | RunNowRefused | ScanResponse]: + """Scan a repository revision + + Scans the whole repository at one commit, resolved once from `ref` or named by `commit_sha`, and + records that resolution. Requires live GitHub write access, and `budget_credits` at most the + organization's on-demand scan limit; a limit of 0 turns on-demand scans off. Sending the same + `request_id` again returns the first resolution. Results remain in Proofline and are never posted to + GitHub. + + Args: + org_id (UUID): + repo_id (UUID): + body (ScanRequestBody): One request to scan a ref or an exact commit of the repository. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Problem | RunNowRefused | ScanResponse] + """ + + kwargs = _get_kwargs( + org_id=org_id, + repo_id=repo_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + org_id: UUID, + repo_id: UUID, + *, + client: AuthenticatedClient, + body: ScanRequestBody, +) -> Problem | RunNowRefused | ScanResponse | None: + """Scan a repository revision + + Scans the whole repository at one commit, resolved once from `ref` or named by `commit_sha`, and + records that resolution. Requires live GitHub write access, and `budget_credits` at most the + organization's on-demand scan limit; a limit of 0 turns on-demand scans off. Sending the same + `request_id` again returns the first resolution. Results remain in Proofline and are never posted to + GitHub. + + Args: + org_id (UUID): + repo_id (UUID): + body (ScanRequestBody): One request to scan a ref or an exact commit of the repository. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Problem | RunNowRefused | ScanResponse + """ + + return ( + await asyncio_detailed( + org_id=org_id, + repo_id=repo_id, + client=client, + body=body, + ) + ).parsed diff --git a/proofline/_generated/api/operations.py b/proofline/_generated/api/operations.py index 7fa9834d..9a9a1240 100644 --- a/proofline/_generated/api/operations.py +++ b/proofline/_generated/api/operations.py @@ -1,11 +1,54 @@ """Typed methods generated from the public operations without custom adapters.""" +from typing import cast +from uuid import UUID + +from ... import _transport from ..client import AuthenticatedClient +from ..models.scan_request_body import ScanRequestBody +from ..models.scan_response import ScanResponse +from .default import request_scan as operation_request_scan class Operations: _api: AuthenticatedClient + def request_scan( + self, + org_id: UUID, + repo_id: UUID, + *, + body: ScanRequestBody, + ) -> ScanResponse: + with _transport.operation_errors(): + response = operation_request_scan.sync_detailed( + client=self._api, + org_id=org_id, + repo_id=repo_id, + body=body, + ) + if not (response.status_code == 200): + raise _transport.invalid_response() + return cast(ScanResponse, response.parsed) + class AsyncOperations: _api: AuthenticatedClient + + async def request_scan( + self, + org_id: UUID, + repo_id: UUID, + *, + body: ScanRequestBody, + ) -> ScanResponse: + with _transport.operation_errors(): + response = await operation_request_scan.asyncio_detailed( + client=self._api, + org_id=org_id, + repo_id=repo_id, + body=body, + ) + if not (response.status_code == 200): + raise _transport.invalid_response() + return cast(ScanResponse, response.parsed) diff --git a/proofline/_generated/models/__init__.py b/proofline/_generated/models/__init__.py index 59e11473..fe47c068 100644 --- a/proofline/_generated/models/__init__.py +++ b/proofline/_generated/models/__init__.py @@ -139,6 +139,8 @@ from .run_now_refused import RunNowRefused from .run_now_request import RunNowRequest from .run_now_response import RunNowResponse +from .scan_request_body import ScanRequestBody +from .scan_response import ScanResponse from .spend_account_kind import SpendAccountKind from .spend_export_row import SpendExportRow from .start_session import StartSession @@ -296,6 +298,8 @@ "RunNowRefused", "RunNowRequest", "RunNowResponse", + "ScanRequestBody", + "ScanResponse", "SpendAccountKind", "SpendExportRow", "StartSession", diff --git a/proofline/_generated/models/customer_review_detail.py b/proofline/_generated/models/customer_review_detail.py index b44a68d1..ca316537 100644 --- a/proofline/_generated/models/customer_review_detail.py +++ b/proofline/_generated/models/customer_review_detail.py @@ -47,8 +47,9 @@ class CustomerReviewDetail: id (UUID): The review's identifier. kind (str): `PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, a review of local changes sent as a patch, `COMMIT`, a review of pushed commits, `FILES`, - complete selected files at one pushed commit, or `MERGE_GROUP`, the - commit GitHub's merge queue built for a group of pull requests. + complete selected files at one pushed commit, `MERGE_GROUP`, the + commit GitHub's merge queue built for a group of pull requests, or + `REVISION_SCAN`, a scan of one captured commit. public_key (str): The review's stable public address: `rev_` followed by its identifier without hyphens. publication (str): Whether the review reached the pull request: `PUBLISHED`, `WITHHELD`, `PUBLICATION_REQUESTED` or `PUBLICATION_REFUSED`. A review run from diff --git a/proofline/_generated/models/review_summary.py b/proofline/_generated/models/review_summary.py index dd4b483a..23b330a9 100644 --- a/proofline/_generated/models/review_summary.py +++ b/proofline/_generated/models/review_summary.py @@ -29,8 +29,9 @@ class ReviewSummary: id (UUID): The review's identifier. kind (str): `PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, a review of local changes sent as a patch, `COMMIT`, a review of pushed commits, `FILES`, - complete selected files at one pushed commit, or `MERGE_GROUP`, the - commit GitHub's merge queue built for a group of pull requests. + complete selected files at one pushed commit, `MERGE_GROUP`, the + commit GitHub's merge queue built for a group of pull requests, or + `REVISION_SCAN`, a scan of one captured commit. public_key (str): The review's stable public address: `rev_` followed by its identifier without hyphens. publication (str): Whether the review reached the pull request: `PUBLISHED`, `WITHHELD`, `PUBLICATION_REQUESTED` or `PUBLICATION_REFUSED`. A review run from diff --git a/proofline/_generated/models/scan_request_body.py b/proofline/_generated/models/scan_request_body.py new file mode 100644 index 00000000..db3b956f --- /dev/null +++ b/proofline/_generated/models/scan_request_body.py @@ -0,0 +1,96 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ScanRequestBody") + + +@_attrs_define +class ScanRequestBody: + """One request to scan a ref or an exact commit of the repository. + + Attributes: + budget_credits (int): The credits the whole scan may spend, at most the organization's + on-demand ceiling. + request_id (UUID): The caller's identity for this request. Sending it again returns the + first resolution instead of scanning again. + commit_sha (None | str | Unset): An exact commit. Name it or `ref`. + ref (None | str | Unset): A ref, resolved once when the request arrives. Name it or `commit_sha`. + """ + + budget_credits: int + request_id: UUID + commit_sha: None | str | Unset = UNSET + ref: None | str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + budget_credits = self.budget_credits + + request_id = str(self.request_id) + + commit_sha: None | str | Unset + if isinstance(self.commit_sha, Unset): + commit_sha = UNSET + else: + commit_sha = self.commit_sha + + ref: None | str | Unset + if isinstance(self.ref, Unset): + ref = UNSET + else: + ref = self.ref + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "budget_credits": budget_credits, + "request_id": request_id, + } + ) + if commit_sha is not UNSET: + field_dict["commit_sha"] = commit_sha + if ref is not UNSET: + field_dict["ref"] = ref + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + budget_credits = d.pop("budget_credits") + + request_id = UUID(d.pop("request_id")) + + def _parse_commit_sha(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + commit_sha = _parse_commit_sha(d.pop("commit_sha", UNSET)) + + def _parse_ref(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + ref = _parse_ref(d.pop("ref", UNSET)) + + scan_request_body = cls( + budget_credits=budget_credits, + request_id=request_id, + commit_sha=commit_sha, + ref=ref, + ) + + return scan_request_body diff --git a/proofline/_generated/models/scan_response.py b/proofline/_generated/models/scan_response.py new file mode 100644 index 00000000..4447d484 --- /dev/null +++ b/proofline/_generated/models/scan_response.py @@ -0,0 +1,105 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ScanResponse") + + +@_attrs_define +class ScanResponse: + """What a scan request resolved to. + + Attributes: + outcome (str): `CREATED`, `EXISTING` when this request id was already resolved, or + `REPOSITORY_UNAVAILABLE` when GitHub could not resolve it. + resolution_id (UUID): The request's one resolution receipt. + review_id (None | Unset | UUID): The scan review, readable through the review routes. Absent when + GitHub could not resolve the request. + """ + + outcome: str + resolution_id: UUID + review_id: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + outcome = self.outcome + + resolution_id = str(self.resolution_id) + + review_id: None | str | Unset + if isinstance(self.review_id, Unset): + review_id = UNSET + elif isinstance(self.review_id, UUID): + review_id = str(self.review_id) + else: + review_id = self.review_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "outcome": outcome, + "resolution_id": resolution_id, + } + ) + if review_id is not UNSET: + field_dict["review_id"] = review_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + outcome = d.pop("outcome") + + resolution_id = UUID(d.pop("resolution_id")) + + def _parse_review_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + review_id_type_0 = UUID(data) + + return review_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + review_id = _parse_review_id(d.pop("review_id", UNSET)) + + scan_response = cls( + outcome=outcome, + resolution_id=resolution_id, + review_id=review_id, + ) + + scan_response.additional_properties = d + return scan_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/proofline/_transport.py b/proofline/_transport.py index f9e4ef41..8a32c866 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -22,7 +22,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "3.1.1" +VERSION = "3.2.0" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index 58536d03..8910b083 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "3.1.1" +version = "3.2.0" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" From 917ad3be669d1678dd96274d6017cd933a7e9ba4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 7 Nov 2026 20:11:08 +0000 Subject: [PATCH 10/38] Update distribution --- proofline/_transport.py | 2 +- pyproject.toml | 2 +- tests/test_http.py | 47 +++++++++++++++++++++++++++++++---------- 3 files changed, 38 insertions(+), 13 deletions(-) diff --git a/proofline/_transport.py b/proofline/_transport.py index 8a32c866..97db3860 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -22,7 +22,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "3.2.0" +VERSION = "3.2.1" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index 8910b083..df100120 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "3.2.0" +version = "3.2.1" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" diff --git a/tests/test_http.py b/tests/test_http.py index 94ec1043..c392df41 100644 --- a/tests/test_http.py +++ b/tests/test_http.py @@ -1162,17 +1162,42 @@ async def expire_async( if status == 200: assert raised.value.type == "urn:proofline:sdk:invalid-response" - # The deadline leaves a loaded worker time to deliver the request, and the - # server holds its headers well past the deadline. - with Server(lambda request, index: Reply(status, body, header_pause=1.0)) as server: - async with session(mode, server.url) as client: - started = time.monotonic() - result = await call(client, "wait_for_review", ORG, REVIEW, timeout=0.3) - assert result.status == "TIMED_OUT" - assert result.review is None - assert result.review_url == f"{server.url}/orgs/by-id/{ORG}/reviews/{REVIEW}" - assert time.monotonic() - started < 0.8 - assert len(server.requests) == 1 + # The headers wait far past a deadline that leaves time to connect and send. The + # client counts its own attempts, so the no-retry proof needs no scheduler timing. + attempts = 0 + with monkeypatch.context() as patch: + sync_request = _sync_http.Transport.handle_request + async_request = httpx.AsyncHTTPTransport.handle_async_request + + def count_sync(transport: _sync_http.Transport, request: httpx.Request) -> httpx.Response: + nonlocal attempts + attempts += 1 + return sync_request(transport, request) + + async def count_async( + transport: httpx.AsyncHTTPTransport, request: httpx.Request + ) -> httpx.Response: + nonlocal attempts + attempts += 1 + return await async_request(transport, request) + + patch.setattr(_sync_http.Transport, "handle_request", count_sync) + patch.setattr(httpx.AsyncHTTPTransport, "handle_async_request", count_async) + with Server(lambda request, index: Reply(status, body, header_pause=2.0)) as server: + async with session(mode, server.url) as client: + started = time.monotonic() + result = await call(client, "wait_for_review", ORG, REVIEW, timeout=0.3) + assert result.status == "TIMED_OUT" + assert result.review is None + assert result.review_url == f"{server.url}/orgs/by-id/{ORG}/reviews/{REVIEW}" + assert time.monotonic() - started < 1.5 + assert attempts == 1 + # The request was sent before the header wait, so the server reads it + # even after the client gives up. + recorded = time.monotonic() + 5 + while not server.requests and time.monotonic() < recorded: + time.sleep(0.01) + assert len(server.requests) == 1 @MODES From eb136f56712a32b3265f7fb141d83f8953da5a59 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 08:57:08 +0000 Subject: [PATCH 11/38] Update distribution --- README.md | 24 +- openapi.public.json | 2 +- proofline/_mcp.py | 26 +- proofline/_transport.py | 2 +- proofline/client.py | 4 + proofline/fixes.py | 60 +- proofline/knowledge.py | 126 +- proofline/outcomes.py | 39 +- pyproject.toml | 2 +- scripts/install_smoke.py | 27 +- tests/fixtures/review-outcomes.json | 1833 +++++++++++++++++++++++++++ tests/test_http.py | 283 ++++- 12 files changed, 2362 insertions(+), 66 deletions(-) create mode 100644 tests/fixtures/review-outcomes.json diff --git a/README.md b/README.md index 29a9220b..a2ce538f 100644 --- a/README.md +++ b/README.md @@ -65,9 +65,29 @@ with ProoflineClient() as client: The response names the recorded report and its covered and instrumented line counts. An identical upload returns that report with `created=False`. Refused reports raise `ProoflineError`. Uploading a report does not establish a check verdict. +## MCP organization selection + +With an MCP OAuth credential approved for several organizations, discover its currently authorized targets with `client.mcp.list_organizations()`. It returns a `KnowledgeResult`; inspect `isError` before reading `structuredContent["data"]["organizations"]`. Each entry contains `organization_id`, `github_login`, and `scopes`. + +Pass the chosen UUID string as the optional keyword `organization_id` on any `knowledge` or `fixes` method: + +```python +organizations = client.mcp.list_organizations() +if organizations.get("isError"): + raise RuntimeError("Organization discovery was refused.") +print(organizations["structuredContent"]["data"]["organizations"]) +# Set organization_id to the UUID of the organization you intend to use. +result = client.fixes.get_fix_context(finding_id, organization_id=organization_id) +result = client.knowledge.get_wiki_page( + "owner/name", "index", organization_id=organization_id, +) +``` + +The async client exposes the same helpers with `await`. Selection applies only to that call, including concurrent calls on one client. A single-organization credential can omit the keyword. An ambiguous omission retains the server's `ORGANIZATION_REQUIRED` tool refusal; a foreign or revoked target retains `NOT_AUTHORIZED` and `isError`. The SDK chooses no default and never retries a tool call. Discovery and targeting use MCP only; an MCP OAuth credential cannot call the REST API. Each organization's scopes and repository restrictions still apply. + ## Knowledge and plans -Both clients expose typed methods under `client.knowledge` over Proofline's stateless MCP endpoint: +Both clients expose typed methods under `client.knowledge` over Proofline's stateless MCP endpoint. Every method accepts the optional `organization_id` keyword described above: - `list_wiki_pages(repository, commit=...)` - `get_wiki_page(repository, page_key, commit=...)` @@ -91,7 +111,7 @@ Each call initializes MCP and makes one tool request without retries, including ## Fix context and re-verification -Both clients expose finding and re-verification methods under `client.fixes` over the stateless MCP endpoint: +Both clients expose finding and re-verification methods under `client.fixes` over the stateless MCP endpoint. Every method accepts the optional `organization_id` keyword described above: - `list_open_findings(repository, pull_request_number)` - `get_fix_context(finding_id)` diff --git a/openapi.public.json b/openapi.public.json index e207603f..7a04561f 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -5831,7 +5831,7 @@ }, "info": { "title": "Proofline Review API", - "version": "3.2.0" + "version": "3.3.0" }, "openapi": "3.1.0", "paths": { diff --git a/proofline/_mcp.py b/proofline/_mcp.py index c85f781d..896a7796 100644 --- a/proofline/_mcp.py +++ b/proofline/_mcp.py @@ -95,7 +95,11 @@ class McpTools: def __init__(self, http: httpx.Client) -> None: self._http = http - def _call(self, name: str, args: dict[str, Any]) -> KnowledgeResult: + def _call( + self, name: str, args: dict[str, Any], *, organization_id: str | None = None + ) -> KnowledgeResult: + if organization_id is not None: + args = {**args, "organization_id": organization_id} call = _body("tools/call", {"name": name, "arguments": args}, 2) frames = [ ( @@ -140,7 +144,11 @@ class AsyncMcpTools: def __init__(self, http: httpx.AsyncClient) -> None: self._http = http - async def _call(self, name: str, args: dict[str, Any]) -> KnowledgeResult: + async def _call( + self, name: str, args: dict[str, Any], *, organization_id: str | None = None + ) -> KnowledgeResult: + if organization_id is not None: + args = {**args, "organization_id": organization_id} call = _body("tools/call", {"name": name, "arguments": args}, 2) frames = [ ( @@ -177,3 +185,17 @@ async def _call(self, name: str, args: dict[str, Any]) -> KnowledgeResult: if identity == 1 and result.get("protocolVersion") != PROTOCOL: raise _refused() return _result(result) + + +class McpClient(McpTools): + """Discover the organizations currently authorized for this MCP credential.""" + + def list_organizations(self) -> KnowledgeResult: + return self._call("list_organizations", {}) + + +class AsyncMcpClient(AsyncMcpTools): + """Discover the organizations currently authorized for this MCP credential.""" + + async def list_organizations(self) -> KnowledgeResult: + return await self._call("list_organizations", {}) diff --git a/proofline/_transport.py b/proofline/_transport.py index 97db3860..e4873f99 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -22,7 +22,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "3.2.1" +VERSION = "3.3.0" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/proofline/client.py b/proofline/client.py index 3c18828b..0a8239b4 100644 --- a/proofline/client.py +++ b/proofline/client.py @@ -69,6 +69,7 @@ from ._generated.models.start_session import StartSession from ._generated.models.stop_response import StopResponse from ._generated.types import UNSET, Response, Unset +from ._mcp import AsyncMcpClient, McpClient from ._transport import ProoflineError from .exports import ExportDataset, ExportFormat, ExportPage, decode_export from .fixes import AsyncFixesClient, FixesClient @@ -109,6 +110,7 @@ class ReviewFilters(TypedDict, total=False): findings: str | None kind: str | None limit: int | None + query: str | None repository: UUID | None search: str | None status: str | None @@ -202,6 +204,7 @@ def __init__( transport=_transport.RetryTransport(self._api.token, timeout), ) self._api.set_httpx_client(self._http) + self.mcp = McpClient(self._http) self.knowledge = KnowledgeClient(self._http) self.fixes = FixesClient(self._http) @@ -530,6 +533,7 @@ def __init__( transport=_transport.AsyncRetryTransport(self._api.token, timeout), ) self._api.set_async_httpx_client(self._http) + self.mcp = AsyncMcpClient(self._http) self.knowledge = AsyncKnowledgeClient(self._http) self.fixes = AsyncFixesClient(self._http) diff --git a/proofline/fixes.py b/proofline/fixes.py index e9541041..85e437b5 100644 --- a/proofline/fixes.py +++ b/proofline/fixes.py @@ -8,17 +8,30 @@ class FixesClient(McpTools): - def list_open_findings(self, repository: str, pull_request_number: int) -> KnowledgeResult: + def list_open_findings( + self, repository: str, pull_request_number: int, *, organization_id: str | None = None + ) -> KnowledgeResult: return self._call( "list_open_findings", {"repository": repository, "pull_request_number": pull_request_number}, + organization_id=organization_id, ) - def get_fix_context(self, finding_id: str) -> KnowledgeResult: - return self._call("get_fix_context", {"finding_id": finding_id}) + def get_fix_context( + self, finding_id: str, *, organization_id: str | None = None + ) -> KnowledgeResult: + return self._call( + "get_fix_context", {"finding_id": finding_id}, organization_id=organization_id + ) def request_reverification( - self, review_id: str, finding_ids: list[str], commit_sha: str, *, note: str | None = None + self, + review_id: str, + finding_ids: list[str], + commit_sha: str, + *, + note: str | None = None, + organization_id: str | None = None, ) -> KnowledgeResult: args: dict[str, Any] = { "review_id": review_id, @@ -27,26 +40,41 @@ def request_reverification( } if note is not None: args["note"] = note - return self._call("request_reverification", args) + return self._call("request_reverification", args, organization_id=organization_id) - def get_reverification(self, request_id: str) -> KnowledgeResult: - return self._call("get_reverification", {"request_id": request_id}) + def get_reverification( + self, request_id: str, *, organization_id: str | None = None + ) -> KnowledgeResult: + return self._call( + "get_reverification", {"request_id": request_id}, organization_id=organization_id + ) class AsyncFixesClient(AsyncMcpTools): async def list_open_findings( - self, repository: str, pull_request_number: int + self, repository: str, pull_request_number: int, *, organization_id: str | None = None ) -> KnowledgeResult: return await self._call( "list_open_findings", {"repository": repository, "pull_request_number": pull_request_number}, + organization_id=organization_id, ) - async def get_fix_context(self, finding_id: str) -> KnowledgeResult: - return await self._call("get_fix_context", {"finding_id": finding_id}) + async def get_fix_context( + self, finding_id: str, *, organization_id: str | None = None + ) -> KnowledgeResult: + return await self._call( + "get_fix_context", {"finding_id": finding_id}, organization_id=organization_id + ) async def request_reverification( - self, review_id: str, finding_ids: list[str], commit_sha: str, *, note: str | None = None + self, + review_id: str, + finding_ids: list[str], + commit_sha: str, + *, + note: str | None = None, + organization_id: str | None = None, ) -> KnowledgeResult: args: dict[str, Any] = { "review_id": review_id, @@ -55,7 +83,11 @@ async def request_reverification( } if note is not None: args["note"] = note - return await self._call("request_reverification", args) + return await self._call("request_reverification", args, organization_id=organization_id) - async def get_reverification(self, request_id: str) -> KnowledgeResult: - return await self._call("get_reverification", {"request_id": request_id}) + async def get_reverification( + self, request_id: str, *, organization_id: str | None = None + ) -> KnowledgeResult: + return await self._call( + "get_reverification", {"request_id": request_id}, organization_id=organization_id + ) diff --git a/proofline/knowledge.py b/proofline/knowledge.py index efa7a15d..2a301cf5 100644 --- a/proofline/knowledge.py +++ b/proofline/knowledge.py @@ -4,62 +4,132 @@ class KnowledgeClient(McpTools): - def list_wiki_pages(self, repository: str, *, commit: str | None = None) -> KnowledgeResult: - return self._call("list_wiki_pages", _repository(repository, commit)) + def list_wiki_pages( + self, repository: str, *, commit: str | None = None, organization_id: str | None = None + ) -> KnowledgeResult: + return self._call( + "list_wiki_pages", _repository(repository, commit), organization_id=organization_id + ) def get_wiki_page( - self, repository: str, page_key: str, *, commit: str | None = None + self, + repository: str, + page_key: str, + *, + commit: str | None = None, + organization_id: str | None = None, ) -> KnowledgeResult: return self._call( - "get_wiki_page", {**_repository(repository, commit), "page_key": page_key} + "get_wiki_page", + {**_repository(repository, commit), "page_key": page_key}, + organization_id=organization_id, ) def ask_codebase( - self, repository: str, question: str, *, commit: str | None = None + self, + repository: str, + question: str, + *, + commit: str | None = None, + organization_id: str | None = None, ) -> KnowledgeResult: - return self._call("ask_codebase", {**_repository(repository, commit), "question": question}) + return self._call( + "ask_codebase", + {**_repository(repository, commit), "question": question}, + organization_id=organization_id, + ) - def get_architecture_document(self, environment_id: str) -> KnowledgeResult: - return self._call("get_architecture_document", {"environment_id": environment_id}) + def get_architecture_document( + self, environment_id: str, *, organization_id: str | None = None + ) -> KnowledgeResult: + return self._call( + "get_architecture_document", + {"environment_id": environment_id}, + organization_id=organization_id, + ) - def get_plan(self, plan_id: str) -> KnowledgeResult: - return self._call("get_plan", {"plan_id": plan_id}) + def get_plan(self, plan_id: str, *, organization_id: str | None = None) -> KnowledgeResult: + return self._call("get_plan", {"plan_id": plan_id}, organization_id=organization_id) - def start_plan_implementation(self, plan_id: str) -> KnowledgeResult: - return self._call("start_plan_implementation", {"plan_id": plan_id}) + def start_plan_implementation( + self, plan_id: str, *, organization_id: str | None = None + ) -> KnowledgeResult: + return self._call( + "start_plan_implementation", {"plan_id": plan_id}, organization_id=organization_id + ) - def get_plan_implementation(self, implementation_id: str) -> KnowledgeResult: - return self._call("get_plan_implementation", {"implementation_id": implementation_id}) + def get_plan_implementation( + self, implementation_id: str, *, organization_id: str | None = None + ) -> KnowledgeResult: + return self._call( + "get_plan_implementation", + {"implementation_id": implementation_id}, + organization_id=organization_id, + ) class AsyncKnowledgeClient(AsyncMcpTools): async def list_wiki_pages( - self, repository: str, *, commit: str | None = None + self, repository: str, *, commit: str | None = None, organization_id: str | None = None ) -> KnowledgeResult: - return await self._call("list_wiki_pages", _repository(repository, commit)) + return await self._call( + "list_wiki_pages", _repository(repository, commit), organization_id=organization_id + ) async def get_wiki_page( - self, repository: str, page_key: str, *, commit: str | None = None + self, + repository: str, + page_key: str, + *, + commit: str | None = None, + organization_id: str | None = None, ) -> KnowledgeResult: return await self._call( - "get_wiki_page", {**_repository(repository, commit), "page_key": page_key} + "get_wiki_page", + {**_repository(repository, commit), "page_key": page_key}, + organization_id=organization_id, ) async def ask_codebase( - self, repository: str, question: str, *, commit: str | None = None + self, + repository: str, + question: str, + *, + commit: str | None = None, + organization_id: str | None = None, ) -> KnowledgeResult: return await self._call( - "ask_codebase", {**_repository(repository, commit), "question": question} + "ask_codebase", + {**_repository(repository, commit), "question": question}, + organization_id=organization_id, ) - async def get_architecture_document(self, environment_id: str) -> KnowledgeResult: - return await self._call("get_architecture_document", {"environment_id": environment_id}) + async def get_architecture_document( + self, environment_id: str, *, organization_id: str | None = None + ) -> KnowledgeResult: + return await self._call( + "get_architecture_document", + {"environment_id": environment_id}, + organization_id=organization_id, + ) - async def get_plan(self, plan_id: str) -> KnowledgeResult: - return await self._call("get_plan", {"plan_id": plan_id}) + async def get_plan( + self, plan_id: str, *, organization_id: str | None = None + ) -> KnowledgeResult: + return await self._call("get_plan", {"plan_id": plan_id}, organization_id=organization_id) - async def start_plan_implementation(self, plan_id: str) -> KnowledgeResult: - return await self._call("start_plan_implementation", {"plan_id": plan_id}) + async def start_plan_implementation( + self, plan_id: str, *, organization_id: str | None = None + ) -> KnowledgeResult: + return await self._call( + "start_plan_implementation", {"plan_id": plan_id}, organization_id=organization_id + ) - async def get_plan_implementation(self, implementation_id: str) -> KnowledgeResult: - return await self._call("get_plan_implementation", {"implementation_id": implementation_id}) + async def get_plan_implementation( + self, implementation_id: str, *, organization_id: str | None = None + ) -> KnowledgeResult: + return await self._call( + "get_plan_implementation", + {"implementation_id": implementation_id}, + organization_id=organization_id, + ) diff --git a/proofline/outcomes.py b/proofline/outcomes.py index 68a4d8aa..e76c171c 100644 --- a/proofline/outcomes.py +++ b/proofline/outcomes.py @@ -14,6 +14,10 @@ OutcomeStatus = Literal["COMPLETED", "INCOMPLETE", "FAILED", "STOPPED", "TIMED_OUT"] COMPLETE_CHECKS = frozenset(("READY", "BLOCKED", "NOT_APPLICABLE")) COMPLETE_LIFECYCLES = frozenset(("GATING", "SHADOW", "QUARANTINED", "RETIRED")) +_KNOWN_ASSESSMENTS = frozenset( + ("PENDING", "RUNNING", "COMPLETED", "INCOMPLETE", "FAILED", "STOPPED", "SUPERSEDED", "EXCLUDED") +) +_WITHHELD_MARKER = "[withheld: environment value]" @dataclass(frozen=True) @@ -29,7 +33,7 @@ class CheckGap: class AssessmentGap: assessment_id: UUID | None status: str - reason_codes: tuple[str, ...] = () + reason_codes: tuple[str, ...] = field(default=(), repr=False) incompleteness_kind: str | None = None release_evidence_gap: str | None = field(default=None, repr=False) checks: tuple[CheckGap, ...] = field(default=(), repr=False) @@ -75,6 +79,14 @@ def _code_assessment(review: CustomerReviewDetail) -> CustomerCodeAssessment | N or not _optional_text(code.incompleteness_kind) ): return None + for recorded, actual in ( + (review.head_commit_sha, code.head_commit_sha), + (review.base_commit_sha, code.base_commit_sha), + ): + if isinstance(recorded, str) and recorded.lower() != actual.lower(): + return None + if any(finding.risk_domain == _WITHHELD_MARKER for finding in code.findings): + return None return code @@ -143,18 +155,20 @@ def outcome( AssessmentGap( code.id, code.status, - () if kind else ("CODE_ASSESSMENT_STATE_UNAVAILABLE",), + (kind,) if kind else ("CODE_ASSESSMENT_STATE_UNAVAILABLE",), kind, ) ) - elif review.assessment_count != len(review.assessments): - gaps.append(AssessmentGap(None, "UNKNOWN", ("ASSESSMENT_HISTORY_UNAVAILABLE",))) for assessment in review.assessments: reasons = ( tuple(assessment.reason_codes) if isinstance(assessment.reason_codes, list) else () ) kind = text(assessment.incompleteness_kind) evidence = text(assessment.release_evidence_gap) + if kind: + reasons = (*reasons, kind) + if evidence: + reasons = (*reasons, evidence) checks = tuple( CheckGap( check.name, @@ -166,17 +180,22 @@ def outcome( for check in assessment.checks.families if check.outcome not in COMPLETE_CHECKS or check.lifecycle not in COMPLETE_LIFECYCLES ) - if ( - not assessment.checks.receipt_recorded - or assessment.checks.status not in COMPLETE_CHECKS - ): - reasons = (*reasons, "CHECK_RECEIPT_UNAVAILABLE") + if not assessment.checks.receipt_recorded: + reasons = (*reasons, "CHECK_RECEIPT_ABSENT") + elif assessment.checks.status not in COMPLETE_CHECKS or checks: + reasons = (*reasons, "CHECKS_UNRESOLVED") if assessment.status != "COMPLETED" or reasons or kind or evidence or checks: if not reasons and not kind and not evidence and not checks: - reasons = ("ASSESSMENT_STATE_UNAVAILABLE",) + reasons = ( + "ASSESSMENT_RESULT_UNAVAILABLE" + if assessment.status in _KNOWN_ASSESSMENTS + else "UNKNOWN_ASSESSMENT_STATUS", + ) gaps.append( AssessmentGap(assessment.id, assessment.status, reasons, kind, evidence, checks) ) + if review.assessment_count != len(review.assessments): + gaps.append(AssessmentGap(None, "UNKNOWN", ("ASSESSMENT_HISTORY_UNAVAILABLE",))) if forced is not None: status = forced elif review.status in ("PENDING", "RUNNING"): diff --git a/pyproject.toml b/pyproject.toml index df100120..350e97e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "3.2.1" +version = "3.3.0" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" diff --git a/scripts/install_smoke.py b/scripts/install_smoke.py index e42fed3e..3509074c 100644 --- a/scripts/install_smoke.py +++ b/scripts/install_smoke.py @@ -9,16 +9,18 @@ import threading from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer from pathlib import Path +from urllib.parse import parse_qs, urlsplit from uuid import UUID import proofline -from proofline import AsyncProoflineClient, ProoflineClient, SecretStr +from proofline import AsyncProoflineClient, ProoflineClient, ReviewFilters, SecretStr ORG = UUID("00000000-0000-4000-8000-000000000001") REVIEW = UUID("00000000-0000-4000-8000-000000000002") ASSESSMENT = UUID("00000000-0000-4000-8000-000000000003") FINDING = UUID("00000000-0000-4000-8000-000000000004") TOKEN = "pln_synthetic_installed_package_token" +QUERY = '(status:COMPLETED OR status:FAILED) AND -author:"release bot"' def main() -> None: @@ -27,6 +29,7 @@ def main() -> None: package_version = importlib.metadata.version("proofline-sdk") assert proofline.__version__ == package_version calls: list[str] = [] + filters: ReviewFilters = {"query": QUERY} finding = { "id": str(FINDING), "severity": "HIGH", @@ -82,6 +85,18 @@ def do_GET(self) -> None: assert self.headers["User-Agent"] == f"proofline-python/{package_version}" calls.append(self.path) body = finding if "/findings/" in self.path else review + path = urlsplit(self.path) + if path.path in ( + f"/api/v1/organizations/{ORG}/reviews", + f"/api/v1/organizations/{ORG}/reviews/pr/repo%2Fname/42", + ): + assert parse_qs(path.query)["query"] == [QUERY] + assert "search" not in parse_qs(path.query) + body = { + "filters": {"repositories": [], "environments": [], "authors": []}, + "items": [], + "truncated": False, + } payload = json.dumps(body).encode() self.send_response(200) self.send_header("Content-Type", "application/json") @@ -96,6 +111,10 @@ def do_GET(self) -> None: async def asynchronous() -> None: async with AsyncProoflineClient(SecretStr(TOKEN), base_url=url) as client: + assert (await client.list_reviews(ORG, query=QUERY)).items == [] + history = await client.list_pull_request_reviews(ORG, "repo/name", 42, filters=filters) + assert history.items == [] + assert [item async for item in client.iter_reviews(ORG, filters=filters)] == [] assert (await client.get_finding(ORG, FINDING)).id == FINDING result = await client.wait_for_review(ORG, REVIEW, timeout=2) assert result.status == "INCOMPLETE" @@ -104,13 +123,17 @@ async def asynchronous() -> None: try: with ProoflineClient(SecretStr(TOKEN), base_url=url) as client: + assert client.list_reviews(ORG, query=QUERY).items == [] + history = client.list_pull_request_reviews(ORG, "repo/name", 42, filters=filters) + assert history.items == [] + assert list(client.iter_reviews(ORG, filters=filters)) == [] assert client.get_finding(ORG, FINDING).id == FINDING result = client.wait_for_review(ORG, REVIEW, timeout=2) assert result.status == "INCOMPLETE" assert result.gaps[0].reason_codes[0] == "WORLD_UNAVAILABLE" assert TOKEN not in repr(client) asyncio.run(asynchronous()) - assert len(calls) == 4 + assert len(calls) == 10 finally: server.shutdown() server.server_close() diff --git a/tests/fixtures/review-outcomes.json b/tests/fixtures/review-outcomes.json new file mode 100644 index 00000000..139b800c --- /dev/null +++ b/tests/fixtures/review-outcomes.json @@ -0,0 +1,1833 @@ +{ + "cases": [ + { + "name": "review-pending", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "PENDING", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": null, + "gaps": [] + }, + { + "name": "review-running", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "RUNNING", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": null, + "gaps": [] + }, + { + "name": "review-completed", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "COMPLETED", + "gaps": [] + }, + { + "name": "review-incomplete", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "INCOMPLETE", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": null, + "reason_codes": ["REVIEW_STATE_UNAVAILABLE"] + } + ] + }, + { + "name": "review-failed", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "FAILED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "FAILED", + "gaps": [] + }, + { + "name": "review-superseded", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "SUPERSEDED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "STOPPED", + "gaps": [] + }, + { + "name": "review-stopped", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "STOPPED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "STOPPED", + "gaps": [] + }, + { + "name": "review-excluded", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "EXCLUDED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": null, + "reason_codes": ["REVIEW_STATE_UNAVAILABLE"] + } + ] + }, + { + "name": "review-future_review", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "FUTURE_REVIEW", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": null, + "reason_codes": ["REVIEW_STATE_UNAVAILABLE"] + } + ] + }, + { + "name": "assessment-pending", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "PENDING", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000003", + "reason_codes": ["ASSESSMENT_RESULT_UNAVAILABLE"] + } + ] + }, + { + "name": "assessment-running", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "RUNNING", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000003", + "reason_codes": ["ASSESSMENT_RESULT_UNAVAILABLE"] + } + ] + }, + { + "name": "assessment-incomplete", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "INCOMPLETE", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000003", + "reason_codes": ["ASSESSMENT_RESULT_UNAVAILABLE"] + } + ] + }, + { + "name": "assessment-failed", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "FAILED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000003", + "reason_codes": ["ASSESSMENT_RESULT_UNAVAILABLE"] + } + ] + }, + { + "name": "assessment-stopped", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "STOPPED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000003", + "reason_codes": ["ASSESSMENT_RESULT_UNAVAILABLE"] + } + ] + }, + { + "name": "assessment-superseded", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "SUPERSEDED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000003", + "reason_codes": ["ASSESSMENT_RESULT_UNAVAILABLE"] + } + ] + }, + { + "name": "assessment-excluded", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "EXCLUDED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000003", + "reason_codes": ["ASSESSMENT_RESULT_UNAVAILABLE"] + } + ] + }, + { + "name": "assessment-future_assessment", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "FUTURE_ASSESSMENT", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000003", + "reason_codes": ["UNKNOWN_ASSESSMENT_STATUS"] + } + ] + }, + { + "name": "absent-check-receipt", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": false, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000003", + "reason_codes": ["CHECK_RECEIPT_ABSENT"] + } + ] + }, + { + "name": "unresolved-check-receipt", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "UNRESOLVED", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000003", + "reason_codes": ["CHECKS_UNRESOLVED"] + } + ] + }, + { + "name": "unknown-check-status", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "FUTURE_CHECK", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000003", + "reason_codes": ["CHECKS_UNRESOLVED"] + } + ] + }, + { + "name": "check-gating-unresolved", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [ + { + "name": "example", + "outcome": "UNRESOLVED", + "lifecycle": "GATING", + "files": [] + } + ] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000003", + "reason_codes": ["CHECKS_UNRESOLVED"] + } + ] + }, + { + "name": "check-shadow-blocked", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [ + { + "name": "example", + "outcome": "BLOCKED", + "lifecycle": "SHADOW", + "files": [] + } + ] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "COMPLETED", + "gaps": [] + }, + { + "name": "evidence-gap", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + }, + "release_evidence_gap": "RELEASE_SET_UNAVAILABLE" + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000003", + "reason_codes": ["RELEASE_SET_UNAVAILABLE"] + } + ] + }, + { + "name": "assessment-kind", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + }, + "incompleteness_kind": "EVIDENCE_UNAVAILABLE" + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000003", + "reason_codes": ["EVIDENCE_UNAVAILABLE"] + } + ] + }, + { + "name": "combined-gaps", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": false, + "status": "READY", + "families": [] + }, + "reason_codes": ["OUT_OF_CREDITS"], + "incompleteness_kind": "MODEL_BUDGET_EXHAUSTED", + "release_evidence_gap": "RELEASE_SET_UNAVAILABLE" + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000003", + "reason_codes": [ + "OUT_OF_CREDITS", + "MODEL_BUDGET_EXHAUSTED", + "RELEASE_SET_UNAVAILABLE", + "CHECK_RECEIPT_ABSENT" + ] + } + ] + }, + { + "name": "assessment-count-0", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 0, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": null, + "reason_codes": ["ASSESSMENT_HISTORY_UNAVAILABLE"] + } + ] + }, + { + "name": "assessment-count-2", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 2, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": null, + "reason_codes": ["ASSESSMENT_HISTORY_UNAVAILABLE"] + } + ] + }, + { + "name": "missing-environment-history", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": null, + "reason_codes": ["ASSESSMENT_HISTORY_UNAVAILABLE"] + } + ] + }, + { + "name": "code-only-completed", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 0, + "environment_display_names": [], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "code_assessment": { + "id": "00000000-0000-7000-8000-000000000005", + "status": "COMPLETED", + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "findings": [], + "incompleteness_kind": null + } + }, + "outcome": "COMPLETED", + "gaps": [] + }, + { + "name": "code-missing", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 0, + "environment_display_names": [], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": null, + "reason_codes": ["CODE_ASSESSMENT_UNAVAILABLE"] + } + ] + }, + { + "name": "code-withheld", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 0, + "environment_display_names": [], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "code_assessment": { + "id": "00000000-0000-7000-8000-000000000005", + "status": "COMPLETED", + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "findings": [ + { + "id": "00000000-0000-7000-8000-000000000006", + "severity": "SERIOUS", + "risk_domain": "[withheld: environment value]", + "claim": "[withheld: environment value]", + "impact": "[withheld: environment value]", + "symbols": [], + "lifecycle_state": "NEW", + "evidence_refs": [], + "comment_reactions": [], + "rule_refs": [] + } + ], + "incompleteness_kind": null + } + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": null, + "reason_codes": ["CODE_ASSESSMENT_UNAVAILABLE"] + } + ] + }, + { + "name": "code-other-head", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 0, + "environment_display_names": [], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "code_assessment": { + "id": "00000000-0000-7000-8000-000000000005", + "status": "COMPLETED", + "head_commit_sha": "cccccccccccccccccccccccccccccccccccccccc", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "findings": [], + "incompleteness_kind": null + } + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": null, + "reason_codes": ["CODE_ASSESSMENT_UNAVAILABLE"] + } + ] + }, + { + "name": "code-other-base", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 0, + "environment_display_names": [], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "code_assessment": { + "id": "00000000-0000-7000-8000-000000000005", + "status": "COMPLETED", + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "cccccccccccccccccccccccccccccccccccccccc", + "findings": [], + "incompleteness_kind": null + } + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": null, + "reason_codes": ["CODE_ASSESSMENT_UNAVAILABLE"] + } + ] + }, + { + "name": "code-unpinned-base", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 0, + "environment_display_names": [], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": null, + "code_assessment": { + "id": "00000000-0000-7000-8000-000000000005", + "status": "COMPLETED", + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "findings": [], + "incompleteness_kind": null + } + }, + "outcome": "COMPLETED", + "gaps": [] + }, + { + "name": "code-unpinned-head", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 0, + "environment_display_names": [], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": null, + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "code_assessment": { + "id": "00000000-0000-7000-8000-000000000005", + "status": "COMPLETED", + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "findings": [], + "incompleteness_kind": null + } + }, + "outcome": "COMPLETED", + "gaps": [] + }, + { + "name": "code-case-insensitive-commits", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 0, + "environment_display_names": [], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "code_assessment": { + "id": "00000000-0000-7000-8000-000000000005", + "status": "COMPLETED", + "head_commit_sha": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "base_commit_sha": "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB", + "findings": [], + "incompleteness_kind": null + } + }, + "outcome": "COMPLETED", + "gaps": [] + }, + { + "name": "code-incomplete", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 0, + "environment_display_names": [], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "code_assessment": { + "id": "00000000-0000-7000-8000-000000000005", + "status": "INCOMPLETE", + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "findings": [], + "incompleteness_kind": null + } + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000005", + "reason_codes": ["CODE_ASSESSMENT_STATE_UNAVAILABLE"] + } + ] + }, + { + "name": "code-evidence-gap", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 0, + "environment_display_names": [], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "code_assessment": { + "id": "00000000-0000-7000-8000-000000000005", + "status": "COMPLETED", + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "findings": [], + "incompleteness_kind": "EVIDENCE_UNAVAILABLE" + } + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000005", + "reason_codes": ["EVIDENCE_UNAVAILABLE"] + } + ] + }, + { + "name": "code-excluded", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 0, + "environment_display_names": [], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "code_assessment": { + "id": "00000000-0000-7000-8000-000000000005", + "status": "EXCLUDED", + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "findings": [], + "incompleteness_kind": null + } + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000005", + "reason_codes": ["CODE_ASSESSMENT_STATE_UNAVAILABLE"] + } + ] + }, + { + "name": "complete-environment-with-partial-code", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 1, + "environment_display_names": ["production"], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [ + { + "id": "00000000-0000-7000-8000-000000000003", + "environment_display_name": "production", + "status": "COMPLETED", + "domains": [], + "findings": [], + "checks": { + "receipt_recorded": true, + "status": "READY", + "families": [] + } + } + ], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "code_assessment": { + "id": "00000000-0000-7000-8000-000000000005", + "status": "INCOMPLETE", + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "findings": [], + "incompleteness_kind": null + } + }, + "outcome": "COMPLETED", + "gaps": [] + } + ] +} diff --git a/tests/test_http.py b/tests/test_http.py index c392df41..5e2b0e18 100644 --- a/tests/test_http.py +++ b/tests/test_http.py @@ -6,6 +6,8 @@ import json import logging import socket +import subprocess +import sys import threading import time import tomllib @@ -16,6 +18,7 @@ from pathlib import Path from typing import Any from urllib.parse import parse_qs, urlsplit +from uuid import UUID import httpx import pytest @@ -73,6 +76,7 @@ Client = ProoflineClient | AsyncProoflineClient MODES = pytest.mark.parametrize("mode", ["sync", "async"]) +STRUCTURED_QUERY = '(status:COMPLETED OR status:FAILED) AND -author:"release bot"' @asynccontextmanager @@ -209,11 +213,21 @@ def respond(request: Request, index: int) -> Reply: with Server(respond) as server: async with session(mode, server.url) as client: calls = [ - ("list_reviews", (ORG,), {"limit": 7, "repository": REPOSITORY}), + ( + "list_reviews", + (ORG,), + {"limit": 7, "repository": REPOSITORY, "query": STRUCTURED_QUERY}, + ), ( "list_pull_request_reviews", (ORG, "repo/name", 42), - {"filters": {"repository": REPOSITORY, "search": "text & space"}}, + { + "filters": { + "repository": REPOSITORY, + "search": "text & space", + "query": STRUCTURED_QUERY, + } + }, ), ("get_pull_request_review", (ORG, "repo/name", 42, 3), {}), ("get_deployment_review", (ORG, "key/with?query"), {}), @@ -261,10 +275,12 @@ def respond(request: Request, index: int) -> Reply: assert parse_qs(urlsplit(server.requests[0].path).query) == { "limit": ["7"], "repository": [str(REPOSITORY)], + "query": [STRUCTURED_QUERY], } assert parse_qs(urlsplit(server.requests[1].path).query) == { "repository": [str(REPOSITORY)], "search": ["text & space"], + "query": [STRUCTURED_QUERY], } bodies = [ @@ -794,7 +810,7 @@ async def test_wait_retains_evidence_gaps_after_running_review( assert result.review_url == f"{server.url}/orgs/by-id/{ORG}/reviews/{REVIEW}" gap = result.gaps[0] assert gap.assessment_id == ASSESSMENT - assert gap.reason_codes == ("WORLD_UNAVAILABLE", "CHECK_RECEIPT_UNAVAILABLE") + assert gap.reason_codes == ("WORLD_UNAVAILABLE", "WORLD", PRIVATE, "CHECKS_UNRESOLVED") assert gap.incompleteness_kind == "WORLD" assert gap.release_evidence_gap == PRIVATE assert gap.checks[0].unresolved_reason == "UNSUPPORTED" @@ -846,7 +862,7 @@ async def test_code_only_outcomes_retain_recorded_kind_and_env_precedence( assert result.gaps[0].incompleteness_kind == kind assert result.gaps[0].checks == () if kind: - assert result.gaps[0].reason_codes == () + assert result.gaps[0].reason_codes == (kind,) else: assert expected == "COMPLETED" assert PRIVATE not in repr(result) @@ -1315,10 +1331,14 @@ def resolve(host: Any, port: Any, *args: Any, **kwargs: Any) -> Any: @MODES async def test_cursor_pagination_preserves_filters_and_refuses_cycles_or_bounds(mode: str) -> None: def respond(request: Request, index: int) -> Reply: + assert urlsplit(request.path).path == f"/api/v1/organizations/{ORG}/reviews" + assert request.headers["Authorization"] == f"Bearer {TOKEN}" query = parse_qs(urlsplit(request.path).query) assert query["repository"] == [str(REPOSITORY)] assert query["status"] == ["COMPLETED"] assert query["limit"] == ["2"] + assert query["query"] == [STRUCTURED_QUERY] + assert query["search"] == ["text & space"] if index == 0: assert "cursor" not in query else: @@ -1330,7 +1350,14 @@ def respond(request: Request, index: int) -> Reply: with Server(respond) as server: async with session(mode, server.url) as client: items = await collect( - client, page_size=2, filters={"repository": REPOSITORY, "status": "COMPLETED"} + client, + page_size=2, + filters={ + "repository": REPOSITORY, + "status": "COMPLETED", + "query": STRUCTURED_QUERY, + "search": "text & space", + }, ) assert [item.id for item in items] == [REVIEW, REVIEW] assert len(server.requests) == 2 @@ -1533,3 +1560,249 @@ async def invoke(name: str, *args: Any, **kwargs: Any) -> Any: with pytest.raises(ProoflineError): await invoke("request_reverification", str(REVIEW), [str(REVIEW)], "a" * 40) assert len(observed) == 5 + + +@MODES +async def test_shared_review_outcome_contract(mode: str, monkeypatch: pytest.MonkeyPatch) -> None: + Clock(monkeypatch) + fixture = json.loads((Path(__file__).parent / "fixtures/review-outcomes.json").read_text()) + for case in fixture["cases"]: + body = case["review"] + pending = case["outcome"] is None + settled = next( + item["review"] for item in fixture["cases"] if item["name"] == "review-completed" + ) + with Server( + lambda request, index: Reply(body=settled if pending and index else body) + ) as server: + async with session(mode, server.url) as client: + result = await call(client, "wait_for_review", ORG, UUID(body["id"])) + assert result.status == ("COMPLETED" if pending else case["outcome"]), case["name"] + assert len(server.requests) == (2 if pending else 1), case["name"] + assert [ + { + "assessment_id": str(gap.assessment_id) if gap.assessment_id else None, + "reason_codes": list(gap.reason_codes), + } + for gap in result.gaps + ] == case["gaps"], case["name"] + + +@MODES +async def test_mcp_per_call_organizations_and_refusals(mode: str) -> None: + first, second, foreign = (str(ORG), str(REVIEW), str(ASSESSMENT)) + admitted = [first, second] + observed: list[dict[str, Any]] = [] + concurrent = False + overlap = threading.Barrier(2) + + def respond(request: Request, index: int) -> Reply: + assert request.path == "/mcp" + assert request.headers["Authorization"] == f"Bearer {TOKEN}" + body = json.loads(request.body) + if body["method"] == "initialize": + return Reply( + body={"jsonrpc": "2.0", "id": 1, "result": {"protocolVersion": "2025-11-25"}} + ) + assert request.headers["MCP-Protocol-Version"] == "2025-11-25" + if body["method"] == "notifications/initialized": + return Reply(status=202, body=b"") + params = body["params"] + observed.append(params) + if params["name"] == "list_organizations": + assert params["arguments"] == {} + result: dict[str, Any] = { + "content": [], + "structuredContent": { + "ok": True, + "data": {"organizations": [{"organization_id": value} for value in admitted]}, + }, + } + else: + if concurrent: + # Neither response completes until both tool calls have arrived. + overlap.wait(timeout=5) + target = params["arguments"].get("organization_id") + code = ( + "ORGANIZATION_REQUIRED" + if target is None + else "NOT_AUTHORIZED" + if target not in admitted + else None + ) + payload = ( + { + "ok": False, + "error": {"code": code, "message": "Target refused", "retryable": False}, + } + if code + else {"ok": True, "data": {"organization_id": target}} + ) + result = { + "isError": code is not None, + "content": [{"type": "text", "text": json.dumps(payload)}], + "structuredContent": payload, + } + return Reply(body={"jsonrpc": "2.0", "id": 2, "result": result}) + + with Server(respond) as server: + async with session(mode, server.url) as client: + + async def invoke(group: str, name: str, *args: Any, **kwargs: Any) -> Any: + result = getattr(getattr(client, group), name)(*args, **kwargs) + return await result if inspect.isawaitable(result) else result + + discovery = await invoke("mcp", "list_organizations") + assert discovery["structuredContent"]["data"]["organizations"] == [ + {"organization_id": first}, + {"organization_id": second}, + ] + cases = [ + ( + "knowledge", + "list_wiki_pages", + ("owner/name",), + {"commit": "a" * 40}, + {"repository": "owner/name", "commit": "a" * 40}, + ), + ( + "knowledge", + "get_wiki_page", + ("owner/name", "index"), + {}, + {"repository": "owner/name", "page_key": "index"}, + ), + ( + "knowledge", + "ask_codebase", + ("owner/name", "How?"), + {}, + {"repository": "owner/name", "question": "How?"}, + ), + ( + "knowledge", + "get_architecture_document", + (str(REVIEW),), + {}, + {"environment_id": str(REVIEW)}, + ), + ("knowledge", "get_plan", (str(REVIEW),), {}, {"plan_id": str(REVIEW)}), + ( + "knowledge", + "start_plan_implementation", + (str(REVIEW),), + {}, + {"plan_id": str(REVIEW)}, + ), + ( + "knowledge", + "get_plan_implementation", + (str(REVIEW),), + {}, + {"implementation_id": str(REVIEW)}, + ), + ( + "fixes", + "list_open_findings", + ("owner/name", 7), + {}, + {"repository": "owner/name", "pull_request_number": 7}, + ), + ("fixes", "get_fix_context", (str(REVIEW),), {}, {"finding_id": str(REVIEW)}), + ( + "fixes", + "request_reverification", + (str(REVIEW), [str(REVIEW)], "a" * 40), + {"note": "fixed"}, + { + "review_id": str(REVIEW), + "finding_ids": [str(REVIEW)], + "commit_sha": "a" * 40, + "note": "fixed", + }, + ), + ("fixes", "get_reverification", (str(REVIEW),), {}, {"request_id": str(REVIEW)}), + ] + for group, name, args, kwargs, expected in cases: + for target in (first, second): + answer = await invoke(group, name, *args, **kwargs, organization_id=target) + assert answer["structuredContent"]["data"]["organization_id"] == target + assert observed[-1] == { + "name": name, + "arguments": {**expected, "organization_id": target}, + } + + if mode == "async": + concurrent = True + answers = await asyncio.gather( + invoke("knowledge", "get_plan", str(REVIEW), organization_id=first), + invoke("fixes", "get_fix_context", str(REVIEW), organization_id=second), + ) + concurrent = False + assert [ + answer["structuredContent"]["data"]["organization_id"] for answer in answers + ] == [first, second] + + async def refused(target: str | None, code: str) -> None: + before = len(observed) + kwargs = {} if target is None else {"organization_id": target} + answer = await invoke( + "fixes", + "request_reverification", + str(REVIEW), + [str(REVIEW)], + "a" * 40, + **kwargs, + ) + assert answer["isError"] is True + assert answer["structuredContent"]["error"]["code"] == code + assert json.loads(answer["content"][0]["text"]) == answer["structuredContent"] + assert len(observed) == before + 1 + assert observed[-1]["arguments"].get("organization_id") == target + assert ("organization_id" in observed[-1]["arguments"]) == (target is not None) + + # An earlier explicit target must never become an implicit default. + await refused(None, "ORGANIZATION_REQUIRED") + await refused(foreign, "NOT_AUTHORIZED") + admitted.remove(first) + await refused(first, "NOT_AUTHORIZED") + remaining = await invoke("mcp", "list_organizations") + assert remaining["structuredContent"]["data"]["organizations"] == [ + {"organization_id": second} + ] + answer = await invoke("fixes", "get_fix_context", str(REVIEW), organization_id=second) + assert answer["structuredContent"]["data"]["organization_id"] == second + assert len(server.requests) == len(observed) * 3 + + +def test_mcp_public_types_accept_legacy_and_targeted_calls(tmp_path: Path) -> None: + # Compile consumer code through the public entry point; dynamic HTTP tests + # cannot catch a missing keyword in just one sync/async method signature. + lines = ["from proofline import ProoflineClient, AsyncProoflineClient, KnowledgeResult"] + calls = [ + 'knowledge.list_wiki_pages("owner/name", commit="a" * 40)', + 'knowledge.get_wiki_page("owner/name", "index")', + 'knowledge.ask_codebase("owner/name", "How?")', + 'knowledge.get_architecture_document("environment-id")', + 'knowledge.get_plan("plan-id")', + 'knowledge.start_plan_implementation("plan-id")', + 'knowledge.get_plan_implementation("implementation-id")', + 'fixes.list_open_findings("owner/name", 7)', + 'fixes.get_fix_context("finding-id")', + 'fixes.request_reverification("review-id", ["finding-id"], "a" * 40, note="fixed")', + 'fixes.get_reverification("request-id")', + ] + for prefix, kind, wait in [ + ("", "ProoflineClient", ""), + ("async ", "AsyncProoflineClient", "await "), + ]: + lines.append(f"{prefix}def use_{kind}(client: {kind}) -> None:") + lines.append(f" result: KnowledgeResult = {wait}client.mcp.list_organizations()") + for expression in calls: + lines.append(f" result = {wait}client.{expression}") + targeted = expression[:-1] + ', organization_id="00000000-0000-7000-8000-000000000001")' + lines.append(f" result = {wait}client.{targeted}") + fixture = tmp_path / "mcp_types.py" + fixture.write_text("\n".join(lines)) + # Use the same mypy configuration as the SDK qualification gate. + subprocess.run([sys.executable, "-m", "mypy", str(fixture)], check=True) From 5682d13cc2708c86013e56f76f381ddbbf6166d7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 14:11:15 +0000 Subject: [PATCH 12/38] Update distribution --- openapi.public.json | 4 ++-- proofline/_generated/models/ci_failure_line.py | 2 +- proofline/_generated/models/review_open_items.py | 4 ++-- proofline/_transport.py | 2 +- pyproject.toml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/openapi.public.json b/openapi.public.json index 7a04561f..a26da522 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -549,7 +549,7 @@ "type": "string" }, "CiFailureLine": { - "description": "One failed CI job as the Check states it.", + "description": "One failed CI job in the observation.", "properties": { "attribution": { "allOf": [ @@ -4263,7 +4263,7 @@ "type": "integer" }, "ci_failures": { - "description": "Failed CI jobs diagnosed on the reviewed head, the newest diagnosed\n attempt of each run, in diagnosis order. The Check states each one;\n none is a Proofline open item. Absent when no job was diagnosed.", + "description": "Failed CI jobs diagnosed on the reviewed head, the newest diagnosed\n attempt of each run, in diagnosis order. The pull-request Check counts\n them; none is a Proofline open item. Absent when no job was diagnosed.", "items": { "$ref": "#/components/schemas/CiFailureLine" }, diff --git a/proofline/_generated/models/ci_failure_line.py b/proofline/_generated/models/ci_failure_line.py index 0e7431cc..d0d682c7 100644 --- a/proofline/_generated/models/ci_failure_line.py +++ b/proofline/_generated/models/ci_failure_line.py @@ -14,7 +14,7 @@ @_attrs_define class CiFailureLine: - """One failed CI job as the Check states it. + """One failed CI job in the observation. Attributes: attribution (CiFailureAttribution): What the control plane records as a failure's cause. diff --git a/proofline/_generated/models/review_open_items.py b/proofline/_generated/models/review_open_items.py index f01499c2..5a3b5ee8 100644 --- a/proofline/_generated/models/review_open_items.py +++ b/proofline/_generated/models/review_open_items.py @@ -44,8 +44,8 @@ class ReviewOpenItems: review_status (OpenItemsReviewStatus): threads (OpenItemsThreadsType0 | OpenItemsThreadsType1): ci_failures (list[CiFailureLine] | Unset): Failed CI jobs diagnosed on the reviewed head, the newest diagnosed - attempt of each run, in diagnosis order. The Check states each one; - none is a Proofline open item. Absent when no job was diagnosed. + attempt of each run, in diagnosis order. The pull-request Check counts + them; none is a Proofline open item. Absent when no job was diagnosed. ci_failures_omitted (int | Unset): Diagnosed failed CI jobs on the reviewed head beyond `ci_failures`. ci_runs_pending (int | Unset): Failed CI run attempts on the reviewed head whose diagnosis is queued or running, so none of their jobs has a line yet. diff --git a/proofline/_transport.py b/proofline/_transport.py index e4873f99..ff0719fe 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -22,7 +22,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "3.3.0" +VERSION = "3.3.1" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index 350e97e4..b4a57b24 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "3.3.0" +version = "3.3.1" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" From 1ae89a7db5c8fb636a1c89d0d2a0bf4149f973a5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2026 06:06:30 +0000 Subject: [PATCH 13/38] Update distribution --- openapi.public.json | 44 +----------- proofline/_generated/models/__init__.py | 4 -- proofline/_generated/models/run_now_mode.py | 1 - .../models/run_now_refusal_view_type_10.py | 72 ------------------- .../models/run_now_refusal_view_type_11.py | 66 ----------------- .../_generated/models/run_now_refused.py | 46 ++---------- .../_generated/models/run_now_request.py | 24 +------ proofline/_transport.py | 2 +- pyproject.toml | 2 +- 9 files changed, 12 insertions(+), 249 deletions(-) delete mode 100644 proofline/_generated/models/run_now_refusal_view_type_10.py delete mode 100644 proofline/_generated/models/run_now_refusal_view_type_11.py diff --git a/openapi.public.json b/openapi.public.json index a26da522..d06d7a71 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -4942,8 +4942,7 @@ "description": "Whether an explicit request may reuse a settled review of the live head.", "enum": [ "EXISTING_OR_NEW", - "FULL", - "EXTENDED" + "FULL" ], "type": "string" }, @@ -5111,36 +5110,6 @@ "reason" ], "type": "object" - }, - { - "description": "Deep review policy, funding or worker availability prevents admission.", - "properties": { - "detail": { - "type": "string" - }, - "reason": { - "const": "DEEP_REVIEW_UNAVAILABLE", - "type": "string" - } - }, - "required": [ - "reason", - "detail" - ], - "type": "object" - }, - { - "description": "The existing review already retains a different focus.", - "properties": { - "reason": { - "const": "DEEP_REVIEW_FOCUS_CONFLICT", - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" } ] }, @@ -5188,20 +5157,13 @@ "additionalProperties": false, "description": "An empty body keeps the run-now behavior existing clients request.", "properties": { - "focus_text": { - "description": "Optional investigation focus for EXTENDED, trimmed and frozen at admission.\n Limited to 500 UTF-16 code units.", - "type": [ - "string", - "null" - ] - }, "mode": { "allOf": [ { "$ref": "#/components/schemas/RunNowMode" } ], - "description": "`EXISTING_OR_NEW`, the default, returns any review that already owns the live head.\n `FULL` returns a pending or running review of that head or starts a new one.\n `EXTENDED` admits one funded Deep Review for that head, with optional focus." + "description": "`EXISTING_OR_NEW`, the default, returns any review that already owns the live head.\n `FULL` returns a pending or running review of that head or starts a new one." } }, "type": "object" @@ -5831,7 +5793,7 @@ }, "info": { "title": "Proofline Review API", - "version": "3.3.0" + "version": "4.0.0" }, "openapi": "3.1.0", "paths": { diff --git a/proofline/_generated/models/__init__.py b/proofline/_generated/models/__init__.py index fe47c068..113b376d 100644 --- a/proofline/_generated/models/__init__.py +++ b/proofline/_generated/models/__init__.py @@ -134,8 +134,6 @@ from .run_now_refusal_view_type_7 import RunNowRefusalViewType7 from .run_now_refusal_view_type_8 import RunNowRefusalViewType8 from .run_now_refusal_view_type_9 import RunNowRefusalViewType9 -from .run_now_refusal_view_type_10 import RunNowRefusalViewType10 -from .run_now_refusal_view_type_11 import RunNowRefusalViewType11 from .run_now_refused import RunNowRefused from .run_now_request import RunNowRequest from .run_now_response import RunNowResponse @@ -285,8 +283,6 @@ "RunNowMode", "RunNowRefusalViewType0", "RunNowRefusalViewType1", - "RunNowRefusalViewType10", - "RunNowRefusalViewType11", "RunNowRefusalViewType2", "RunNowRefusalViewType3", "RunNowRefusalViewType4", diff --git a/proofline/_generated/models/run_now_mode.py b/proofline/_generated/models/run_now_mode.py index 693f4bc5..9fdac7a3 100644 --- a/proofline/_generated/models/run_now_mode.py +++ b/proofline/_generated/models/run_now_mode.py @@ -3,7 +3,6 @@ class RunNowMode(StrEnum): EXISTING_OR_NEW = "EXISTING_OR_NEW" - EXTENDED = "EXTENDED" FULL = "FULL" def __str__(self) -> str: diff --git a/proofline/_generated/models/run_now_refusal_view_type_10.py b/proofline/_generated/models/run_now_refusal_view_type_10.py deleted file mode 100644 index 2c7ce041..00000000 --- a/proofline/_generated/models/run_now_refusal_view_type_10.py +++ /dev/null @@ -1,72 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, Literal, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="RunNowRefusalViewType10") - - -@_attrs_define -class RunNowRefusalViewType10: - """Deep review policy, funding or worker availability prevents admission. - - Attributes: - detail (str): - reason (Literal['DEEP_REVIEW_UNAVAILABLE']): - """ - - detail: str - reason: Literal["DEEP_REVIEW_UNAVAILABLE"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - detail = self.detail - - reason = self.reason - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "detail": detail, - "reason": reason, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - detail = d.pop("detail") - - reason = cast(Literal["DEEP_REVIEW_UNAVAILABLE"], d.pop("reason")) - if reason != "DEEP_REVIEW_UNAVAILABLE": - raise ValueError(f"reason must match const 'DEEP_REVIEW_UNAVAILABLE', got '{reason}'") - - run_now_refusal_view_type_10 = cls( - detail=detail, - reason=reason, - ) - - run_now_refusal_view_type_10.additional_properties = d - return run_now_refusal_view_type_10 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/run_now_refusal_view_type_11.py b/proofline/_generated/models/run_now_refusal_view_type_11.py deleted file mode 100644 index 26a66201..00000000 --- a/proofline/_generated/models/run_now_refusal_view_type_11.py +++ /dev/null @@ -1,66 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, Literal, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="RunNowRefusalViewType11") - - -@_attrs_define -class RunNowRefusalViewType11: - """The existing review already retains a different focus. - - Attributes: - reason (Literal['DEEP_REVIEW_FOCUS_CONFLICT']): - """ - - reason: Literal["DEEP_REVIEW_FOCUS_CONFLICT"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - reason = self.reason - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "reason": reason, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - reason = cast(Literal["DEEP_REVIEW_FOCUS_CONFLICT"], d.pop("reason")) - if reason != "DEEP_REVIEW_FOCUS_CONFLICT": - raise ValueError( - f"reason must match const 'DEEP_REVIEW_FOCUS_CONFLICT', got '{reason}'" - ) - - run_now_refusal_view_type_11 = cls( - reason=reason, - ) - - run_now_refusal_view_type_11.additional_properties = d - return run_now_refusal_view_type_11 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/proofline/_generated/models/run_now_refused.py b/proofline/_generated/models/run_now_refused.py index a2e6cecb..095b8f4c 100644 --- a/proofline/_generated/models/run_now_refused.py +++ b/proofline/_generated/models/run_now_refused.py @@ -17,8 +17,6 @@ from ..models.run_now_refusal_view_type_7 import RunNowRefusalViewType7 from ..models.run_now_refusal_view_type_8 import RunNowRefusalViewType8 from ..models.run_now_refusal_view_type_9 import RunNowRefusalViewType9 - from ..models.run_now_refusal_view_type_10 import RunNowRefusalViewType10 - from ..models.run_now_refusal_view_type_11 import RunNowRefusalViewType11 T = TypeVar("T", bound="RunNowRefused") @@ -38,10 +36,10 @@ class RunNowRefused: Attributes: detail (str): One sentence naming the condition and the setting to change, for a reader with no link to follow. - refusal (RunNowRefusalViewType0 | RunNowRefusalViewType1 | RunNowRefusalViewType10 | RunNowRefusalViewType11 | - RunNowRefusalViewType2 | RunNowRefusalViewType3 | RunNowRefusalViewType4 | RunNowRefusalViewType5 | - RunNowRefusalViewType6 | RunNowRefusalViewType7 | RunNowRefusalViewType8 | RunNowRefusalViewType9): Why a run- - now request created nothing, each reason with what the page + refusal (RunNowRefusalViewType0 | RunNowRefusalViewType1 | RunNowRefusalViewType2 | RunNowRefusalViewType3 | + RunNowRefusalViewType4 | RunNowRefusalViewType5 | RunNowRefusalViewType6 | RunNowRefusalViewType7 | + RunNowRefusalViewType8 | RunNowRefusalViewType9): Why a run-now request created nothing, each reason with what + the page needs to link the setting to change. repository_name (str): The repository's name within its owner, as its pages are addressed. status (int): Always 400. @@ -52,8 +50,6 @@ class RunNowRefused: refusal: ( RunNowRefusalViewType0 | RunNowRefusalViewType1 - | RunNowRefusalViewType10 - | RunNowRefusalViewType11 | RunNowRefusalViewType2 | RunNowRefusalViewType3 | RunNowRefusalViewType4 @@ -78,8 +74,6 @@ def to_dict(self) -> dict[str, Any]: from ..models.run_now_refusal_view_type_6 import RunNowRefusalViewType6 # noqa: PLC0415 from ..models.run_now_refusal_view_type_7 import RunNowRefusalViewType7 # noqa: PLC0415 from ..models.run_now_refusal_view_type_8 import RunNowRefusalViewType8 # noqa: PLC0415 - from ..models.run_now_refusal_view_type_9 import RunNowRefusalViewType9 # noqa: PLC0415 - from ..models.run_now_refusal_view_type_10 import RunNowRefusalViewType10 # noqa: PLC0415 detail = self.detail @@ -102,10 +96,6 @@ def to_dict(self) -> dict[str, Any]: refusal = self.refusal.to_dict() elif isinstance(self.refusal, RunNowRefusalViewType8): refusal = self.refusal.to_dict() - elif isinstance(self.refusal, RunNowRefusalViewType9): - refusal = self.refusal.to_dict() - elif isinstance(self.refusal, RunNowRefusalViewType10): - refusal = self.refusal.to_dict() else: refusal = self.refusal.to_dict() @@ -141,8 +131,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.run_now_refusal_view_type_7 import RunNowRefusalViewType7 # noqa: PLC0415 from ..models.run_now_refusal_view_type_8 import RunNowRefusalViewType8 # noqa: PLC0415 from ..models.run_now_refusal_view_type_9 import RunNowRefusalViewType9 # noqa: PLC0415 - from ..models.run_now_refusal_view_type_10 import RunNowRefusalViewType10 # noqa: PLC0415 - from ..models.run_now_refusal_view_type_11 import RunNowRefusalViewType11 # noqa: PLC0415 d = dict(src_dict) detail = d.pop("detail") @@ -152,8 +140,6 @@ def _parse_refusal( ) -> ( RunNowRefusalViewType0 | RunNowRefusalViewType1 - | RunNowRefusalViewType10 - | RunNowRefusalViewType11 | RunNowRefusalViewType2 | RunNowRefusalViewType3 | RunNowRefusalViewType4 @@ -253,31 +239,11 @@ def _parse_refusal( return componentsschemas_run_now_refusal_view_type_8 except (TypeError, ValueError, AttributeError, KeyError): pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_run_now_refusal_view_type_9 = RunNowRefusalViewType9.from_dict( - data - ) - - return componentsschemas_run_now_refusal_view_type_9 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_run_now_refusal_view_type_10 = RunNowRefusalViewType10.from_dict( - data - ) - - return componentsschemas_run_now_refusal_view_type_10 - except (TypeError, ValueError, AttributeError, KeyError): - pass if not isinstance(data, dict): raise TypeError() - componentsschemas_run_now_refusal_view_type_11 = RunNowRefusalViewType11.from_dict(data) + componentsschemas_run_now_refusal_view_type_9 = RunNowRefusalViewType9.from_dict(data) - return componentsschemas_run_now_refusal_view_type_11 + return componentsschemas_run_now_refusal_view_type_9 refusal = _parse_refusal(d.pop("refusal")) diff --git a/proofline/_generated/models/run_now_request.py b/proofline/_generated/models/run_now_request.py index 32eb0a19..c3ce3a1c 100644 --- a/proofline/_generated/models/run_now_request.py +++ b/proofline/_generated/models/run_now_request.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar from attrs import define as _attrs_define @@ -16,21 +16,12 @@ class RunNowRequest: """An empty body keeps the run-now behavior existing clients request. Attributes: - focus_text (None | str | Unset): Optional investigation focus for EXTENDED, trimmed and frozen at admission. - Limited to 500 UTF-16 code units. mode (RunNowMode | Unset): Whether an explicit request may reuse a settled review of the live head. """ - focus_text: None | str | Unset = UNSET mode: RunNowMode | Unset = UNSET def to_dict(self) -> dict[str, Any]: - focus_text: None | str | Unset - if isinstance(self.focus_text, Unset): - focus_text = UNSET - else: - focus_text = self.focus_text - mode: str | Unset = UNSET if not isinstance(self.mode, Unset): mode = self.mode.value @@ -38,8 +29,6 @@ def to_dict(self) -> dict[str, Any]: field_dict: dict[str, Any] = {} field_dict.update({}) - if focus_text is not UNSET: - field_dict["focus_text"] = focus_text if mode is not UNSET: field_dict["mode"] = mode @@ -48,16 +37,6 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - - def _parse_focus_text(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - focus_text = _parse_focus_text(d.pop("focus_text", UNSET)) - _mode = d.pop("mode", UNSET) mode: RunNowMode | Unset if isinstance(_mode, Unset): @@ -66,7 +45,6 @@ def _parse_focus_text(data: object) -> None | str | Unset: mode = RunNowMode(_mode) run_now_request = cls( - focus_text=focus_text, mode=mode, ) diff --git a/proofline/_transport.py b/proofline/_transport.py index ff0719fe..a1c71951 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -22,7 +22,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "3.3.1" +VERSION = "4.0.0" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index b4a57b24..1801f53d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "3.3.1" +version = "4.0.0" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" From b48a8e79f9f9039223d6534c438b02c9fa2d9cdc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2026 12:31:47 +0000 Subject: [PATCH 14/38] Update distribution --- README.md | 18 +++++ openapi.public.json | 14 ++-- proofline/__init__.py | 3 +- proofline/_transport.py | 154 +++++++++++++++++++++++++++++++++---- pyproject.toml | 2 +- tests/test_http.py | 165 +++++++++++++++++++++++++++++++++++++++- 6 files changed, 331 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index a2ce538f..be99a7fb 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,24 @@ with ProoflineClient(os.environ["PROOFLINE_TOKEN"]) as client: When no token is passed, the clients read `PROOFLINE_TOKEN` from the environment, keep the token in memory, and redact it from diagnostic output. `AsyncProoflineClient` exposes the same methods as coroutines that you call with `await`. The [SDK guide](https://proofline.sh/docs/sdks/) and [API reference](https://proofline.sh/docs/api/) cover every operation. +## Errors and refusals + +A refused request raises `ProoflineError` with the server problem's `status`, `type`, `title` and `detail`. When a review request creates nothing, the error also carries `refusal`, whose `reason` names the setting to change, such as `NO_LINKED_ENVIRONMENT` or `ENVIRONMENT_NOT_READY`, and `repository_name`. `RunNowRefusal` names the type of `refusal`. A refusal that does not match the public contract keeps its status, `title` and `detail` with the type `urn:proofline:sdk:invalid-response` and no `refusal`. The token is redacted from every text field, and `repr` and `str` show only the status. + +```python +from proofline import ProoflineError + +try: + client.request_review(organization_id, repository_id, 12) +except ProoflineError as error: + if error.refusal is None: + raise + if error.refusal.reason == "NO_LINKED_ENVIRONMENT": + print(f"Link an environment to {error.repository_name}.") + else: + print(error.detail) +``` + ## Review exports `export_reviews` reads one CSV or NDJSON page over the bounded transport. Export tokens require `analytics:read`. diff --git a/openapi.public.json b/openapi.public.json index d06d7a71..a918bdda 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -5793,7 +5793,7 @@ }, "info": { "title": "Proofline Review API", - "version": "4.0.0" + "version": "5.0.0" }, "openapi": "3.1.0", "paths": { @@ -6305,7 +6305,7 @@ }, "400": { "content": { - "application/json": { + "application/problem+json": { "schema": { "$ref": "#/components/schemas/RunNowRefused" } @@ -6393,7 +6393,7 @@ }, "422": { "content": { - "application/json": { + "application/problem+json": { "schema": { "$ref": "#/components/schemas/CoverageRefused" } @@ -6471,7 +6471,7 @@ }, "400": { "content": { - "application/json": { + "application/problem+json": { "schema": { "$ref": "#/components/schemas/RunNowRefused" } @@ -6549,7 +6549,7 @@ }, "400": { "content": { - "application/json": { + "application/problem+json": { "schema": { "$ref": "#/components/schemas/RunNowRefused" } @@ -6636,7 +6636,7 @@ }, "400": { "content": { - "application/json": { + "application/problem+json": { "schema": { "$ref": "#/components/schemas/RunNowRefused" } @@ -6771,7 +6771,7 @@ }, "400": { "content": { - "application/json": { + "application/problem+json": { "schema": { "$ref": "#/components/schemas/RunNowRefused" } diff --git a/proofline/__init__.py b/proofline/__init__.py index f9dbdb95..61bd6294 100644 --- a/proofline/__init__.py +++ b/proofline/__init__.py @@ -30,7 +30,7 @@ UploadedReport, ) from ._transport import VERSION as __version__ -from ._transport import ProoflineError +from ._transport import ProoflineError, RunNowRefusal from .client import AsyncProoflineClient, ProoflineClient, ReviewFilters from .exports import ExportDataset, ExportFormat, ExportPage from .outcomes import AssessmentGap, CheckGap, ReviewOutcome @@ -65,6 +65,7 @@ "ReviewOutcome", "ReviewPage", "RunNowMode", + "RunNowRefusal", "RunNowRequest", "RunNowResponse", "SecretStr", diff --git a/proofline/_transport.py b/proofline/_transport.py index a1c71951..86a69d99 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -7,22 +7,38 @@ import os import re from asyncio import sleep as async_sleep -from collections.abc import AsyncIterator, Generator, Iterator +from collections.abc import AsyncIterator, Callable, Generator, Iterator from contextlib import contextmanager from contextvars import ContextVar from datetime import UTC, datetime from email.utils import parsedate_to_datetime from time import monotonic, sleep +from typing import Any, TypeAlias, cast from urllib.parse import urlsplit import anyio import httpx from pydantic import SecretStr +from ._generated.models import ( + RefusedEnvironment, + RunNowRefusalViewType0, + RunNowRefusalViewType1, + RunNowRefusalViewType2, + RunNowRefusalViewType3, + RunNowRefusalViewType4, + RunNowRefusalViewType5, + RunNowRefusalViewType6, + RunNowRefusalViewType7, + RunNowRefusalViewType8, + RunNowRefusalViewType9, + RunNowRefused, +) +from ._generated.types import Unset from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "4.0.0" +VERSION = "5.0.0" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" @@ -35,6 +51,19 @@ rf"{WEEKDAY} {MONTH} [ \d]\d \d{{2}}:\d{{2}}:\d{{2}} \d{{4}}", ) ) +# Each variant has a literal `reason`; the other fields depend on it. +RunNowRefusal: TypeAlias = ( + RunNowRefusalViewType0 + | RunNowRefusalViewType1 + | RunNowRefusalViewType2 + | RunNowRefusalViewType3 + | RunNowRefusalViewType4 + | RunNowRefusalViewType5 + | RunNowRefusalViewType6 + | RunNowRefusalViewType7 + | RunNowRefusalViewType8 + | RunNowRefusalViewType9 +) DEADLINE: ContextVar[float | None] = ContextVar("proofline_request_deadline", default=None) @@ -49,12 +78,29 @@ def auth_flow(self, request: httpx.Request) -> Generator[httpx.Request, httpx.Re class ProoflineError(Exception): - """An RFC 9457 problem. Inspect detail explicitly; repr contains only status.""" - - def __init__(self, status: int, type: str, detail: str) -> None: + """An RFC 9457 problem. Inspect detail explicitly; repr contains only status. + + title names the server's problem class. A refused review request also + carries the typed refusal, whose reason names the setting to change, and + the repository_name it refers to. + """ + + def __init__( + self, + status: int, + type: str, + detail: str, + *, + title: str | None = None, + refusal: RunNowRefusal | None = None, + repository_name: str | None = None, + ) -> None: self.status = status self.type = type self.detail = detail + self.title = title + self.refusal = refusal + self.repository_name = repository_name super().__init__(f"Proofline request failed (HTTP {status}).") def __repr__(self) -> str: @@ -184,21 +230,99 @@ def retry_delay(value: str | None, attempt: int) -> float | None: return delay if math.isfinite(delay) and delay <= 60 else None +def redacted(value: object, raw: str) -> object: + if isinstance(value, str): + return value.replace(raw, "[redacted]") + if isinstance(value, list): + return [redacted(item, raw) for item in value] + if isinstance(value, dict): + return {key: redacted(item, raw) for key, item in value.items()} + return value + + +def environment(value: object) -> bool: + return isinstance(value, dict) and all( + isinstance(value.get(key), str) for key in ("id", "external_key", "display_name", "status") + ) + + +def optional(value: object, check: Callable[[object], bool]) -> bool: + return value is None or check(value) + + +def text(value: object) -> bool: + return isinstance(value, str) + + +# The generated parser copies reason fields without checking their types, so +# each documented reason's fields are checked here before a refusal is typed. +REFUSAL_SHAPES: dict[str, Callable[[dict[str, Any]], bool]] = { + "TRIGGER_DISABLED": lambda view: True, + "REPOSITORY_DISABLED": lambda view: True, + "NO_LINKED_ENVIRONMENT": lambda view: True, + "ENVIRONMENT_REVIEWS_OFF": lambda view: environment(view.get("environment")), + "ENVIRONMENT_NOT_READY": lambda view: ( + environment(view.get("environment")) and optional(view.get("status_detail"), text) + ), + "ENVIRONMENT_EVIDENCE_UNAVAILABLE": lambda view: environment(view.get("environment")), + "INVALID_DELIVERY_CONFIGURATION": lambda view: ( + text(view.get("detail")) and optional(view.get("environment"), environment) + ), + "PULL_REQUEST_UNKNOWN": lambda view: True, + "AUTHOR_HAS_NO_SEAT": lambda view: True, + "PULL_REQUEST_CLOSED": lambda view: True, +} + + def problem(response: httpx.Response, token: SecretStr) -> ProoflineError: - kind = "about:blank" - detail = "Proofline returned an HTTP error without a problem document." try: body = response.json() - if isinstance(body, dict): - if isinstance(body.get("type"), str): - kind = body["type"] - if isinstance(body.get("detail"), str): - detail = body["detail"] except (ValueError, UnicodeError): - pass - raw = token.get_secret_value() + body = None + if not isinstance(body, dict): + return ProoflineError( + response.status_code, + "about:blank", + "Proofline returned an HTTP error without a problem document.", + ) + body = cast(dict[str, Any], redacted(body, token.get_secret_value())) + kind = body["type"] if isinstance(body.get("type"), str) else "about:blank" + title = body["title"] if isinstance(body.get("title"), str) else None + if isinstance(body.get("detail"), str): + detail = body["detail"] + elif title is not None: + # Logged internal errors omit detail; the problem itself still arrived. + detail = f"Proofline returned the problem {title!r} without a detail." + else: + detail = "Proofline returned an HTTP error without a problem document." + if "refusal" not in body: + return ProoflineError(response.status_code, kind, detail, title=title) + try: + view = body["refusal"] + shape = isinstance(view, dict) and REFUSAL_SHAPES.get(str(view.get("reason"))) + if not shape or not shape(view): + raise TypeError("refusal fields") + refused = RunNowRefused.from_dict(body) + if title is None or not isinstance(body.get("detail"), str): + raise TypeError("problem fields") + if not isinstance(refused.repository_name, str): + raise TypeError("repository_name") + # The generated optional parser keeps the raw value when a nested + # environment does not parse, for example an id that is not a UUID. + nested = getattr(refused.refusal, "environment", None) + if not isinstance(nested, RefusedEnvironment | Unset | None): + raise TypeError("environment") + except (KeyError, TypeError, ValueError, AttributeError): + return ProoflineError( + response.status_code, "urn:proofline:sdk:invalid-response", detail, title=title + ) return ProoflineError( - response.status_code, kind.replace(raw, "[redacted]"), detail.replace(raw, "[redacted]") + response.status_code, + kind, + detail, + title=title, + refusal=refused.refusal, + repository_name=refused.repository_name, ) diff --git a/pyproject.toml b/pyproject.toml index 1801f53d..8f642678 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "4.0.0" +version = "5.0.0" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" diff --git a/tests/test_http.py b/tests/test_http.py index 5e2b0e18..fe561591 100644 --- a/tests/test_http.py +++ b/tests/test_http.py @@ -56,6 +56,7 @@ from proofline._generated.models.finding_fix_prompt_type_0 import FindingFixPromptType0 from proofline._generated.models.finding_fix_prompt_type_1 import FindingFixPromptType1 from proofline._generated.types import UNSET +from proofline._transport import REFUSAL_SHAPES from .fixtures import ( ASSESSMENT, @@ -434,7 +435,11 @@ def respond(request: Request, index: int) -> Reply: assert (result.covered_lines, result.instrumented_lines) == (1, 2) with pytest.raises(ProoflineError) as refused: await call(client, "upload_coverage_reports", ORG, REPOSITORY, body=body) - assert refused.value.status == 422 + error = refused.value + assert (error.status, error.type) == (422, "about:blank") + assert error.title == "unprocessable coverage upload" + assert error.detail == "The coverage upload was refused." + assert (error.refusal, error.repository_name) == (None, None) assert len(server.requests) == 3 @@ -519,6 +524,164 @@ def respond(request: Request, index: int) -> Reply: assert summary.prose.notable_paths == ["src/new.py"] +CONTRACT = json.loads((Path(__file__).parents[1] / "openapi.public.json").read_text()) +REFUSAL_VARIANTS = CONTRACT["components"]["schemas"]["RunNowRefusalView"]["oneOf"] +ENVIRONMENT = { + "id": str(ASSESSMENT), + "external_key": "production", + "display_name": "Production", + "status": "PENDING", +} +COMMIT = CommitReviewRequest(base_commit_sha="b" * 40, head_commit_sha="c" * 40) +REVIEW_REQUESTS = { + "request_review": (42,), + "request_patch_review": (), + "request_file_review": (), + "request_commit_review": (), +} + + +def review_request(name: str) -> tuple[tuple[Any, ...], dict[str, Any]]: + bodies = { + "request_review": UNSET, + "request_patch_review": PatchReviewRequest( + base_commit_sha="b" * 40, patch="diff --git a/x b/x\n" + ), + "request_file_review": FileReviewRequest(commit_sha="c" * 40, paths=["src/main.py"]), + "request_commit_review": COMMIT, + } + return (ORG, REPOSITORY, *REVIEW_REQUESTS[name]), {"body": bodies[name]} + + +def refusal_view(variant: dict[str, Any]) -> dict[str, Any]: + view: dict[str, Any] = {"reason": variant["properties"]["reason"]["const"]} + for name in variant["required"]: + if name == "environment": + view[name] = dict(ENVIRONMENT, display_name=f"{PRIVATE} {TOKEN}") + elif name == "detail": + view[name] = f"Configuration names {TOKEN}." + return view + + +def refused(view: Any) -> dict[str, Any]: + return { + "title": "invalid request", + "status": 400, + "detail": f"Nothing was created for {TOKEN}.", + "repository_name": "api", + "refusal": view, + } + + +@MODES +@pytest.mark.parametrize( + "variant", REFUSAL_VARIANTS, ids=[v["properties"]["reason"]["const"] for v in REFUSAL_VARIANTS] +) +async def test_review_requests_return_each_documented_refusal( + mode: str, variant: dict[str, Any] +) -> None: + view = refusal_view(variant) + with Server( + lambda request, index: Reply( + 400, refused(view), {"Content-Type": "application/problem+json"} + ) + ) as server: + async with session(mode, server.url) as client: + for name in REVIEW_REQUESTS: + args, kwargs = review_request(name) + with pytest.raises(ProoflineError) as raised: + await call(client, name, *args, **kwargs) + error = raised.value + assert (error.status, error.type) == (400, "about:blank") + assert error.title == "invalid request" + assert error.detail == "Nothing was created for [redacted]." + assert error.repository_name == "api" + assert error.refusal is not None + assert error.refusal.reason == view["reason"] + decoded = error.refusal.to_dict() + assert TOKEN not in json.dumps(decoded) + if "environment" in view: + assert decoded["environment"]["display_name"] == f"{PRIVATE} [redacted]" + diagnostic = repr(error) + str(error) + "".join(traceback.format_exception(error)) + assert PRIVATE not in diagnostic and TOKEN not in diagnostic + assert len(server.requests) == len(REVIEW_REQUESTS) + + +@MODES +@pytest.mark.parametrize( + "body", + [ + refused({"reason": "NOT_A_DOCUMENTED_REASON"}), + refused({"reason": "ENVIRONMENT_REVIEWS_OFF"}), + refused("NO_LINKED_ENVIRONMENT"), + dict(refused({"reason": "NO_LINKED_ENVIRONMENT"}), repository_name=7), + {k: v for k, v in refused({"reason": "NO_LINKED_ENVIRONMENT"}).items() if k != "detail"}, + refused({"reason": "INVALID_DELIVERY_CONFIGURATION", "detail": 7, "environment": 7}), + refused({"reason": "INVALID_DELIVERY_CONFIGURATION", "detail": "d", "environment": 7}), + refused({"reason": "ENVIRONMENT_REVIEWS_OFF", "environment": dict(ENVIRONMENT, id=7)}), + refused( + { + "reason": "INVALID_DELIVERY_CONFIGURATION", + "detail": "d", + "environment": dict(ENVIRONMENT, id="not-a-uuid"), + } + ), + refused({"reason": "ENVIRONMENT_REVIEWS_OFF", "environment": dict(ENVIRONMENT, id="x")}), + refused( + {"reason": "ENVIRONMENT_NOT_READY", "environment": ENVIRONMENT, "status_detail": 7} + ), + ], + ids=[ + "unknown-reason", + "missing-environment", + "untyped-refusal", + "repository-name", + "detail", + "numeric-delivery-fields", + "numeric-delivery-environment", + "environment-field", + "delivery-environment-id", + "required-environment-id", + "status-detail", + ], +) +async def test_malformed_refusal_keeps_fixed_sdk_problem_type( + mode: str, body: dict[str, Any] +) -> None: + with Server(lambda request, index: Reply(400, body)) as server: + async with session(mode, server.url) as client: + with pytest.raises(ProoflineError) as raised: + await call(client, "request_commit_review", ORG, REPOSITORY, body=COMMIT) + error = raised.value + assert (error.status, error.type) == (400, "urn:proofline:sdk:invalid-response") + assert error.title == "invalid request" + assert (error.refusal, error.repository_name) == (None, None) + assert TOKEN not in error.detail + + +def test_every_documented_refusal_reason_has_a_field_check() -> None: + reasons = {variant["properties"]["reason"]["const"] for variant in REFUSAL_VARIANTS} + assert set(REFUSAL_SHAPES) == reasons + + +@MODES +async def test_problem_without_detail_keeps_status_and_title(mode: str) -> None: + with Server( + lambda request, index: Reply( + 500, {"title": "internal error", "status": 500, "detail": None} + ) + ) as server: + async with session(mode, server.url) as client: + with pytest.raises(ProoflineError) as raised: + await call(client, "get_finding", ORG, FINDING) + error = raised.value + assert (error.status, error.type, error.title) == (500, "about:blank", "internal error") + assert "without a problem document" not in error.detail + assert "internal error" in error.detail + assert error.refusal is None + assert len(server.requests) == 1 + + @MODES @pytest.mark.parametrize("status", [401, 403, 404]) async def test_authority_problems_do_not_retry_or_disclose_secrets( From a4712e098854a071db4173c80d5b45f4a50dc0ca Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2026 20:57:07 +0000 Subject: [PATCH 15/38] Update distribution --- README.md | 2 +- openapi.public.json | 2 +- proofline/_generated/models/coverage_upload_request.py | 2 +- proofline/_transport.py | 2 +- pyproject.toml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index be99a7fb..1bc220e3 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Each response returns the original text, decoded rows, dataset version, settled ## Coverage uploads -To upload coverage reports from CI, use a repository-restricted token with `coverage:write` and current repository write access. Name the full commit SHA that the tests ran on. Reports may use LCOV, Cobertura XML, JaCoCo XML, or Go cover profiles. +To upload coverage reports from CI, use a repository-restricted token with `coverage:write` and current repository write access. Name the full commit SHA that the tests ran on. Send 1 to 50 LCOV, Cobertura XML, JaCoCo XML, or Go cover reports in a JSON body of at most 30 MiB. ```python import os diff --git a/openapi.public.json b/openapi.public.json index a918bdda..e8522233 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -807,7 +807,7 @@ "description": "The coverage reports a CI run produced for one commit.", "properties": { "reports": { - "description": "One to 50 reports, each LCOV, Cobertura XML, `JaCoCo` XML or a Go\n cover profile, in a JSON body of at most 64 MiB.", + "description": "One to 50 reports, each LCOV, Cobertura XML, `JaCoCo` XML or a Go\n cover profile, in a JSON body of at most 30 MiB.", "items": { "$ref": "#/components/schemas/UploadedReport" }, diff --git a/proofline/_generated/models/coverage_upload_request.py b/proofline/_generated/models/coverage_upload_request.py index 8f61ca01..1eab6586 100644 --- a/proofline/_generated/models/coverage_upload_request.py +++ b/proofline/_generated/models/coverage_upload_request.py @@ -18,7 +18,7 @@ class CoverageUploadRequest: Attributes: reports (list[UploadedReport]): One to 50 reports, each LCOV, Cobertura XML, `JaCoCo` XML or a Go - cover profile, in a JSON body of at most 64 MiB. + cover profile, in a JSON body of at most 30 MiB. tested_sha (str): The full 40-character commit the tests ran on. GitHub must have it in this repository. A merge commit counts for a pull request head that is one of its two parents. diff --git a/proofline/_transport.py b/proofline/_transport.py index 86a69d99..13405734 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -38,7 +38,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "5.0.0" +VERSION = "5.0.1" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index 8f642678..bc7c574f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "5.0.0" +version = "5.0.1" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" From c433780baf6310c682f780481157f317d59a8169 Mon Sep 17 00:00:00 2001 From: Marshal Date: Thu, 12 Nov 2026 12:57:40 +0200 Subject: [PATCH 16/38] fix: preserve Unicode separators in NDJSON exports --- proofline/exports.py | 2 +- tests/test_http.py | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/proofline/exports.py b/proofline/exports.py index a274dd23..529fc232 100644 --- a/proofline/exports.py +++ b/proofline/exports.py @@ -48,7 +48,7 @@ def decode_export(response: httpx.Response, format: ExportFormat) -> ExportPage: raise ValueError rows = [dict(zip(columns, row, strict=True)) for row in records] else: - rows = [json.loads(line) for line in text.splitlines() if line.strip()] + rows = [json.loads(line) for line in text.split("\n") if line.strip()] if any(not isinstance(row, dict) or str(row.get("dataset_version")) != "1" for row in rows): raise ValueError return ExportPage( diff --git a/tests/test_http.py b/tests/test_http.py index fe561591..3ce1dc6e 100644 --- a/tests/test_http.py +++ b/tests/test_http.py @@ -1969,3 +1969,44 @@ def test_mcp_public_types_accept_legacy_and_targeted_calls(tmp_path: Path) -> No fixture.write_text("\n".join(lines)) # Use the same mypy configuration as the SDK qualification gate. subprocess.run([sys.executable, "-m", "mypy", str(fixture)], check=True) + + +@MODES +async def test_export_ndjson_preserves_unicode_line_separators(mode: str) -> None: + kwargs = { + "from_time": "2026-10-01T00:00:00Z", + "to_time": "2026-10-25T00:00:00Z", + } + + for separator in ("\x85", "\u2028", "\u2029"): + row = { + "dataset_version": 1, + "claim": f"before{separator}after", + } + body = (json.dumps(row, ensure_ascii=False) + "\n").encode("utf-8") + + def respond(request: Request, index: int) -> Reply: + return Reply( + body=body, + headers={ + "Content-Type": "application/x-ndjson", + "X-Proofline-Export-Version": "1", + "X-Proofline-Export-Settled-Until": "2026-10-25T00:00:00Z", + "X-Proofline-Export-Next-Cursor": "next-page", + }, + ) + + with Server(respond) as server: + async with session(mode, server.url) as client: + exported = await call( + client, + "export_reviews", + ORG, + "findings", + format="ndjson", + **kwargs, + ) + + assert len(exported.rows) == 1 + assert exported.rows[0]["claim"] == row["claim"] + assert exported.next_cursor == "next-page" From 8fe60e1492b871b9219bfa55715eb4f2204f2e83 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 12 Nov 2026 15:10:47 +0000 Subject: [PATCH 17/38] Update distribution --- openapi.public.json | 53 ++++++++++++- .../api/default/get_pull_request_review.py | 12 ++- .../api/default/list_pull_request_reviews.py | 12 ++- proofline/_generated/models/__init__.py | 4 + .../models/customer_review_detail.py | 35 +++++++++ .../_generated/models/export_review_kind.py | 2 + proofline/_generated/models/provider_wait.py | 74 +++++++++++++++++++ .../_generated/models/provider_wait_reason.py | 8 ++ proofline/_transport.py | 2 +- pyproject.toml | 2 +- tests/test_http.py | 66 +++++++++++++++++ 11 files changed, 257 insertions(+), 13 deletions(-) create mode 100644 proofline/_generated/models/provider_wait.py create mode 100644 proofline/_generated/models/provider_wait_reason.py diff --git a/openapi.public.json b/openapi.public.json index e8522233..18b482b8 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -1806,6 +1806,17 @@ ], "description": "Dated PR counts with head, evaluated-scope and bounded thread proof.\n Absent when that observation is unavailable; scalar counts remain separate." }, + "provider_wait": { + "anyOf": [ + { + "$ref": "#/components/schemas/ProviderWait" + }, + { + "type": "null" + } + ], + "description": "What holds the review now: GitHub's rate limit, and when it resets.\n Null unless one of the review's runs waits for it, and once the run\n continues." + }, "public_key": { "description": "The review's stable public address: `rev_` followed by its identifier without hyphens.", "type": "string" @@ -2218,7 +2229,9 @@ "DEPLOYMENT", "PATCH", "COMMIT", - "FILES" + "FILES", + "MERGE_GROUP", + "REVISION_SCAN" ], "type": "string" }, @@ -3815,6 +3828,36 @@ } ] }, + "ProviderWait": { + "description": "A provider wait that holds the review now.", + "properties": { + "reason": { + "allOf": [ + { + "$ref": "#/components/schemas/ProviderWaitReason" + } + ], + "description": "`GITHUB_RATE_LIMIT`: GitHub's rate limit for the organization's App\n installation is reached, and the review continues after it resets." + }, + "until": { + "description": "When the wait ends: the reset GitHub named, or, when it named none,\n when the run is due again.", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "reason", + "until" + ], + "type": "object" + }, + "ProviderWaitReason": { + "description": "Why a review's run waits on a provider.", + "enum": [ + "GITHUB_RATE_LIMIT" + ], + "type": "string" + }, "PullRequestMergeGate": { "properties": { "assessment_count": { @@ -4783,7 +4826,7 @@ "$ref": "#/components/schemas/ExportReviewKind" } ], - "description": "Whether the review analyzes a pull request, a deployment, a local patch, pushed\n commits or selected whole files." + "description": "Whether the review analyzes a pull request, a deployment, a local patch, pushed\n commits, selected whole files, a merge group or a revision scan." }, "organization_id": { "description": "The organization that owns the review.", @@ -5793,7 +5836,7 @@ }, "info": { "title": "Proofline Review API", - "version": "5.0.0" + "version": "5.1.0" }, "openapi": "3.1.0", "paths": { @@ -7107,10 +7150,12 @@ "style": "simple" }, { + "description": "The repository's name without its owner, or a name it had before a rename.", "in": "path", "name": "repository", "required": true, "schema": { + "description": "The repository's name without its owner, or a name it had before a rename.", "type": "string" }, "style": "simple" @@ -7301,10 +7346,12 @@ "style": "simple" }, { + "description": "The repository's name without its owner, or a name it had before a rename.", "in": "path", "name": "repository", "required": true, "schema": { + "description": "The repository's name without its owner, or a name it had before a rename.", "type": "string" }, "style": "simple" diff --git a/proofline/_generated/api/default/get_pull_request_review.py b/proofline/_generated/api/default/get_pull_request_review.py index 482d002a..06f9d2aa 100644 --- a/proofline/_generated/api/default/get_pull_request_review.py +++ b/proofline/_generated/api/default/get_pull_request_review.py @@ -69,7 +69,8 @@ def sync_detailed( Args: org_id (UUID): - repository (str): + repository (str): The repository's name without its owner, or a name it had before a + rename. pull_request_number (int): run_number (int): @@ -110,7 +111,8 @@ def sync( Args: org_id (UUID): - repository (str): + repository (str): The repository's name without its owner, or a name it had before a + rename. pull_request_number (int): run_number (int): @@ -146,7 +148,8 @@ async def asyncio_detailed( Args: org_id (UUID): - repository (str): + repository (str): The repository's name without its owner, or a name it had before a + rename. pull_request_number (int): run_number (int): @@ -185,7 +188,8 @@ async def asyncio( Args: org_id (UUID): - repository (str): + repository (str): The repository's name without its owner, or a name it had before a + rename. pull_request_number (int): run_number (int): diff --git a/proofline/_generated/api/default/list_pull_request_reviews.py b/proofline/_generated/api/default/list_pull_request_reviews.py index 7e1142b6..4987576a 100644 --- a/proofline/_generated/api/default/list_pull_request_reviews.py +++ b/proofline/_generated/api/default/list_pull_request_reviews.py @@ -174,7 +174,8 @@ def sync_detailed( Args: org_id (UUID): - repository_path (str): + repository_path (str): The repository's name without its owner, or a name it had before a + rename. pull_request_number (int): attention (None | str | Unset): `needed` lists terminal reviews of open pull requests with active @@ -247,7 +248,8 @@ def sync( Args: org_id (UUID): - repository_path (str): + repository_path (str): The repository's name without its owner, or a name it had before a + rename. pull_request_number (int): attention (None | str | Unset): `needed` lists terminal reviews of open pull requests with active @@ -315,7 +317,8 @@ async def asyncio_detailed( Args: org_id (UUID): - repository_path (str): + repository_path (str): The repository's name without its owner, or a name it had before a + rename. pull_request_number (int): attention (None | str | Unset): `needed` lists terminal reviews of open pull requests with active @@ -386,7 +389,8 @@ async def asyncio( Args: org_id (UUID): - repository_path (str): + repository_path (str): The repository's name without its owner, or a name it had before a + rename. pull_request_number (int): attention (None | str | Unset): `needed` lists terminal reviews of open pull requests with active diff --git a/proofline/_generated/models/__init__.py b/proofline/_generated/models/__init__.py index 113b376d..9e8477e2 100644 --- a/proofline/_generated/models/__init__.py +++ b/proofline/_generated/models/__init__.py @@ -102,6 +102,8 @@ from .problem import Problem from .prose import Prose from .prose_outcome_type_0 import ProseOutcomeType0 +from .provider_wait import ProviderWait +from .provider_wait_reason import ProviderWaitReason from .pull_request_merge_gate import PullRequestMergeGate from .refresh_view import RefreshView from .refused_environment import RefusedEnvironment @@ -259,6 +261,8 @@ "Problem", "Prose", "ProseOutcomeType0", + "ProviderWait", + "ProviderWaitReason", "PullRequestMergeGate", "RefreshView", "RefusedEnvironment", diff --git a/proofline/_generated/models/customer_review_detail.py b/proofline/_generated/models/customer_review_detail.py index ca316537..eec6356a 100644 --- a/proofline/_generated/models/customer_review_detail.py +++ b/proofline/_generated/models/customer_review_detail.py @@ -20,6 +20,7 @@ from ..models.deep_review_escalation import DeepReviewEscalation from ..models.local_reverification import LocalReverification from ..models.open_items_view import OpenItemsView + from ..models.provider_wait import ProviderWait from ..models.pull_request_merge_gate import PullRequestMergeGate from ..models.refresh_view import RefreshView from ..models.related_review import RelatedReview @@ -134,6 +135,9 @@ class CustomerReviewDetail: open_items_observation (None | ReviewOpenItems | Unset): Dated PR counts with head, evaluated-scope and bounded thread proof. Absent when that observation is unavailable; scalar counts remain separate. + provider_wait (None | ProviderWait | Unset): What holds the review now: GitHub's rate limit, and when it resets. + Null unless one of the review's runs waits for it, and once the run + continues. publication_detail (None | str | Unset): Why a publication was refused, or how one failed. Server text. pull_request_author_avatar_url (None | str | Unset): Provider-supplied avatar URL. Login-derived `.png` URLs do not work for @@ -231,6 +235,7 @@ class CustomerReviewDetail: merge_group_pull_request_numbers: list[int] | Unset = UNSET open_items: None | OpenItemsView | Unset = UNSET open_items_observation: None | ReviewOpenItems | Unset = UNSET + provider_wait: None | ProviderWait | Unset = UNSET publication_detail: None | str | Unset = UNSET pull_request_author_avatar_url: None | str | Unset = UNSET pull_request_author_github_user_id: int | None | Unset = UNSET @@ -265,6 +270,7 @@ def to_dict(self) -> dict[str, Any]: from ..models.customer_code_assessment import CustomerCodeAssessment # noqa: PLC0415 from ..models.deep_review_escalation import DeepReviewEscalation # noqa: PLC0415 from ..models.open_items_view import OpenItemsView # noqa: PLC0415 + from ..models.provider_wait import ProviderWait # noqa: PLC0415 from ..models.pull_request_merge_gate import PullRequestMergeGate # noqa: PLC0415 from ..models.refresh_view import RefreshView # noqa: PLC0415 from ..models.review_diff_stats import ReviewDiffStats # noqa: PLC0415 @@ -457,6 +463,14 @@ def to_dict(self) -> dict[str, Any]: else: open_items_observation = self.open_items_observation + provider_wait: dict[str, Any] | None | Unset + if isinstance(self.provider_wait, Unset): + provider_wait = UNSET + elif isinstance(self.provider_wait, ProviderWait): + provider_wait = self.provider_wait.to_dict() + else: + provider_wait = self.provider_wait + publication_detail: None | str | Unset if isinstance(self.publication_detail, Unset): publication_detail = UNSET @@ -692,6 +706,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["open_items"] = open_items if open_items_observation is not UNSET: field_dict["open_items_observation"] = open_items_observation + if provider_wait is not UNSET: + field_dict["provider_wait"] = provider_wait if publication_detail is not UNSET: field_dict["publication_detail"] = publication_detail if pull_request_author_avatar_url is not UNSET: @@ -755,6 +771,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.deep_review_escalation import DeepReviewEscalation # noqa: PLC0415 from ..models.local_reverification import LocalReverification # noqa: PLC0415 from ..models.open_items_view import OpenItemsView # noqa: PLC0415 + from ..models.provider_wait import ProviderWait # noqa: PLC0415 from ..models.pull_request_merge_gate import PullRequestMergeGate # noqa: PLC0415 from ..models.refresh_view import RefreshView # noqa: PLC0415 from ..models.related_review import RelatedReview # noqa: PLC0415 @@ -1080,6 +1097,23 @@ def _parse_open_items_observation(data: object) -> None | ReviewOpenItems | Unse d.pop("open_items_observation", UNSET) ) + def _parse_provider_wait(data: object) -> None | ProviderWait | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + provider_wait_type_0 = ProviderWait.from_dict(data) + + return provider_wait_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | ProviderWait | Unset, data) + + provider_wait = _parse_provider_wait(d.pop("provider_wait", UNSET)) + def _parse_publication_detail(data: object) -> None | str | Unset: if data is None: return data @@ -1428,6 +1462,7 @@ def _parse_walkthrough(data: object) -> None | Unset | WalkthroughView: merge_group_pull_request_numbers=merge_group_pull_request_numbers, open_items=open_items, open_items_observation=open_items_observation, + provider_wait=provider_wait, publication_detail=publication_detail, pull_request_author_avatar_url=pull_request_author_avatar_url, pull_request_author_github_user_id=pull_request_author_github_user_id, diff --git a/proofline/_generated/models/export_review_kind.py b/proofline/_generated/models/export_review_kind.py index f7b81df3..f04aba2a 100644 --- a/proofline/_generated/models/export_review_kind.py +++ b/proofline/_generated/models/export_review_kind.py @@ -5,8 +5,10 @@ class ExportReviewKind(StrEnum): COMMIT = "COMMIT" DEPLOYMENT = "DEPLOYMENT" FILES = "FILES" + MERGE_GROUP = "MERGE_GROUP" PATCH = "PATCH" PULL_REQUEST = "PULL_REQUEST" + REVISION_SCAN = "REVISION_SCAN" def __str__(self) -> str: return str(self.value) diff --git a/proofline/_generated/models/provider_wait.py b/proofline/_generated/models/provider_wait.py new file mode 100644 index 00000000..860f7a17 --- /dev/null +++ b/proofline/_generated/models/provider_wait.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.provider_wait_reason import ProviderWaitReason + +T = TypeVar("T", bound="ProviderWait") + + +@_attrs_define +class ProviderWait: + """A provider wait that holds the review now. + + Attributes: + reason (ProviderWaitReason): Why a review's run waits on a provider. + until (datetime.datetime): When the wait ends: the reset GitHub named, or, when it named none, + when the run is due again. + """ + + reason: ProviderWaitReason + until: datetime.datetime + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + reason = self.reason.value + + until = self.until.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "reason": reason, + "until": until, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + reason = ProviderWaitReason(d.pop("reason")) + + until = datetime.datetime.fromisoformat(d.pop("until")) + + provider_wait = cls( + reason=reason, + until=until, + ) + + provider_wait.additional_properties = d + return provider_wait + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/proofline/_generated/models/provider_wait_reason.py b/proofline/_generated/models/provider_wait_reason.py new file mode 100644 index 00000000..9efa5836 --- /dev/null +++ b/proofline/_generated/models/provider_wait_reason.py @@ -0,0 +1,8 @@ +from enum import StrEnum + + +class ProviderWaitReason(StrEnum): + GITHUB_RATE_LIMIT = "GITHUB_RATE_LIMIT" + + def __str__(self) -> str: + return str(self.value) diff --git a/proofline/_transport.py b/proofline/_transport.py index 13405734..a3b9d688 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -38,7 +38,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "5.0.1" +VERSION = "5.1.0" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index bc7c574f..0bca10aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "5.0.1" +version = "5.1.0" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" diff --git a/tests/test_http.py b/tests/test_http.py index fe561591..d308af0f 100644 --- a/tests/test_http.py +++ b/tests/test_http.py @@ -53,8 +53,10 @@ models, ) from proofline import client as client_module +from proofline._generated.models.export_review_kind import ExportReviewKind from proofline._generated.models.finding_fix_prompt_type_0 import FindingFixPromptType0 from proofline._generated.models.finding_fix_prompt_type_1 import FindingFixPromptType1 +from proofline._generated.models.reviews_export_row import ReviewsExportRow from proofline._generated.types import UNSET from proofline._transport import REFUSAL_SHAPES @@ -1609,6 +1611,70 @@ def respond(request: Request, index: int) -> Reply: assert caught.value.status == 404 +@MODES +@pytest.mark.parametrize("format", ["csv", "ndjson"]) +async def test_review_export_retains_every_recorded_kind(mode: str, format: str) -> None: + kinds = [ + "PULL_REQUEST", + "DEPLOYMENT", + "PATCH", + "COMMIT", + "FILES", + "MERGE_GROUP", + "REVISION_SCAN", + ] + rows = [ + { + "dataset_version": 1, + "kind": kind, + "created_at": "2026-10-24T00:00:00Z", + "organization_id": str(ORG), + "review_id": "00000000-0000-7000-8000-000000000002", + "status": "COMPLETED", + "trigger_origin": "AUTOMATIC", + } + for kind in kinds + ] + + def respond(request: Request, index: int) -> Reply: + assert request.path.startswith(f"/api/v1/organizations/{ORG}/exports/reviews?") + assert request.headers["Authorization"] == f"Bearer {TOKEN}" + return Reply( + body=( + ( + ",".join(rows[0]) + + "\r\n" + + "".join(",".join(map(str, row.values())) + "\r\n" for row in rows) + ).encode() + if format == "csv" + else ("\n".join(json.dumps(row) for row in rows) + "\n").encode() + ), + headers={ + "Content-Type": "text/csv" if format == "csv" else "application/x-ndjson", + "X-Proofline-Export-Version": "1", + "X-Proofline-Export-Settled-Until": "2026-10-25T00:00:00Z", + }, + ) + + with Server(respond) as server: + async with session(mode, server.url) as client: + page = await call( + client, + "export_reviews", + ORG, + "reviews", + format=format, + from_time="2026-10-01T00:00:00Z", + to_time="2026-10-25T00:00:00Z", + ) + assert [row["kind"] for row in page.rows] == kinds + # The generated wire enum must accept the same retained spellings. + assert [ExportReviewKind(row["kind"]).value for row in page.rows] == kinds + if format == "ndjson": + assert [ReviewsExportRow.from_dict(row).kind.value for row in page.rows] == kinds + assert page.next_cursor is None + + @MODES async def test_knowledge_negotiation_scope_and_no_retry(mode: str) -> None: refusal = False From db0c9b1c43b99923cf7b4502d8ea98a51b215380 Mon Sep 17 00:00:00 2001 From: mekdelawite Date: Fri, 13 Nov 2026 10:51:52 +0300 Subject: [PATCH 18/38] fix: accept case-insensitive export content types --- proofline/exports.py | 2 +- tests/test_http.py | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/proofline/exports.py b/proofline/exports.py index a274dd23..1488c4ba 100644 --- a/proofline/exports.py +++ b/proofline/exports.py @@ -31,7 +31,7 @@ def decode_export(response: httpx.Response, format: ExportFormat) -> ExportPage: try: media = "text/csv" if format == "csv" else "application/x-ndjson" if ( - response.headers.get("content-type", "").split(";")[0].strip() != media + response.headers.get("content-type", "").split(";")[0].strip().lower() != media or response.headers.get("x-proofline-export-version") != "1" ): raise ValueError diff --git a/tests/test_http.py b/tests/test_http.py index d308af0f..13839aa2 100644 --- a/tests/test_http.py +++ b/tests/test_http.py @@ -1611,6 +1611,46 @@ def respond(request: Request, index: int) -> Reply: assert caught.value.status == 404 +@MODES +@pytest.mark.parametrize( + ("format", "content_type"), + [ + ("csv", "Text/CSV; charset=utf-8"), + ("ndjson", "Application/X-NDJSON; charset=utf-8"), + ], +) +async def test_export_accepts_case_insensitive_content_type( + mode: str, format: str, content_type: str +) -> None: + def respond(request: Request, index: int) -> Reply: + body = ( + b"dataset_version,claim\n1,hello\n" + if format == "csv" + else b'{"dataset_version":1,"claim":"hello"}\n' + ) + return Reply( + body=body, + headers={ + "Content-Type": content_type, + "X-Proofline-Export-Version": "1", + "X-Proofline-Export-Settled-Until": "2026-10-25T00:00:00Z", + }, + ) + + with Server(respond) as server: + async with session(mode, server.url) as client: + page = await call( + client, + "export_reviews", + ORG, + "findings", + format=format, + from_time="2026-10-01T00:00:00Z", + to_time="2026-10-25T00:00:00Z", + ) + assert page.rows[0]["claim"] == "hello" + + @MODES @pytest.mark.parametrize("format", ["csv", "ndjson"]) async def test_review_export_retains_every_recorded_kind(mode: str, format: str) -> None: From c3d4da517d712477460ad2bc1a545e30d423f2d1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 13 Nov 2026 08:38:07 +0000 Subject: [PATCH 19/38] Update distribution --- openapi.public.json | 16 ++++++- .../models/pull_request_merge_gate.py | 44 +++++++++++++++++++ proofline/_transport.py | 2 +- pyproject.toml | 2 +- 4 files changed, 61 insertions(+), 3 deletions(-) diff --git a/openapi.public.json b/openapi.public.json index 18b482b8..7183dda2 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -3938,6 +3938,20 @@ "null" ] }, + "merged_by_login": { + "description": "The merger's GitHub login as this organization's developer record last saw it. Display\n metadata only. Null when the organization has no record of that user.", + "type": [ + "string", + "null" + ] + }, + "merged_by_name": { + "description": "The merger's name, from the organization's developer record or their Proofline account.\n Display metadata only: `merged_by_github_user_id` stays the identity. Null when unknown.", + "type": [ + "string", + "null" + ] + }, "merged_pull_request_number": { "description": "The actual pull request merged in the recorded bypass, which may differ from the captured PR.", "format": "int64", @@ -5836,7 +5850,7 @@ }, "info": { "title": "Proofline Review API", - "version": "5.1.0" + "version": "5.2.0" }, "openapi": "3.1.0", "paths": { diff --git a/proofline/_generated/models/pull_request_merge_gate.py b/proofline/_generated/models/pull_request_merge_gate.py index 1c510cbd..abf3699b 100644 --- a/proofline/_generated/models/pull_request_merge_gate.py +++ b/proofline/_generated/models/pull_request_merge_gate.py @@ -42,6 +42,12 @@ class PullRequestMergeGate: none was reported. merged_by_github_user_id (int | None | Unset): The stable GitHub user ID reported by a merged-close bypass, or null when none was reported. + merged_by_login (None | str | Unset): The merger's GitHub login as this organization's developer record last saw + it. Display + metadata only. Null when the organization has no record of that user. + merged_by_name (None | str | Unset): The merger's name, from the organization's developer record or their + Proofline account. + Display metadata only: `merged_by_github_user_id` stays the identity. Null when unknown. merged_pull_request_number (int | None | Unset): The actual pull request merged in the recorded bypass, which may differ from the captured PR. reason_code (None | str | Unset): The recorded deterministic decision or refusal reason. Null until a decision @@ -64,6 +70,8 @@ class PullRequestMergeGate: finding_count: int | None | Unset = UNSET merge_commit_sha: None | str | Unset = UNSET merged_by_github_user_id: int | None | Unset = UNSET + merged_by_login: None | str | Unset = UNSET + merged_by_name: None | str | Unset = UNSET merged_pull_request_number: int | None | Unset = UNSET reason_code: None | str | Unset = UNSET review_id: None | Unset | UUID = UNSET @@ -136,6 +144,18 @@ def to_dict(self) -> dict[str, Any]: else: merged_by_github_user_id = self.merged_by_github_user_id + merged_by_login: None | str | Unset + if isinstance(self.merged_by_login, Unset): + merged_by_login = UNSET + else: + merged_by_login = self.merged_by_login + + merged_by_name: None | str | Unset + if isinstance(self.merged_by_name, Unset): + merged_by_name = UNSET + else: + merged_by_name = self.merged_by_name + merged_pull_request_number: int | None | Unset if isinstance(self.merged_pull_request_number, Unset): merged_pull_request_number = UNSET @@ -184,6 +204,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["merge_commit_sha"] = merge_commit_sha if merged_by_github_user_id is not UNSET: field_dict["merged_by_github_user_id"] = merged_by_github_user_id + if merged_by_login is not UNSET: + field_dict["merged_by_login"] = merged_by_login + if merged_by_name is not UNSET: + field_dict["merged_by_name"] = merged_by_name if merged_pull_request_number is not UNSET: field_dict["merged_pull_request_number"] = merged_pull_request_number if reason_code is not UNSET: @@ -306,6 +330,24 @@ def _parse_merged_by_github_user_id(data: object) -> int | None | Unset: d.pop("merged_by_github_user_id", UNSET) ) + def _parse_merged_by_login(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + merged_by_login = _parse_merged_by_login(d.pop("merged_by_login", UNSET)) + + def _parse_merged_by_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + merged_by_name = _parse_merged_by_name(d.pop("merged_by_name", UNSET)) + def _parse_merged_pull_request_number(data: object) -> int | None | Unset: if data is None: return data @@ -358,6 +400,8 @@ def _parse_review_id(data: object) -> None | Unset | UUID: finding_count=finding_count, merge_commit_sha=merge_commit_sha, merged_by_github_user_id=merged_by_github_user_id, + merged_by_login=merged_by_login, + merged_by_name=merged_by_name, merged_pull_request_number=merged_pull_request_number, reason_code=reason_code, review_id=review_id, diff --git a/proofline/_transport.py b/proofline/_transport.py index a3b9d688..8638fd25 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -38,7 +38,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "5.1.0" +VERSION = "5.2.0" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index 0bca10aa..bf8d16f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "5.1.0" +version = "5.2.0" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" From 341dc4bab10b4aeddc5890eb19908d7211a2908a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 13 Nov 2026 14:43:22 +0000 Subject: [PATCH 20/38] Update distribution --- openapi.public.json | 142 +++++++++- proofline/_generated/models/__init__.py | 4 + .../models/customer_review_detail.py | 85 +++++- .../_generated/models/environment_check.py | 257 ++++++++++++++++++ .../models/incomplete_cause_type_0.py | 12 + proofline/_generated/models/review_summary.py | 89 +++++- proofline/_transport.py | 2 +- pyproject.toml | 2 +- 8 files changed, 585 insertions(+), 8 deletions(-) create mode 100644 proofline/_generated/models/environment_check.py create mode 100644 proofline/_generated/models/incomplete_cause_type_0.py diff --git a/openapi.public.json b/openapi.public.json index 7183dda2..89b055bb 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -1715,6 +1715,13 @@ }, "type": "array" }, + "environments": { + "description": "For a pull-request review, each environment its repository linked\n when the review was created and each environment it assessed, with\n whether the review checked it and why not. Absent for any other\n review, and when the repository links no environment.", + "items": { + "$ref": "#/components/schemas/EnvironmentCheck" + }, + "type": "array" + }, "finding_count": { "description": "How many findings this review's assessments recorded, across all of them.", "format": "int64", @@ -1750,6 +1757,13 @@ "format": "uuid", "type": "string" }, + "incomplete_causes": { + "description": "Why an `INCOMPLETE` review ended incomplete, as its incomplete\n assessments recorded it, in name order. `UNKNOWN` alone when none\n recorded a cause. Absent for every other status, and on reads other\n than the reviews list and a single review.", + "items": { + "$ref": "#/components/schemas/IncompleteCause" + }, + "type": "array" + }, "is_deep_review": { "description": "Present and true when this run is a Deep Review.", "type": "boolean" @@ -1953,7 +1967,7 @@ "type": "null" } ], - "description": "Who asked for this review, for a review a person requested. Null on\n automatic reviews and on reviews recorded before requesters were." + "description": "Who asked for this review, for the reviews a person asked for: the\n run-now button, a rerun, a pull request `review` command, or local\n changes and pushed commits sent from the CLI or an editor. Absent on\n automatic reviews, and on reviews recorded before requesters were." }, "review_comment_url": { "description": "The pull request review Proofline submitted for this review. Null when\n it submitted none.", @@ -2172,6 +2186,92 @@ ], "type": "object" }, + "EnvironmentCheck": { + "description": "One environment linked to the reviewed repository, and whether this\n review checked it.", + "properties": { + "environment_display_name": { + "description": "The environment's display name.", + "type": "string" + }, + "reason": { + "anyOf": [ + { + "$ref": "#/components/schemas/EnvironmentCheckReason" + }, + { + "type": "null" + } + ], + "description": "Why the environment was not checked or does not apply. Null when it\n was checked or its check is still running." + }, + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/EnvironmentCheckState" + } + ], + "description": "Whether this review checked the environment." + } + }, + "required": [ + "environment_display_name", + "state" + ], + "type": "object" + }, + "EnvironmentCheckReason": { + "oneOf": [ + { + "const": "NOT_COVERED", + "description": "`NOT_CHECKED`: Proofline does not check this environment for pull\n requests, so the review assessed its code only.", + "type": "string" + }, + { + "const": "FORK_PULL_REQUEST", + "description": "`NOT_CHECKED`: the pull request comes from a fork, which Proofline\n does not check against an environment.", + "type": "string" + }, + { + "const": "UNFINISHED", + "description": "`NOT_CHECKED`: the environment's assessment did not finish.", + "type": "string" + }, + { + "const": "ENDED", + "description": "`NOT_CHECKED`: the review or the assessment stopped before the\n environment was checked.", + "type": "string" + }, + { + "const": "PULL_REQUEST_REVIEWS_OFF", + "description": "`NOT_APPLICABLE`: pull request reviews are off on this repository's\n link to the environment.", + "type": "string" + } + ] + }, + "EnvironmentCheckState": { + "oneOf": [ + { + "const": "CHECKED", + "description": "The environment's assessment finished.", + "type": "string" + }, + { + "const": "CHECKING", + "description": "The environment's assessment is still running.", + "type": "string" + }, + { + "const": "NOT_CHECKED", + "description": "The review did not check the environment; `reason` says why.", + "type": "string" + }, + { + "const": "NOT_APPLICABLE", + "description": "The repository's link to the environment does not ask for pull\n request reviews; `reason` says so.", + "type": "string" + } + ] + }, "ExportEvidenceKind": { "enum": [ "repository_file", @@ -3267,6 +3367,26 @@ ], "type": "string" }, + "IncompleteCause": { + "description": "Why an assessment of the review ended incomplete, as the assessment\n recorded it (`incompleteness_kind`), or `UNKNOWN` when none did.", + "oneOf": [ + { + "enum": [ + "NOT_CONFIGURED", + "POLICY_EXCLUDED", + "EVIDENCE_UNAVAILABLE", + "HYPOTHESES_UNRESOLVED", + "MODEL_BUDGET_EXHAUSTED" + ], + "type": "string" + }, + { + "const": "UNKNOWN", + "description": "The review ended incomplete and no assessment recorded why.", + "type": "string" + } + ] + }, "LocalReverification": { "description": "One finding a patch review re-verified against the patch. The outcome is\n local: the pull request's finding is unchanged whatever it is.", "properties": { @@ -4626,6 +4746,13 @@ "format": "uuid", "type": "string" }, + "incomplete_causes": { + "description": "Why an `INCOMPLETE` review ended incomplete, as its incomplete\n assessments recorded it, in name order. `UNKNOWN` alone when none\n recorded a cause. Absent for every other status, and on reads other\n than the reviews list and a single review.", + "items": { + "$ref": "#/components/schemas/IncompleteCause" + }, + "type": "array" + }, "kind": { "description": "`PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, a review of local changes\n sent as a patch, `COMMIT`, a review of pushed commits, `FILES`,\n complete selected files at one pushed commit, `MERGE_GROUP`, the\n commit GitHub's merge queue built for a group of pull requests, or\n `REVISION_SCAN`, a scan of one captured commit.", "type": "string" @@ -4758,6 +4885,17 @@ "null" ] }, + "requested_by": { + "anyOf": [ + { + "$ref": "#/components/schemas/ActorView" + }, + { + "type": "null" + } + ], + "description": "Who asked for this review, for the reviews a person asked for: the\n run-now button, a rerun, a pull request `review` command, or local\n changes and pushed commits sent from the CLI or an editor. Absent on\n automatic reviews, and on reviews recorded before requesters were." + }, "run_number": { "description": "One-based, append-only ordinal within one repository pull request.", "format": "int64", @@ -5850,7 +5988,7 @@ }, "info": { "title": "Proofline Review API", - "version": "5.2.0" + "version": "5.3.0" }, "openapi": "3.1.0", "paths": { diff --git a/proofline/_generated/models/__init__.py b/proofline/_generated/models/__init__.py index 9e8477e2..87856a91 100644 --- a/proofline/_generated/models/__init__.py +++ b/proofline/_generated/models/__init__.py @@ -40,6 +40,7 @@ from .deep_review_escalation_status import DeepReviewEscalationStatus from .domain_view import DomainView from .earlier_open_finding import EarlierOpenFinding +from .environment_check import EnvironmentCheck from .export_evidence_kind import ExportEvidenceKind from .export_evidence_ref import ExportEvidenceRef from .export_finding_lifecycle import ExportFindingLifecycle @@ -79,6 +80,7 @@ from .finding_validations_export_row import FindingValidationsExportRow from .findings_export_row import FindingsExportRow from .gate_status import GateStatus +from .incomplete_cause_type_0 import IncompleteCauseType0 from .local_reverification import LocalReverification from .local_reverification_outcome import LocalReverificationOutcome from .matched_local_finding import MatchedLocalFinding @@ -199,6 +201,7 @@ "DeepReviewEscalationStatus", "DomainView", "EarlierOpenFinding", + "EnvironmentCheck", "ExportEvidenceKind", "ExportEvidenceRef", "ExportFindingLifecycle", @@ -238,6 +241,7 @@ "FindingSupport", "FindingValidationsExportRow", "GateStatus", + "IncompleteCauseType0", "LocalReverification", "LocalReverificationOutcome", "MatchedLocalFinding", diff --git a/proofline/_generated/models/customer_review_detail.py b/proofline/_generated/models/customer_review_detail.py index eec6356a..4d5ebcb5 100644 --- a/proofline/_generated/models/customer_review_detail.py +++ b/proofline/_generated/models/customer_review_detail.py @@ -2,12 +2,13 @@ import datetime from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, Literal, TypeVar, cast from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.incomplete_cause_type_0 import IncompleteCauseType0 from ..models.patch_trigger_source import PatchTriggerSource from ..types import UNSET, Unset @@ -18,6 +19,7 @@ from ..models.customer_assessment import CustomerAssessment from ..models.customer_code_assessment import CustomerCodeAssessment from ..models.deep_review_escalation import DeepReviewEscalation + from ..models.environment_check import EnvironmentCheck from ..models.local_reverification import LocalReverification from ..models.open_items_view import OpenItemsView from ..models.provider_wait import ProviderWait @@ -106,6 +108,10 @@ class CustomerReviewDetail: diff_stats (None | ReviewDiffStats | Unset): Line totals from this run's pinned comparison. Null until recorded, or when the provider's changed-file list was incomplete. + environments (list[EnvironmentCheck] | Unset): For a pull-request review, each environment its repository linked + when the review was created and each environment it assessed, with + whether the review checked it and why not. Absent for any other + review, and when the repository links no environment. fix_generation_enabled (bool | Unset): Whether fix generation is configured for this deployment and organization. Write authorization is checked again when a fix is requested. @@ -116,6 +122,11 @@ class CustomerReviewDetail: branch moves, the reviewed input does not. Absent for a patch review. head_ref (None | str | Unset): The pull request's head branch name as last recorded from GitHub, for orientation only. Null when no pull request state is recorded. + incomplete_causes (list[IncompleteCauseType0 | Literal['UNKNOWN']] | Unset): Why an `INCOMPLETE` review ended + incomplete, as its incomplete + assessments recorded it, in name order. `UNKNOWN` alone when none + recorded a cause. Absent for every other status, and on reads other + than the reviews list and a single review. is_deep_review (bool | Unset): Present and true when this run is a Deep Review. local_reverifications (list[LocalReverification] | Unset): For a patch review requested with `verify_finding_ids`, each finding @@ -171,8 +182,10 @@ class CustomerReviewDetail: repository. repository_url (None | str | Unset): The repository on GitHub. Absent when the deployment's web base cannot be joined with the stored name. - requested_by (ActorView | None | Unset): Who asked for this review, for a review a person requested. Null on - automatic reviews and on reviews recorded before requesters were. + requested_by (ActorView | None | Unset): Who asked for this review, for the reviews a person asked for: the + run-now button, a rerun, a pull request `review` command, or local + changes and pushed commits sent from the CLI or an editor. Absent on + automatic reviews, and on reviews recorded before requesters were. review_comment_url (None | str | Unset): The pull request review Proofline submitted for this review. Null when it submitted none. review_retracted_at (datetime.datetime | None | Unset): When a submitted pull request review was marked @@ -225,10 +238,12 @@ class CustomerReviewDetail: current_head_commit_sha: None | str | Unset = UNSET deep_review_escalation: DeepReviewEscalation | None | Unset = UNSET diff_stats: None | ReviewDiffStats | Unset = UNSET + environments: list[EnvironmentCheck] | Unset = UNSET fix_generation_enabled: bool | Unset = UNSET head_commit_sha: None | str | Unset = UNSET head_commit_url: None | str | Unset = UNSET head_ref: None | str | Unset = UNSET + incomplete_causes: list[IncompleteCauseType0 | Literal["UNKNOWN"]] | Unset = UNSET is_deep_review: bool | Unset = UNSET local_reverifications: list[LocalReverification] | Unset = UNSET merge_gate: None | PullRequestMergeGate | Unset = UNSET @@ -406,6 +421,13 @@ def to_dict(self) -> dict[str, Any]: else: diff_stats = self.diff_stats + environments: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.environments, Unset): + environments = [] + for environments_item_data in self.environments: + environments_item = environments_item_data.to_dict() + environments.append(environments_item) + fix_generation_enabled = self.fix_generation_enabled head_commit_sha: None | str | Unset @@ -426,6 +448,17 @@ def to_dict(self) -> dict[str, Any]: else: head_ref = self.head_ref + incomplete_causes: list[Literal["UNKNOWN"] | str] | Unset = UNSET + if not isinstance(self.incomplete_causes, Unset): + incomplete_causes = [] + for incomplete_causes_item_data in self.incomplete_causes: + incomplete_causes_item: Literal["UNKNOWN"] | str + if isinstance(incomplete_causes_item_data, IncompleteCauseType0): + incomplete_causes_item = incomplete_causes_item_data.value + else: + incomplete_causes_item = incomplete_causes_item_data + incomplete_causes.append(incomplete_causes_item) + is_deep_review = self.is_deep_review local_reverifications: list[dict[str, Any]] | Unset = UNSET @@ -686,6 +719,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["deep_review_escalation"] = deep_review_escalation if diff_stats is not UNSET: field_dict["diff_stats"] = diff_stats + if environments is not UNSET: + field_dict["environments"] = environments if fix_generation_enabled is not UNSET: field_dict["fix_generation_enabled"] = fix_generation_enabled if head_commit_sha is not UNSET: @@ -694,6 +729,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["head_commit_url"] = head_commit_url if head_ref is not UNSET: field_dict["head_ref"] = head_ref + if incomplete_causes is not UNSET: + field_dict["incomplete_causes"] = incomplete_causes if is_deep_review is not UNSET: field_dict["is_deep_review"] = is_deep_review if local_reverifications is not UNSET: @@ -769,6 +806,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.customer_assessment import CustomerAssessment # noqa: PLC0415 from ..models.customer_code_assessment import CustomerCodeAssessment # noqa: PLC0415 from ..models.deep_review_escalation import DeepReviewEscalation # noqa: PLC0415 + from ..models.environment_check import EnvironmentCheck # noqa: PLC0415 from ..models.local_reverification import LocalReverification # noqa: PLC0415 from ..models.open_items_view import OpenItemsView # noqa: PLC0415 from ..models.provider_wait import ProviderWait # noqa: PLC0415 @@ -998,6 +1036,15 @@ def _parse_diff_stats(data: object) -> None | ReviewDiffStats | Unset: diff_stats = _parse_diff_stats(d.pop("diff_stats", UNSET)) + _environments = d.pop("environments", UNSET) + environments: list[EnvironmentCheck] | Unset = UNSET + if _environments is not UNSET: + environments = [] + for environments_item_data in _environments: + environments_item = EnvironmentCheck.from_dict(environments_item_data) + + environments.append(environments_item) + fix_generation_enabled = d.pop("fix_generation_enabled", UNSET) def _parse_head_commit_sha(data: object) -> None | str | Unset: @@ -1027,6 +1074,36 @@ def _parse_head_ref(data: object) -> None | str | Unset: head_ref = _parse_head_ref(d.pop("head_ref", UNSET)) + _incomplete_causes = d.pop("incomplete_causes", UNSET) + incomplete_causes: list[IncompleteCauseType0 | Literal["UNKNOWN"]] | Unset = UNSET + if _incomplete_causes is not UNSET: + incomplete_causes = [] + for incomplete_causes_item_data in _incomplete_causes: + + def _parse_incomplete_causes_item( + data: object, + ) -> IncompleteCauseType0 | Literal["UNKNOWN"]: + try: + if not isinstance(data, str): + raise TypeError() + componentsschemas_incomplete_cause_type_0 = IncompleteCauseType0(data) + + return componentsschemas_incomplete_cause_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not (type(data) is str and data == "UNKNOWN"): + raise TypeError() + componentsschemas_incomplete_cause_type_1 = cast(Literal["UNKNOWN"], data) + if componentsschemas_incomplete_cause_type_1 != "UNKNOWN": + raise ValueError( + f"/components/schemas/IncompleteCause_type_1 must match const 'UNKNOWN', got '{componentsschemas_incomplete_cause_type_1}'" + ) + return componentsschemas_incomplete_cause_type_1 + + incomplete_causes_item = _parse_incomplete_causes_item(incomplete_causes_item_data) + + incomplete_causes.append(incomplete_causes_item) + is_deep_review = d.pop("is_deep_review", UNSET) _local_reverifications = d.pop("local_reverifications", UNSET) @@ -1452,10 +1529,12 @@ def _parse_walkthrough(data: object) -> None | Unset | WalkthroughView: current_head_commit_sha=current_head_commit_sha, deep_review_escalation=deep_review_escalation, diff_stats=diff_stats, + environments=environments, fix_generation_enabled=fix_generation_enabled, head_commit_sha=head_commit_sha, head_commit_url=head_commit_url, head_ref=head_ref, + incomplete_causes=incomplete_causes, is_deep_review=is_deep_review, local_reverifications=local_reverifications, merge_gate=merge_gate, diff --git a/proofline/_generated/models/environment_check.py b/proofline/_generated/models/environment_check.py new file mode 100644 index 00000000..9a47bf94 --- /dev/null +++ b/proofline/_generated/models/environment_check.py @@ -0,0 +1,257 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, Literal, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EnvironmentCheck") + + +@_attrs_define +class EnvironmentCheck: + """One environment linked to the reviewed repository, and whether this + review checked it. + + Attributes: + environment_display_name (str): The environment's display name. + state (Literal['CHECKED'] | Literal['CHECKING'] | Literal['NOT_APPLICABLE'] | Literal['NOT_CHECKED']): + reason (Literal['ENDED'] | Literal['FORK_PULL_REQUEST'] | Literal['NOT_COVERED'] | + Literal['PULL_REQUEST_REVIEWS_OFF'] | Literal['UNFINISHED'] | None | Unset): Why the environment was not checked + or does not apply. Null when it + was checked or its check is still running. + """ + + environment_display_name: str + state: ( + Literal["CHECKED"] + | Literal["CHECKING"] + | Literal["NOT_APPLICABLE"] + | Literal["NOT_CHECKED"] + ) + reason: ( + Literal["ENDED"] + | Literal["FORK_PULL_REQUEST"] + | Literal["NOT_COVERED"] + | Literal["PULL_REQUEST_REVIEWS_OFF"] + | Literal["UNFINISHED"] + | None + | Unset + ) = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + environment_display_name = self.environment_display_name + + state: ( + Literal["CHECKED"] + | Literal["CHECKING"] + | Literal["NOT_APPLICABLE"] + | Literal["NOT_CHECKED"] + ) + state = self.state + + reason: ( + Literal["ENDED"] + | Literal["FORK_PULL_REQUEST"] + | Literal["NOT_COVERED"] + | Literal["PULL_REQUEST_REVIEWS_OFF"] + | Literal["UNFINISHED"] + | None + | Unset + ) + if isinstance(self.reason, Unset): + reason = UNSET + else: + reason = self.reason + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "environment_display_name": environment_display_name, + "state": state, + } + ) + if reason is not UNSET: + field_dict["reason"] = reason + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + environment_display_name = d.pop("environment_display_name") + + def _parse_state( + data: object, + ) -> ( + Literal["CHECKED"] + | Literal["CHECKING"] + | Literal["NOT_APPLICABLE"] + | Literal["NOT_CHECKED"] + ): + try: + if not (type(data) is str and data == "CHECKED"): + raise TypeError() + componentsschemas_environment_check_state_type_0 = cast(Literal["CHECKED"], data) + if componentsschemas_environment_check_state_type_0 != "CHECKED": + raise ValueError( + f"/components/schemas/EnvironmentCheckState_type_0 must match const 'CHECKED', got '{componentsschemas_environment_check_state_type_0}'" + ) + return componentsschemas_environment_check_state_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not (type(data) is str and data == "CHECKING"): + raise TypeError() + componentsschemas_environment_check_state_type_1 = cast(Literal["CHECKING"], data) + if componentsschemas_environment_check_state_type_1 != "CHECKING": + raise ValueError( + f"/components/schemas/EnvironmentCheckState_type_1 must match const 'CHECKING', got '{componentsschemas_environment_check_state_type_1}'" + ) + return componentsschemas_environment_check_state_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not (type(data) is str and data == "NOT_CHECKED"): + raise TypeError() + componentsschemas_environment_check_state_type_2 = cast( + Literal["NOT_CHECKED"], data + ) + if componentsschemas_environment_check_state_type_2 != "NOT_CHECKED": + raise ValueError( + f"/components/schemas/EnvironmentCheckState_type_2 must match const 'NOT_CHECKED', got '{componentsschemas_environment_check_state_type_2}'" + ) + return componentsschemas_environment_check_state_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not (type(data) is str and data == "NOT_APPLICABLE"): + raise TypeError() + componentsschemas_environment_check_state_type_3 = cast(Literal["NOT_APPLICABLE"], data) + if componentsschemas_environment_check_state_type_3 != "NOT_APPLICABLE": + raise ValueError( + f"/components/schemas/EnvironmentCheckState_type_3 must match const 'NOT_APPLICABLE', got '{componentsschemas_environment_check_state_type_3}'" + ) + return componentsschemas_environment_check_state_type_3 + + state = _parse_state(d.pop("state")) + + def _parse_reason( + data: object, + ) -> ( + Literal["ENDED"] + | Literal["FORK_PULL_REQUEST"] + | Literal["NOT_COVERED"] + | Literal["PULL_REQUEST_REVIEWS_OFF"] + | Literal["UNFINISHED"] + | None + | Unset + ): + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not (type(data) is str and data == "NOT_COVERED"): + raise TypeError() + componentsschemas_environment_check_reason_type_0 = cast( + Literal["NOT_COVERED"], data + ) + if componentsschemas_environment_check_reason_type_0 != "NOT_COVERED": + raise ValueError( + f"/components/schemas/EnvironmentCheckReason_type_0 must match const 'NOT_COVERED', got '{componentsschemas_environment_check_reason_type_0}'" + ) + return componentsschemas_environment_check_reason_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not (type(data) is str and data == "FORK_PULL_REQUEST"): + raise TypeError() + componentsschemas_environment_check_reason_type_1 = cast( + Literal["FORK_PULL_REQUEST"], data + ) + if componentsschemas_environment_check_reason_type_1 != "FORK_PULL_REQUEST": + raise ValueError( + f"/components/schemas/EnvironmentCheckReason_type_1 must match const 'FORK_PULL_REQUEST', got '{componentsschemas_environment_check_reason_type_1}'" + ) + return componentsschemas_environment_check_reason_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not (type(data) is str and data == "UNFINISHED"): + raise TypeError() + componentsschemas_environment_check_reason_type_2 = cast( + Literal["UNFINISHED"], data + ) + if componentsschemas_environment_check_reason_type_2 != "UNFINISHED": + raise ValueError( + f"/components/schemas/EnvironmentCheckReason_type_2 must match const 'UNFINISHED', got '{componentsschemas_environment_check_reason_type_2}'" + ) + return componentsschemas_environment_check_reason_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not (type(data) is str and data == "ENDED"): + raise TypeError() + componentsschemas_environment_check_reason_type_3 = cast(Literal["ENDED"], data) + if componentsschemas_environment_check_reason_type_3 != "ENDED": + raise ValueError( + f"/components/schemas/EnvironmentCheckReason_type_3 must match const 'ENDED', got '{componentsschemas_environment_check_reason_type_3}'" + ) + return componentsschemas_environment_check_reason_type_3 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not (type(data) is str and data == "PULL_REQUEST_REVIEWS_OFF"): + raise TypeError() + componentsschemas_environment_check_reason_type_4 = cast( + Literal["PULL_REQUEST_REVIEWS_OFF"], data + ) + if componentsschemas_environment_check_reason_type_4 != "PULL_REQUEST_REVIEWS_OFF": + raise ValueError( + f"/components/schemas/EnvironmentCheckReason_type_4 must match const 'PULL_REQUEST_REVIEWS_OFF', got '{componentsschemas_environment_check_reason_type_4}'" + ) + return componentsschemas_environment_check_reason_type_4 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + Literal["ENDED"] + | Literal["FORK_PULL_REQUEST"] + | Literal["NOT_COVERED"] + | Literal["PULL_REQUEST_REVIEWS_OFF"] + | Literal["UNFINISHED"] + | None + | Unset, + data, + ) + + reason = _parse_reason(d.pop("reason", UNSET)) + + environment_check = cls( + environment_display_name=environment_display_name, + state=state, + reason=reason, + ) + + environment_check.additional_properties = d + return environment_check + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/proofline/_generated/models/incomplete_cause_type_0.py b/proofline/_generated/models/incomplete_cause_type_0.py new file mode 100644 index 00000000..27b74abd --- /dev/null +++ b/proofline/_generated/models/incomplete_cause_type_0.py @@ -0,0 +1,12 @@ +from enum import StrEnum + + +class IncompleteCauseType0(StrEnum): + EVIDENCE_UNAVAILABLE = "EVIDENCE_UNAVAILABLE" + HYPOTHESES_UNRESOLVED = "HYPOTHESES_UNRESOLVED" + MODEL_BUDGET_EXHAUSTED = "MODEL_BUDGET_EXHAUSTED" + NOT_CONFIGURED = "NOT_CONFIGURED" + POLICY_EXCLUDED = "POLICY_EXCLUDED" + + def __str__(self) -> str: + return str(self.value) diff --git a/proofline/_generated/models/review_summary.py b/proofline/_generated/models/review_summary.py index 23b330a9..91f36749 100644 --- a/proofline/_generated/models/review_summary.py +++ b/proofline/_generated/models/review_summary.py @@ -2,15 +2,17 @@ import datetime from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, Literal, TypeVar, cast from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.incomplete_cause_type_0 import IncompleteCauseType0 from ..types import UNSET, Unset if TYPE_CHECKING: + from ..models.actor_view import ActorView from ..models.refresh_view import RefreshView @@ -50,6 +52,11 @@ class ReviewSummary: which is not a commit. Absent when the review recorded none. head_commit_url (None | str | Unset): The exact revision reviewed. A commit URL, never a branch URL: the branch moves, the reviewed input does not. Absent for a patch review. + incomplete_causes (list[IncompleteCauseType0 | Literal['UNKNOWN']] | Unset): Why an `INCOMPLETE` review ended + incomplete, as its incomplete + assessments recorded it, in name order. `UNKNOWN` alone when none + recorded a cause. Absent for every other status, and on reads other + than the reviews list and a single review. merge_group_pull_request_numbers (list[int] | Unset): For a `MERGE_GROUP` review, the pull requests GitHub queued in the group, in number order. Absent for every other kind, and until @@ -87,6 +94,10 @@ class ReviewSummary: repository. repository_url (None | str | Unset): The repository on GitHub. Absent when the deployment's web base cannot be joined with the stored name. + requested_by (ActorView | None | Unset): Who asked for this review, for the reviews a person asked for: the + run-now button, a rerun, a pull request `review` command, or local + changes and pushed commits sent from the CLI or an editor. Absent on + automatic reviews, and on reviews recorded before requesters were. run_number (int | None | Unset): One-based, append-only ordinal within one repository pull request. """ @@ -104,6 +115,7 @@ class ReviewSummary: current_head_commit_sha: None | str | Unset = UNSET head_commit_sha: None | str | Unset = UNSET head_commit_url: None | str | Unset = UNSET + incomplete_causes: list[IncompleteCauseType0 | Literal["UNKNOWN"]] | Unset = UNSET merge_group_pull_request_numbers: list[int] | Unset = UNSET publication_detail: None | str | Unset = UNSET pull_request_author_avatar_url: None | str | Unset = UNSET @@ -120,10 +132,12 @@ class ReviewSummary: repository_id: None | Unset | UUID = UNSET repository_name: None | str | Unset = UNSET repository_url: None | str | Unset = UNSET + requested_by: ActorView | None | Unset = UNSET run_number: int | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.actor_view import ActorView # noqa: PLC0415 from ..models.refresh_view import RefreshView # noqa: PLC0415 assessment_count = self.assessment_count @@ -172,6 +186,17 @@ def to_dict(self) -> dict[str, Any]: else: head_commit_url = self.head_commit_url + incomplete_causes: list[Literal["UNKNOWN"] | str] | Unset = UNSET + if not isinstance(self.incomplete_causes, Unset): + incomplete_causes = [] + for incomplete_causes_item_data in self.incomplete_causes: + incomplete_causes_item: Literal["UNKNOWN"] | str + if isinstance(incomplete_causes_item_data, IncompleteCauseType0): + incomplete_causes_item = incomplete_causes_item_data.value + else: + incomplete_causes_item = incomplete_causes_item_data + incomplete_causes.append(incomplete_causes_item) + merge_group_pull_request_numbers: list[int] | Unset = UNSET if not isinstance(self.merge_group_pull_request_numbers, Unset): merge_group_pull_request_numbers = self.merge_group_pull_request_numbers @@ -270,6 +295,14 @@ def to_dict(self) -> dict[str, Any]: else: repository_url = self.repository_url + requested_by: dict[str, Any] | None | Unset + if isinstance(self.requested_by, Unset): + requested_by = UNSET + elif isinstance(self.requested_by, ActorView): + requested_by = self.requested_by.to_dict() + else: + requested_by = self.requested_by + run_number: int | None | Unset if isinstance(self.run_number, Unset): run_number = UNSET @@ -300,6 +333,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["head_commit_sha"] = head_commit_sha if head_commit_url is not UNSET: field_dict["head_commit_url"] = head_commit_url + if incomplete_causes is not UNSET: + field_dict["incomplete_causes"] = incomplete_causes if merge_group_pull_request_numbers is not UNSET: field_dict["merge_group_pull_request_numbers"] = merge_group_pull_request_numbers if publication_detail is not UNSET: @@ -332,6 +367,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["repository_name"] = repository_name if repository_url is not UNSET: field_dict["repository_url"] = repository_url + if requested_by is not UNSET: + field_dict["requested_by"] = requested_by if run_number is not UNSET: field_dict["run_number"] = run_number @@ -339,6 +376,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.actor_view import ActorView # noqa: PLC0415 from ..models.refresh_view import RefreshView # noqa: PLC0415 d = dict(src_dict) @@ -408,6 +446,36 @@ def _parse_head_commit_url(data: object) -> None | str | Unset: head_commit_url = _parse_head_commit_url(d.pop("head_commit_url", UNSET)) + _incomplete_causes = d.pop("incomplete_causes", UNSET) + incomplete_causes: list[IncompleteCauseType0 | Literal["UNKNOWN"]] | Unset = UNSET + if _incomplete_causes is not UNSET: + incomplete_causes = [] + for incomplete_causes_item_data in _incomplete_causes: + + def _parse_incomplete_causes_item( + data: object, + ) -> IncompleteCauseType0 | Literal["UNKNOWN"]: + try: + if not isinstance(data, str): + raise TypeError() + componentsschemas_incomplete_cause_type_0 = IncompleteCauseType0(data) + + return componentsschemas_incomplete_cause_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not (type(data) is str and data == "UNKNOWN"): + raise TypeError() + componentsschemas_incomplete_cause_type_1 = cast(Literal["UNKNOWN"], data) + if componentsschemas_incomplete_cause_type_1 != "UNKNOWN": + raise ValueError( + f"/components/schemas/IncompleteCause_type_1 must match const 'UNKNOWN', got '{componentsschemas_incomplete_cause_type_1}'" + ) + return componentsschemas_incomplete_cause_type_1 + + incomplete_causes_item = _parse_incomplete_causes_item(incomplete_causes_item_data) + + incomplete_causes.append(incomplete_causes_item) + merge_group_pull_request_numbers = cast( list[int], d.pop("merge_group_pull_request_numbers", UNSET) ) @@ -573,6 +641,23 @@ def _parse_repository_url(data: object) -> None | str | Unset: repository_url = _parse_repository_url(d.pop("repository_url", UNSET)) + def _parse_requested_by(data: object) -> ActorView | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + requested_by_type_0 = ActorView.from_dict(data) + + return requested_by_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(ActorView | None | Unset, data) + + requested_by = _parse_requested_by(d.pop("requested_by", UNSET)) + def _parse_run_number(data: object) -> int | None | Unset: if data is None: return data @@ -597,6 +682,7 @@ def _parse_run_number(data: object) -> int | None | Unset: current_head_commit_sha=current_head_commit_sha, head_commit_sha=head_commit_sha, head_commit_url=head_commit_url, + incomplete_causes=incomplete_causes, merge_group_pull_request_numbers=merge_group_pull_request_numbers, publication_detail=publication_detail, pull_request_author_avatar_url=pull_request_author_avatar_url, @@ -613,6 +699,7 @@ def _parse_run_number(data: object) -> int | None | Unset: repository_id=repository_id, repository_name=repository_name, repository_url=repository_url, + requested_by=requested_by, run_number=run_number, ) diff --git a/proofline/_transport.py b/proofline/_transport.py index 8638fd25..673835c8 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -38,7 +38,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "5.2.0" +VERSION = "5.3.0" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index bf8d16f4..d7524f58 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "5.2.0" +version = "5.3.0" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" From ade0ef76a561f9d5edafd5b123550039b27409aa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 13 Nov 2026 20:00:03 +0000 Subject: [PATCH 21/38] Update distribution --- openapi.public.json | 10 ++++++++- .../models/customer_review_detail.py | 22 +++++++++++++++++++ proofline/_transport.py | 2 +- pyproject.toml | 2 +- 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/openapi.public.json b/openapi.public.json index 89b055bb..b6c3f380 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -1674,6 +1674,14 @@ "null" ] }, + "cost_microcredits": { + "description": "The credits this run was charged so far, in microcredits, whoever\n paid: the plan, the free review month or the organization's credits.\n Null for a caller who is not a member of the organization.", + "format": "int64", + "type": [ + "integer", + "null" + ] + }, "created_at": { "description": "When the review was created.", "format": "date-time", @@ -5988,7 +5996,7 @@ }, "info": { "title": "Proofline Review API", - "version": "5.3.0" + "version": "5.4.0" }, "openapi": "3.1.0", "paths": { diff --git a/proofline/_generated/models/customer_review_detail.py b/proofline/_generated/models/customer_review_detail.py index 4d5ebcb5..f7163c58 100644 --- a/proofline/_generated/models/customer_review_detail.py +++ b/proofline/_generated/models/customer_review_detail.py @@ -99,6 +99,9 @@ class CustomerReviewDetail: head GitHub does not have. completed_at (datetime.datetime | None | Unset): When the review reached a terminal status. Absent while it is still pending or running. + cost_microcredits (int | None | Unset): The credits this run was charged so far, in microcredits, whoever + paid: the plan, the free review month or the organization's credits. + Null for a caller who is not a member of the organization. current_head_commit_sha (None | str | Unset): The pull request's head commit as the latest provider projection reports it, which can differ from `head_commit_sha`. Set only on a single-review read, and absent for a deployment review or a pull request with no projection. @@ -235,6 +238,7 @@ class CustomerReviewDetail: code_assessment: CustomerCodeAssessment | None | Unset = UNSET compare_url: None | str | Unset = UNSET completed_at: datetime.datetime | None | Unset = UNSET + cost_microcredits: int | None | Unset = UNSET current_head_commit_sha: None | str | Unset = UNSET deep_review_escalation: DeepReviewEscalation | None | Unset = UNSET diff_stats: None | ReviewDiffStats | Unset = UNSET @@ -399,6 +403,12 @@ def to_dict(self) -> dict[str, Any]: else: completed_at = self.completed_at + cost_microcredits: int | None | Unset + if isinstance(self.cost_microcredits, Unset): + cost_microcredits = UNSET + else: + cost_microcredits = self.cost_microcredits + current_head_commit_sha: None | str | Unset if isinstance(self.current_head_commit_sha, Unset): current_head_commit_sha = UNSET @@ -713,6 +723,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["compare_url"] = compare_url if completed_at is not UNSET: field_dict["completed_at"] = completed_at + if cost_microcredits is not UNSET: + field_dict["cost_microcredits"] = cost_microcredits if current_head_commit_sha is not UNSET: field_dict["current_head_commit_sha"] = current_head_commit_sha if deep_review_escalation is not UNSET: @@ -989,6 +1001,15 @@ def _parse_completed_at(data: object) -> datetime.datetime | None | Unset: completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) + def _parse_cost_microcredits(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + cost_microcredits = _parse_cost_microcredits(d.pop("cost_microcredits", UNSET)) + def _parse_current_head_commit_sha(data: object) -> None | str | Unset: if data is None: return data @@ -1526,6 +1547,7 @@ def _parse_walkthrough(data: object) -> None | Unset | WalkthroughView: code_assessment=code_assessment, compare_url=compare_url, completed_at=completed_at, + cost_microcredits=cost_microcredits, current_head_commit_sha=current_head_commit_sha, deep_review_escalation=deep_review_escalation, diff_stats=diff_stats, diff --git a/proofline/_transport.py b/proofline/_transport.py index 673835c8..1f195f04 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -38,7 +38,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "5.3.0" +VERSION = "5.4.0" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index d7524f58..63073cb2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "5.3.0" +version = "5.4.0" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" From 6aa929ab5f71d39bae56eb635bc239e6802df494 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 13 Nov 2026 23:36:48 +0000 Subject: [PATCH 22/38] Update distribution --- openapi.public.json | 12 ++++++- .../models/customer_code_assessment.py | 33 +++++++++++++++++++ proofline/_transport.py | 2 +- pyproject.toml | 2 +- 4 files changed, 46 insertions(+), 3 deletions(-) diff --git a/openapi.public.json b/openapi.public.json index b6c3f380..c029e479 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -1189,6 +1189,16 @@ "null" ] }, + "reason_codes": { + "description": "Public causes of an `INCOMPLETE` code assessment: `OUT_OF_CREDITS`\n when credits refused its model. Absent otherwise; other recorded\n details stay private.", + "items": { + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, "started_at": { "description": "When the code assessment started. Null until it starts.", "format": "date-time", @@ -5996,7 +6006,7 @@ }, "info": { "title": "Proofline Review API", - "version": "5.4.0" + "version": "5.5.0" }, "openapi": "3.1.0", "paths": { diff --git a/proofline/_generated/models/customer_code_assessment.py b/proofline/_generated/models/customer_code_assessment.py index a920ddf6..0d789a38 100644 --- a/proofline/_generated/models/customer_code_assessment.py +++ b/proofline/_generated/models/customer_code_assessment.py @@ -39,6 +39,9 @@ class CustomerCodeAssessment: incompleteness_kind (None | str | Unset): Why an `INCOMPLETE` code assessment is incomplete: `NOT_CONFIGURED`, `POLICY_EXCLUDED`, `EVIDENCE_UNAVAILABLE`, `HYPOTHESES_UNRESOLVED` or `MODEL_BUDGET_EXHAUSTED`. Null otherwise. + reason_codes (list[str] | None | Unset): Public causes of an `INCOMPLETE` code assessment: `OUT_OF_CREDITS` + when credits refused its model. Absent otherwise; other recorded + details stay private. started_at (datetime.datetime | None | Unset): When the code assessment started. Null until it starts. """ @@ -50,6 +53,7 @@ class CustomerCodeAssessment: completed_at: datetime.datetime | None | Unset = UNSET coverage_details: list[str] | Unset = UNSET incompleteness_kind: None | str | Unset = UNSET + reason_codes: list[str] | None | Unset = UNSET started_at: datetime.datetime | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -89,6 +93,15 @@ def to_dict(self) -> dict[str, Any]: else: incompleteness_kind = self.incompleteness_kind + reason_codes: list[str] | None | Unset + if isinstance(self.reason_codes, Unset): + reason_codes = UNSET + elif isinstance(self.reason_codes, list): + reason_codes = self.reason_codes + + else: + reason_codes = self.reason_codes + started_at: None | str | Unset if isinstance(self.started_at, Unset): started_at = UNSET @@ -114,6 +127,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["coverage_details"] = coverage_details if incompleteness_kind is not UNSET: field_dict["incompleteness_kind"] = incompleteness_kind + if reason_codes is not UNSET: + field_dict["reason_codes"] = reason_codes if started_at is not UNSET: field_dict["started_at"] = started_at @@ -185,6 +200,23 @@ def _parse_incompleteness_kind(data: object) -> None | str | Unset: incompleteness_kind = _parse_incompleteness_kind(d.pop("incompleteness_kind", UNSET)) + def _parse_reason_codes(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + reason_codes_type_0 = cast(list[str], data) + + return reason_codes_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + reason_codes = _parse_reason_codes(d.pop("reason_codes", UNSET)) + def _parse_started_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data @@ -211,6 +243,7 @@ def _parse_started_at(data: object) -> datetime.datetime | None | Unset: completed_at=completed_at, coverage_details=coverage_details, incompleteness_kind=incompleteness_kind, + reason_codes=reason_codes, started_at=started_at, ) diff --git a/proofline/_transport.py b/proofline/_transport.py index 1f195f04..3e6ba278 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -38,7 +38,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "5.4.0" +VERSION = "5.5.0" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index 63073cb2..fb47fea0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "5.4.0" +version = "5.5.0" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" From ad7abf2c5e7a3b38229cccdb53fc757497c52927 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 14 Nov 2026 05:33:57 +0000 Subject: [PATCH 23/38] Update distribution --- openapi.public.json | 2 +- proofline/__init__.py | 4 ++++ proofline/_transport.py | 2 +- pyproject.toml | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/openapi.public.json b/openapi.public.json index c029e479..d10516a3 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -6006,7 +6006,7 @@ }, "info": { "title": "Proofline Review API", - "version": "5.5.0" + "version": "5.6.0" }, "openapi": "3.1.0", "paths": { diff --git a/proofline/__init__.py b/proofline/__init__.py index 61bd6294..5704485b 100644 --- a/proofline/__init__.py +++ b/proofline/__init__.py @@ -25,6 +25,8 @@ RunNowMode, RunNowRequest, RunNowResponse, + ScanRequestBody, + ScanResponse, StartSession, StopResponse, UploadedReport, @@ -68,6 +70,8 @@ "RunNowRefusal", "RunNowRequest", "RunNowResponse", + "ScanRequestBody", + "ScanResponse", "SecretStr", "StartSession", "StopResponse", diff --git a/proofline/_transport.py b/proofline/_transport.py index 3e6ba278..f7723032 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -38,7 +38,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "5.5.0" +VERSION = "5.6.0" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index fb47fea0..a8eeaaf7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "5.5.0" +version = "5.6.0" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" From 081294a6e8d69da857060ba52c2699e4497d4554 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 14 Nov 2026 15:04:44 +0000 Subject: [PATCH 24/38] Update distribution --- openapi.public.json | 36 ++++++++- proofline/_generated/models/__init__.py | 2 + .../_generated/models/code_ceiling_stop.py | 74 +++++++++++++++++++ .../models/customer_code_assessment.py | 36 +++++++++ proofline/_transport.py | 2 +- pyproject.toml | 2 +- 6 files changed, 149 insertions(+), 3 deletions(-) create mode 100644 proofline/_generated/models/code_ceiling_stop.py diff --git a/openapi.public.json b/openapi.public.json index d10516a3..7f795a32 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -653,6 +653,29 @@ } ] }, + "CodeCeilingStop": { + "description": "What a code assessment had read when its head's spending ceiling stopped\n it. A rerun of the same commit runs under the same ceiling.", + "properties": { + "changed_files": { + "description": "The distinct files the reviewed change touched.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "unfinished_paths": { + "description": "The changed files of each part of the change the ceiling stopped or\n never reached, in review order. The assessment may have read some of\n their changed lines, so this lists files it did not finish. Empty\n when the ceiling stopped it after every part was read.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "changed_files", + "unfinished_paths" + ], + "type": "object" + }, "CommentAddressEvaluationView": { "description": "One stored post-merge judgment of a finding comment.", "properties": { @@ -1151,6 +1174,17 @@ "description": "The base commit the code assessment compared the head with.", "type": "string" }, + "ceiling_stop": { + "anyOf": [ + { + "$ref": "#/components/schemas/CodeCeilingStop" + }, + { + "type": "null" + } + ], + "description": "How much of the change the code assessment read before its head's\n spending ceiling stopped it. Null for every other ending, and for an\n assessment that recorded no change map." + }, "completed_at": { "description": "When the code assessment ended. Null while it has not.", "format": "date-time", @@ -6006,7 +6040,7 @@ }, "info": { "title": "Proofline Review API", - "version": "5.6.0" + "version": "5.7.0" }, "openapi": "3.1.0", "paths": { diff --git a/proofline/_generated/models/__init__.py b/proofline/_generated/models/__init__.py index 87856a91..3ef061a6 100644 --- a/proofline/_generated/models/__init__.py +++ b/proofline/_generated/models/__init__.py @@ -17,6 +17,7 @@ from .ci_failure_attribution import CiFailureAttribution from .ci_failure_line import CiFailureLine from .code_assessment_status_type_0 import CodeAssessmentStatusType0 +from .code_ceiling_stop import CodeCeilingStop from .comment_address_evaluation_view import CommentAddressEvaluationView from .comment_address_outcome import CommentAddressOutcome from .comment_reaction import CommentReaction @@ -178,6 +179,7 @@ "CiFailureAttribution", "CiFailureLine", "CodeAssessmentStatusType0", + "CodeCeilingStop", "CommentAddressEvaluationView", "CommentAddressOutcome", "CommentReaction", diff --git a/proofline/_generated/models/code_ceiling_stop.py b/proofline/_generated/models/code_ceiling_stop.py new file mode 100644 index 00000000..b84d2e55 --- /dev/null +++ b/proofline/_generated/models/code_ceiling_stop.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CodeCeilingStop") + + +@_attrs_define +class CodeCeilingStop: + """What a code assessment had read when its head's spending ceiling stopped + it. A rerun of the same commit runs under the same ceiling. + + Attributes: + changed_files (int): The distinct files the reviewed change touched. + unfinished_paths (list[str]): The changed files of each part of the change the ceiling stopped or + never reached, in review order. The assessment may have read some of + their changed lines, so this lists files it did not finish. Empty + when the ceiling stopped it after every part was read. + """ + + changed_files: int + unfinished_paths: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + changed_files = self.changed_files + + unfinished_paths = self.unfinished_paths + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "changed_files": changed_files, + "unfinished_paths": unfinished_paths, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + changed_files = d.pop("changed_files") + + unfinished_paths = cast(list[str], d.pop("unfinished_paths")) + + code_ceiling_stop = cls( + changed_files=changed_files, + unfinished_paths=unfinished_paths, + ) + + code_ceiling_stop.additional_properties = d + return code_ceiling_stop + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/proofline/_generated/models/customer_code_assessment.py b/proofline/_generated/models/customer_code_assessment.py index 0d789a38..6e02b7ba 100644 --- a/proofline/_generated/models/customer_code_assessment.py +++ b/proofline/_generated/models/customer_code_assessment.py @@ -12,6 +12,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: + from ..models.code_ceiling_stop import CodeCeilingStop from ..models.customer_finding import CustomerFinding @@ -32,6 +33,9 @@ class CustomerCodeAssessment: status (CodeAssessmentStatusType0 | Literal['EXCLUDED']): A code assessment's recorded execution status. It is never a verdict on the change: only `COMPLETED` says the assessment covered what it read. + ceiling_stop (CodeCeilingStop | None | Unset): How much of the change the code assessment read before its head's + spending ceiling stopped it. Null for every other ending, and for an + assessment that recorded no change map. completed_at (datetime.datetime | None | Unset): When the code assessment ended. Null while it has not. coverage_details (list[str] | Unset): Recorded check coverage counts and fixed cancellation causes, without source text. @@ -50,6 +54,7 @@ class CustomerCodeAssessment: head_commit_sha: str id: UUID status: CodeAssessmentStatusType0 | Literal["EXCLUDED"] + ceiling_stop: CodeCeilingStop | None | Unset = UNSET completed_at: datetime.datetime | None | Unset = UNSET coverage_details: list[str] | Unset = UNSET incompleteness_kind: None | str | Unset = UNSET @@ -58,6 +63,8 @@ class CustomerCodeAssessment: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.code_ceiling_stop import CodeCeilingStop # noqa: PLC0415 + base_commit_sha = self.base_commit_sha findings = [] @@ -75,6 +82,14 @@ def to_dict(self) -> dict[str, Any]: else: status = self.status + ceiling_stop: dict[str, Any] | None | Unset + if isinstance(self.ceiling_stop, Unset): + ceiling_stop = UNSET + elif isinstance(self.ceiling_stop, CodeCeilingStop): + ceiling_stop = self.ceiling_stop.to_dict() + else: + ceiling_stop = self.ceiling_stop + completed_at: None | str | Unset if isinstance(self.completed_at, Unset): completed_at = UNSET @@ -121,6 +136,8 @@ def to_dict(self) -> dict[str, Any]: "status": status, } ) + if ceiling_stop is not UNSET: + field_dict["ceiling_stop"] = ceiling_stop if completed_at is not UNSET: field_dict["completed_at"] = completed_at if coverage_details is not UNSET: @@ -136,6 +153,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.code_ceiling_stop import CodeCeilingStop # noqa: PLC0415 from ..models.customer_finding import CustomerFinding # noqa: PLC0415 d = dict(src_dict) @@ -172,6 +190,23 @@ def _parse_status(data: object) -> CodeAssessmentStatusType0 | Literal["EXCLUDED status = _parse_status(d.pop("status")) + def _parse_ceiling_stop(data: object) -> CodeCeilingStop | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + ceiling_stop_type_0 = CodeCeilingStop.from_dict(data) + + return ceiling_stop_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(CodeCeilingStop | None | Unset, data) + + ceiling_stop = _parse_ceiling_stop(d.pop("ceiling_stop", UNSET)) + def _parse_completed_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data @@ -240,6 +275,7 @@ def _parse_started_at(data: object) -> datetime.datetime | None | Unset: head_commit_sha=head_commit_sha, id=id, status=status, + ceiling_stop=ceiling_stop, completed_at=completed_at, coverage_details=coverage_details, incompleteness_kind=incompleteness_kind, diff --git a/proofline/_transport.py b/proofline/_transport.py index f7723032..670b07b3 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -38,7 +38,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "5.6.0" +VERSION = "5.7.0" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index a8eeaaf7..a4132b96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "5.6.0" +version = "5.7.0" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" From bb09db3c3f72861ff847594ed3eb146704250232 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 14 Nov 2026 16:53:26 +0000 Subject: [PATCH 25/38] Update distribution --- openapi.public.json | 2 +- proofline/_generated/models/pull_request_merge_gate.py | 4 ++-- proofline/_transport.py | 2 +- pyproject.toml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openapi.public.json b/openapi.public.json index 7f795a32..5f48167e 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -4149,7 +4149,7 @@ ] }, "review_id": { - "description": "The first review captured for this gate. Null when its trigger was refused before a review existed.", + "description": "The review the gate decides from: the first review captured, or the one retry that replaced a review that could not finish. Null when its trigger was refused before a review existed.", "format": "uuid", "type": [ "string", diff --git a/proofline/_generated/models/pull_request_merge_gate.py b/proofline/_generated/models/pull_request_merge_gate.py index abf3699b..7087f0a0 100644 --- a/proofline/_generated/models/pull_request_merge_gate.py +++ b/proofline/_generated/models/pull_request_merge_gate.py @@ -52,8 +52,8 @@ class PullRequestMergeGate: may differ from the captured PR. reason_code (None | str | Unset): The recorded deterministic decision or refusal reason. Null until a decision is recorded. - review_id (None | Unset | UUID): The first review captured for this gate. Null when its trigger was refused - before a review existed. + review_id (None | Unset | UUID): The review the gate decides from: the first review captured, or the one retry + that replaced a review that could not finish. Null when its trigger was refused before a review existed. """ blocking_severity: str diff --git a/proofline/_transport.py b/proofline/_transport.py index 670b07b3..c5c2c51d 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -38,7 +38,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "5.7.0" +VERSION = "5.7.1" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index a4132b96..3f559729 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "5.7.0" +version = "5.7.1" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" From c663b2068c9c697c5f6cd445db8c4be140b3af37 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 15 Nov 2026 00:01:44 +0000 Subject: [PATCH 26/38] Update distribution --- openapi.public.json | 37 +++++++++- .../models/customer_review_detail.py | 71 +++++++++++++++++++ proofline/_generated/models/review_summary.py | 71 +++++++++++++++++++ proofline/_transport.py | 2 +- pyproject.toml | 2 +- 5 files changed, 180 insertions(+), 3 deletions(-) diff --git a/openapi.public.json b/openapi.public.json index 5f48167e..ce1000f6 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -799,6 +799,17 @@ ], "type": "object" }, + "CountedCause": { + "anyOf": [ + { + "$ref": "#/components/schemas/IncompleteCause" + }, + { + "$ref": "#/components/schemas/CreditRefusalCause" + } + ], + "description": "What a review is counted under: the cause its assessments recorded, or\n `OUT_OF_CREDITS` where an assessment recorded the credit refusal. An\n assessment's detail names that refusal by the rule `public_reason_codes`\n applies; no other detail is read into the summary." + }, "CoverageRefused": { "description": "An upload refused for its content: a symbolic or unknown commit, or a\n report that cannot be read. Nothing is stored.", "properties": { @@ -893,6 +904,16 @@ ], "type": "object" }, + "CreditRefusalCause": { + "description": "The credit refusal, named apart from the `NOT_CONFIGURED` it records.", + "oneOf": [ + { + "const": "OUT_OF_CREDITS", + "description": "The organization had no credits left, so the code lane refused to\n run its model.", + "type": "string" + } + ] + }, "CustomerAssessment": { "properties": { "checks": { @@ -1726,6 +1747,13 @@ "null" ] }, + "counted_incomplete_causes": { + "description": "`incomplete_causes` as the Inbox and the reviews `cause:` search\n count them: `OUT_OF_CREDITS` in place of the `NOT_CONFIGURED` an\n assessment records when credits refused it. Present exactly when\n `incomplete_causes` is.", + "items": { + "$ref": "#/components/schemas/CountedCause" + }, + "type": "array" + }, "created_at": { "description": "When the review was created.", "format": "date-time", @@ -4755,6 +4783,13 @@ "null" ] }, + "counted_incomplete_causes": { + "description": "`incomplete_causes` as the Inbox and the reviews `cause:` search\n count them: `OUT_OF_CREDITS` in place of the `NOT_CONFIGURED` an\n assessment records when credits refused it. Present exactly when\n `incomplete_causes` is.", + "items": { + "$ref": "#/components/schemas/CountedCause" + }, + "type": "array" + }, "created_at": { "description": "When the review was created.", "format": "date-time", @@ -6040,7 +6075,7 @@ }, "info": { "title": "Proofline Review API", - "version": "5.7.0" + "version": "5.8.0" }, "openapi": "3.1.0", "paths": { diff --git a/proofline/_generated/models/customer_review_detail.py b/proofline/_generated/models/customer_review_detail.py index f7163c58..e86fbc6b 100644 --- a/proofline/_generated/models/customer_review_detail.py +++ b/proofline/_generated/models/customer_review_detail.py @@ -102,6 +102,11 @@ class CustomerReviewDetail: cost_microcredits (int | None | Unset): The credits this run was charged so far, in microcredits, whoever paid: the plan, the free review month or the organization's credits. Null for a caller who is not a member of the organization. + counted_incomplete_causes (list[IncompleteCauseType0 | Literal['OUT_OF_CREDITS'] | Literal['UNKNOWN']] | Unset): + `incomplete_causes` as the Inbox and the reviews `cause:` search + count them: `OUT_OF_CREDITS` in place of the `NOT_CONFIGURED` an + assessment records when credits refused it. Present exactly when + `incomplete_causes` is. current_head_commit_sha (None | str | Unset): The pull request's head commit as the latest provider projection reports it, which can differ from `head_commit_sha`. Set only on a single-review read, and absent for a deployment review or a pull request with no projection. @@ -239,6 +244,9 @@ class CustomerReviewDetail: compare_url: None | str | Unset = UNSET completed_at: datetime.datetime | None | Unset = UNSET cost_microcredits: int | None | Unset = UNSET + counted_incomplete_causes: ( + list[IncompleteCauseType0 | Literal["OUT_OF_CREDITS"] | Literal["UNKNOWN"]] | Unset + ) = UNSET current_head_commit_sha: None | str | Unset = UNSET deep_review_escalation: DeepReviewEscalation | None | Unset = UNSET diff_stats: None | ReviewDiffStats | Unset = UNSET @@ -409,6 +417,19 @@ def to_dict(self) -> dict[str, Any]: else: cost_microcredits = self.cost_microcredits + counted_incomplete_causes: ( + list[Literal["OUT_OF_CREDITS"] | Literal["UNKNOWN"] | str] | Unset + ) = UNSET + if not isinstance(self.counted_incomplete_causes, Unset): + counted_incomplete_causes = [] + for counted_incomplete_causes_item_data in self.counted_incomplete_causes: + counted_incomplete_causes_item: Literal["OUT_OF_CREDITS"] | Literal["UNKNOWN"] | str + if isinstance(counted_incomplete_causes_item_data, IncompleteCauseType0): + counted_incomplete_causes_item = counted_incomplete_causes_item_data.value + else: + counted_incomplete_causes_item = counted_incomplete_causes_item_data + counted_incomplete_causes.append(counted_incomplete_causes_item) + current_head_commit_sha: None | str | Unset if isinstance(self.current_head_commit_sha, Unset): current_head_commit_sha = UNSET @@ -725,6 +746,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["completed_at"] = completed_at if cost_microcredits is not UNSET: field_dict["cost_microcredits"] = cost_microcredits + if counted_incomplete_causes is not UNSET: + field_dict["counted_incomplete_causes"] = counted_incomplete_causes if current_head_commit_sha is not UNSET: field_dict["current_head_commit_sha"] = current_head_commit_sha if deep_review_escalation is not UNSET: @@ -1010,6 +1033,53 @@ def _parse_cost_microcredits(data: object) -> int | None | Unset: cost_microcredits = _parse_cost_microcredits(d.pop("cost_microcredits", UNSET)) + _counted_incomplete_causes = d.pop("counted_incomplete_causes", UNSET) + counted_incomplete_causes: ( + list[IncompleteCauseType0 | Literal["OUT_OF_CREDITS"] | Literal["UNKNOWN"]] | Unset + ) = UNSET + if _counted_incomplete_causes is not UNSET: + counted_incomplete_causes = [] + for counted_incomplete_causes_item_data in _counted_incomplete_causes: + + def _parse_counted_incomplete_causes_item( + data: object, + ) -> IncompleteCauseType0 | Literal["OUT_OF_CREDITS"] | Literal["UNKNOWN"]: + try: + if not isinstance(data, str): + raise TypeError() + componentsschemas_incomplete_cause_type_0 = IncompleteCauseType0(data) + + return componentsschemas_incomplete_cause_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not (type(data) is str and data == "UNKNOWN"): + raise TypeError() + componentsschemas_incomplete_cause_type_1 = cast(Literal["UNKNOWN"], data) + if componentsschemas_incomplete_cause_type_1 != "UNKNOWN": + raise ValueError( + f"/components/schemas/IncompleteCause_type_1 must match const 'UNKNOWN', got '{componentsschemas_incomplete_cause_type_1}'" + ) + return componentsschemas_incomplete_cause_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not (type(data) is str and data == "OUT_OF_CREDITS"): + raise TypeError() + componentsschemas_credit_refusal_cause_type_0 = cast( + Literal["OUT_OF_CREDITS"], data + ) + if componentsschemas_credit_refusal_cause_type_0 != "OUT_OF_CREDITS": + raise ValueError( + f"/components/schemas/CreditRefusalCause_type_0 must match const 'OUT_OF_CREDITS', got '{componentsschemas_credit_refusal_cause_type_0}'" + ) + return componentsschemas_credit_refusal_cause_type_0 + + counted_incomplete_causes_item = _parse_counted_incomplete_causes_item( + counted_incomplete_causes_item_data + ) + + counted_incomplete_causes.append(counted_incomplete_causes_item) + def _parse_current_head_commit_sha(data: object) -> None | str | Unset: if data is None: return data @@ -1548,6 +1618,7 @@ def _parse_walkthrough(data: object) -> None | Unset | WalkthroughView: compare_url=compare_url, completed_at=completed_at, cost_microcredits=cost_microcredits, + counted_incomplete_causes=counted_incomplete_causes, current_head_commit_sha=current_head_commit_sha, deep_review_escalation=deep_review_escalation, diff_stats=diff_stats, diff --git a/proofline/_generated/models/review_summary.py b/proofline/_generated/models/review_summary.py index 91f36749..d5a42987 100644 --- a/proofline/_generated/models/review_summary.py +++ b/proofline/_generated/models/review_summary.py @@ -44,6 +44,11 @@ class ReviewSummary: or `UNKNOWN` for a trigger key this build does not recognise. completed_at (datetime.datetime | None | Unset): When the review reached a terminal status. Absent while it is still pending or running. + counted_incomplete_causes (list[IncompleteCauseType0 | Literal['OUT_OF_CREDITS'] | Literal['UNKNOWN']] | Unset): + `incomplete_causes` as the Inbox and the reviews `cause:` search + count them: `OUT_OF_CREDITS` in place of the `NOT_CONFIGURED` an + assessment records when credits refused it. Present exactly when + `incomplete_causes` is. current_head_commit_sha (None | str | Unset): The pull request's head commit as the latest provider projection reports it, which can differ from `head_commit_sha`. Set only on a single-review read, and absent for a deployment review or a pull request with no projection. @@ -112,6 +117,9 @@ class ReviewSummary: status: str trigger_origin: str completed_at: datetime.datetime | None | Unset = UNSET + counted_incomplete_causes: ( + list[IncompleteCauseType0 | Literal["OUT_OF_CREDITS"] | Literal["UNKNOWN"]] | Unset + ) = UNSET current_head_commit_sha: None | str | Unset = UNSET head_commit_sha: None | str | Unset = UNSET head_commit_url: None | str | Unset = UNSET @@ -168,6 +176,19 @@ def to_dict(self) -> dict[str, Any]: else: completed_at = self.completed_at + counted_incomplete_causes: ( + list[Literal["OUT_OF_CREDITS"] | Literal["UNKNOWN"] | str] | Unset + ) = UNSET + if not isinstance(self.counted_incomplete_causes, Unset): + counted_incomplete_causes = [] + for counted_incomplete_causes_item_data in self.counted_incomplete_causes: + counted_incomplete_causes_item: Literal["OUT_OF_CREDITS"] | Literal["UNKNOWN"] | str + if isinstance(counted_incomplete_causes_item_data, IncompleteCauseType0): + counted_incomplete_causes_item = counted_incomplete_causes_item_data.value + else: + counted_incomplete_causes_item = counted_incomplete_causes_item_data + counted_incomplete_causes.append(counted_incomplete_causes_item) + current_head_commit_sha: None | str | Unset if isinstance(self.current_head_commit_sha, Unset): current_head_commit_sha = UNSET @@ -327,6 +348,8 @@ def to_dict(self) -> dict[str, Any]: ) if completed_at is not UNSET: field_dict["completed_at"] = completed_at + if counted_incomplete_causes is not UNSET: + field_dict["counted_incomplete_causes"] = counted_incomplete_causes if current_head_commit_sha is not UNSET: field_dict["current_head_commit_sha"] = current_head_commit_sha if head_commit_sha is not UNSET: @@ -417,6 +440,53 @@ def _parse_completed_at(data: object) -> datetime.datetime | None | Unset: completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) + _counted_incomplete_causes = d.pop("counted_incomplete_causes", UNSET) + counted_incomplete_causes: ( + list[IncompleteCauseType0 | Literal["OUT_OF_CREDITS"] | Literal["UNKNOWN"]] | Unset + ) = UNSET + if _counted_incomplete_causes is not UNSET: + counted_incomplete_causes = [] + for counted_incomplete_causes_item_data in _counted_incomplete_causes: + + def _parse_counted_incomplete_causes_item( + data: object, + ) -> IncompleteCauseType0 | Literal["OUT_OF_CREDITS"] | Literal["UNKNOWN"]: + try: + if not isinstance(data, str): + raise TypeError() + componentsschemas_incomplete_cause_type_0 = IncompleteCauseType0(data) + + return componentsschemas_incomplete_cause_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not (type(data) is str and data == "UNKNOWN"): + raise TypeError() + componentsschemas_incomplete_cause_type_1 = cast(Literal["UNKNOWN"], data) + if componentsschemas_incomplete_cause_type_1 != "UNKNOWN": + raise ValueError( + f"/components/schemas/IncompleteCause_type_1 must match const 'UNKNOWN', got '{componentsschemas_incomplete_cause_type_1}'" + ) + return componentsschemas_incomplete_cause_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not (type(data) is str and data == "OUT_OF_CREDITS"): + raise TypeError() + componentsschemas_credit_refusal_cause_type_0 = cast( + Literal["OUT_OF_CREDITS"], data + ) + if componentsschemas_credit_refusal_cause_type_0 != "OUT_OF_CREDITS": + raise ValueError( + f"/components/schemas/CreditRefusalCause_type_0 must match const 'OUT_OF_CREDITS', got '{componentsschemas_credit_refusal_cause_type_0}'" + ) + return componentsschemas_credit_refusal_cause_type_0 + + counted_incomplete_causes_item = _parse_counted_incomplete_causes_item( + counted_incomplete_causes_item_data + ) + + counted_incomplete_causes.append(counted_incomplete_causes_item) + def _parse_current_head_commit_sha(data: object) -> None | str | Unset: if data is None: return data @@ -679,6 +749,7 @@ def _parse_run_number(data: object) -> int | None | Unset: status=status, trigger_origin=trigger_origin, completed_at=completed_at, + counted_incomplete_causes=counted_incomplete_causes, current_head_commit_sha=current_head_commit_sha, head_commit_sha=head_commit_sha, head_commit_url=head_commit_url, diff --git a/proofline/_transport.py b/proofline/_transport.py index c5c2c51d..20c3008b 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -38,7 +38,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "5.7.1" +VERSION = "5.8.0" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index 3f559729..2ffc2f2c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "5.7.1" +version = "5.8.0" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" From 3b2d9138db880e8bd376bf2c7eed5c948febc264 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 15 Nov 2026 09:52:16 +0000 Subject: [PATCH 27/38] Update distribution --- proofline/_transport.py | 2 +- pyproject.toml | 2 +- tests/test_http.py | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/proofline/_transport.py b/proofline/_transport.py index 20c3008b..c324b197 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -38,7 +38,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "5.8.0" +VERSION = "5.8.1" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index 2ffc2f2c..7c7cd36e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "5.8.0" +version = "5.8.1" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" diff --git a/tests/test_http.py b/tests/test_http.py index d308af0f..f62d93f6 100644 --- a/tests/test_http.py +++ b/tests/test_http.py @@ -758,6 +758,7 @@ async def test_redirect_never_contacts_other_origin(mode: str) -> None: async def test_retry_after_waits_for_server_then_returns_typed_success( mode: str, monkeypatch: pytest.MonkeyPatch ) -> None: + clock = Clock(monkeypatch) with Server( lambda request, index: ( Reply(429, {"detail": "Rate limit."}, {"Retry-After": "2"}) @@ -765,11 +766,10 @@ async def test_retry_after_waits_for_server_then_returns_typed_success( else Reply(body=finding()) ) ) as server: - started = time.monotonic() async with session(mode, server.url) as client: result = await call(client, "get_finding", ORG, FINDING) assert result.id == FINDING - assert time.monotonic() - started >= 2 + assert clock.delays == [2.0] assert len(server.requests) == 2 instant = datetime(2069, 9, 30, tzinfo=UTC) @@ -788,10 +788,9 @@ def now(cls, tz: Any = None) -> datetime: else Reply(body=finding()) ) ) as server: - started = time.monotonic() async with session(mode, server.url) as client: assert (await call(client, "get_finding", ORG, FINDING)).id == FINDING - assert time.monotonic() - started >= 2 + assert clock.delays == [2.0, 2.0] assert len(server.requests) == 2 From 0664d1d71199e278569143f11d6bae68919ee245 Mon Sep 17 00:00:00 2001 From: Suhas Guruprasad Date: Sun, 15 Nov 2026 17:56:13 +0530 Subject: [PATCH 28/38] Hold wait_for_review to the commit the caller names wait_for_review takes head_commit_sha in both clients. A review pinned to another commit ends the wait on the read that shows it and is never COMPLETED. Without the keyword nothing changes. Co-Authored-By: Claude Fable 5.2 --- README.md | 15 +++++ proofline/client.py | 40 ++++++++++-- proofline/outcomes.py | 27 +++++++- tests/test_http.py | 148 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 222 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1bc220e3..8e5eac4b 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,21 @@ except ProoflineError as error: print(error.detail) ``` +## Holding a wait to a commit + +`request_review` names a pull request, and its response names no commit: the review belongs to the head the pull request has when the request arrives. To accept a result only for the commit you hold, pass that commit to `wait_for_review`. + +```python +requested = client.request_review(organization_id, repository_id, 12) +outcome = client.wait_for_review( + organization_id, requested.review_id, head_commit_sha=head_commit_sha, +) +if outcome.status != "COMPLETED": + print(outcome.status, outcome.reason) +``` + +`head_commit_sha` is a full SHA of 40 or 64 hexadecimal characters; any other value raises `ValueError` before a request. A review pinned to another head ends the wait on the read that names it. Its outcome is `INCOMPLETE` whatever the review's own status, its last gap has the reason code `HEAD_COMMIT_MISMATCH`, and `reason` says that the review is pinned to another head commit. A settled review that names no head has `HEAD_COMMIT_UNAVAILABLE` instead and is not `COMPLETED` either. `outcome.review.head_commit_sha` is the commit the review is pinned to. A patch review's head is a derived revision ID, so no commit matches it. In a GitHub Actions `pull_request` job, `GITHUB_SHA` is the merge commit; pass the pull request's head. + ## Review exports `export_reviews` reads one CSV or NDJSON page over the bounded transport. Export tokens require `analytics:read`. diff --git a/proofline/client.py b/proofline/client.py index 0a8239b4..57114842 100644 --- a/proofline/client.py +++ b/proofline/client.py @@ -5,6 +5,7 @@ import math from asyncio import sleep as async_sleep from collections.abc import AsyncIterator, Awaitable, Callable, Iterator +from string import hexdigits from time import monotonic, sleep from types import TracebackType from typing import Any, Self, TypedDict, TypeVar, Unpack, cast @@ -151,6 +152,16 @@ def _page_limits(page_size: int, max_pages: int, max_items: int) -> None: ) +def _head_commit(value: str | None) -> None: + # Only a full SHA names one exact commit; a branch or an abbreviation does not. + if value is not None and ( + not isinstance(value, str) + or len(value) not in (40, 64) + or any(character not in hexdigits for character in value) + ): + raise ValueError("The head commit must be a full 40 or 64 character hexadecimal SHA.") + + def _next_cursor(page: ReviewPage, seen: set[str]) -> str | None: if not isinstance(page.truncated, bool): raise _transport.invalid_response() @@ -476,16 +487,25 @@ def iter_reviews( raise _pagination_limit() def wait_for_review( - self, organization_id: UUID, review_id: UUID, *, timeout: float = 300 + self, + organization_id: UUID, + review_id: UUID, + *, + timeout: float = 300, + head_commit_sha: str | None = None, ) -> ReviewOutcome: """Wait for recorded review completion or return TIMED_OUT. A name lookup still running at the deadline returns TIMED_OUT; it never reports completion. + + head_commit_sha holds the outcome to that commit. A review pinned to + another head ends the wait on that read and is never COMPLETED. """ if not math.isfinite(timeout) or timeout < 0: raise ValueError("The review timeout must be a finite nonnegative number of seconds.") + _head_commit(head_commit_sha) url = _review_url(self._base_url, organization_id, review_id) last: CustomerReviewDetail | None = None deadline = _transport.DEADLINE.set(monotonic() + timeout) @@ -500,12 +520,13 @@ def wait_for_review( raise if (_transport.remaining() or 0) <= 0: break - result = outcome(last, url, review_id=review_id) + result = outcome(last, url, review_id=review_id, head_commit_sha=head_commit_sha) if result is not None: return result sleep(min(interval, _transport.remaining() or 0)) interval = min(60, interval * 2) - return outcome(last, url, "TIMED_OUT") or ReviewOutcome("TIMED_OUT", url) + timed_out = outcome(last, url, "TIMED_OUT", head_commit_sha=head_commit_sha) + return timed_out or ReviewOutcome("TIMED_OUT", url) finally: _transport.DEADLINE.reset(deadline) @@ -830,10 +851,16 @@ async def iter_reviews( raise _pagination_limit() async def wait_for_review( - self, organization_id: UUID, review_id: UUID, *, timeout: float = 300 + self, + organization_id: UUID, + review_id: UUID, + *, + timeout: float = 300, + head_commit_sha: str | None = None, ) -> ReviewOutcome: if not math.isfinite(timeout) or timeout < 0: raise ValueError("The review timeout must be a finite nonnegative number of seconds.") + _head_commit(head_commit_sha) url = _review_url(self._base_url, organization_id, review_id) last: CustomerReviewDetail | None = None deadline = _transport.DEADLINE.set(monotonic() + timeout) @@ -848,11 +875,12 @@ async def wait_for_review( raise if (_transport.remaining() or 0) <= 0: break - result = outcome(last, url, review_id=review_id) + result = outcome(last, url, review_id=review_id, head_commit_sha=head_commit_sha) if result is not None: return result await async_sleep(min(interval, _transport.remaining() or 0)) interval = min(60, interval * 2) - return outcome(last, url, "TIMED_OUT") or ReviewOutcome("TIMED_OUT", url) + timed_out = outcome(last, url, "TIMED_OUT", head_commit_sha=head_commit_sha) + return timed_out or ReviewOutcome("TIMED_OUT", url) finally: _transport.DEADLINE.reset(deadline) diff --git a/proofline/outcomes.py b/proofline/outcomes.py index e76c171c..3d551fa6 100644 --- a/proofline/outcomes.py +++ b/proofline/outcomes.py @@ -18,6 +18,10 @@ ("PENDING", "RUNNING", "COMPLETED", "INCOMPLETE", "FAILED", "STOPPED", "SUPERSEDED", "EXCLUDED") ) _WITHHELD_MARKER = "[withheld: environment value]" +_HEAD_REASONS = { + "HEAD_COMMIT_MISMATCH": "The review is pinned to another head commit.", + "HEAD_COMMIT_UNAVAILABLE": "The review names no head commit.", +} @dataclass(frozen=True) @@ -131,12 +135,23 @@ def _validate(review: CustomerReviewDetail, review_id: UUID | None) -> None: raise _invalid() +def _head_gap(review: CustomerReviewDetail, head_commit_sha: str | None) -> str | None: + # A result is evidence only for the head the review is pinned to. + if head_commit_sha is None: + return None + head = text(review.head_commit_sha) + if head is None: + return "HEAD_COMMIT_UNAVAILABLE" + return None if head.lower() == head_commit_sha.lower() else "HEAD_COMMIT_MISMATCH" + + def outcome( review: CustomerReviewDetail | None, review_url: str, forced: OutcomeStatus | None = None, *, review_id: UUID | None = None, + head_commit_sha: str | None = None, ) -> ReviewOutcome | None: gaps: list[AssessmentGap] = [] if review is None: @@ -196,8 +211,13 @@ def outcome( ) if review.assessment_count != len(review.assessments): gaps.append(AssessmentGap(None, "UNKNOWN", ("ASSESSMENT_HISTORY_UNAVAILABLE",))) + head_gap = _head_gap(review, head_commit_sha) if forced is not None: status = forced + elif head_gap == "HEAD_COMMIT_MISMATCH": + # A pinned head does not change, so nothing this review records later + # can speak for the commit the caller named. + status = "INCOMPLETE" elif review.status in ("PENDING", "RUNNING"): return None elif review.status == "FAILED": @@ -205,9 +225,12 @@ def outcome( elif review.status in ("STOPPED", "SUPERSEDED"): status = "STOPPED" elif review.status == "COMPLETED": - status = "INCOMPLETE" if gaps else "COMPLETED" + status = "INCOMPLETE" if gaps or head_gap else "COMPLETED" else: status = "INCOMPLETE" if not gaps: gaps.append(AssessmentGap(None, review.status, ("REVIEW_STATE_UNAVAILABLE",))) - return ReviewOutcome(status, review_url, review, tuple(gaps)) + if head_gap is None: + return ReviewOutcome(status, review_url, review, tuple(gaps)) + gaps.append(AssessmentGap(None, "UNKNOWN", (head_gap,))) + return ReviewOutcome(status, review_url, review, tuple(gaps), _HEAD_REASONS[head_gap]) diff --git a/tests/test_http.py b/tests/test_http.py index f62d93f6..3cc45f2c 100644 --- a/tests/test_http.py +++ b/tests/test_http.py @@ -1207,6 +1207,154 @@ async def test_failure_and_stop_remain_distinct( assert len(server.requests) == 1 +HEAD = "a" * 40 +OTHER_HEAD = "c" * 40 +PINNED_ELSEWHERE = (None, "UNKNOWN", ("HEAD_COMMIT_MISMATCH",)) +NO_HEAD = (None, "UNKNOWN", ("HEAD_COMMIT_UNAVAILABLE",)) + + +def review_at(head: Any, status: str = "COMPLETED") -> dict[str, Any]: + return {**review(status), "head_commit_sha": head} + + +def gap_facts(result: Any) -> list[tuple[Any, str, tuple[str, ...]]]: + return [(gap.assessment_id, gap.status, gap.reason_codes) for gap in result.gaps] + + +@MODES +async def test_wait_held_to_a_head_commit_never_completes_for_another( + mode: str, monkeypatch: pytest.MonkeyPatch +) -> None: + clock = Clock(monkeypatch) + with Server(lambda request, index: Reply(body=review_at(HEAD))) as server: + async with session(mode, server.url) as client: + for held in (HEAD, HEAD.upper()): + result = await call(client, "wait_for_review", ORG, REVIEW, head_commit_sha=held) + assert (result.status, result.gaps, result.reason) == ("COMPLETED", (), None) + result = await call(client, "wait_for_review", ORG, REVIEW, head_commit_sha=OTHER_HEAD) + assert result.status == "INCOMPLETE" + assert gap_facts(result) == [PINNED_ELSEWHERE] + assert result.reason == "The review is pinned to another head commit." + assert result.review.head_commit_sha == HEAD + assert result.review_url == f"{server.url}/orgs/by-id/{ORG}/reviews/{REVIEW}" + assert HEAD not in repr(result) and OTHER_HEAD not in repr(result) + # Without the keyword the same record completes, as it always has. + result = await call(client, "wait_for_review", ORG, REVIEW) + assert (result.status, result.gaps, result.reason) == ("COMPLETED", (), None) + assert len(server.requests) == 4 + assert clock.delays == [] + + +@MODES +async def test_wait_ends_on_the_read_that_names_another_head( + mode: str, monkeypatch: pytest.MonkeyPatch +) -> None: + clock = Clock(monkeypatch) + responses = [review("PENDING"), review_at(HEAD, "RUNNING"), review_at(HEAD)] + with Server(lambda request, index: Reply(body=responses[index])) as server: + async with session(mode, server.url) as client: + result = await call( + client, "wait_for_review", ORG, REVIEW, timeout=100, head_commit_sha=HEAD + ) + assert (result.status, result.gaps, result.reason) == ("COMPLETED", (), None) + assert len(server.requests) == 3 + assert clock.delays == [5, 10] + with Server(lambda request, index: Reply(body=responses[index])) as server: + async with session(mode, server.url) as client: + result = await call( + client, "wait_for_review", ORG, REVIEW, timeout=100, head_commit_sha=OTHER_HEAD + ) + assert result.status == "INCOMPLETE" + assert result.review.status == "RUNNING" + assert gap_facts(result) == [PINNED_ELSEWHERE] + assert result.reason == "The review is pinned to another head commit." + # The second read names the head, so the review that would complete is never read. + assert len(server.requests) == 2 + assert clock.delays == [5, 10, 5] + + +@MODES +async def test_a_review_of_another_head_is_incomplete_whatever_its_own_status( + mode: str, monkeypatch: pytest.MonkeyPatch +) -> None: + Clock(monkeypatch) + statuses = ["FAILED", "STOPPED", "SUPERSEDED"] + with Server(lambda request, index: Reply(body=review_at(HEAD, statuses[index // 2]))) as server: + async with session(mode, server.url) as client: + for status in statuses: + result = await call( + client, "wait_for_review", ORG, REVIEW, head_commit_sha=OTHER_HEAD + ) + assert (result.status, gap_facts(result)) == ("INCOMPLETE", [PINNED_ELSEWHERE]) + assert result.review.status == status + result = await call(client, "wait_for_review", ORG, REVIEW, head_commit_sha=HEAD) + assert result.status == ("FAILED" if status == "FAILED" else "STOPPED") + assert (result.gaps, result.reason) == ((), None) + assert len(server.requests) == 6 + + +@MODES +async def test_a_review_that_names_no_head_never_completes_for_a_named_commit( + mode: str, monkeypatch: pytest.MonkeyPatch +) -> None: + clock = Clock(monkeypatch) + bodies = [ + review(), + review_at(None), + review_at(""), + review_at(7), + review_at(None, "FAILED"), + review_at(None, "SUPERSEDED"), + ] + expected = ["INCOMPLETE", "INCOMPLETE", "INCOMPLETE", "INCOMPLETE", "FAILED", "STOPPED"] + with Server(lambda request, index: Reply(body=bodies[index])) as server: + async with session(mode, server.url) as client: + for status in expected: + result = await call(client, "wait_for_review", ORG, REVIEW, head_commit_sha=HEAD) + assert result.status == status + assert gap_facts(result) == [NO_HEAD] + assert result.reason == "The review names no head commit." + assert len(server.requests) == len(bodies) + assert clock.delays == [] + # A review that is still pending may name its head later, so the wait goes on. + with Server(lambda request, index: Reply(body=review("PENDING"))) as server: + async with session(mode, server.url) as client: + result = await call( + client, "wait_for_review", ORG, REVIEW, timeout=12, head_commit_sha=HEAD + ) + assert result.status == "TIMED_OUT" + assert gap_facts(result) == [NO_HEAD] + assert result.reason == "The review names no head commit." + assert len(server.requests) == 2 + assert clock.delays == [5, 7] + + +@MODES +async def test_head_commit_must_be_a_full_sha_before_any_request(mode: str) -> None: + refused = [ + "main", + "a" * 7, + "a" * 39, + "a" * 41, + "g" * 40, + "\u0661" * 40, + HEAD + "\n", + " " + HEAD[1:], + "", + 7, + HEAD.encode(), + ] + with Server(lambda request, index: Reply(body=review_at("d" * 64))) as server: + async with session(mode, server.url) as client: + for value in refused: + with pytest.raises(ValueError, match="full 40 or 64 character"): + await call(client, "wait_for_review", ORG, REVIEW, head_commit_sha=value) + assert server.requests == [] + result = await call(client, "wait_for_review", ORG, REVIEW, head_commit_sha="D" * 64) + assert (result.status, result.gaps, result.reason) == ("COMPLETED", (), None) + assert len(server.requests) == 1 + + @MODES async def test_polling_backoff_and_timeout_keep_review_url_and_last_record( mode: str, monkeypatch: pytest.MonkeyPatch From 86920c776a8bf40423130bb4a8cbd4a9fb77068c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 15 Nov 2026 13:24:13 +0000 Subject: [PATCH 29/38] Update distribution --- openapi.public.json | 77 ++++++- proofline/_generated/models/__init__.py | 2 + .../models/customer_review_detail.py | 36 ++++ proofline/_generated/models/run_progress.py | 188 ++++++++++++++++++ proofline/_transport.py | 2 +- pyproject.toml | 2 +- 6 files changed, 304 insertions(+), 3 deletions(-) create mode 100644 proofline/_generated/models/run_progress.py diff --git a/openapi.public.json b/openapi.public.json index ce1000f6..0c627774 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -2072,6 +2072,17 @@ "null" ] }, + "run_progress": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunProgress" + }, + { + "type": "null" + } + ], + "description": "Where an unfinished review's runs stand: running, queued for a worker,\n waiting for a scheduled step, or due again after an attempt that did\n not finish. Null once the review has ended." + }, "status": { "description": "The review's lifecycle status: `PENDING`, `RUNNING`, `COMPLETED`, `INCOMPLETE`, `FAILED`, `SUPERSEDED`, `STOPPED` or `EXCLUDED`.", "type": "string" @@ -5480,6 +5491,70 @@ ], "type": "object" }, + "RunProgress": { + "description": "Where an unfinished review's runs stand.", + "properties": { + "attempts": { + "description": "Attempts begun by the run in `state`, counting worker claims.", + "format": "int32", + "type": "integer" + }, + "due_at": { + "description": "When the run in `state` is due: in the past for `QUEUED`, the next\n attempt for `RETRY_SCHEDULED` and the next check for `WAITING`. Null\n for `RUNNING`.", + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "last_progress_at": { + "description": "When any of the review's runs last recorded a completed step. Null\n before the first.", + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/RunProgressState" + } + ], + "description": "The most telling state among the review's unfinished runs: a scheduled\n retry, then a running worker, then a queued run, then a wait." + } + }, + "required": [ + "state", + "attempts" + ], + "type": "object" + }, + "RunProgressState": { + "description": "What an unfinished review's runs are doing now.", + "oneOf": [ + { + "const": "WAITING", + "description": "A run waits for a scheduled step, such as a push's quiet period, a\n resource another run holds, or its assessments, and is checked again\n at `due_at`.", + "type": "string" + }, + { + "const": "QUEUED", + "description": "A run is due and no worker has claimed it yet. It has been due since\n `due_at`.", + "type": "string" + }, + { + "const": "RUNNING", + "description": "A worker is running one of the review's runs.", + "type": "string" + }, + { + "const": "RETRY_SCHEDULED", + "description": "An attempt of a run ended without finishing, and the run starts again\n at `due_at`.", + "type": "string" + } + ] + }, "ScanRequestBody": { "additionalProperties": false, "description": "One request to scan a ref or an exact commit of the repository.", @@ -6075,7 +6150,7 @@ }, "info": { "title": "Proofline Review API", - "version": "5.8.0" + "version": "5.9.0" }, "openapi": "3.1.0", "paths": { diff --git a/proofline/_generated/models/__init__.py b/proofline/_generated/models/__init__.py index 3ef061a6..325d2605 100644 --- a/proofline/_generated/models/__init__.py +++ b/proofline/_generated/models/__init__.py @@ -142,6 +142,7 @@ from .run_now_refused import RunNowRefused from .run_now_request import RunNowRequest from .run_now_response import RunNowResponse +from .run_progress import RunProgress from .scan_request_body import ScanRequestBody from .scan_response import ScanResponse from .spend_account_kind import SpendAccountKind @@ -304,6 +305,7 @@ "RunNowRefused", "RunNowRequest", "RunNowResponse", + "RunProgress", "ScanRequestBody", "ScanResponse", "SpendAccountKind", diff --git a/proofline/_generated/models/customer_review_detail.py b/proofline/_generated/models/customer_review_detail.py index e86fbc6b..55f64a02 100644 --- a/proofline/_generated/models/customer_review_detail.py +++ b/proofline/_generated/models/customer_review_detail.py @@ -29,6 +29,7 @@ from ..models.review_actions import ReviewActions from ..models.review_diff_stats import ReviewDiffStats from ..models.review_open_items import ReviewOpenItems + from ..models.run_progress import RunProgress from ..models.subject_view import SubjectView from ..models.walkthrough_view import WalkthroughView @@ -200,6 +201,10 @@ class CustomerReviewDetail: retracted, a marker only older versions set. Null otherwise. run_number (int | None | Unset): One-based, append-only ordinal within one repository pull request. + run_progress (None | RunProgress | Unset): Where an unfinished review's runs stand: running, queued for a + worker, + waiting for a scheduled step, or due again after an attempt that did + not finish. Null once the review has ended. stopped_at (datetime.datetime | None | Unset): When the review was stopped. Null unless it was stopped. stopped_by (ActorView | None | Unset): Who stopped this review, for a `STOPPED` review whose stop recorded its actor. Null otherwise. @@ -282,6 +287,7 @@ class CustomerReviewDetail: review_comment_url: None | str | Unset = UNSET review_retracted_at: datetime.datetime | None | Unset = UNSET run_number: int | None | Unset = UNSET + run_progress: None | RunProgress | Unset = UNSET stopped_at: datetime.datetime | None | Unset = UNSET stopped_by: ActorView | None | Unset = UNSET stopped_from: None | str | Unset = UNSET @@ -302,6 +308,7 @@ def to_dict(self) -> dict[str, Any]: from ..models.refresh_view import RefreshView # noqa: PLC0415 from ..models.review_diff_stats import ReviewDiffStats # noqa: PLC0415 from ..models.review_open_items import ReviewOpenItems # noqa: PLC0415 + from ..models.run_progress import RunProgress # noqa: PLC0415 from ..models.walkthrough_view import WalkthroughView # noqa: PLC0415 actions = self.actions.to_dict() @@ -657,6 +664,14 @@ def to_dict(self) -> dict[str, Any]: else: run_number = self.run_number + run_progress: dict[str, Any] | None | Unset + if isinstance(self.run_progress, Unset): + run_progress = UNSET + elif isinstance(self.run_progress, RunProgress): + run_progress = self.run_progress.to_dict() + else: + run_progress = self.run_progress + stopped_at: None | str | Unset if isinstance(self.stopped_at, Unset): stopped_at = UNSET @@ -818,6 +833,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["review_retracted_at"] = review_retracted_at if run_number is not UNSET: field_dict["run_number"] = run_number + if run_progress is not UNSET: + field_dict["run_progress"] = run_progress if stopped_at is not UNSET: field_dict["stopped_at"] = stopped_at if stopped_by is not UNSET: @@ -851,6 +868,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.review_actions import ReviewActions # noqa: PLC0415 from ..models.review_diff_stats import ReviewDiffStats # noqa: PLC0415 from ..models.review_open_items import ReviewOpenItems # noqa: PLC0415 + from ..models.run_progress import RunProgress # noqa: PLC0415 from ..models.subject_view import SubjectView # noqa: PLC0415 from ..models.walkthrough_view import WalkthroughView # noqa: PLC0415 @@ -1495,6 +1513,23 @@ def _parse_run_number(data: object) -> int | None | Unset: run_number = _parse_run_number(d.pop("run_number", UNSET)) + def _parse_run_progress(data: object) -> None | RunProgress | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + run_progress_type_0 = RunProgress.from_dict(data) + + return run_progress_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | RunProgress | Unset, data) + + run_progress = _parse_run_progress(d.pop("run_progress", UNSET)) + def _parse_stopped_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data @@ -1654,6 +1689,7 @@ def _parse_walkthrough(data: object) -> None | Unset | WalkthroughView: review_comment_url=review_comment_url, review_retracted_at=review_retracted_at, run_number=run_number, + run_progress=run_progress, stopped_at=stopped_at, stopped_by=stopped_by, stopped_from=stopped_from, diff --git a/proofline/_generated/models/run_progress.py b/proofline/_generated/models/run_progress.py new file mode 100644 index 00000000..462bc88b --- /dev/null +++ b/proofline/_generated/models/run_progress.py @@ -0,0 +1,188 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, Literal, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunProgress") + + +@_attrs_define +class RunProgress: + """Where an unfinished review's runs stand. + + Attributes: + attempts (int): Attempts begun by the run in `state`, counting worker claims. + state (Literal['QUEUED'] | Literal['RETRY_SCHEDULED'] | Literal['RUNNING'] | Literal['WAITING']): What an + unfinished review's runs are doing now. + due_at (datetime.datetime | None | Unset): When the run in `state` is due: in the past for `QUEUED`, the next + attempt for `RETRY_SCHEDULED` and the next check for `WAITING`. Null + for `RUNNING`. + last_progress_at (datetime.datetime | None | Unset): When any of the review's runs last recorded a completed + step. Null + before the first. + """ + + attempts: int + state: Literal["QUEUED"] | Literal["RETRY_SCHEDULED"] | Literal["RUNNING"] | Literal["WAITING"] + due_at: datetime.datetime | None | Unset = UNSET + last_progress_at: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + attempts = self.attempts + + state: ( + Literal["QUEUED"] | Literal["RETRY_SCHEDULED"] | Literal["RUNNING"] | Literal["WAITING"] + ) + state = self.state + + due_at: None | str | Unset + if isinstance(self.due_at, Unset): + due_at = UNSET + elif isinstance(self.due_at, datetime.datetime): + due_at = self.due_at.isoformat() + else: + due_at = self.due_at + + last_progress_at: None | str | Unset + if isinstance(self.last_progress_at, Unset): + last_progress_at = UNSET + elif isinstance(self.last_progress_at, datetime.datetime): + last_progress_at = self.last_progress_at.isoformat() + else: + last_progress_at = self.last_progress_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "attempts": attempts, + "state": state, + } + ) + if due_at is not UNSET: + field_dict["due_at"] = due_at + if last_progress_at is not UNSET: + field_dict["last_progress_at"] = last_progress_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + attempts = d.pop("attempts") + + def _parse_state( + data: object, + ) -> ( + Literal["QUEUED"] | Literal["RETRY_SCHEDULED"] | Literal["RUNNING"] | Literal["WAITING"] + ): + try: + if not (type(data) is str and data == "WAITING"): + raise TypeError() + componentsschemas_run_progress_state_type_0 = cast(Literal["WAITING"], data) + if componentsschemas_run_progress_state_type_0 != "WAITING": + raise ValueError( + f"/components/schemas/RunProgressState_type_0 must match const 'WAITING', got '{componentsschemas_run_progress_state_type_0}'" + ) + return componentsschemas_run_progress_state_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not (type(data) is str and data == "QUEUED"): + raise TypeError() + componentsschemas_run_progress_state_type_1 = cast(Literal["QUEUED"], data) + if componentsschemas_run_progress_state_type_1 != "QUEUED": + raise ValueError( + f"/components/schemas/RunProgressState_type_1 must match const 'QUEUED', got '{componentsschemas_run_progress_state_type_1}'" + ) + return componentsschemas_run_progress_state_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not (type(data) is str and data == "RUNNING"): + raise TypeError() + componentsschemas_run_progress_state_type_2 = cast(Literal["RUNNING"], data) + if componentsschemas_run_progress_state_type_2 != "RUNNING": + raise ValueError( + f"/components/schemas/RunProgressState_type_2 must match const 'RUNNING', got '{componentsschemas_run_progress_state_type_2}'" + ) + return componentsschemas_run_progress_state_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not (type(data) is str and data == "RETRY_SCHEDULED"): + raise TypeError() + componentsschemas_run_progress_state_type_3 = cast(Literal["RETRY_SCHEDULED"], data) + if componentsschemas_run_progress_state_type_3 != "RETRY_SCHEDULED": + raise ValueError( + f"/components/schemas/RunProgressState_type_3 must match const 'RETRY_SCHEDULED', got '{componentsschemas_run_progress_state_type_3}'" + ) + return componentsschemas_run_progress_state_type_3 + + state = _parse_state(d.pop("state")) + + def _parse_due_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + due_at_type_0 = datetime.datetime.fromisoformat(data) + + return due_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + due_at = _parse_due_at(d.pop("due_at", UNSET)) + + def _parse_last_progress_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + last_progress_at_type_0 = datetime.datetime.fromisoformat(data) + + return last_progress_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + last_progress_at = _parse_last_progress_at(d.pop("last_progress_at", UNSET)) + + run_progress = cls( + attempts=attempts, + state=state, + due_at=due_at, + last_progress_at=last_progress_at, + ) + + run_progress.additional_properties = d + return run_progress + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/proofline/_transport.py b/proofline/_transport.py index c324b197..8b54266d 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -38,7 +38,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "5.8.1" +VERSION = "5.9.0" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index 7c7cd36e..0ea2388a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "5.8.1" +version = "5.9.0" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" From 45b27ba8ae129e270534e483cd23515fd49863f2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 15 Nov 2026 15:16:55 +0000 Subject: [PATCH 30/38] Update distribution --- openapi.public.json | 11 ++++++++-- proofline/_generated/models/actor_view.py | 20 +++++++++++++++++++ .../models/customer_code_assessment.py | 5 +++-- proofline/_transport.py | 2 +- pyproject.toml | 2 +- 5 files changed, 34 insertions(+), 6 deletions(-) diff --git a/openapi.public.json b/openapi.public.json index 0c627774..f851e530 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -22,6 +22,13 @@ "description": "The login they were known by when they acted. Display metadata.", "type": "string" }, + "name": { + "description": "Profile name resolved for this organization. Display metadata only.", + "type": [ + "string", + "null" + ] + }, "profile_url": { "description": "Their profile on the deployment's GitHub host.", "type": [ @@ -1245,7 +1252,7 @@ ] }, "reason_codes": { - "description": "Public causes of an `INCOMPLETE` code assessment: `OUT_OF_CREDITS`\n when credits refused its model. Absent otherwise; other recorded\n details stay private.", + "description": "Public causes of an `INCOMPLETE` code assessment: `OUT_OF_CREDITS`\n when credits refused its model, and `MODEL_ANSWER_WITHHELD` when the\n credential mask withheld its model's answer after the source was read.\n Absent otherwise; other recorded details stay private.", "items": { "type": "string" }, @@ -6150,7 +6157,7 @@ }, "info": { "title": "Proofline Review API", - "version": "5.9.0" + "version": "5.10.0" }, "openapi": "3.1.0", "paths": { diff --git a/proofline/_generated/models/actor_view.py b/proofline/_generated/models/actor_view.py index 63d6feb3..4b1676d4 100644 --- a/proofline/_generated/models/actor_view.py +++ b/proofline/_generated/models/actor_view.py @@ -18,11 +18,13 @@ class ActorView: Attributes: github_user_id (int): Stable GitHub identity. The login below is display metadata. login (str): The login they were known by when they acted. Display metadata. + name (None | str | Unset): Profile name resolved for this organization. Display metadata only. profile_url (None | str | Unset): Their profile on the deployment's GitHub host. """ github_user_id: int login: str + name: None | str | Unset = UNSET profile_url: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -31,6 +33,12 @@ def to_dict(self) -> dict[str, Any]: login = self.login + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + profile_url: None | str | Unset if isinstance(self.profile_url, Unset): profile_url = UNSET @@ -45,6 +53,8 @@ def to_dict(self) -> dict[str, Any]: "login": login, } ) + if name is not UNSET: + field_dict["name"] = name if profile_url is not UNSET: field_dict["profile_url"] = profile_url @@ -57,6 +67,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: login = d.pop("login") + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + def _parse_profile_url(data: object) -> None | str | Unset: if data is None: return data @@ -69,6 +88,7 @@ def _parse_profile_url(data: object) -> None | str | Unset: actor_view = cls( github_user_id=github_user_id, login=login, + name=name, profile_url=profile_url, ) diff --git a/proofline/_generated/models/customer_code_assessment.py b/proofline/_generated/models/customer_code_assessment.py index 6e02b7ba..2d8c5077 100644 --- a/proofline/_generated/models/customer_code_assessment.py +++ b/proofline/_generated/models/customer_code_assessment.py @@ -44,8 +44,9 @@ class CustomerCodeAssessment: `POLICY_EXCLUDED`, `EVIDENCE_UNAVAILABLE`, `HYPOTHESES_UNRESOLVED` or `MODEL_BUDGET_EXHAUSTED`. Null otherwise. reason_codes (list[str] | None | Unset): Public causes of an `INCOMPLETE` code assessment: `OUT_OF_CREDITS` - when credits refused its model. Absent otherwise; other recorded - details stay private. + when credits refused its model, and `MODEL_ANSWER_WITHHELD` when the + credential mask withheld its model's answer after the source was read. + Absent otherwise; other recorded details stay private. started_at (datetime.datetime | None | Unset): When the code assessment started. Null until it starts. """ diff --git a/proofline/_transport.py b/proofline/_transport.py index 8b54266d..bd51befd 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -38,7 +38,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "5.9.0" +VERSION = "5.10.0" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index 0ea2388a..dafb99cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "5.9.0" +version = "5.10.0" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" From 1193cd6d2908cfd1858a6de50d0d9e51f92f5b79 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 15 Nov 2026 18:50:16 +0000 Subject: [PATCH 31/38] Update distribution --- openapi.public.json | 76 +++++++++++- proofline/_generated/models/__init__.py | 4 + .../models/customer_review_detail.py | 30 +++++ .../models/review_investigation_citation.py | 88 ++++++++++++++ .../models/review_investigation_finding.py | 114 ++++++++++++++++++ proofline/_transport.py | 2 +- pyproject.toml | 10 +- requirements-dev.txt | 15 ++- 8 files changed, 327 insertions(+), 12 deletions(-) create mode 100644 proofline/_generated/models/review_investigation_citation.py create mode 100644 proofline/_generated/models/review_investigation_finding.py diff --git a/openapi.public.json b/openapi.public.json index f851e530..b5b04e1a 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -1851,6 +1851,13 @@ }, "type": "array" }, + "investigation_findings": { + "description": "The supported findings of each environment investigation this review\n published, by assessment in recorded order, including those the\n pull-request Check left off its list. Absent when there are none.", + "items": { + "$ref": "#/components/schemas/ReviewInvestigationFinding" + }, + "type": "array" + }, "is_deep_review": { "description": "Present and true when this run is a Deep Review.", "type": "boolean" @@ -4529,6 +4536,73 @@ ], "type": "object" }, + "ReviewInvestigationCitation": { + "description": "One environment evidence record a finding cites, as Proofline verified\n it.", + "properties": { + "collection_id": { + "description": "The evidence collection that holds the record.", + "format": "uuid", + "type": "string" + }, + "digest": { + "description": "The record's stored digest.", + "type": "string" + }, + "record_id": { + "description": "The record's ID.", + "format": "uuid", + "type": "string" + }, + "table": { + "description": "The table that holds the record.", + "type": "string" + } + }, + "required": [ + "collection_id", + "table", + "record_id", + "digest" + ], + "type": "object" + }, + "ReviewInvestigationFinding": { + "description": "One supported finding of an environment investigation.", + "properties": { + "area": { + "description": "What the finding is about: `secrets`, `configuration`, `iam`,\n `network`, `capacity` or `other`.", + "type": "string" + }, + "assessment_id": { + "description": "The environment assessment whose investigation recorded the finding.", + "format": "uuid", + "type": "string" + }, + "citations": { + "description": "The evidence records the finding cites, each verified, in the order\n the finding cites them.", + "items": { + "$ref": "#/components/schemas/ReviewInvestigationCitation" + }, + "type": "array" + }, + "detail": { + "description": "Model text with protected values withheld. Render it as plain text.", + "type": "string" + }, + "title": { + "description": "Model text with protected values withheld. Render it as plain text.", + "type": "string" + } + }, + "required": [ + "assessment_id", + "area", + "title", + "detail", + "citations" + ], + "type": "object" + }, "ReviewOpenItems": { "properties": { "accepted_risk_count": { @@ -6157,7 +6231,7 @@ }, "info": { "title": "Proofline Review API", - "version": "5.10.0" + "version": "5.11.0" }, "openapi": "3.1.0", "paths": { diff --git a/proofline/_generated/models/__init__.py b/proofline/_generated/models/__init__.py index 325d2605..1f14a3bb 100644 --- a/proofline/_generated/models/__init__.py +++ b/proofline/_generated/models/__init__.py @@ -119,6 +119,8 @@ from .review_depth import ReviewDepth from .review_diff_stats import ReviewDiffStats from .review_filters import ReviewFilters +from .review_investigation_citation import ReviewInvestigationCitation +from .review_investigation_finding import ReviewInvestigationFinding from .review_open_items import ReviewOpenItems from .review_page import ReviewPage from .review_routing_view_type_0 import ReviewRoutingViewType0 @@ -282,6 +284,8 @@ "ReviewDepth", "ReviewDiffStats", "ReviewFilters", + "ReviewInvestigationCitation", + "ReviewInvestigationFinding", "ReviewOpenItems", "ReviewPage", "ReviewRoutingViewType0", diff --git a/proofline/_generated/models/customer_review_detail.py b/proofline/_generated/models/customer_review_detail.py index 55f64a02..9c699aa6 100644 --- a/proofline/_generated/models/customer_review_detail.py +++ b/proofline/_generated/models/customer_review_detail.py @@ -28,6 +28,7 @@ from ..models.related_review import RelatedReview from ..models.review_actions import ReviewActions from ..models.review_diff_stats import ReviewDiffStats + from ..models.review_investigation_finding import ReviewInvestigationFinding from ..models.review_open_items import ReviewOpenItems from ..models.run_progress import RunProgress from ..models.subject_view import SubjectView @@ -136,6 +137,10 @@ class CustomerReviewDetail: assessments recorded it, in name order. `UNKNOWN` alone when none recorded a cause. Absent for every other status, and on reads other than the reviews list and a single review. + investigation_findings (list[ReviewInvestigationFinding] | Unset): The supported findings of each environment + investigation this review + published, by assessment in recorded order, including those the + pull-request Check left off its list. Absent when there are none. is_deep_review (bool | Unset): Present and true when this run is a Deep Review. local_reverifications (list[LocalReverification] | Unset): For a patch review requested with `verify_finding_ids`, each finding @@ -261,6 +266,7 @@ class CustomerReviewDetail: head_commit_url: None | str | Unset = UNSET head_ref: None | str | Unset = UNSET incomplete_causes: list[IncompleteCauseType0 | Literal["UNKNOWN"]] | Unset = UNSET + investigation_findings: list[ReviewInvestigationFinding] | Unset = UNSET is_deep_review: bool | Unset = UNSET local_reverifications: list[LocalReverification] | Unset = UNSET merge_gate: None | PullRequestMergeGate | Unset = UNSET @@ -497,6 +503,13 @@ def to_dict(self) -> dict[str, Any]: incomplete_causes_item = incomplete_causes_item_data incomplete_causes.append(incomplete_causes_item) + investigation_findings: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.investigation_findings, Unset): + investigation_findings = [] + for investigation_findings_item_data in self.investigation_findings: + investigation_findings_item = investigation_findings_item_data.to_dict() + investigation_findings.append(investigation_findings_item) + is_deep_review = self.is_deep_review local_reverifications: list[dict[str, Any]] | Unset = UNSET @@ -781,6 +794,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["head_ref"] = head_ref if incomplete_causes is not UNSET: field_dict["incomplete_causes"] = incomplete_causes + if investigation_findings is not UNSET: + field_dict["investigation_findings"] = investigation_findings if is_deep_review is not UNSET: field_dict["is_deep_review"] = is_deep_review if local_reverifications is not UNSET: @@ -867,6 +882,9 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.related_review import RelatedReview # noqa: PLC0415 from ..models.review_actions import ReviewActions # noqa: PLC0415 from ..models.review_diff_stats import ReviewDiffStats # noqa: PLC0415 + from ..models.review_investigation_finding import ( + ReviewInvestigationFinding, # noqa: PLC0415 + ) from ..models.review_open_items import ReviewOpenItems # noqa: PLC0415 from ..models.run_progress import RunProgress # noqa: PLC0415 from ..models.subject_view import SubjectView # noqa: PLC0415 @@ -1213,6 +1231,17 @@ def _parse_incomplete_causes_item( incomplete_causes.append(incomplete_causes_item) + _investigation_findings = d.pop("investigation_findings", UNSET) + investigation_findings: list[ReviewInvestigationFinding] | Unset = UNSET + if _investigation_findings is not UNSET: + investigation_findings = [] + for investigation_findings_item_data in _investigation_findings: + investigation_findings_item = ReviewInvestigationFinding.from_dict( + investigation_findings_item_data + ) + + investigation_findings.append(investigation_findings_item) + is_deep_review = d.pop("is_deep_review", UNSET) _local_reverifications = d.pop("local_reverifications", UNSET) @@ -1663,6 +1692,7 @@ def _parse_walkthrough(data: object) -> None | Unset | WalkthroughView: head_commit_url=head_commit_url, head_ref=head_ref, incomplete_causes=incomplete_causes, + investigation_findings=investigation_findings, is_deep_review=is_deep_review, local_reverifications=local_reverifications, merge_gate=merge_gate, diff --git a/proofline/_generated/models/review_investigation_citation.py b/proofline/_generated/models/review_investigation_citation.py new file mode 100644 index 00000000..c4144e85 --- /dev/null +++ b/proofline/_generated/models/review_investigation_citation.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ReviewInvestigationCitation") + + +@_attrs_define +class ReviewInvestigationCitation: + """One environment evidence record a finding cites, as Proofline verified + it. + + Attributes: + collection_id (UUID): The evidence collection that holds the record. + digest (str): The record's stored digest. + record_id (UUID): The record's ID. + table (str): The table that holds the record. + """ + + collection_id: UUID + digest: str + record_id: UUID + table: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + collection_id = str(self.collection_id) + + digest = self.digest + + record_id = str(self.record_id) + + table = self.table + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "collection_id": collection_id, + "digest": digest, + "record_id": record_id, + "table": table, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + collection_id = UUID(d.pop("collection_id")) + + digest = d.pop("digest") + + record_id = UUID(d.pop("record_id")) + + table = d.pop("table") + + review_investigation_citation = cls( + collection_id=collection_id, + digest=digest, + record_id=record_id, + table=table, + ) + + review_investigation_citation.additional_properties = d + return review_investigation_citation + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/proofline/_generated/models/review_investigation_finding.py b/proofline/_generated/models/review_investigation_finding.py new file mode 100644 index 00000000..c80e45c4 --- /dev/null +++ b/proofline/_generated/models/review_investigation_finding.py @@ -0,0 +1,114 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.review_investigation_citation import ReviewInvestigationCitation + + +T = TypeVar("T", bound="ReviewInvestigationFinding") + + +@_attrs_define +class ReviewInvestigationFinding: + """One supported finding of an environment investigation. + + Attributes: + area (str): What the finding is about: `secrets`, `configuration`, `iam`, + `network`, `capacity` or `other`. + assessment_id (UUID): The environment assessment whose investigation recorded the finding. + citations (list[ReviewInvestigationCitation]): The evidence records the finding cites, each verified, in the + order + the finding cites them. + detail (str): Model text with protected values withheld. Render it as plain text. + title (str): Model text with protected values withheld. Render it as plain text. + """ + + area: str + assessment_id: UUID + citations: list[ReviewInvestigationCitation] + detail: str + title: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + area = self.area + + assessment_id = str(self.assessment_id) + + citations = [] + for citations_item_data in self.citations: + citations_item = citations_item_data.to_dict() + citations.append(citations_item) + + detail = self.detail + + title = self.title + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "area": area, + "assessment_id": assessment_id, + "citations": citations, + "detail": detail, + "title": title, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.review_investigation_citation import ( + ReviewInvestigationCitation, # noqa: PLC0415 + ) + + d = dict(src_dict) + area = d.pop("area") + + assessment_id = UUID(d.pop("assessment_id")) + + citations = [] + _citations = d.pop("citations") + for citations_item_data in _citations: + citations_item = ReviewInvestigationCitation.from_dict(citations_item_data) + + citations.append(citations_item) + + detail = d.pop("detail") + + title = d.pop("title") + + review_investigation_finding = cls( + area=area, + assessment_id=assessment_id, + citations=citations, + detail=detail, + title=title, + ) + + review_investigation_finding.additional_properties = d + return review_investigation_finding + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/proofline/_transport.py b/proofline/_transport.py index bd51befd..10ad45a4 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -38,7 +38,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "5.10.0" +VERSION = "5.11.0" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index dafb99cb..9600cbc5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [build-system] -requires = ["hatchling==1.27.0"] +requires = ["hatchling==1.33.0"] build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "5.10.0" +version = "5.11.0" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" @@ -39,14 +39,16 @@ dev = [ "mypy==1.18.2", "pytest==8.4.2", "pytest-asyncio==1.2.0", - "build==1.3.0", - "hatchling==1.27.0", + "build==1.6.1", + "hatchling==1.33.0", ] [tool.hatch.build.targets.wheel] packages = ["proofline"] +core-metadata-version = "2.4" [tool.hatch.build.targets.sdist] +core-metadata-version = "2.4" include = ["/openapi.public.json", "/LICENSE", "/README.md", "/proofline", "/scripts", "/templates", "/tests", "/generator.json", "/pyproject.toml", "/requirements-dev.txt"] [tool.pytest.ini_options] diff --git a/requirements-dev.txt b/requirements-dev.txt index ab3aafff..523830e6 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -10,9 +10,9 @@ anyio==4.15.1 \ attrs==26.1.0 \ --hash=sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309 \ --hash=sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32 -build==1.3.0 \ - --hash=sha256:698edd0ea270bde950f53aed21f3a0135672206f3911e0176261a31e0e07b397 \ - --hash=sha256:7145f0b5061ba90a1500d60bd1b13ca0a8a4cebdd0cc16ed8adf1c0e739f43b4 +build==1.6.1 \ + --hash=sha256:51cc11666391ab6f092070437ac747002ff46f3e4113a3622177ee6b488bfc53 \ + --hash=sha256:ecd351a4be9d35a9eaaba244a7687143c9c7d4aea6ac964e7e7ddab20cbcf4e7 certifi==2026.7.22 \ --hash=sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775 \ --hash=sha256:741e2c3b351ddf169a738da9f2c048608ff7f2c5cc02f1ebc6b118bb090d5d55 @@ -22,9 +22,9 @@ colorama==0.4.6 ; os_name == 'nt' or sys_platform == 'win32' \ h11==0.16.0 \ --hash=sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1 \ --hash=sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86 -hatchling==1.27.0 \ - --hash=sha256:971c296d9819abb3811112fc52c7a9751c8d381898f36533bb16f9791e941fd6 \ - --hash=sha256:d3a2f3567c4f926ea39849cdf924c7e99e6686c9c8e288ae1037c8fa2a5d937b +hatchling==1.33.0 \ + --hash=sha256:415290b84f464d2884303fca8974d38e7b85579069fab02a15db0828fbb1446d \ + --hash=sha256:4c422bd4d554fcff5de5b73e9596f85e41e9f97f7e553d8f7595ecb31a627bef httpcore==1.0.9 \ --hash=sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55 \ --hash=sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8 @@ -361,6 +361,9 @@ shellingham==1.5.4 \ six==1.17.0 \ --hash=sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274 \ --hash=sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81 +tomlkit==0.15.2 \ + --hash=sha256:05562412163a3037b94497385fb7f9204c637bc605af7a48199e41cf2272f437 \ + --hash=sha256:83e32755ba1d20d9340bd069ee97e9f6232ba2346b63ffcba425de01f7e327a6 trove-classifiers==2026.9.21.13 \ --hash=sha256:0a9ebc8d4e2f3e8a22848c5258033035bec17a3012ac3fea16dbaa764489eb71 \ --hash=sha256:8b1ff4f9c191b1040b71c37f1e445ab99732911e3cd91de52838453a854d7a17 From 0b08aa6388193efd0a6ee45c1675dba1fb70a624 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 15 Nov 2026 21:19:03 +0000 Subject: [PATCH 32/38] Update distribution --- README.md | 24 +- .../api/default/get_agent_session.py | 1 + .../api/default/get_agent_session_prompt.py | 1 + .../_generated/api/default/get_assessment.py | 1 + .../api/default/get_deployment_review.py | 1 + .../_generated/api/default/get_finding.py | 1 + .../api/default/get_finding_fix_prompt.py | 1 + .../api/default/get_pull_request_review.py | 1 + .../_generated/api/default/get_review.py | 1 + .../api/default/get_review_guidance.py | 1 + .../api/default/get_review_routing.py | 1 + .../api/default/list_pull_request_reviews.py | 1 + .../api/default/list_repositories.py | 1 + .../_generated/api/default/list_reviews.py | 1 + .../_generated/api/default/rerun_review.py | 1 + .../_generated/api/default/stop_review.py | 1 + .../_generated/models/customer_finding.py | 8 +- .../models/customer_review_detail.py | 4 +- .../models/finding_outcomes_export_row.py | 8 +- .../models/finding_outcomes_outcome_count.py | 4 +- .../finding_outcomes_post_merge_counts.py | 4 +- .../models/review_investigation_finding.py | 4 +- proofline/_transport.py | 2 +- pyproject.toml | 10 +- requirements-dev.txt | 339 ++++++++++++++---- scripts/_uv.py | 16 +- scripts/generate.py | 2 +- 27 files changed, 328 insertions(+), 112 deletions(-) diff --git a/README.md b/README.md index 1bc220e3..8a61889d 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,10 @@ from uuid import UUID with ProoflineClient() as client: page = client.export_reviews( - UUID(os.environ["PROOFLINE_ORGANIZATION_ID"]), "reviews", - from_time="2026-10-01T00:00:00Z", to_time="2026-10-25T00:00:00Z", + UUID(os.environ["PROOFLINE_ORGANIZATION_ID"]), + "reviews", + from_time="2026-10-01T00:00:00Z", + to_time="2026-10-25T00:00:00Z", format="csv", ) print(page.text, end="") @@ -73,10 +75,12 @@ with ProoflineClient() as client: UUID(os.environ["PROOFLINE_REPOSITORY_ID"]), body=CoverageUploadRequest( tested_sha=os.environ["TESTED_SHA"], - reports=[UploadedReport( - name="lcov.info", - content=Path("lcov.info").read_text(encoding="utf-8"), - )], + reports=[ + UploadedReport( + name="lcov.info", + content=Path("lcov.info").read_text(encoding="utf-8"), + ) + ], ), ) ``` @@ -97,7 +101,9 @@ print(organizations["structuredContent"]["data"]["organizations"]) # Set organization_id to the UUID of the organization you intend to use. result = client.fixes.get_fix_context(finding_id, organization_id=organization_id) result = client.knowledge.get_wiki_page( - "owner/name", "index", organization_id=organization_id, + "owner/name", + "index", + organization_id=organization_id, ) ``` @@ -140,7 +146,9 @@ Read operations require `reviews:read`. Requesting re-verification also requires ```python result = client.fixes.request_reverification( - review_id, [finding_id], pushed_commit_sha, + review_id, + [finding_id], + pushed_commit_sha, note="Fixed the null case and added a regression test.", ) if result.get("isError"): diff --git a/proofline/_generated/api/default/get_agent_session.py b/proofline/_generated/api/default/get_agent_session.py index 15de4b34..f7521d13 100644 --- a/proofline/_generated/api/default/get_agent_session.py +++ b/proofline/_generated/api/default/get_agent_session.py @@ -15,6 +15,7 @@ def _get_kwargs( org_id: UUID, session_id: UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/api/v1/organizations/{org_id}/agent-sessions/{session_id}".format( diff --git a/proofline/_generated/api/default/get_agent_session_prompt.py b/proofline/_generated/api/default/get_agent_session_prompt.py index 6d2a57b3..f8a13cf2 100644 --- a/proofline/_generated/api/default/get_agent_session_prompt.py +++ b/proofline/_generated/api/default/get_agent_session_prompt.py @@ -16,6 +16,7 @@ def _get_kwargs( org_id: UUID, finding_id: UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/api/v1/organizations/{org_id}/findings/{finding_id}/agent-session-prompt".format( diff --git a/proofline/_generated/api/default/get_assessment.py b/proofline/_generated/api/default/get_assessment.py index 1d086d5d..899c6d34 100644 --- a/proofline/_generated/api/default/get_assessment.py +++ b/proofline/_generated/api/default/get_assessment.py @@ -16,6 +16,7 @@ def _get_kwargs( review_id: UUID, assessment_id: UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/api/v1/organizations/{org_id}/reviews/{review_id}/assessments/{assessment_id}".format( diff --git a/proofline/_generated/api/default/get_deployment_review.py b/proofline/_generated/api/default/get_deployment_review.py index b3bcdb09..575040bc 100644 --- a/proofline/_generated/api/default/get_deployment_review.py +++ b/proofline/_generated/api/default/get_deployment_review.py @@ -15,6 +15,7 @@ def _get_kwargs( org_id: UUID, public_key: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/api/v1/organizations/{org_id}/reviews/deployments/{public_key}".format( diff --git a/proofline/_generated/api/default/get_finding.py b/proofline/_generated/api/default/get_finding.py index 3225d0d0..c0e93bbf 100644 --- a/proofline/_generated/api/default/get_finding.py +++ b/proofline/_generated/api/default/get_finding.py @@ -15,6 +15,7 @@ def _get_kwargs( org_id: UUID, finding_id: UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/api/v1/organizations/{org_id}/findings/{finding_id}".format( diff --git a/proofline/_generated/api/default/get_finding_fix_prompt.py b/proofline/_generated/api/default/get_finding_fix_prompt.py index d8098f57..6a462923 100644 --- a/proofline/_generated/api/default/get_finding_fix_prompt.py +++ b/proofline/_generated/api/default/get_finding_fix_prompt.py @@ -16,6 +16,7 @@ def _get_kwargs( org_id: UUID, finding_id: UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/api/v1/organizations/{org_id}/findings/{finding_id}/fix-prompt".format( diff --git a/proofline/_generated/api/default/get_pull_request_review.py b/proofline/_generated/api/default/get_pull_request_review.py index 06f9d2aa..99eea92c 100644 --- a/proofline/_generated/api/default/get_pull_request_review.py +++ b/proofline/_generated/api/default/get_pull_request_review.py @@ -17,6 +17,7 @@ def _get_kwargs( pull_request_number: int, run_number: int, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/api/v1/organizations/{org_id}/reviews/pr/{repository}/{pull_request_number}/runs/{run_number}".format( diff --git a/proofline/_generated/api/default/get_review.py b/proofline/_generated/api/default/get_review.py index d0b3602b..1bffebae 100644 --- a/proofline/_generated/api/default/get_review.py +++ b/proofline/_generated/api/default/get_review.py @@ -15,6 +15,7 @@ def _get_kwargs( org_id: UUID, review_id: UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/api/v1/organizations/{org_id}/reviews/{review_id}".format( diff --git a/proofline/_generated/api/default/get_review_guidance.py b/proofline/_generated/api/default/get_review_guidance.py index df940ba6..0bda79cd 100644 --- a/proofline/_generated/api/default/get_review_guidance.py +++ b/proofline/_generated/api/default/get_review_guidance.py @@ -15,6 +15,7 @@ def _get_kwargs( org_id: UUID, repo_id: UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/api/v1/organizations/{org_id}/repositories/{repo_id}/review-guidance".format( diff --git a/proofline/_generated/api/default/get_review_routing.py b/proofline/_generated/api/default/get_review_routing.py index fe5b30a3..547f9f06 100644 --- a/proofline/_generated/api/default/get_review_routing.py +++ b/proofline/_generated/api/default/get_review_routing.py @@ -17,6 +17,7 @@ def _get_kwargs( org_id: UUID, review_id: UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/api/v1/organizations/{org_id}/reviews/{review_id}/routing".format( diff --git a/proofline/_generated/api/default/list_pull_request_reviews.py b/proofline/_generated/api/default/list_pull_request_reviews.py index 4987576a..7d1ca8b4 100644 --- a/proofline/_generated/api/default/list_pull_request_reviews.py +++ b/proofline/_generated/api/default/list_pull_request_reviews.py @@ -28,6 +28,7 @@ def _get_kwargs( search: None | str | Unset = UNSET, status: None | str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} json_attention: None | str | Unset diff --git a/proofline/_generated/api/default/list_repositories.py b/proofline/_generated/api/default/list_repositories.py index 9abdda1e..9eb6d269 100644 --- a/proofline/_generated/api/default/list_repositories.py +++ b/proofline/_generated/api/default/list_repositories.py @@ -14,6 +14,7 @@ def _get_kwargs( org_id: UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/api/v1/organizations/{org_id}/repository-names".format( diff --git a/proofline/_generated/api/default/list_reviews.py b/proofline/_generated/api/default/list_reviews.py index f3630bc4..306c0cc1 100644 --- a/proofline/_generated/api/default/list_reviews.py +++ b/proofline/_generated/api/default/list_reviews.py @@ -26,6 +26,7 @@ def _get_kwargs( search: None | str | Unset = UNSET, status: None | str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} json_attention: None | str | Unset diff --git a/proofline/_generated/api/default/rerun_review.py b/proofline/_generated/api/default/rerun_review.py index 75e34ff9..4f9d5cd0 100644 --- a/proofline/_generated/api/default/rerun_review.py +++ b/proofline/_generated/api/default/rerun_review.py @@ -15,6 +15,7 @@ def _get_kwargs( org_id: UUID, review_id: UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "post", "url": "/api/v1/organizations/{org_id}/reviews/{review_id}/rerun".format( diff --git a/proofline/_generated/api/default/stop_review.py b/proofline/_generated/api/default/stop_review.py index 6a58ba43..67e5bd86 100644 --- a/proofline/_generated/api/default/stop_review.py +++ b/proofline/_generated/api/default/stop_review.py @@ -15,6 +15,7 @@ def _get_kwargs( org_id: UUID, review_id: UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "post", "url": "/api/v1/organizations/{org_id}/reviews/{review_id}/stop".format( diff --git a/proofline/_generated/models/customer_finding.py b/proofline/_generated/models/customer_finding.py index 55ea189e..6458cf8c 100644 --- a/proofline/_generated/models/customer_finding.py +++ b/proofline/_generated/models/customer_finding.py @@ -115,9 +115,7 @@ class CustomerFinding: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.comment_address_evaluation_view import ( - CommentAddressEvaluationView, # noqa: PLC0415 - ) + from ..models.comment_address_evaluation_view import CommentAddressEvaluationView # noqa: PLC0415 from ..models.customer_finding_validation import CustomerFindingValidation # noqa: PLC0415 from ..models.finding_causal_graph_view import FindingCausalGraphView # noqa: PLC0415 from ..models.finding_placement_view import FindingPlacementView # noqa: PLC0415 @@ -287,9 +285,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.comment_address_evaluation_view import ( - CommentAddressEvaluationView, # noqa: PLC0415 - ) + from ..models.comment_address_evaluation_view import CommentAddressEvaluationView # noqa: PLC0415 from ..models.comment_reaction_view import CommentReactionView # noqa: PLC0415 from ..models.customer_evidence_ref import CustomerEvidenceRef # noqa: PLC0415 from ..models.customer_finding_validation import CustomerFindingValidation # noqa: PLC0415 diff --git a/proofline/_generated/models/customer_review_detail.py b/proofline/_generated/models/customer_review_detail.py index 9c699aa6..8fdbecaa 100644 --- a/proofline/_generated/models/customer_review_detail.py +++ b/proofline/_generated/models/customer_review_detail.py @@ -882,9 +882,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.related_review import RelatedReview # noqa: PLC0415 from ..models.review_actions import ReviewActions # noqa: PLC0415 from ..models.review_diff_stats import ReviewDiffStats # noqa: PLC0415 - from ..models.review_investigation_finding import ( - ReviewInvestigationFinding, # noqa: PLC0415 - ) + from ..models.review_investigation_finding import ReviewInvestigationFinding # noqa: PLC0415 from ..models.review_open_items import ReviewOpenItems # noqa: PLC0415 from ..models.run_progress import RunProgress # noqa: PLC0415 from ..models.subject_view import SubjectView # noqa: PLC0415 diff --git a/proofline/_generated/models/finding_outcomes_export_row.py b/proofline/_generated/models/finding_outcomes_export_row.py index 0c4f2943..82fec763 100644 --- a/proofline/_generated/models/finding_outcomes_export_row.py +++ b/proofline/_generated/models/finding_outcomes_export_row.py @@ -114,12 +114,8 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.finding_outcomes_count import FindingOutcomesCount # noqa: PLC0415 - from ..models.finding_outcomes_outcome_count import ( - FindingOutcomesOutcomeCount, # noqa: PLC0415 - ) - from ..models.finding_outcomes_post_merge_counts import ( - FindingOutcomesPostMergeCounts, # noqa: PLC0415 - ) + from ..models.finding_outcomes_outcome_count import FindingOutcomesOutcomeCount # noqa: PLC0415 + from ..models.finding_outcomes_post_merge_counts import FindingOutcomesPostMergeCounts # noqa: PLC0415 d = dict(src_dict) code_changed = FindingOutcomesCount.from_dict(d.pop("code_changed")) diff --git a/proofline/_generated/models/finding_outcomes_outcome_count.py b/proofline/_generated/models/finding_outcomes_outcome_count.py index 1e77d87d..90e03b1c 100644 --- a/proofline/_generated/models/finding_outcomes_outcome_count.py +++ b/proofline/_generated/models/finding_outcomes_outcome_count.py @@ -57,9 +57,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.finding_outcomes_drilldown import FindingOutcomesDrilldown # noqa: PLC0415 - from ..models.finding_outcomes_validation_sources import ( - FindingOutcomesValidationSources, # noqa: PLC0415 - ) + from ..models.finding_outcomes_validation_sources import FindingOutcomesValidationSources # noqa: PLC0415 d = dict(src_dict) count = d.pop("count") diff --git a/proofline/_generated/models/finding_outcomes_post_merge_counts.py b/proofline/_generated/models/finding_outcomes_post_merge_counts.py index e49a1974..793cf393 100644 --- a/proofline/_generated/models/finding_outcomes_post_merge_counts.py +++ b/proofline/_generated/models/finding_outcomes_post_merge_counts.py @@ -48,9 +48,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.finding_outcomes_post_merge_count import ( - FindingOutcomesPostMergeCount, # noqa: PLC0415 - ) + from ..models.finding_outcomes_post_merge_count import FindingOutcomesPostMergeCount # noqa: PLC0415 d = dict(src_dict) judged = d.pop("judged") diff --git a/proofline/_generated/models/review_investigation_finding.py b/proofline/_generated/models/review_investigation_finding.py index c80e45c4..89561418 100644 --- a/proofline/_generated/models/review_investigation_finding.py +++ b/proofline/_generated/models/review_investigation_finding.py @@ -66,9 +66,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.review_investigation_citation import ( - ReviewInvestigationCitation, # noqa: PLC0415 - ) + from ..models.review_investigation_citation import ReviewInvestigationCitation # noqa: PLC0415 d = dict(src_dict) area = d.pop("area") diff --git a/proofline/_transport.py b/proofline/_transport.py index 10ad45a4..d792d3f0 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -38,7 +38,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "5.11.0" +VERSION = "5.11.1" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index 9600cbc5..560d980e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "5.11.0" +version = "5.11.1" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" @@ -35,10 +35,10 @@ Repository = "https://github.com/prooflinedev/sdk-python" [project.optional-dependencies] dev = [ "openapi-python-client==0.29.1", - "ruff==0.14.3", - "mypy==1.18.2", - "pytest==8.4.2", - "pytest-asyncio==1.2.0", + "ruff==0.17.4", + "mypy==2.4.1", + "pytest==9.2.0", + "pytest-asyncio==1.4.1", "build==1.6.1", "hatchling==1.33.0", ] diff --git a/requirements-dev.txt b/requirements-dev.txt index 523830e6..4585644d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -7,6 +7,64 @@ annotated-types==0.8.0 \ anyio==4.15.1 \ --hash=sha256:6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101 \ --hash=sha256:9f28306018cbd6d329e64a36d58256edff76dd996fe423bc957326e578b82a94 +ast-serialize==0.13.1 \ + --hash=sha256:02686b281ec9b8e9614f6f0db27e12e4cac515f336c5d05b678bc9eb73ff2af5 \ + --hash=sha256:032b09d86c785c3984e975378b7861f2a68ac44e22ba7b07b93a536b2524eeb8 \ + --hash=sha256:0d764913374ba21df8cd618045b371ed104ce55c6276de7c59e554a4f5ba26fd \ + --hash=sha256:121e1d08d58b75c15491cc3003609cbad71ac2b0016043c36d30a6b2032b6605 \ + --hash=sha256:1b158f1c9e3a0d386913924c57995d6df78224868a4d0f215bdd41587c97b34a \ + --hash=sha256:2015fd0165e463aac3b1aadc6a1fa1e5820c14ca950821f4fe02f8a3f6a388d6 \ + --hash=sha256:23d768369b89d551077dc173da6892fad00443338417523b6732f4e8ba4a7ed5 \ + --hash=sha256:2876444a5f87a7c76f371af3c07c2fda563a08bc8af52568df812e8aba4bf568 \ + --hash=sha256:29422d7bcd9e7f39411571c36cec45ce8a7a9b3ad4b2e7aa64497c15a9e397f6 \ + --hash=sha256:2bad302ae2427454ef9dab71bd5c3ad67188860c39d36daee38f72031edb39c4 \ + --hash=sha256:2f9a9ce8b0994f757b941f7f7fe384a6666b4162b941ebc5c248081baea18e47 \ + --hash=sha256:30cf89b6a6844542d116c758725d13de5b97b9410a51ee577715f761270d0c1c \ + --hash=sha256:3e129d44b0cffbea24a7f40117ce49e30993c3d119e584d4817ebd6f87246456 \ + --hash=sha256:401cc84e8888d4d76f2c8d296fa006ed1a5ff993b6aff90dd777c03973efd025 \ + --hash=sha256:43e8ddd63e80fc280c2f790157386f27f9b9f6ccb9c4f8e803b863cbfb085769 \ + --hash=sha256:48f11d96c9ec71119612f8e79a8c55c12f2b136716d68347433c561d27a25f43 \ + --hash=sha256:4bcf1d5f4eefecaa325a34ecf079b2741189e7d0821523f92cb343a389a67489 \ + --hash=sha256:4e385b17d5bde892a6184003a9aff3518387908b73f8f5ea539313c07c8c0ede \ + --hash=sha256:4f98da562e5901d69c7dd30885594c5438f859edf354e9ac7517d188fb026c3a \ + --hash=sha256:523d45bab16ddaf1399c04c4fe81bbf180f81e33c2f7bcbe76be56b0f7311ab4 \ + --hash=sha256:5d99910e6b9a9b9360bcca2ae99aee36cc912ce058df2a57d1c33099b6cb2593 \ + --hash=sha256:5db12d843d931b9d1f1519ce66b9cbfe72d8563b75c1204d255322254d1964dd \ + --hash=sha256:638333fb8ae72c62753f9e794fda20290883ddc65b0d85e26e08f8bb227567ad \ + --hash=sha256:68f8829d114dab6c9db4a8bbb8d0e342958faee1b5e15a29022678df639960f8 \ + --hash=sha256:6eb0be64c9b8f1ed26637eef345abe75ea90351c92c85a8aec7838b3af971011 \ + --hash=sha256:6ffb0f548a7dc126067fdfb7b2325ab5dfcdeecc29faf5e0f0461c96d6ebfa3d \ + --hash=sha256:732aaae9e498c973fc63fd7f308009b57c4afa6ff59d0b674d894e57d0bca01a \ + --hash=sha256:75d7750fe98f6f35a96c43aba8d98a2e623e22c778a0c17ab9ede92eb10f5d82 \ + --hash=sha256:77a6201b69ce42e919f2fd9a559138d5410b5d8afff7c3a6b1f500b0481ff7d8 \ + --hash=sha256:7a5c38bdb93669c596f94fb7204dd6ebe4fadb19058ac9a2faf2948c2a175f96 \ + --hash=sha256:7f2427bddfca208e84de700044fadf9aef2769a70bae740a1bdabb89ee9e1117 \ + --hash=sha256:7f3e8a3eff69af640db985360fef35073fb46956dfc3e5c614cf00920d2746dd \ + --hash=sha256:847cad4c22953823f5e76d0b126c6f9da670cfa45b1df41b9324e22189d77611 \ + --hash=sha256:87427913c325adc811e81e7c9a757b061f47ef1e29114ac479aa0953a2687a98 \ + --hash=sha256:885a62ec6481ce58ab24c6357360d7a82023b62dd7e5e7ceccf59e9662a3272b \ + --hash=sha256:8899c038b1c15ae8b98e379057fb3ef398ceb0b21d1737a8156dd5a0923b7e51 \ + --hash=sha256:88df960e67184a71874e5b2ee014f87d1254a0dbc1f903c7bd7b1ab7733ecaef \ + --hash=sha256:8c8ebd419811c435812d242fb2a173e57dfede198c9ac9a0a584666ebc9b9331 \ + --hash=sha256:9221e09496fb942901993c1812ee87950cc0ecbb514c7c0f1f5fa6d78f701ed8 \ + --hash=sha256:929eda0c419e622ab49df3a4c45f81c57dcc10874bbad55d0470a4a03324dac3 \ + --hash=sha256:9f99786e0d62082a5b121b3437f3167562133711df22128de1e9886f57f0b226 \ + --hash=sha256:a01b515b25a03184eff4acef25b981ae007916379682e908fc8785b342a0bf3e \ + --hash=sha256:a789cbe14d0a0e9ec9b32a456e5abc81ad8799479c3cfd88a29e3442262aebe6 \ + --hash=sha256:a8ab2c2585b2e22e48cd4aff2136fce4eab4ced569b85f150ef9a5a5d6f34d49 \ + --hash=sha256:aca07de3ca8e3d9f2b716c3c31f4f384fe4bd2d03e09912417cff7a3e08036f7 \ + --hash=sha256:acf4e9f055d75058ab01536da330648746f2f82b7697a85230547f2d5ebe895c \ + --hash=sha256:ad88921f95b92bc144d9ad059a0e16f8c1ae69f5239f2d3c6536fd2774f73dfe \ + --hash=sha256:bf53a3ba1cbe45399fc1e4ccd684b8f2a11cca450f89706b79122f478534c6f5 \ + --hash=sha256:c652d9f5d52d8b81eff3ff2c95c9dd0f281de45f6ad5d3fa95527550c396454a \ + --hash=sha256:ca9acc67f796aa2554fa3037dccc022a4b08b38b2ad153edfac9c9bb7cb1f3c6 \ + --hash=sha256:cc34c670747d85d4232834665e247009413eaebe47c69eaf60a5c439aaecaed9 \ + --hash=sha256:d9c1a920b2aa0c1e016bed7721689717034ca0dba64ac3a3ff243b003d4e8dd8 \ + --hash=sha256:ddf7cbc9c8abf70102c4a088efe154bb86bfb825b0a10e556d2b15972cf99bd7 \ + --hash=sha256:e14c4de98f965647a74e6eaf37e20207124e45451ccd36e84a6f6ebab45e0372 \ + --hash=sha256:eb41e1906502ac80d24ff343f45008552a3f5b5158607959fe6a07dbfc6eb037 \ + --hash=sha256:f8b17e2921e56621bcb46792bd3e0b82ca3b85de78d5936e7b8174ba1758b0aa \ + --hash=sha256:fb8021f4dc3296de18737e3b8b34994411da725374d74a0b9eb32a738f2a23d0 attrs==26.1.0 \ --hash=sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309 \ --hash=sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32 @@ -40,6 +98,144 @@ iniconfig==2.3.0 \ jinja2==3.1.6 \ --hash=sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d \ --hash=sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67 +librt==0.16.0 ; platform_python_implementation != 'PyPy' \ + --hash=sha256:001bfd59a7d45b17e3e75f2a8c6405280b35e7b84471792778e718c4f368950e \ + --hash=sha256:0058f9d68721094105917254c72ac0569117bb7b13b9769cf45d26d89f9d21cd \ + --hash=sha256:02118f56a9c36ddd07dfd9b919d9ecc117ba20a90987d56aa4c429fa34509188 \ + --hash=sha256:0253721561787b8df8443eb347b7a6461015354e5bdd37ee38a41fef220d2bb0 \ + --hash=sha256:02d89c813d5ff74b17df72d3a34819d132cd168e56b81bf755b809bd9e46b8c4 \ + --hash=sha256:0314058469f4d2fd279ce7c62ac274ac82c3918ef7db62ef0697c4c359370155 \ + --hash=sha256:0dbe4096a7ecc00fa835d24510ad8545a4efef738dac96e0e63516783ccde905 \ + --hash=sha256:0ead24d2562a49473dddd9efef8581f020007eb0054389c3ee3ffad38b1ca4c9 \ + --hash=sha256:13b4e8aba90b0b1c82474e9844aa9ffe7ad3faa484350e1da64cb8188d903134 \ + --hash=sha256:14ed6ebe3e4f85f326d7920011ad30ff49ed9334e62cf88caef9ba973d9e3a92 \ + --hash=sha256:17bac7f7a16b328fff77e440287693eb017abde913595b5827ebccbc21ecd8a6 \ + --hash=sha256:1b384b90ab79a7bc30b566895809a636e0666f21f3cf12b54823d025b7e83839 \ + --hash=sha256:1bc17e54e5305f8d40b7ca203671ff5a9e59c1d0f8ea0f625dcca53a3984de11 \ + --hash=sha256:1d28ae980ae2218f9c5b95d191e947296f918c9bf0b400d467a9430275bbe678 \ + --hash=sha256:1e511762a074005bb0aa569166779834e75e438370226930d0ce1866d4b6a33b \ + --hash=sha256:20fe0bf9053885e21c62b3e091fb5e73e1c54d1daf2e70eb388d70763bcd4220 \ + --hash=sha256:242e00b3d4fa37c3d3c1ca5f5c9adb7d909ddb1eac9c41f2787320d00caa0af2 \ + --hash=sha256:25a58a19ea8d83b68209f04912df765e9260635ef77646542ed4b4abe6bc7940 \ + --hash=sha256:273d00be33792a15189331df10f1f1331621b043881e66c6c4377f7f776e1291 \ + --hash=sha256:28e038895b998d7a0c7798922ce8a1dc157675df5cf1c9ef0aca809ed804b7a1 \ + --hash=sha256:2bec3818c7da7c96ceae0ef5915a3d16c52dd08f3ea913bf1fe8568c447c7978 \ + --hash=sha256:2c4aa329c17bd1aaea4f6e89335d8ccd494b3a5830b6654462273e50e11023f0 \ + --hash=sha256:300c3ffdc459f4a779a8411ecb188e3ac0b1ff3a3a7b099642555dedae06c69b \ + --hash=sha256:30b7beaf3f4487b7d8adef1f158b49067cb4d5a19fa7a3bf31a4e7a820e435c5 \ + --hash=sha256:314e703f0c19320dc8094e7a784b9cf29e1b67402515abf580069a6363c0b4f1 \ + --hash=sha256:33f41443a1f4e1f099331b3d8120e409fbff84b9760bc1cc9ea496f37ddaa5cc \ + --hash=sha256:349c0bcb87ebd07481b6ff781e25cdc699723dbe2212e57dabb27f7a13b7b87d \ + --hash=sha256:36e53948e99bbe3ffea257124cfcae1cfb01831555c9a9c903c9f9a72db7fd07 \ + --hash=sha256:375bfe6b572a8f6cfc398709356046173bf27e64c4c5edaf5f7062f051fb4bf9 \ + --hash=sha256:378dfaffb38e59c24a87cde5713cd865d51ff7383fa12947f3907f306ea1ca55 \ + --hash=sha256:3931f7a3db322e7f44e02a280e3949326ce9579ad388ee8d691dc7c76da9fb70 \ + --hash=sha256:39ca4f2f2fe05de8e63493da592d84311adabe5bef52b193851981da9816b302 \ + --hash=sha256:39ec1d5a14e37baf1450a6cabf03fe552340808bf1ad9d71824ab90117716459 \ + --hash=sha256:3ddeb3c9dedb461bb457c6c7d9aa7fbf35329da313d1a7543d00c8d0f3473c96 \ + --hash=sha256:3e0c39bdc85370422e8b637be76eb1fd07d30967551b03e62267dd156f553152 \ + --hash=sha256:3e483a8d69ede8067db70c0e83007423b6925de6fd53afed01d66160f2e9398c \ + --hash=sha256:3f0b8114c44b2ac06ff5dacd08e07e8e807ff4f46083f2a1602685122559be41 \ + --hash=sha256:3ff4b2367926b69c6215635902cccb04048e73094e9862900d27cb2c6bbff143 \ + --hash=sha256:4323193ac0cd025f85af531df8ba91bf24d1973b401697347a6282e8fd3fcf5e \ + --hash=sha256:468df902df016a06eb0e40b0747dc8d14e47d7a38b18b63b1fb167d85cb94d63 \ + --hash=sha256:473eebc7866bb0a0c8849a292b5e7157c1aba5d14d0f0f610c52158d6d964262 \ + --hash=sha256:47ada6ea32636492c61aa8ad27ae3b9404bfe7a97e3ba946d1984236cc741da0 \ + --hash=sha256:4b6183e2e2e0ee00aac2ec07c7f7d151c97e85666b304f574b71cff0f9fccc4e \ + --hash=sha256:4e29522c62e28595ff7e324c6834ade51127707f0e255b18d1c1cf03d39c1048 \ + --hash=sha256:4eb1313a19847089ee81e88742abedf285c60538816640b99742d8534b81d26a \ + --hash=sha256:52327da75a94012e7f932f913d20d3876bed3c102be00e6c3e8600ff7bdd58a7 \ + --hash=sha256:54d11f726aae9df5a6ffbbf0a03a52449bbac84a53ef03669cb41cdfd4ae41bf \ + --hash=sha256:5696d7f52e7b37217cb3a8f92c744fe835942602fdd4c1a8bc4741d3bfdce15e \ + --hash=sha256:5750a105b42a416f930edc59054927a406effb2550cd5bab92ad7a5842ed5d05 \ + --hash=sha256:5810ba811297fdf37a1531a57667cb8ace0842013ca8606bf9eb7c24cf4be154 \ + --hash=sha256:5981c011b306781ce561e18e14230a14524a3d8109b97553666c942c18f31a96 \ + --hash=sha256:5a269c46ae327d8e6f8c1f85f7516cb52c0fa48127565a1105a4f4a05ff2a0b4 \ + --hash=sha256:5b976054553670829985ed767feb78fb6bcede0175327c4844dd5c281c1be659 \ + --hash=sha256:5bcc2c4726ced915b00de0c9856a4eeabfb3fddb93e10e0b8f735b7709358b6d \ + --hash=sha256:5cd5b092441053364af968ea12084692cb9d4a22f3ce9524e377880bf028761e \ + --hash=sha256:5f49cff01bd608ef7d97104cb035c75455e79c2d70bf4a506cf773338ac1860d \ + --hash=sha256:6072e92dd876ff6ceeb6cf371e35e51f479349837391341f479b08df4564242b \ + --hash=sha256:64c79520414a3fdfc6aabd7593e6169afa14d5f8d9908d4b498db068868b08dd \ + --hash=sha256:67e718c7a43f8db325abbbf1404e2d535f12f8f7a1a82259568385cc5274b82a \ + --hash=sha256:69ba927445cfaaffb4081003ef5224c55a5c2ab67ef956f416ef744916e44121 \ + --hash=sha256:6a63610fa76524edfa605b5b259a603915c7a6e10e54f003e5503030506e81de \ + --hash=sha256:6c5da27e8056439f927ea896735da60e616c477a8293feaa3233d4e7781a6726 \ + --hash=sha256:6c8893eae2fd13c5488d94056f3e6e5cf3142bfb1c4acaf136cb33d760c5964b \ + --hash=sha256:6d4a64283ee61824b5790de882bc68e2d9d7a5143537cb7a966f7354f71646d4 \ + --hash=sha256:6fe436af2eaf630474f491af5d032cbe45f93fcff5c3b9fe4ab194a7255b20ff \ + --hash=sha256:71b93b42784e25b975079573c642a8fedb049a7bb31d70a51721b1666b3b2ced \ + --hash=sha256:7393c9a48dcce4817dbd4b0d8ff6237efe9b0a0609f5b0adaef315f8541726b5 \ + --hash=sha256:77c7a2b4fe2c1369e0d5aa1cade26740a7b14be32fbc9a5535d617d20065c39d \ + --hash=sha256:7a1d272724b581bb6bc769dfdafed6da2ecc9886ba2450311de55a4ac2e1e9cd \ + --hash=sha256:7cc365f006891afb006b52d5ee5ee74c09306ffa20e2f8705a32a4450af2f3ba \ + --hash=sha256:7e510b7770bee609617a3374a96548eb114cae048023e3f049ee449e7ff2db32 \ + --hash=sha256:80039ba9b6a7d5f1a0175a4cca6bbefead87bd854c80abad1cb30afe47a830db \ + --hash=sha256:83d4041a3d9b2fd053a8a4e1f22878b3e5833e2712956382d5c048d791454e91 \ + --hash=sha256:845a511b60ca43b9880dcc84a9784c891d6a2098c829130b320846c69c9c0c68 \ + --hash=sha256:877698bf6bca5721d8be345f2fe09778e40ecadea8b58c73075f2b1a53666bf2 \ + --hash=sha256:8caf96a4ef8fb27d0ac0d1ad8337d26a240acd4a02fe4345d0a8f264753e8f99 \ + --hash=sha256:8ceafb70f2a4f0826f11031942e59c0728fd98da112dc346d4352bde1e486866 \ + --hash=sha256:8f36c58e33b304b525c6c9c5076399c6ebf1109e17b9051a05a407b091b9215b \ + --hash=sha256:8ff5d26c529336be9bd7ae04483235d77778ee7d6444a95353102b542601ce81 \ + --hash=sha256:909d8e3c1faee44cb762b1c519ff8613dcc5ceae5c99987a00917b5a31fd1d6a \ + --hash=sha256:92caf82ebef5e12d21c72242b70d1e92536f1711cf2a727a4c276de4b4469087 \ + --hash=sha256:931a0bb0fcac88f263e269e46eb30ba8e21402cd3c62ca40cb97034c0693fab1 \ + --hash=sha256:943c6bbecbdf7fa575a4f2952fcfd848c88ef95507c3fca411e89d4ac3ff8143 \ + --hash=sha256:94aed6a8308818b91677957d1bd03188869cd7aeb23c5dba7912a6c0402f7602 \ + --hash=sha256:94be5cb7bca4df6201f4183e9e4fa2086c655283d20b38cd84500a69057575a7 \ + --hash=sha256:953107e2f68d0f3512c48f898b0dbf0ce5cc52bba0f318d847c985dc555ee4cc \ + --hash=sha256:96f576f2711f8519152ec76d0e599243555c1f07679fa73606ca8c8c868c0be6 \ + --hash=sha256:a33e0dae1f8592146a4764d54ce842b278732d21a84e17c3bbe6b1bc158a2248 \ + --hash=sha256:a4aaefb4ba6c07e1aeebb2795c8958148f1d6f9af3b555b53d23d766edb6d67a \ + --hash=sha256:a8afb6557920860b7a3a596eb804cf37e09e7cf8a803db2478c202acc72d8c2e \ + --hash=sha256:aa9357a1b4d4fc787bb718a59cb1112c28c8a976d6bfa268b71cc0a4ab8f3a94 \ + --hash=sha256:ac38d6d8d66bf3d744148dbbc0b8e193e195a51e364ed55e224631f5721891fc \ + --hash=sha256:ad37d5b9abd49c9a655dcda7ea52a8a752884062ef1ee71ae17c2f2a0f81fe6a \ + --hash=sha256:aea7b1f2b125dad5de85f049136651bff256c883c65e6b9209b2da0a1ac3cdef \ + --hash=sha256:afced3dfc17cd805ecf7a3d77996a71cf5f2c75aa66eb0c21a9930f4fc992f86 \ + --hash=sha256:b0e3e721c75d2e79a76d4422c79d7ba705fe1bbafec907037fe7a657a480a0e3 \ + --hash=sha256:b6d085d70bce51d43c5c7c36d63490770180d8779e71c49305c87b4213918de7 \ + --hash=sha256:b95d5d92ab83d39e760a52091bb1baba664f3a2351e39b1e16801e5747c2f0e9 \ + --hash=sha256:b9d6d4b14e92d876f8026b54c20c445f36425214c1081dc76f74e40db386b82b \ + --hash=sha256:bc02954b1295de798bbdb0b4e2d8a28c2117de8b5c73dcbeb27dc32572dfb971 \ + --hash=sha256:bd3150023d3dc2bc70f3784e59ffa1140d56ddba3d8125b3d6f9f85221279bfc \ + --hash=sha256:be56ba9c884143495b517f23fe794ae367d58cd89ea0fdd6d437e3c024a87f9f \ + --hash=sha256:c17194318e4c0c0348b36f36c2ec7534436fe0a4c15582403162a4f08c80797a \ + --hash=sha256:c3d1bb7841a816ace6449bb26d3f9560dbfa20e71c568d23f0f62bf1e68f50b1 \ + --hash=sha256:c43bd6e642d8a248c114327f98dd25ac5a7cb5aa168ef02f0559b91874df16b8 \ + --hash=sha256:c5db585d43449a5f54303d4b2774e45e1babd975cfe1630a3d708c0b80c3e560 \ + --hash=sha256:c5e6144e68b577f157519f2ba88ca20e3ed61c29b00e5cdfa76cd2d45acf059a \ + --hash=sha256:c6f1b27bf1632a7e016af9f145f82be95e1edd7721a646505c21059257cb5a04 \ + --hash=sha256:c71d1b76210a36729fedfc5115069b50a3d8619054745f8758fe5d6f19e86671 \ + --hash=sha256:c72c5295a84bd249526da9bdca38f2e176d15c31c13bb0063c5053f4ca023421 \ + --hash=sha256:ca8052401c55d7511dda6760719fda7618067e83535d7d0010096d216c34b667 \ + --hash=sha256:d1aabe3925cbb4a08d15b7b20ba4011b53019da0c4173a25155139b7b1baed65 \ + --hash=sha256:d3c94211ee0c4f8d649ec06b7c115c0ec4eadb873a0e3154ca15cef3f814b071 \ + --hash=sha256:d46ca272b251d033dd4527b0dec5f261a28a52bd5fa0f99c117b0a1f8588cc2d \ + --hash=sha256:d608f0bf3b8cbddd0067fe02cb8cab7d13e8eb9386b23a1843d4363044fd9e22 \ + --hash=sha256:d6a365f2ab45a984d0e00eee0dd17f599ceab8cadab6ea07b6111c8132fc0e42 \ + --hash=sha256:d92db7a0f6aee44f1baee94750457e8d2d1c6ccea41842de6268d34e8dc7eddd \ + --hash=sha256:df183721229ae51eef90108c115b43e98cb169b6155d34480338e5fc6616df00 \ + --hash=sha256:e05108e0849966f53a8d2d3112a7af881d0efaa479bc735bba91108f9f2350a7 \ + --hash=sha256:e1967e36ac4cae0c7e9615ad32e1a513cdacff79f9e8afb28bedc91caf48b4f3 \ + --hash=sha256:e42f8e098b9c5396fefa05fb1cc7e33b0e08fc51da106b5de4a45fd22aac6743 \ + --hash=sha256:e56aaf8c167548dc8e5d6f3bd0f48dcdd299a23c73be3f744aab79d99e9c7f5d \ + --hash=sha256:e9ce0bc440e7fd09b5f51f372f0f6640658f854b8fb05260f819cc669c93c42d \ + --hash=sha256:ebefd60b42e2a82b32d136bb5f7c94eadfcd29f772b547df6f3291d1ed855a1c \ + --hash=sha256:ef46c1a29ffb8c72e882e22618ec618778eacd0578fb22c6e7cf9c11d15f357b \ + --hash=sha256:efc49c462d4516b8a58b00b490078fa64689fd1fe66970cc190131d7afb8027e \ + --hash=sha256:f01f3805f2dae4781c0c34b440e31740d082950bdaf89a6f601ad589a28af57a \ + --hash=sha256:f06c689cb14afd9b612727553a5ec5a40febf113ca41c4413a2b0b334285884b \ + --hash=sha256:f1e8591bd8a5a628cd7f07954c6a1592359a878bf032957a8e9057a41d644311 \ + --hash=sha256:f4462528b6000afe8f16907b5c7c2553abf1df005ba5140e6eb394541c3624c3 \ + --hash=sha256:f7be7cf555bc30ec12622e9447299cc4a9b8ff307548b634794353db0c2065dc \ + --hash=sha256:f81b5b19ce748ef68d4746656b7929762eb2fe99269b266e4be07e2ee4de7144 \ + --hash=sha256:f9807485a908f00355820f18e91e045ffdcdc5adb68aaec40a1e2b88c5f7bba1 \ + --hash=sha256:fbe4fb8c5445f7496d7f7f6bb0807875d09d47e6771ffa175fb2df2895fb86ba \ + --hash=sha256:fe4372c52d4849096c6cc1cda2817d293ec51440c890474ed59ef38d46556f18 \ + --hash=sha256:fe52bf4641069e7978a14253b036cb9002def1926317e710f2e249f8a8c47742 \ + --hash=sha256:ff7baa55f8e7c69851419e50a666015d02a74198716fd45c0125a2112e0a389f markdown-it-py==4.2.0 \ --hash=sha256:04a21681d6fbb623de53f6f364d352309d4094dd4194040a10fd51833e418d49 \ --hash=sha256:9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a @@ -136,45 +332,59 @@ markupsafe==3.0.3 \ mdurl==0.1.2 \ --hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 \ --hash=sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba -mypy==1.18.2 \ - --hash=sha256:01199871b6110a2ce984bde85acd481232d17413868c9807e95c1b0739a58914 \ - --hash=sha256:030c52d0ea8144e721e49b1f68391e39553d7451f0c3f8a7565b59e19fcb608b \ - --hash=sha256:06a398102a5f203d7477b2923dda3634c36727fa5c237d8f859ef90c42a9924b \ - --hash=sha256:07b8b0f580ca6d289e69209ec9d3911b4a26e5abfde32228a288eb79df129fcc \ - --hash=sha256:0e2785a84b34a72ba55fb5daf079a1003a34c05b22238da94fcae2bbe46f3544 \ - --hash=sha256:1331eb7fd110d60c24999893320967594ff84c38ac6d19e0a76c5fd809a84c86 \ - --hash=sha256:1379451880512ffce14505493bd9fe469e0697543717298242574882cf8cdb8d \ - --hash=sha256:20c02215a080e3a2be3aa50506c67242df1c151eaba0dcbc1e4e557922a26075 \ - --hash=sha256:22a1748707dd62b58d2ae53562ffc4d7f8bcc727e8ac7cbc69c053ddc874d47e \ - --hash=sha256:22f27105f1525ec024b5c630c0b9f36d5c1cc4d447d61fe51ff4bd60633f47ac \ - --hash=sha256:25a9c8fb67b00599f839cf472713f54249a62efd53a54b565eb61956a7e3296b \ - --hash=sha256:33eca32dd124b29400c31d7cf784e795b050ace0e1f91b8dc035672725617e34 \ - --hash=sha256:3ca30b50a51e7ba93b00422e486cbb124f1c56a535e20eff7b2d6ab72b3b2e37 \ - --hash=sha256:448acd386266989ef11662ce3c8011fd2a7b632e0ec7d61a98edd8e27472225b \ - --hash=sha256:592ec214750bc00741af1f80cbf96b5013d81486b7bb24cb052382c19e40b428 \ - --hash=sha256:5d6c838e831a062f5f29d11c9057c6009f60cb294fea33a98422688181fe2893 \ - --hash=sha256:62f0e1e988ad41c2a110edde6c398383a889d95b36b3e60bcf155f5164c4fdce \ - --hash=sha256:664dc726e67fa54e14536f6e1224bcfce1d9e5ac02426d2326e2bb4e081d1ce8 \ - --hash=sha256:6ca1e64b24a700ab5ce10133f7ccd956a04715463d30498e64ea8715236f9c9c \ - --hash=sha256:749b5f83198f1ca64345603118a6f01a4e99ad4bf9d103ddc5a3200cc4614adf \ - --hash=sha256:776bb00de1778caf4db739c6e83919c1d85a448f71979b6a0edd774ea8399341 \ - --hash=sha256:7a780ca61fc239e4865968ebc5240bb3bf610ef59ac398de9a7421b54e4a207e \ - --hash=sha256:7ab28cc197f1dd77a67e1c6f35cd1f8e8b73ed2217e4fc005f9e6a504e46e7ba \ - --hash=sha256:7fb95f97199ea11769ebe3638c29b550b5221e997c63b14ef93d2e971606ebed \ - --hash=sha256:807d9315ab9d464125aa9fcf6d84fde6e1dc67da0b6f80e7405506b8ac72bc7f \ - --hash=sha256:8795a039bab805ff0c1dfdb8cd3344642c2b99b8e439d057aba30850b8d3423d \ - --hash=sha256:a2afc0fa0b0e91b4599ddfe0f91e2c26c2b5a5ab263737e998d6817874c5f7c8 \ - --hash=sha256:a3c47adf30d65e89b2dcd2fa32f3aeb5e94ca970d2c15fcb25e297871c8e4764 \ - --hash=sha256:a431a6f1ef14cf8c144c6b14793a23ec4eae3db28277c358136e79d7d062f62d \ - --hash=sha256:aa5e07ac1a60a253445797e42b8b2963c9675563a94f11291ab40718b016a7a0 \ - --hash=sha256:c1eab0cf6294dafe397c261a75f96dc2c31bffe3b944faa24db5def4e2b0f77c \ - --hash=sha256:c2b9c7e284ee20e7598d6f42e13ca40b4928e6957ed6813d1ab6348aa3f47133 \ - --hash=sha256:c3ad2afadd1e9fea5cf99a45a822346971ede8685cc581ed9cd4d42eaf940986 \ - --hash=sha256:d6985ed057513e344e43a26cc1cd815c7a94602fb6a3130a34798625bc2f07b6 \ - --hash=sha256:d8068d0afe682c7c4897c0f7ce84ea77f6de953262b12d07038f4d296d547074 \ - --hash=sha256:d924eef3795cc89fecf6bedc6ed32b33ac13e8321344f6ddbf8ee89f706c05cb \ - --hash=sha256:ed4482847168439651d3feee5833ccedbf6657e964572706a2adb1f7fa4dfe2e \ - --hash=sha256:f9e171c465ad3901dc652643ee4bffa8e9fef4d7d0eece23b428908c77a76a66 +mypy==2.4.1 \ + --hash=sha256:01b7718552d017f88d1151f3cc9d6556d778a90bd58060a2c3d87d070f9099fb \ + --hash=sha256:0724cf95fabc87ca4a2d5b7f276b43f51afce8a3804bde704490b008e377e50b \ + --hash=sha256:080cf64a60b90a73435542feecf4171904cc5710658165b40c6869115d4aa100 \ + --hash=sha256:0c5bf267645351887b72903fd2f5fbddcf85234e0e6c4ad94e2fcfb4f0c3f971 \ + --hash=sha256:0e95ad0bec03ced9a73b42514208abd24c789e67f0e1eba476e276dd7a2dea3a \ + --hash=sha256:0f0a8b8f5dee799195a3f2670a5b2617ac7193d3563f52dbef42ad6770c6a9db \ + --hash=sha256:133886ef1a7a8cf673df55d865e41580c6c46aa9b8e31e1325dfe315c038f745 \ + --hash=sha256:1784648d6ec8c2b5465e3f26241b845a0b3cb4e56c993c64abe16989e7698999 \ + --hash=sha256:1fb70621535c22fd4b1a0450d37ed1d6c5eb39656a1cebfb189084c12de54ba7 \ + --hash=sha256:2875280687e64740e6ddcef43bd4c5852ad45ff34549740f6aea3f0373870b93 \ + --hash=sha256:2b4e0aa029ad0c1d42cc494daf86d1e0efd15dab4db7bd096ece29e8a9689c6a \ + --hash=sha256:3467b1d13000812ab85dc2a3834b9379ec77798ca1bcabe434e23fb21fead692 \ + --hash=sha256:3f1613bfe6726169a5680ec3dad5fe1f6d96285c12aded51ad432eadedd39d45 \ + --hash=sha256:4af5ad558033bf71a44a1be149ed61633522824f84c1b6bc2445d3fe2d2a5296 \ + --hash=sha256:4c194c5d878130fca1ae662dfb1feb6274afbab0b40032c80147377e0ea803d5 \ + --hash=sha256:4e18d0da3898b3bcd16192f15a206e7b8b8dd0f4a0b3e51aa5bd5c2afe749e2c \ + --hash=sha256:51f742d4154824837ca6e92aa81f00eec222700a3c337bd258e5562a3880d75a \ + --hash=sha256:63b590965691e540a335fa74dadf31a7069142f6b72e234689bbd244edf55623 \ + --hash=sha256:63c6ff0e7ea546943001a91639c9f0c64b60d239268fa5d29e4a6c87f82c2373 \ + --hash=sha256:680ba5d9f0e3fe0c746b3d14df15f2a718e4bc308a1145616a1ea691ce7c354b \ + --hash=sha256:6f7225951a277dd0d6add900731d487174b7d24ac133c09d670ed63b4d8cb90d \ + --hash=sha256:70196470ac300f444a302a738541101893c2c57804078b33690286a7899149e9 \ + --hash=sha256:70971cc0bcb1d3f03d2eb68fa430a6481ccc03558dc001d9534d7e5fa274c392 \ + --hash=sha256:71eda06e5bae51976ce869fda429159c9cec678bd02f25bb197f0265c8f991be \ + --hash=sha256:727890a32f1858c09549eb55a8b234fe990d460450b28f03e8213ef925f1247c \ + --hash=sha256:7344869cad05f073b8cae2826774fa0161e3eb2f5c685b76813574008d77d750 \ + --hash=sha256:79a1e79199e980fb41f219cb3d4746d25c64b0b623840d3ed57df1cdc13a6502 \ + --hash=sha256:8e437811ebd26d3e6258efb562a711b385c139be597dffed5e735c801d15c77f \ + --hash=sha256:9d7dafd56179d296651df9e1844b91c9517c379398f017a2a435d077a28943c1 \ + --hash=sha256:9ed1195502cca32be5ef756b1693477f4991db2f2e34eaa90cc4ad6bea4f9531 \ + --hash=sha256:a20ff6cd2af7a670c64f089bfa5fbcebe8ff3bf896c5e6ac7c9862c7960e4494 \ + --hash=sha256:a2d4a51db92059eecc2c33b2a5194b28585ebfd917292c015fe87a77dbff6cd2 \ + --hash=sha256:a5b5da107dc2c93fb0a22f7a45dbaea5dc131afc7056b5468d78e819f9a138e6 \ + --hash=sha256:acdd82cb3a2eb10720e87706a128d75785d005a8c47e36a4973221524f41fc56 \ + --hash=sha256:b69a15fc2e75858d6b15e91ed3a0dcff1a533265183b64734138791fe0f49aa5 \ + --hash=sha256:be4c03f33c55500191df2ed4a9b5e7edbdd1fff067fe361a5a9b1b5d3262da6e \ + --hash=sha256:beb254fec368c4e7f7f82a5f310c6470b893ec88a90b66426da971c6826b0453 \ + --hash=sha256:c3a4d0c47053cc90035dd3a2c321112b593ad42935d0cbfd747288e1564fa8ca \ + --hash=sha256:c45485061ba08f700acc12cfc8b177e6997e6bc353605babfc0abb081e079456 \ + --hash=sha256:c535efcb91f7e66f41b9bd2b5dbd78900a7609ce88f4c020d668e4c82d082b0b \ + --hash=sha256:c6c7210e40dd423af7d65cbe428b5906d11dc60659337bdae4e5fdf02ce32ed7 \ + --hash=sha256:d4c343b2a720741a016d720b255e75581a50e2bede61d53250484e18562a1d64 \ + --hash=sha256:d63737426a048a27705a4eedb828669f4bc0873612a1b46b0b9fe892b2ebaaaf \ + --hash=sha256:d6e081b466e88d4343adffe11aff0f02df34b5b9070b4b700053a0b7294c0be1 \ + --hash=sha256:d923cec43316f0e6736b8298fd00abeaaf348a091c20e7296b3aebceecb63eca \ + --hash=sha256:db599d03e7d60d15f2e0a11665c18bc52a88699fcab990fdf8cecd5be8ac801c \ + --hash=sha256:de95648e0a6d46fa9929b956ed2c87c5dc9933d4d59945e6390e9d753c74e7c1 \ + --hash=sha256:ea0714d2bccaf6d010c970e1d3ba2c9c2add79d2030aad2ef03167d788948276 \ + --hash=sha256:ec416d5d2ae689e681f5727e328723f18d8b5dc8c903a146b7851dc5727aad8a \ + --hash=sha256:ef8d5be90032261197ac388d945d8ff4f476c95880798a1911760af64ddfe71f \ + --hash=sha256:f44dd4c5ab22df21206dd926c98381ebdbf5bfd696df37dd38ded2d23143fcb6 \ + --hash=sha256:f9118a3f50de264b614861bb11814833a742138ac3c8e2e49a860b6977fb2704 mypy-extensions==1.1.0 \ --hash=sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505 \ --hash=sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558 @@ -320,12 +530,12 @@ pygments==2.21.0 \ pyproject-hooks==1.3.3 \ --hash=sha256:5fc53fdac9f7bd63fbcdc868fb5f90b4784d78a53a3d3388cd738b807441a20b \ --hash=sha256:defda19b854fa0d3bd4f76ea4ddcba8abd7dcfcdd585a6690ade050744fc5f43 -pytest==8.4.2 \ - --hash=sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01 \ - --hash=sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79 -pytest-asyncio==1.2.0 \ - --hash=sha256:8e17ae5e46d8e7efe51ab6494dd2010f4ca8dae51652aa3c8d55acf50bfb2e99 \ - --hash=sha256:c609a64a2a8768462d0c99811ddb8bd2583c33fd33cf7f21af1c142e824ffb57 +pytest==9.2.0 \ + --hash=sha256:07acdcf88ec174f907dc01af70bf52d49b014bbab03faeeade31c96b18c2e588 \ + --hash=sha256:97c4f3b1f3c7414aa36465e09b8220f1d03627993bd51b1282e193753c80557b +pytest-asyncio==1.4.1 \ + --hash=sha256:507afa78ec77c6661164ef1a2368bc7820383fd1a14b2a7f813de8b5a92949cc \ + --hash=sha256:e8266eb094e5ee9ffdb2068c9836f33e209ea77a970eb846933d416b5602669b python-dateutil==2.9.0.post0 \ --hash=sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3 \ --hash=sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427 @@ -335,26 +545,25 @@ rich==15.0.0 \ ruamel-yaml==0.19.1 \ --hash=sha256:27592957fedf6e0b62f281e96effd28043345e0e66001f97683aa9a40c667c93 \ --hash=sha256:53eb66cd27849eff968ebf8f0bf61f46cdac2da1d1f3576dd4ccee9b25c31993 -ruff==0.14.3 \ - --hash=sha256:0e2f8a0bbcffcfd895df39c9a4ecd59bb80dca03dc43f7fb63e647ed176b741e \ - --hash=sha256:1ec1ac071e7e37e0221d2f2dbaf90897a988c531a8592a6a5959f0603a1ecf5e \ - --hash=sha256:26eb477ede6d399d898791d01961e16b86f02bc2486d0d1a7a9bb2379d055dc1 \ - --hash=sha256:3d6bc90307c469cb9d28b7cfad90aaa600b10d67c6e22026869f585e1e8a2db0 \ - --hash=sha256:469e35872a09c0e45fecf48dd960bfbce056b5db2d5e6b50eca329b4f853ae20 \ - --hash=sha256:4ff876d2ab2b161b6de0aa1f5bd714e8e9b4033dc122ee006925fbacc4f62153 \ - --hash=sha256:678fdd7c7d2d94851597c23ee6336d25f9930b460b55f8598e011b57c74fd8c5 \ - --hash=sha256:71ff6edca490c308f083156938c0c1a66907151263c4abdcb588602c6e696a14 \ - --hash=sha256:786ee3ce6139772ff9272aaf43296d975c0217ee1b97538a98171bf0d21f87ed \ - --hash=sha256:7bfc42f81862749a7136267a343990f865e71fe2f99cf8d2958f684d23ce3dfa \ - --hash=sha256:876b21e6c824f519446715c1342b8e60f97f93264012de9d8d10314f8a79c371 \ - --hash=sha256:a497ec0c3d2c88561b6d90f9c29f5ae68221ac00d471f306fa21fa4264ce5fcd \ - --hash=sha256:a65e448cfd7e9c59fae8cf37f9221585d3354febaad9a07f29158af1528e165f \ - --hash=sha256:afcdc4b5335ef440d19e7df9e8ae2ad9f749352190e96d481dc501b753f0733e \ - --hash=sha256:b6fd8c79b457bedd2abf2702b9b472147cd860ed7855c73a5247fa55c9117654 \ - --hash=sha256:cd6291d0061811c52b8e392f946889916757610d45d004e41140d81fb6cd5ddc \ - --hash=sha256:d7b7006ac0756306db212fd37116cce2bd307e1e109375e1c6c106002df0ae5f \ - --hash=sha256:e231e1be58fc568950a04fbe6887c8e4b85310e7889727e2b81db205c45059eb \ - --hash=sha256:f3d91857d023ba93e14ed2d462ab62c3428f9bbf2b4fbac50a03ca66d31991f7 +ruff==0.17.4 \ + --hash=sha256:0d1f4848fd2ec0499be4046db9b7dfcc952666885f00233cc7033515282556a8 \ + --hash=sha256:13e781c3c5f663e7fba737eaaeb70dd943dd55171daf316afb25cd5268cfe0c7 \ + --hash=sha256:181ae38a9a8fb94925bf7d0794327b48d7fd7f4b50cfd84c0e999cc09ef8d131 \ + --hash=sha256:20e43d7a08e712e33067ba887e6574546c79bd4831596ce8f16803ac7ff9ad90 \ + --hash=sha256:2b08c4ff98dc234f4a3871a3105353b922fa875ea1073ca31001eb8c06bb4d89 \ + --hash=sha256:2cd025509b2e15721b426fc70fd946d71f43b3db3b08e946dfec2d696d911690 \ + --hash=sha256:3971a78cba76298b284c8321e6d40d93045ed348bec5c369d85099efc97fb7cf \ + --hash=sha256:49b77f7b3921669466882a4881168801bdb06ec2cd83fb936049016cf5fdece1 \ + --hash=sha256:5f28cf0dd37cb172fa5a8d2e92e6ada3a9dbd0609f094ed24039929eef0b7524 \ + --hash=sha256:6007e7f3a0e55b0fbdb947af69cf24c21b4928df6be8ef3e767c69b5ccccf496 \ + --hash=sha256:67c5a894fc054cf41f75f7afa24815de5a74329d97634126c2a1015740ff4e8c \ + --hash=sha256:6b21c771b296888e8a35c6f48555f4b44e4483f61675d6ed51810a5203469ce6 \ + --hash=sha256:7e061dcc0933c7031a616ac8d66ac540309b2aa21ab558101a8f53e9ac7a1185 \ + --hash=sha256:7ed2f416349944f908f9574215994602242b0836844eba48eec61473033afca0 \ + --hash=sha256:8ea6e0017c785f7282092b11e46338e4ebed1b9e575ebf2e55a8a1eda968241a \ + --hash=sha256:e3b84eb74f260d1c2dbd236fd9d4c011d4fdd0a52bdf8aea57a10e3a1b71fca5 \ + --hash=sha256:f32d178b50e826e00f6c6c1be3f56333068acb9b67fe167143527fa9b81e890d \ + --hash=sha256:f99e95a1515161138be3cbd1b06c06e739d8feb38ade35564556999fffc3686e shellingham==1.5.4 \ --hash=sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686 \ --hash=sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de diff --git a/scripts/_uv.py b/scripts/_uv.py index 76a07aff..1eb82687 100644 --- a/scripts/_uv.py +++ b/scripts/_uv.py @@ -1,4 +1,4 @@ -"""Use uv 0.10.12, verifying the official release archive before execution.""" +"""Use uv 0.13.7, verifying the official release archive before execution.""" from __future__ import annotations @@ -11,13 +11,13 @@ from pathlib import Path from urllib.request import urlopen -VERSION = "0.10.12" -# https://github.com/astral-sh/uv/releases/tag/0.10.12 +VERSION = "0.13.7" +# https://github.com/astral-sh/uv/releases/tag/0.13.7 CHECKSUMS = { - "aarch64-apple-darwin": "ae738b5661a900579ec621d3918c0ef17bdec0da2a8a6d8b161137cd15f25414", - "x86_64-apple-darwin": "17443e293f2ae407bb2d8d34b875ebfe0ae01cf1296de5647e69e7b2e2b428f0", - "aarch64-unknown-linux-gnu": "0ed7d20f49f6b9b60d45fdfcac28f3ac01a671a6ef08672401ed2833423fea2a", - "x86_64-unknown-linux-gnu": "ec72570c9d1f33021aa80b176d7baba390de2cfeb1abcbefca346d563bf17484", + "aarch64-apple-darwin": "81b811b57e4624df7ed3aac148e0359100d9962f3d9dce00aec533dc2e086731", + "x86_64-apple-darwin": "20c47e4c1f630b8abaff8c291fa9b9aa300fef92c4fbff95adf198b55287cda7", + "aarch64-unknown-linux-gnu": "71279f8d3c67241e807b9d8db872d1bf541579fb9f08b7d1eb1682196d1e57dc", + "x86_64-unknown-linux-gnu": "c5221ff41b7892bfc223543883600125f6a47fe845093e0f5bdff4f359196d83", } @@ -41,7 +41,7 @@ def executable(tools: Path) -> Path: system = {"Darwin": "apple-darwin", "Linux": "unknown-linux-gnu"}.get(platform.system()) target = f"{architecture}-{system}" if target not in CHECKSUMS: - raise SystemExit("Install uv 0.10.12 to run the gate on this bootstrap platform.") + raise SystemExit("Install uv 0.13.7 to run the gate on this bootstrap platform.") tools.mkdir(parents=True, exist_ok=True) archive = tools / f"uv-{VERSION}-{target}.tar.gz" if not archive.exists(): diff --git a/scripts/generate.py b/scripts/generate.py index 1f0bae1b..2ab56ba8 100644 --- a/scripts/generate.py +++ b/scripts/generate.py @@ -14,7 +14,7 @@ from pathlib import Path VERSION = "0.29.1" -RUFF_VERSION = "0.14.3" +RUFF_VERSION = "0.17.4" ROOT = Path(__file__).resolve().parents[1] DOCUMENT = ROOT / "openapi.public.json" OUTPUT = ROOT / "proofline" / "_generated" From 399d4452acd0919b44949668347e15bc2569cda8 Mon Sep 17 00:00:00 2001 From: veliunusdu Date: Mon, 16 Nov 2026 19:20:25 +0300 Subject: [PATCH 33/38] fix: accept bounded large CSV export fields --- proofline/_csv.py | 61 +++++++++++++++++++++++++ proofline/exports.py | 11 +++-- tests/test_exports.py | 104 ++++++++++++++++++++++++++++++++++++++++++ tests/test_http.py | 54 ++++++++++++++++++++++ 4 files changed, 225 insertions(+), 5 deletions(-) create mode 100644 proofline/_csv.py create mode 100644 tests/test_exports.py diff --git a/proofline/_csv.py b/proofline/_csv.py new file mode 100644 index 00000000..e2f4c9db --- /dev/null +++ b/proofline/_csv.py @@ -0,0 +1,61 @@ +"""Fixed-dialect CSV parsing without changing Python's global field-size limit. + +The caller bounds the UTF-8 input before parsing. Text runs are consumed together +so large cells do not require one allocation per character. +""" + +from __future__ import annotations + +import re + +_TOKENS = re.compile(r'[^,"\r\n]+|.', re.DOTALL) + + +def parse_csv(text: str) -> list[list[str]]: + records: list[list[str]] = [] + row: list[str] = [] + fragments: list[str] = [] + state = "start" + skip_lf = False + for match in _TOKENS.finditer(text): + token = match[0] + if skip_lf: + skip_lf = False + if token == "\n": + continue + if state == "quoted": + if token == '"': + state = "after_quote" + else: + fragments.append(token) + continue + if state == "after_quote": + if token == '"': + fragments.append('"') + state = "quoted" + continue + if token not in (",", "\r", "\n"): + raise ValueError("Unexpected text after a closing CSV quote.") + if token == ",": + row.append("".join(fragments)) + fragments.clear() + state = "start" + elif token in ("\r", "\n"): + if state != "start" or row: + row.append("".join(fragments)) + records.append(row) + row = [] + fragments.clear() + state = "start" + skip_lf = token == "\r" + elif token == '"' and state == "start": + state = "quoted" + else: + fragments.append(token) + state = "unquoted" + if state == "quoted": + raise ValueError("Unterminated CSV quote.") + if state != "start" or row: + row.append("".join(fragments)) + records.append(row) + return records diff --git a/proofline/exports.py b/proofline/exports.py index a274dd23..7623cdbf 100644 --- a/proofline/exports.py +++ b/proofline/exports.py @@ -2,8 +2,6 @@ from __future__ import annotations -import csv -import io import json from dataclasses import dataclass from datetime import datetime @@ -11,7 +9,8 @@ import httpx -from ._transport import ProoflineError +from ._csv import parse_csv +from ._transport import MAX_RESPONSE_BYTES, ProoflineError ExportDataset = Literal["reviews", "finding_outcomes", "finding_validations", "spend", "findings"] ExportFormat = Literal["csv", "ndjson"] @@ -29,6 +28,8 @@ class ExportPage: def decode_export(response: httpx.Response, format: ExportFormat) -> ExportPage: try: + if len(response.content) > MAX_RESPONSE_BYTES: + raise ValueError media = "text/csv" if format == "csv" else "application/x-ndjson" if ( response.headers.get("content-type", "").split(";")[0].strip() != media @@ -40,7 +41,7 @@ def decode_export(response: httpx.Response, format: ExportFormat) -> ExportPage: raise ValueError text = response.content.decode("utf-8") if format == "csv": - records = list(csv.reader(io.StringIO(text, newline=""), strict=True)) + records = parse_csv(text) columns = records.pop(0) if len(set(columns)) != len(columns) or any( len(row) != len(columns) for row in records @@ -54,7 +55,7 @@ def decode_export(response: httpx.Response, format: ExportFormat) -> ExportPage: return ExportPage( format, text, rows, 1, horizon, response.headers.get("x-proofline-export-next-cursor") ) - except (ValueError, KeyError, IndexError, UnicodeError, csv.Error): + except (ValueError, KeyError, IndexError, UnicodeError): raise ProoflineError( response.status_code, "urn:proofline:sdk:invalid-response", diff --git a/tests/test_exports.py b/tests/test_exports.py new file mode 100644 index 00000000..3343209f --- /dev/null +++ b/tests/test_exports.py @@ -0,0 +1,104 @@ +from __future__ import annotations + +import csv +import io +from concurrent.futures import ThreadPoolExecutor +from itertools import product + +import httpx +import pytest + +from proofline import ProoflineError +from proofline._transport import MAX_RESPONSE_BYTES +from proofline.exports import decode_export + + +def response(text: str) -> httpx.Response: + return httpx.Response( + 200, + content=text.encode(), + headers={ + "Content-Type": "text/csv", + "X-Proofline-Export-Version": "1", + "X-Proofline-Export-Settled-Until": "2026-11-16T00:00:00Z", + }, + ) + + +@pytest.mark.parametrize("size", [131_072, 131_073, 150_000]) +def test_large_csv_field_preserved(size: int) -> None: + claim = 'é, "quoted"\r\n' + "x" * size + stream = io.StringIO(newline="") + writer = csv.writer(stream) + writer.writerow(["dataset_version", "claim"]) + writer.writerow(["1", claim]) + text = stream.getvalue() + page = decode_export(response(text), "csv") + assert page.rows == [{"dataset_version": "1", "claim": claim}] + assert page.text == text + + +@pytest.mark.parametrize("extra", [0, 1]) +def test_csv_response_byte_bound(extra: int) -> None: + prefix = "dataset_version,claim\n1," + text = prefix + "x" * (MAX_RESPONSE_BYTES - len(prefix) + extra) + if extra: + with pytest.raises(ProoflineError, match="HTTP 200") as caught: + decode_export(response(text), "csv") + assert caught.value.type == "urn:proofline:sdk:invalid-response" + else: + assert len(decode_export(response(text), "csv").rows[0]["claim"]) == ( + MAX_RESPONSE_BYTES - len(prefix) + ) + + +@pytest.mark.parametrize( + "text", + [ + "", + 'dataset_version,claim\n1,"unfinished', + 'dataset_version,claim\n1,"closed"junk', + "dataset_version,claim,claim\n1,a,b", + "dataset_version,claim\n1", + "dataset_version,claim\n1,a,b", + "dataset_version,claim\n\n", + ], +) +def test_invalid_csv_retains_typed_error(text: str) -> None: + with pytest.raises(ProoflineError) as caught: + decode_export(response(text), "csv") + assert caught.value.type == "urn:proofline:sdk:invalid-response" + assert caught.value.status == 200 + + +def test_csv_parser_matches_standard_dialect() -> None: + from proofline._csv import parse_csv + + # Exhaust short combinations to exercise transitions, including malformed quoting. + samples = ("".join(chars) for length in range(6) for chars in product('a,"\r\n', repeat=length)) + for text in samples: + try: + expected = list(csv.reader(io.StringIO(text, newline=""), strict=True)) + except csv.Error: + with pytest.raises(ValueError): + parse_csv(text) + else: + assert parse_csv(text) == expected, repr(text) + for text in ['a,"é,\r\n""quote""",\r\n', "a,b\r1,2", 'a,""', "a,b\n"]: + assert parse_csv(text) == list(csv.reader(io.StringIO(text, newline=""), strict=True)) + + +def test_concurrent_decoding_preserves_global_csv_limit() -> None: + before = csv.field_size_limit() + + def decode(index: int) -> str: + if index % 2: + with pytest.raises(ProoflineError): + decode_export(response('dataset_version,claim\n1,"unfinished'), "csv") + else: + assert decode_export(response("dataset_version,claim\n1," + "x" * 150_000), "csv") + return str(csv.field_size_limit()) + + with ThreadPoolExecutor(max_workers=4) as pool: + assert set(pool.map(decode, range(12))) == {str(before)} + assert csv.field_size_limit() == before diff --git a/tests/test_http.py b/tests/test_http.py index f62d93f6..c95984f0 100644 --- a/tests/test_http.py +++ b/tests/test_http.py @@ -1,8 +1,10 @@ from __future__ import annotations import asyncio +import csv import gzip import inspect +import io import json import logging import socket @@ -1571,6 +1573,58 @@ def test_token_environment_and_https_origin_rejection(monkeypatch: pytest.Monkey pass +@MODES +@pytest.mark.parametrize("size", [131_072, 131_073, 150_000, 8 * 1024 * 1024 + 1]) +async def test_csv_export_preserves_large_cells(mode: str, size: int) -> None: + claim = 'é, "quoted"\r\n' + "x" * size + row = { + "dataset_version": "1", + "organization_id": str(ORG), + "repository_id": str(REPOSITORY), + "review_id": str(REVIEW), + "assessment_id": str(ASSESSMENT), + "environment_id": str(ORG), + "finding_id": str(FINDING), + "claim": claim, + "impact": "Synthetic consequence", + "risk_domain": "SECURITY", + "severity": "HIGH", + "lifecycle_state": "OPEN", + "created_at": "2026-11-16T00:00:00Z", + "evidence_refs": "[]", + } + stream = io.StringIO(newline="") + writer = csv.DictWriter(stream, fieldnames=list(row)) + writer.writeheader() + writer.writerow(row) + text = stream.getvalue() + with Server( + lambda request, index: Reply( + body=text.encode(), + headers={ + "Content-Type": "text/csv", + "X-Proofline-Export-Version": "1", + "X-Proofline-Export-Settled-Until": "2026-11-16T00:00:00Z", + "X-Proofline-Export-Next-Cursor": "opaque/+cursor", + }, + ) + ) as server: + async with session(mode, server.url) as client: + kwargs = {"from_time": "2026-11-01T00:00:00Z", "to_time": "2026-11-15T00:00:00Z"} + if size > 8 * 1024 * 1024: + with pytest.raises(ProoflineError) as caught: + await call(client, "export_reviews", ORG, "findings", format="csv", **kwargs) + assert caught.value.type == "urn:proofline:sdk:invalid-response" + else: + page = await call(client, "export_reviews", ORG, "findings", format="csv", **kwargs) + assert page.rows == [row] + assert page.text == text + assert page.version == 1 + assert page.settled_until == "2026-11-16T00:00:00Z" + assert page.next_cursor == "opaque/+cursor" + assert len(server.requests) == 1 + + @MODES async def test_export_pages_preserve_csv_and_refuse_foreign_cursor(mode: str) -> None: def respond(request: Request, index: int) -> Reply: From 1f0e97a5e524e0862e3bca4c7083f6bc101e369e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2026 17:01:27 +0000 Subject: [PATCH 34/38] Update distribution --- README.md | 2 +- proofline/_transport.py | 6 +- proofline/outcomes.py | 21 +++++-- pyproject.toml | 2 +- tests/fixtures/review-outcomes.json | 88 +++++++++++++++++++++++++++++ tests/test_http.py | 33 +++++++++++ 6 files changed, 142 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 8a61889d..aef29c97 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ When no token is passed, the clients read `PROOFLINE_TOKEN` from the environment ## Errors and refusals -A refused request raises `ProoflineError` with the server problem's `status`, `type`, `title` and `detail`. When a review request creates nothing, the error also carries `refusal`, whose `reason` names the setting to change, such as `NO_LINKED_ENVIRONMENT` or `ENVIRONMENT_NOT_READY`, and `repository_name`. `RunNowRefusal` names the type of `refusal`. A refusal that does not match the public contract keeps its status, `title` and `detail` with the type `urn:proofline:sdk:invalid-response` and no `refusal`. The token is redacted from every text field, and `repr` and `str` show only the status. +A refused request raises `ProoflineError` with the server problem's `status`, `type`, `title` and `detail`. When a review request creates nothing, the error also carries `refusal`, whose `reason` names the setting to change, such as `NO_LINKED_ENVIRONMENT` or `ENVIRONMENT_NOT_READY`, and `repository_name`. `RunNowRefusal` names the type of `refusal`. A refusal that does not match the public contract keeps its status, `title` and `detail` with the type `urn:proofline:sdk:invalid-response` and no `refusal`. Any other status, such as the 402 a review request answers when credits cannot pay, is a plain problem with no `refusal`. The token is redacted from every text field, and `repr` and `str` show only the status. ```python from proofline import ProoflineError diff --git a/proofline/_transport.py b/proofline/_transport.py index d792d3f0..bbcc5c70 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -38,7 +38,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "5.11.1" +VERSION = "5.11.2" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" @@ -295,7 +295,9 @@ def problem(response: httpx.Response, token: SecretStr) -> ProoflineError: detail = f"Proofline returned the problem {title!r} without a detail." else: detail = "Proofline returned an HTTP error without a problem document." - if "refusal" not in body: + # The contract types a refusal only as a review request's 400. The 402 a + # credit refusal answers is undocumented, so it stays a plain problem. + if response.status_code != 400 or "refusal" not in body: return ProoflineError(response.status_code, kind, detail, title=title) try: view = body["refusal"] diff --git a/proofline/outcomes.py b/proofline/outcomes.py index e76c171c..ee79ec91 100644 --- a/proofline/outcomes.py +++ b/proofline/outcomes.py @@ -64,6 +64,14 @@ def _optional_text(value: object) -> bool: return value is None or isinstance(value, (str, Unset)) +def _optional_texts(value: object) -> bool: + return ( + value is None + or isinstance(value, Unset) + or (isinstance(value, list) and all(isinstance(item, str) for item in value)) + ) + + def _code_assessment(review: CustomerReviewDetail) -> CustomerCodeAssessment | None: # A CODE result cannot replace a missing ENV result or its check receipts. if review.assessment_count != 0 or review.assessments: @@ -77,6 +85,7 @@ def _code_assessment(review: CustomerReviewDetail) -> CustomerCodeAssessment | N or not isinstance(code.findings, list) or code.status not in ("PENDING", "RUNNING", "COMPLETED", "INCOMPLETE", "EXCLUDED") or not _optional_text(code.incompleteness_kind) + or not _optional_texts(code.reason_codes) ): return None for recorded, actual in ( @@ -115,10 +124,7 @@ def _validate(review: CustomerReviewDetail, review_id: UUID | None) -> None: if assessment.id in seen: raise _invalid() seen.add(assessment.id) - reasons = assessment.reason_codes - if not (reasons is None or isinstance(reasons, Unset)) and ( - not isinstance(reasons, list) or any(not isinstance(reason, str) for reason in reasons) - ): + if not _optional_texts(assessment.reason_codes): raise _invalid() for check in assessment.checks.families: if ( @@ -149,13 +155,16 @@ def outcome( if code_only: if code is None: gaps.append(AssessmentGap(None, "UNKNOWN", ("CODE_ASSESSMENT_UNAVAILABLE",))) - elif code.status != "COMPLETED" or text(code.incompleteness_kind): + elif code.status != "COMPLETED" or text(code.incompleteness_kind) or code.reason_codes: kind = text(code.incompleteness_kind) + reasons = tuple(code.reason_codes) if isinstance(code.reason_codes, list) else () + if kind: + reasons = (*reasons, kind) gaps.append( AssessmentGap( code.id, code.status, - (kind,) if kind else ("CODE_ASSESSMENT_STATE_UNAVAILABLE",), + reasons or ("CODE_ASSESSMENT_STATE_UNAVAILABLE",), kind, ) ) diff --git a/pyproject.toml b/pyproject.toml index 560d980e..de228165 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "5.11.1" +version = "5.11.2" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" diff --git a/tests/fixtures/review-outcomes.json b/tests/fixtures/review-outcomes.json index 139b800c..547cc69f 100644 --- a/tests/fixtures/review-outcomes.json +++ b/tests/fixtures/review-outcomes.json @@ -1692,6 +1692,94 @@ } ] }, + { + "name": "code-out-of-credits", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 0, + "environment_display_names": [], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "code_assessment": { + "id": "00000000-0000-7000-8000-000000000005", + "status": "INCOMPLETE", + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "findings": [], + "incompleteness_kind": null, + "reason_codes": ["OUT_OF_CREDITS"] + } + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000005", + "reason_codes": ["OUT_OF_CREDITS"] + } + ] + }, + { + "name": "code-reason-and-kind", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 0, + "environment_display_names": [], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "code_assessment": { + "id": "00000000-0000-7000-8000-000000000005", + "status": "INCOMPLETE", + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "findings": [], + "incompleteness_kind": "EVIDENCE_UNAVAILABLE", + "reason_codes": ["MODEL_ANSWER_WITHHELD"] + } + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000005", + "reason_codes": ["MODEL_ANSWER_WITHHELD", "EVIDENCE_UNAVAILABLE"] + } + ] + }, { "name": "code-evidence-gap", "review": { diff --git a/tests/test_http.py b/tests/test_http.py index f62d93f6..c9c4a2de 100644 --- a/tests/test_http.py +++ b/tests/test_http.py @@ -661,6 +661,39 @@ async def test_malformed_refusal_keeps_fixed_sdk_problem_type( assert TOKEN not in error.detail +@MODES +@pytest.mark.parametrize( + "view", + [ + {"reason": "OUT_OF_CREDITS"}, + {"reason": "PLAN_CREDITS_SPENT", "resets": "2026-12-01T00:00:00Z"}, + ], + ids=["out-of-credits", "plan-credits-spent"], +) +async def test_credit_refusal_keeps_the_server_problem(mode: str, view: dict[str, Any]) -> None: + body = { + "title": "payment required", + "status": 402, + "detail": f"Credits cannot pay for {TOKEN}.", + "repository_name": "api", + "refusal": view, + } + with Server( + lambda request, index: Reply(402, body, {"Content-Type": "application/problem+json"}) + ) as server: + async with session(mode, server.url) as client: + for name in REVIEW_REQUESTS: + args, kwargs = review_request(name) + with pytest.raises(ProoflineError) as raised: + await call(client, name, *args, **kwargs) + error = raised.value + assert (error.status, error.type) == (402, "about:blank") + assert error.title == "payment required" + assert error.detail == "Credits cannot pay for [redacted]." + assert (error.refusal, error.repository_name) == (None, None) + assert len(server.requests) == len(REVIEW_REQUESTS) + + def test_every_documented_refusal_reason_has_a_field_check() -> None: reasons = {variant["properties"]["reason"]["const"] for variant in REFUSAL_VARIANTS} assert set(REFUSAL_SHAPES) == reasons From 0a30e6c9892bd15020bc7d073524f4e884a61079 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2026 19:15:57 +0000 Subject: [PATCH 35/38] Update distribution --- openapi.public.json | 16 +++++ .../api/default/list_pull_request_reviews.py | 64 ++++++++++++++----- .../_generated/api/default/list_reviews.py | 64 ++++++++++++++----- proofline/_transport.py | 2 +- pyproject.toml | 2 +- tests/fixtures/review-outcomes.json | 44 +++++++++++++ 6 files changed, 158 insertions(+), 34 deletions(-) diff --git a/openapi.public.json b/openapi.public.json index b5b04e1a..a95ee9af 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -7305,9 +7305,11 @@ "style": "form" }, { + "description": "`mine` for the caller's own pull requests, or a GitHub user ID. `mine`\n needs a person's sign-in or token.", "in": "query", "name": "author", "schema": { + "description": "`mine` for the caller's own pull requests, or a GitHub user ID. `mine`\n needs a person's sign-in or token.", "type": [ "string", "null" @@ -7339,9 +7341,11 @@ "style": "form" }, { + "description": "`present` lists reviews with at least one finding; `none` lists reviews\n with no finding.", "in": "query", "name": "findings", "schema": { + "description": "`present` lists reviews with at least one finding; `none` lists reviews\n with no finding.", "type": [ "string", "null" @@ -7350,9 +7354,11 @@ "style": "form" }, { + "description": "One review kind: `PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, `COMMIT`,\n `FILES`, `MERGE_GROUP` or `REVISION_SCAN`.", "in": "query", "name": "kind", "schema": { + "description": "One review kind: `PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, `COMMIT`,\n `FILES`, `MERGE_GROUP` or `REVISION_SCAN`.", "type": [ "string", "null" @@ -7409,9 +7415,11 @@ "style": "form" }, { + "description": "One review status: `PENDING`, `RUNNING`, `COMPLETED`, `INCOMPLETE`,\n `FAILED`, `SUPERSEDED`, `STOPPED` or `EXCLUDED`.", "in": "query", "name": "status", "schema": { + "description": "One review status: `PENDING`, `RUNNING`, `COMPLETED`, `INCOMPLETE`,\n `FAILED`, `SUPERSEDED`, `STOPPED` or `EXCLUDED`.", "type": [ "string", "null" @@ -7569,9 +7577,11 @@ "style": "form" }, { + "description": "`mine` for the caller's own pull requests, or a GitHub user ID. `mine`\n needs a person's sign-in or token.", "in": "query", "name": "author", "schema": { + "description": "`mine` for the caller's own pull requests, or a GitHub user ID. `mine`\n needs a person's sign-in or token.", "type": [ "string", "null" @@ -7603,9 +7613,11 @@ "style": "form" }, { + "description": "`present` lists reviews with at least one finding; `none` lists reviews\n with no finding.", "in": "query", "name": "findings", "schema": { + "description": "`present` lists reviews with at least one finding; `none` lists reviews\n with no finding.", "type": [ "string", "null" @@ -7614,9 +7626,11 @@ "style": "form" }, { + "description": "One review kind: `PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, `COMMIT`,\n `FILES`, `MERGE_GROUP` or `REVISION_SCAN`.", "in": "query", "name": "kind", "schema": { + "description": "One review kind: `PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, `COMMIT`,\n `FILES`, `MERGE_GROUP` or `REVISION_SCAN`.", "type": [ "string", "null" @@ -7673,9 +7687,11 @@ "style": "form" }, { + "description": "One review status: `PENDING`, `RUNNING`, `COMPLETED`, `INCOMPLETE`,\n `FAILED`, `SUPERSEDED`, `STOPPED` or `EXCLUDED`.", "in": "query", "name": "status", "schema": { + "description": "One review status: `PENDING`, `RUNNING`, `COMPLETED`, `INCOMPLETE`,\n `FAILED`, `SUPERSEDED`, `STOPPED` or `EXCLUDED`.", "type": [ "string", "null" diff --git a/proofline/_generated/api/default/list_pull_request_reviews.py b/proofline/_generated/api/default/list_pull_request_reviews.py index 7d1ca8b4..c5e5637d 100644 --- a/proofline/_generated/api/default/list_pull_request_reviews.py +++ b/proofline/_generated/api/default/list_pull_request_reviews.py @@ -181,17 +181,25 @@ def sync_detailed( attention (None | str | Unset): `needed` lists terminal reviews of open pull requests with active findings, FAILED/INCOMPLETE/STOPPED execution, or an earlier reviewed commit. - author (None | str | Unset): + author (None | str | Unset): `mine` for the caller's own pull requests, or a GitHub user + ID. `mine` + needs a person's sign-in or token. cursor (None | str | Unset): environment (None | Unset | UUID): - findings (None | str | Unset): - kind (None | str | Unset): + findings (None | str | Unset): `present` lists reviews with at least one finding; `none` + lists reviews + with no finding. + kind (None | str | Unset): One review kind: `PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, + `COMMIT`, + `FILES`, `MERGE_GROUP` or `REVISION_SCAN`. limit (int | None | Unset): query (None | str | Unset): Qualifiers, quoted values, AND/OR, groups and minus exclusions. repository_query (None | Unset | UUID): search (None | str | Unset): - status (None | str | Unset): + status (None | str | Unset): One review status: `PENDING`, `RUNNING`, `COMPLETED`, + `INCOMPLETE`, + `FAILED`, `SUPERSEDED`, `STOPPED` or `EXCLUDED`. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -255,17 +263,25 @@ def sync( attention (None | str | Unset): `needed` lists terminal reviews of open pull requests with active findings, FAILED/INCOMPLETE/STOPPED execution, or an earlier reviewed commit. - author (None | str | Unset): + author (None | str | Unset): `mine` for the caller's own pull requests, or a GitHub user + ID. `mine` + needs a person's sign-in or token. cursor (None | str | Unset): environment (None | Unset | UUID): - findings (None | str | Unset): - kind (None | str | Unset): + findings (None | str | Unset): `present` lists reviews with at least one finding; `none` + lists reviews + with no finding. + kind (None | str | Unset): One review kind: `PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, + `COMMIT`, + `FILES`, `MERGE_GROUP` or `REVISION_SCAN`. limit (int | None | Unset): query (None | str | Unset): Qualifiers, quoted values, AND/OR, groups and minus exclusions. repository_query (None | Unset | UUID): search (None | str | Unset): - status (None | str | Unset): + status (None | str | Unset): One review status: `PENDING`, `RUNNING`, `COMPLETED`, + `INCOMPLETE`, + `FAILED`, `SUPERSEDED`, `STOPPED` or `EXCLUDED`. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -324,17 +340,25 @@ async def asyncio_detailed( attention (None | str | Unset): `needed` lists terminal reviews of open pull requests with active findings, FAILED/INCOMPLETE/STOPPED execution, or an earlier reviewed commit. - author (None | str | Unset): + author (None | str | Unset): `mine` for the caller's own pull requests, or a GitHub user + ID. `mine` + needs a person's sign-in or token. cursor (None | str | Unset): environment (None | Unset | UUID): - findings (None | str | Unset): - kind (None | str | Unset): + findings (None | str | Unset): `present` lists reviews with at least one finding; `none` + lists reviews + with no finding. + kind (None | str | Unset): One review kind: `PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, + `COMMIT`, + `FILES`, `MERGE_GROUP` or `REVISION_SCAN`. limit (int | None | Unset): query (None | str | Unset): Qualifiers, quoted values, AND/OR, groups and minus exclusions. repository_query (None | Unset | UUID): search (None | str | Unset): - status (None | str | Unset): + status (None | str | Unset): One review status: `PENDING`, `RUNNING`, `COMPLETED`, + `INCOMPLETE`, + `FAILED`, `SUPERSEDED`, `STOPPED` or `EXCLUDED`. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -396,17 +420,25 @@ async def asyncio( attention (None | str | Unset): `needed` lists terminal reviews of open pull requests with active findings, FAILED/INCOMPLETE/STOPPED execution, or an earlier reviewed commit. - author (None | str | Unset): + author (None | str | Unset): `mine` for the caller's own pull requests, or a GitHub user + ID. `mine` + needs a person's sign-in or token. cursor (None | str | Unset): environment (None | Unset | UUID): - findings (None | str | Unset): - kind (None | str | Unset): + findings (None | str | Unset): `present` lists reviews with at least one finding; `none` + lists reviews + with no finding. + kind (None | str | Unset): One review kind: `PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, + `COMMIT`, + `FILES`, `MERGE_GROUP` or `REVISION_SCAN`. limit (int | None | Unset): query (None | str | Unset): Qualifiers, quoted values, AND/OR, groups and minus exclusions. repository_query (None | Unset | UUID): search (None | str | Unset): - status (None | str | Unset): + status (None | str | Unset): One review status: `PENDING`, `RUNNING`, `COMPLETED`, + `INCOMPLETE`, + `FAILED`, `SUPERSEDED`, `STOPPED` or `EXCLUDED`. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/proofline/_generated/api/default/list_reviews.py b/proofline/_generated/api/default/list_reviews.py index 306c0cc1..717b0e14 100644 --- a/proofline/_generated/api/default/list_reviews.py +++ b/proofline/_generated/api/default/list_reviews.py @@ -173,17 +173,25 @@ def sync_detailed( attention (None | str | Unset): `needed` lists terminal reviews of open pull requests with active findings, FAILED/INCOMPLETE/STOPPED execution, or an earlier reviewed commit. - author (None | str | Unset): + author (None | str | Unset): `mine` for the caller's own pull requests, or a GitHub user + ID. `mine` + needs a person's sign-in or token. cursor (None | str | Unset): environment (None | Unset | UUID): - findings (None | str | Unset): - kind (None | str | Unset): + findings (None | str | Unset): `present` lists reviews with at least one finding; `none` + lists reviews + with no finding. + kind (None | str | Unset): One review kind: `PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, + `COMMIT`, + `FILES`, `MERGE_GROUP` or `REVISION_SCAN`. limit (int | None | Unset): query (None | str | Unset): Qualifiers, quoted values, AND/OR, groups and minus exclusions. repository (None | Unset | UUID): search (None | str | Unset): - status (None | str | Unset): + status (None | str | Unset): One review status: `PENDING`, `RUNNING`, `COMPLETED`, + `INCOMPLETE`, + `FAILED`, `SUPERSEDED`, `STOPPED` or `EXCLUDED`. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -241,17 +249,25 @@ def sync( attention (None | str | Unset): `needed` lists terminal reviews of open pull requests with active findings, FAILED/INCOMPLETE/STOPPED execution, or an earlier reviewed commit. - author (None | str | Unset): + author (None | str | Unset): `mine` for the caller's own pull requests, or a GitHub user + ID. `mine` + needs a person's sign-in or token. cursor (None | str | Unset): environment (None | Unset | UUID): - findings (None | str | Unset): - kind (None | str | Unset): + findings (None | str | Unset): `present` lists reviews with at least one finding; `none` + lists reviews + with no finding. + kind (None | str | Unset): One review kind: `PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, + `COMMIT`, + `FILES`, `MERGE_GROUP` or `REVISION_SCAN`. limit (int | None | Unset): query (None | str | Unset): Qualifiers, quoted values, AND/OR, groups and minus exclusions. repository (None | Unset | UUID): search (None | str | Unset): - status (None | str | Unset): + status (None | str | Unset): One review status: `PENDING`, `RUNNING`, `COMPLETED`, + `INCOMPLETE`, + `FAILED`, `SUPERSEDED`, `STOPPED` or `EXCLUDED`. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -304,17 +320,25 @@ async def asyncio_detailed( attention (None | str | Unset): `needed` lists terminal reviews of open pull requests with active findings, FAILED/INCOMPLETE/STOPPED execution, or an earlier reviewed commit. - author (None | str | Unset): + author (None | str | Unset): `mine` for the caller's own pull requests, or a GitHub user + ID. `mine` + needs a person's sign-in or token. cursor (None | str | Unset): environment (None | Unset | UUID): - findings (None | str | Unset): - kind (None | str | Unset): + findings (None | str | Unset): `present` lists reviews with at least one finding; `none` + lists reviews + with no finding. + kind (None | str | Unset): One review kind: `PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, + `COMMIT`, + `FILES`, `MERGE_GROUP` or `REVISION_SCAN`. limit (int | None | Unset): query (None | str | Unset): Qualifiers, quoted values, AND/OR, groups and minus exclusions. repository (None | Unset | UUID): search (None | str | Unset): - status (None | str | Unset): + status (None | str | Unset): One review status: `PENDING`, `RUNNING`, `COMPLETED`, + `INCOMPLETE`, + `FAILED`, `SUPERSEDED`, `STOPPED` or `EXCLUDED`. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -370,17 +394,25 @@ async def asyncio( attention (None | str | Unset): `needed` lists terminal reviews of open pull requests with active findings, FAILED/INCOMPLETE/STOPPED execution, or an earlier reviewed commit. - author (None | str | Unset): + author (None | str | Unset): `mine` for the caller's own pull requests, or a GitHub user + ID. `mine` + needs a person's sign-in or token. cursor (None | str | Unset): environment (None | Unset | UUID): - findings (None | str | Unset): - kind (None | str | Unset): + findings (None | str | Unset): `present` lists reviews with at least one finding; `none` + lists reviews + with no finding. + kind (None | str | Unset): One review kind: `PULL_REQUEST`, `DEPLOYMENT`, `PATCH`, + `COMMIT`, + `FILES`, `MERGE_GROUP` or `REVISION_SCAN`. limit (int | None | Unset): query (None | str | Unset): Qualifiers, quoted values, AND/OR, groups and minus exclusions. repository (None | Unset | UUID): search (None | str | Unset): - status (None | str | Unset): + status (None | str | Unset): One review status: `PENDING`, `RUNNING`, `COMPLETED`, + `INCOMPLETE`, + `FAILED`, `SUPERSEDED`, `STOPPED` or `EXCLUDED`. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/proofline/_transport.py b/proofline/_transport.py index bbcc5c70..1b42e085 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -38,7 +38,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "5.11.2" +VERSION = "5.11.3" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index de228165..cc0a951b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "5.11.2" +version = "5.11.3" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" diff --git a/tests/fixtures/review-outcomes.json b/tests/fixtures/review-outcomes.json index 547cc69f..4a0eccb4 100644 --- a/tests/fixtures/review-outcomes.json +++ b/tests/fixtures/review-outcomes.json @@ -1780,6 +1780,50 @@ } ] }, + { + "name": "code-completed-with-reason", + "review": { + "id": "00000000-0000-7000-8000-000000000002", + "public_key": "review-outcome-example", + "kind": "PULL_REQUEST", + "status": "COMPLETED", + "assessment_count": 0, + "environment_display_names": [], + "finding_count": 0, + "trigger_origin": "MANUAL", + "publication": "WITHHELD", + "created_at": "2026-01-01T00:00:00Z", + "stoppable": false, + "related_reviews": [], + "subjects": [], + "assessments": [], + "actions": { + "promote_findings": false, + "rerun": false, + "publish": false, + "stop": false, + "validate_findings": false + }, + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "code_assessment": { + "id": "00000000-0000-7000-8000-000000000005", + "status": "COMPLETED", + "head_commit_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "base_commit_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "findings": [], + "incompleteness_kind": null, + "reason_codes": ["OUT_OF_CREDITS"] + } + }, + "outcome": "INCOMPLETE", + "gaps": [ + { + "assessment_id": "00000000-0000-7000-8000-000000000005", + "reason_codes": ["OUT_OF_CREDITS"] + } + ] + }, { "name": "code-evidence-gap", "review": { From b252ad66b104235e54a8476c032e48882ceb9ebd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:56:33 +0000 Subject: [PATCH 36/38] Update distribution --- openapi.public.json | 4 ++-- proofline/_generated/models/finding_outcomes_export_row.py | 6 ++++-- proofline/_transport.py | 2 +- pyproject.toml | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/openapi.public.json b/openapi.public.json index a95ee9af..33ca18e5 100644 --- a/openapi.public.json +++ b/openapi.public.json @@ -2873,7 +2873,7 @@ "description": "The dimension that defines this row's group." }, "key": { - "description": "The grouping value: a repository or environment ID, a risk domain, a severity or a\n review kind, as `group_by` selects.", + "description": "The grouping value: a repository or environment ID, a risk domain, a severity or a\n review kind, as `group_by` selects. Grouped by environment, code-lane findings, which\n belong to no environment, share the key `code_review`.", "type": "string" }, "limitations": { @@ -2884,7 +2884,7 @@ "type": "array" }, "name": { - "description": "The group's display name: the repository's full name (or `Repository` and its ID when\n no name is recorded), the environment's display name, or otherwise `key`.", + "description": "The group's display name: the repository's full name (or `Repository` and its ID when\n no name is recorded), the environment's display name (`Code review` for the code-lane\n group), or otherwise `key`.", "type": "string" }, "organization_id": { diff --git a/proofline/_generated/models/finding_outcomes_export_row.py b/proofline/_generated/models/finding_outcomes_export_row.py index 82fec763..1a26b0fd 100644 --- a/proofline/_generated/models/finding_outcomes_export_row.py +++ b/proofline/_generated/models/finding_outcomes_export_row.py @@ -31,11 +31,13 @@ class FindingOutcomesExportRow: from_ (datetime.datetime): The inclusive start of the requested first-publication window. group_by (FindingOutcomesGroupBy): key (str): The grouping value: a repository or environment ID, a risk domain, a severity or a - review kind, as `group_by` selects. + review kind, as `group_by` selects. Grouped by environment, code-lane findings, which + belong to no environment, share the key `code_review`. limitations (list[str]): Gaps in publication history that keep findings outside these counts; they mean missing history, not zero findings. name (str): The group's display name: the repository's full name (or `Repository` and its ID when - no name is recorded), the environment's display name, or otherwise `key`. + no name is recorded), the environment's display name (`Code review` for the code-lane + group), or otherwise `key`. organization_id (UUID): The organization whose findings are counted. outcomes (list[FindingOutcomesOutcomeCount]): One count per outcome, always all six `FindingOutcomesOutcome` values in a fixed order. diff --git a/proofline/_transport.py b/proofline/_transport.py index 1b42e085..7f490782 100644 --- a/proofline/_transport.py +++ b/proofline/_transport.py @@ -38,7 +38,7 @@ from ._sync_http import IO_DEADLINE from ._sync_http import Transport as SyncHTTPTransport -VERSION = "5.11.3" +VERSION = "5.11.4" MAX_RESPONSE_BYTES = 8 * 1024 * 1024 WEEKDAY = r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)" FULL_WEEKDAY = r"(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)" diff --git a/pyproject.toml b/pyproject.toml index cc0a951b..dcbe9caf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "proofline-sdk" -version = "5.11.3" +version = "5.11.4" description = "Typed synchronous and asynchronous clients for the Proofline review API" readme = "README.md" license = "Apache-2.0 AND MIT" From f8879198568efd09b705e6af4c9d4e424e8a47fd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Nov 2026 14:30:05 +0000 Subject: [PATCH 37/38] Bump the python-dev-dependencies group with 16 updates Bumps the python-dev-dependencies group with 16 updates: | Package | From | To | | --- | --- | --- | | [anyio](https://github.com/agronholm/anyio) | `4.15.1` | `4.16.0` | | [pydantic](https://github.com/pydantic/pydantic) | `2.13.5` | `2.14.3` | | [python-dateutil](https://github.com/dateutil/dateutil) | `2.9.0.post0` | `4.0.0` | | [openapi-python-client](https://github.com/openapi-generators/openapi-python-client) | `0.29.1` | `0.30.0` | | [ruff](https://github.com/astral-sh/ruff) | `0.17.4` | `0.17.5` | | [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) | `1.4.1` | `1.5.0` | | [annotated-doc](https://github.com/fastapi/annotated-doc) | `0.0.5` | `0.0.6` | | [certifi](https://github.com/certifi/python-certifi) | `2026.7.22` | `2026.10.23` | | [iniconfig](https://github.com/pytest-dev/iniconfig) | `2.3.0` | `2.3.1` | | [markdown-it-py](https://github.com/executablebooks/markdown-it-py) | `4.2.0` | `4.3.0` | | [markupsafe](https://github.com/pallets/markupsafe) | `3.0.3` | `3.0.4` | | [mypy-extensions](https://github.com/python/mypy_extensions) | `1.1.0` | `1.2.0` | | [pluggy](https://github.com/pytest-dev/pluggy) | `1.6.0` | `1.7.0` | | [pydantic-core](https://github.com/pydantic/pydantic) | `2.46.5` | `2.50.4` | | [typer](https://github.com/fastapi/typer) | `0.27.2` | `0.29.1` | | [typing-inspection](https://github.com/pydantic/typing-inspection) | `0.4.4` | `0.4.5` | Updates `anyio` from 4.15.1 to 4.16.0 - [Release notes](https://github.com/agronholm/anyio/releases) - [Commits](https://github.com/agronholm/anyio/compare/4.15.1...4.16.0) Updates `pydantic` from 2.13.5 to 2.14.3 - [Release notes](https://github.com/pydantic/pydantic/releases) - [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md) - [Commits](https://github.com/pydantic/pydantic/compare/v2.13.5...v2.14.3) Updates `python-dateutil` from 2.9.0.post0 to 4.0.0 - [Release notes](https://github.com/dateutil/dateutil/releases) - [Changelog](https://github.com/dateutil/dateutil/blob/master/NEWS) - [Commits](https://github.com/dateutil/dateutil/compare/2.9.0.post0...4.0.0) Updates `openapi-python-client` from 0.29.1 to 0.30.0 - [Release notes](https://github.com/openapi-generators/openapi-python-client/releases) - [Changelog](https://github.com/openapi-generators/openapi-python-client/blob/main/CHANGELOG.md) - [Commits](https://github.com/openapi-generators/openapi-python-client/compare/v0.29.1...v0.30.0) Updates `ruff` from 0.17.4 to 0.17.5 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.17.4...0.17.5) Updates `pytest-asyncio` from 1.4.1 to 1.5.0 - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases) - [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v1.4.1...v1.5.0) Updates `annotated-doc` from 0.0.5 to 0.0.6 - [Release notes](https://github.com/fastapi/annotated-doc/releases) - [Changelog](https://github.com/fastapi/annotated-doc/blob/main/release-notes.md) - [Commits](https://github.com/fastapi/annotated-doc/compare/0.0.5...0.0.6) Updates `certifi` from 2026.7.22 to 2026.10.23 - [Commits](https://github.com/certifi/python-certifi/compare/2026.07.22...2026.10.23) Updates `iniconfig` from 2.3.0 to 2.3.1 - [Release notes](https://github.com/pytest-dev/iniconfig/releases) - [Changelog](https://github.com/pytest-dev/iniconfig/blob/main/CHANGELOG) - [Commits](https://github.com/pytest-dev/iniconfig/compare/v2.3.0...v2.3.1) Updates `markdown-it-py` from 4.2.0 to 4.3.0 - [Release notes](https://github.com/executablebooks/markdown-it-py/releases) - [Changelog](https://github.com/executablebooks/markdown-it-py/blob/master/CHANGELOG.md) - [Commits](https://github.com/executablebooks/markdown-it-py/compare/v4.2.0...v4.3.0) Updates `markupsafe` from 3.0.3 to 3.0.4 - [Release notes](https://github.com/pallets/markupsafe/releases) - [Changelog](https://github.com/pallets/markupsafe/blob/main/CHANGES.rst) - [Commits](https://github.com/pallets/markupsafe/compare/3.0.3...3.0.4) Updates `mypy-extensions` from 1.1.0 to 1.2.0 - [Commits](https://github.com/python/mypy_extensions/compare/1.1.0...1.2.0) Updates `pluggy` from 1.6.0 to 1.7.0 - [Changelog](https://github.com/pytest-dev/pluggy/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pluggy/compare/1.6.0...1.7.0) Updates `pydantic-core` from 2.46.5 to 2.50.4 - [Release notes](https://github.com/pydantic/pydantic/releases) - [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md) - [Commits](https://github.com/pydantic/pydantic/compare/core-v2.46.5...core-v2.50.4) Updates `typer` from 0.27.2 to 0.29.1 - [Release notes](https://github.com/fastapi/typer/releases) - [Changelog](https://github.com/fastapi/typer/blob/master/docs/release-notes.md) - [Commits](https://github.com/fastapi/typer/compare/0.27.2...0.29.1) Updates `typing-inspection` from 0.4.4 to 0.4.5 - [Release notes](https://github.com/pydantic/typing-inspection/releases) - [Changelog](https://github.com/pydantic/typing-inspection/blob/main/HISTORY.md) - [Commits](https://github.com/pydantic/typing-inspection/compare/v0.4.4...v0.4.5) --- updated-dependencies: - dependency-name: anyio dependency-version: 4.16.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-dev-dependencies - dependency-name: pydantic dependency-version: 2.14.3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-dev-dependencies - dependency-name: python-dateutil dependency-version: 4.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: python-dev-dependencies - dependency-name: openapi-python-client dependency-version: 0.30.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: python-dev-dependencies - dependency-name: ruff dependency-version: 0.17.5 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: python-dev-dependencies - dependency-name: pytest-asyncio dependency-version: 1.5.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: python-dev-dependencies - dependency-name: annotated-doc dependency-version: 0.0.6 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: python-dev-dependencies - dependency-name: certifi dependency-version: 2026.10.23 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: python-dev-dependencies - dependency-name: iniconfig dependency-version: 2.3.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: python-dev-dependencies - dependency-name: markdown-it-py dependency-version: 4.3.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: python-dev-dependencies - dependency-name: markupsafe dependency-version: 3.0.4 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: python-dev-dependencies - dependency-name: mypy-extensions dependency-version: 1.2.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: python-dev-dependencies - dependency-name: pluggy dependency-version: 1.7.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: python-dev-dependencies - dependency-name: pydantic-core dependency-version: 2.50.4 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: python-dev-dependencies - dependency-name: typer dependency-version: 0.29.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: python-dev-dependencies - dependency-name: typing-inspection dependency-version: 0.4.5 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: python-dev-dependencies ... Signed-off-by: dependabot[bot] --- pyproject.toml | 8 +- requirements-dev.txt | 620 ++++++++++++++++++++++++------------------- 2 files changed, 355 insertions(+), 273 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index dcbe9caf..3b5301a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ dependencies = [ "httpcore==1.0.9", "httpx>=0.27,<0.29", "pydantic>=2.10,<3", - "python-dateutil>=2.8.2,<3", + "python-dateutil>=2.8.2,<5", ] [project.urls] @@ -34,11 +34,11 @@ Repository = "https://github.com/prooflinedev/sdk-python" [project.optional-dependencies] dev = [ - "openapi-python-client==0.29.1", - "ruff==0.17.4", + "openapi-python-client==0.30.0", + "ruff==0.17.5", "mypy==2.4.1", "pytest==9.2.0", - "pytest-asyncio==1.4.1", + "pytest-asyncio==1.5.0", "build==1.6.1", "hatchling==1.33.0", ] diff --git a/requirements-dev.txt b/requirements-dev.txt index 4585644d..16245648 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,12 +1,12 @@ -annotated-doc==0.0.5 \ - --hash=sha256:117bac03a25ede5df5440e855b32d556049ca169ead221505badf432fed4b101 \ - --hash=sha256:c7e58ce09192557605d8bbd92836d7e1d520ac9580096042c0bfd197efacf1bb +annotated-doc==0.0.6 \ + --hash=sha256:361ca0950cc7082f53fa69e9328409f40a62c61e57e0a47e1825a08078a58a53 \ + --hash=sha256:7969bb69912085b2285849c0dcac0b4b374fd180c13cf10a87f284ffcf347bbf annotated-types==0.8.0 \ --hash=sha256:13b2beaad985e05e2d6407ee4c4f35590b11f8d693a258a561055cac8f64cab7 \ --hash=sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0 -anyio==4.15.1 \ - --hash=sha256:6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101 \ - --hash=sha256:9f28306018cbd6d329e64a36d58256edff76dd996fe423bc957326e578b82a94 +anyio==4.16.0 \ + --hash=sha256:59bb03251907983d1603d27c3087ddb1e93299ea2163adcdba37899a4fb12ffb \ + --hash=sha256:c66ae634e0b8228396b801741beb3294326d4b6102f7bba4041c0dfb58c29026 ast-serialize==0.13.1 \ --hash=sha256:02686b281ec9b8e9614f6f0db27e12e4cac515f336c5d05b678bc9eb73ff2af5 \ --hash=sha256:032b09d86c785c3984e975378b7861f2a68ac44e22ba7b07b93a536b2524eeb8 \ @@ -71,9 +71,9 @@ attrs==26.1.0 \ build==1.6.1 \ --hash=sha256:51cc11666391ab6f092070437ac747002ff46f3e4113a3622177ee6b488bfc53 \ --hash=sha256:ecd351a4be9d35a9eaaba244a7687143c9c7d4aea6ac964e7e7ddab20cbcf4e7 -certifi==2026.7.22 \ - --hash=sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775 \ - --hash=sha256:741e2c3b351ddf169a738da9f2c048608ff7f2c5cc02f1ebc6b118bb090d5d55 +certifi==2026.10.23 \ + --hash=sha256:a9895e6e2758b371e0545e321a3a8fd1fcfd9829ada8824a936dfb16aaaf36cd \ + --hash=sha256:e9b54de76e530bb6cf0ccd036787103acb58fd42ba930ea8bf948ddbaa2f61d1 colorama==0.4.6 ; os_name == 'nt' or sys_platform == 'win32' \ --hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \ --hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6 @@ -92,9 +92,9 @@ httpx==0.28.1 \ idna==3.20 \ --hash=sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44 \ --hash=sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c -iniconfig==2.3.0 \ - --hash=sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730 \ - --hash=sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12 +iniconfig==2.3.1 \ + --hash=sha256:67f4b9c50da0dedf52af349e7749a80a9057a5031199791b906c3bb3ae878960 \ + --hash=sha256:9121e2c1fdb355232495be3194c8dfe87ccc2d5dee45947b78e68f499790d7a7 jinja2==3.1.6 \ --hash=sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d \ --hash=sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67 @@ -236,99 +236,161 @@ librt==0.16.0 ; platform_python_implementation != 'PyPy' \ --hash=sha256:fe4372c52d4849096c6cc1cda2817d293ec51440c890474ed59ef38d46556f18 \ --hash=sha256:fe52bf4641069e7978a14253b036cb9002def1926317e710f2e249f8a8c47742 \ --hash=sha256:ff7baa55f8e7c69851419e50a666015d02a74198716fd45c0125a2112e0a389f -markdown-it-py==4.2.0 \ - --hash=sha256:04a21681d6fbb623de53f6f364d352309d4094dd4194040a10fd51833e418d49 \ - --hash=sha256:9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a -markupsafe==3.0.3 \ - --hash=sha256:0303439a41979d9e74d18ff5e2dd8c43ed6c6001fd40e5bf2e43f7bd9bbc523f \ - --hash=sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a \ - --hash=sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf \ - --hash=sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19 \ - --hash=sha256:0eb9ff8191e8498cca014656ae6b8d61f39da5f95b488805da4bb029cccbfbaf \ - --hash=sha256:0f4b68347f8c5eab4a13419215bdfd7f8c9b19f2b25520968adfad23eb0ce60c \ - --hash=sha256:1085e7fbddd3be5f89cc898938f42c0b3c711fdcb37d75221de2666af647c175 \ - --hash=sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219 \ - --hash=sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb \ - --hash=sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6 \ - --hash=sha256:1353ef0c1b138e1907ae78e2f6c63ff67501122006b0f9abad68fda5f4ffc6ab \ - --hash=sha256:15d939a21d546304880945ca1ecb8a039db6b4dc49b2c5a400387cdae6a62e26 \ - --hash=sha256:177b5253b2834fe3678cb4a5f0059808258584c559193998be2601324fdeafb1 \ - --hash=sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce \ - --hash=sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218 \ - --hash=sha256:1b52b4fb9df4eb9ae465f8d0c228a00624de2334f216f178a995ccdcf82c4634 \ - --hash=sha256:1ba88449deb3de88bd40044603fafffb7bc2b055d626a330323a9ed736661695 \ - --hash=sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad \ - --hash=sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73 \ - --hash=sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c \ - --hash=sha256:2713baf880df847f2bece4230d4d094280f4e67b1e813eec43b4c0e144a34ffe \ - --hash=sha256:2a15a08b17dd94c53a1da0438822d70ebcd13f8c3a95abe3a9ef9f11a94830aa \ - --hash=sha256:2f981d352f04553a7171b8e44369f2af4055f888dfb147d55e42d29e29e74559 \ - --hash=sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa \ - --hash=sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37 \ - --hash=sha256:3537e01efc9d4dccdf77221fb1cb3b8e1a38d5428920e0657ce299b20324d758 \ - --hash=sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f \ - --hash=sha256:38664109c14ffc9e7437e86b4dceb442b0096dfe3541d7864d9cbe1da4cf36c8 \ - --hash=sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d \ - --hash=sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c \ - --hash=sha256:457a69a9577064c05a97c41f4e65148652db078a3a509039e64d3467b9e7ef97 \ - --hash=sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a \ - --hash=sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19 \ - --hash=sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9 \ - --hash=sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9 \ - --hash=sha256:5678211cb9333a6468fb8d8be0305520aa073f50d17f089b5b4b477ea6e67fdc \ - --hash=sha256:591ae9f2a647529ca990bc681daebdd52c8791ff06c2bfa05b65163e28102ef2 \ - --hash=sha256:5a7d5dc5140555cf21a6fefbdbf8723f06fcd2f63ef108f2854de715e4422cb4 \ - --hash=sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354 \ - --hash=sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50 \ - --hash=sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698 \ - --hash=sha256:729586769a26dbceff69f7a7dbbf59ab6572b99d94576a5592625d5b411576b9 \ - --hash=sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b \ - --hash=sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc \ - --hash=sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115 \ - --hash=sha256:7c3fb7d25180895632e5d3148dbdc29ea38ccb7fd210aa27acbd1201a1902c6e \ - --hash=sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485 \ - --hash=sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f \ - --hash=sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12 \ - --hash=sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025 \ - --hash=sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009 \ - --hash=sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d \ - --hash=sha256:949b8d66bc381ee8b007cd945914c721d9aba8e27f71959d750a46f7c282b20b \ - --hash=sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a \ - --hash=sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5 \ - --hash=sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f \ - --hash=sha256:a320721ab5a1aba0a233739394eb907f8c8da5c98c9181d1161e77a0c8e36f2d \ - --hash=sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1 \ - --hash=sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287 \ - --hash=sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6 \ - --hash=sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f \ - --hash=sha256:bdc919ead48f234740ad807933cdf545180bfbe9342c2bb451556db2ed958581 \ - --hash=sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed \ - --hash=sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b \ - --hash=sha256:c0c0b3ade1c0b13b936d7970b1d37a57acde9199dc2aecc4c336773e1d86049c \ - --hash=sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026 \ - --hash=sha256:c4ffb7ebf07cfe8931028e3e4c85f0357459a3f9f9490886198848f4fa002ec8 \ - --hash=sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676 \ - --hash=sha256:d2ee202e79d8ed691ceebae8e0486bd9a2cd4794cec4824e1c99b6f5009502f6 \ - --hash=sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e \ - --hash=sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d \ - --hash=sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d \ - --hash=sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01 \ - --hash=sha256:df2449253ef108a379b8b5d6b43f4b1a8e81a061d6537becd5582fba5f9196d7 \ - --hash=sha256:e1c1493fb6e50ab01d20a22826e57520f1284df32f2d8601fdd90b6304601419 \ - --hash=sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795 \ - --hash=sha256:e2103a929dfa2fcaf9bb4e7c091983a49c9ac3b19c9061b6d5427dd7d14d81a1 \ - --hash=sha256:e56b7d45a839a697b5eb268c82a71bd8c7f6c94d6fd50c3d577fa39a9f1409f5 \ - --hash=sha256:e8afc3f2ccfa24215f8cb28dcf43f0113ac3c37c2f0f0806d8c70e4228c5cf4d \ - --hash=sha256:e8fc20152abba6b83724d7ff268c249fa196d8259ff481f3b1476383f8f24e42 \ - --hash=sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe \ - --hash=sha256:ec15a59cf5af7be74194f7ab02d0f59a62bdcf1a537677ce67a2537c9b87fcda \ - --hash=sha256:f190daf01f13c72eac4efd5c430a8de82489d9cff23c364c3ea822545032993e \ - --hash=sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737 \ - --hash=sha256:f3e98bb3798ead92273dc0e5fd0f31ade220f59a266ffd8a4f6065e0a3ce0523 \ - --hash=sha256:f42d0984e947b8adf7dd6dde396e720934d12c506ce84eea8476409563607591 \ - --hash=sha256:f71a396b3bf33ecaa1626c255855702aca4d3d9fea5e051b41ac59a9c1c41edc \ - --hash=sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a \ - --hash=sha256:fed51ac40f757d41b7c48425901843666a6677e3e8eb0abcff09e4ba6e664f50 +markdown-it-py==4.3.0 \ + --hash=sha256:7aa1511a46c39138de78d9eba92ce47e63124d8003fc98b3a351909e04239efa \ + --hash=sha256:91a58fa5b72c71a40cf7177250fd767480d7a2bb3ac426ccfb76fb90305fdaaa +markupsafe==3.0.4 \ + --hash=sha256:007e1ffd9bf65bb6ee96df7b258fc632a4868dd5566037986c64781f35a36e98 \ + --hash=sha256:02fa4acbc6a3fc5c693c34d4dd8c1130b7fe99cc915181b0ddd6f72aeb296002 \ + --hash=sha256:03470d1a8268e692ecf79ecd565593e59d44219377a7ead61f1f1b94c1f7ff6b \ + --hash=sha256:04e7902ba80ee4bac1d50a549606527a1dcf0476cd81403db41099d3b60ec653 \ + --hash=sha256:051417f74bcaaefa316276e0ff723f541616ca51043d070da00249d9bddd3e3c \ + --hash=sha256:05295589e619b9bed252a86b532b8e27350abc372d18ba89b59375325e91ec1e \ + --hash=sha256:06de8ef6331f6e822c28d577dc8bf43fe398800477c49498f38fc38b67ff33fc \ + --hash=sha256:0764a13d34cae40db7bbf3a09b7e9b491bf4603e20b263a7a9d6b8e324975d0a \ + --hash=sha256:077293e425f28ec737dbcad442a71752e28f8ae27cde3d68acd1fb212091cd92 \ + --hash=sha256:0930db9bdc62d22944e10b066448bb65dc9abe9112880c7cab8da54db4284d5f \ + --hash=sha256:0cee7cb0f9a1b6892ea482237d9403b3d1b4603aee057d0ff01f0fac2d019a97 \ + --hash=sha256:0d9c47709875fdb321452056622e930c52afbc07a7d780762fbb8b4d91ce6fa4 \ + --hash=sha256:11935df9bf455ed0c04eb87bcd720f02b1fe5e02128a9430f23aed6f93336fc7 \ + --hash=sha256:12a606a492de952afcb43b59a14aaaaad120e708d3663dd0fdf2d738d427a691 \ + --hash=sha256:14bd2d845d62ab678eaf81da89d7b621b51756c72346745c1a594c09d49207a2 \ + --hash=sha256:15ba9e28640feef770374b116a6f019c21f52404aeabe516aa7f800587b98cfc \ + --hash=sha256:18a801868a884f216e784d7d14db2a4077143ce7610440aee2ce8f734e7cfcde \ + --hash=sha256:1c0df495a977d10460a94941799c72d5b5ab03d3858d949b55b5a66c8f371c99 \ + --hash=sha256:1caa2fa5a6184fb233153b35f654e6687bd555476f6170f29d8ee9be1a8b0af9 \ + --hash=sha256:1e1451fab512d1bcc3dc26988ec1edb0b82c2db909132872cd9356070a6b63df \ + --hash=sha256:1f1f9477e174582b0a1b583d60b66e1f2cf5d3fe12cee985e4aedf44766600e5 \ + --hash=sha256:2628d3a8cb648ecebb3c5d6b0a1052d400e4d8b7ac0fb786be8d285b50040d17 \ + --hash=sha256:26e9867520db70d37f7fb421a7f0d8adb40171011fb84ce869afa1a83370dfa8 \ + --hash=sha256:2a6ef68ae94aed8721934072b27a3b654ea2100b97e4ab864cf1489c90926fbc \ + --hash=sha256:2b2b1e18af909b448bb3cf9e3433366f7a8726271fc214e8b10e0f62a78c724b \ + --hash=sha256:2cb3dd71fc6be918ad4264346a8ed69485f9b7ed7bf35495d8e22807cd6b8bea \ + --hash=sha256:2d1b7d9308288661f56672b1b157d75fc536714d3638487bbea17b6318a78248 \ + --hash=sha256:2dad610540cb2e6272855c178f08ae9a1c7ac258a7fb71660553a5f104b42741 \ + --hash=sha256:2e5a7cd7fdd14fcb1ae5d7d8bf23d24fbd1daefd1fbca2580132e1ea75f098b5 \ + --hash=sha256:2e9ad7dd851bf45fab9f75cbff4cb493fee9979e8d8c7c9c3ee119022518edd6 \ + --hash=sha256:340cbb1957ba99929cbf19a75626d36ba1ae21d1730b287d1cf7f824a20c4fc7 \ + --hash=sha256:34bdde374c5932765d7dc685c4a1d191a3207852d67e8e0a9eb6ea85156181f1 \ + --hash=sha256:353bd63081912ab8cfa6a0c7d185934cdf8426f04c618bba6bc4b394f2069b67 \ + --hash=sha256:387d8cd30e69b3f0a72877b9ae717033396404e19095b17fe89753a981fda44f \ + --hash=sha256:3882fb412298575bae3b9c46868251f15cc69307359f87bb1b382e53d6e5a2c9 \ + --hash=sha256:38fc55594dab834470b6733dead2ee9e3f657fb0608c769dcafa0ba5ab52f45c \ + --hash=sha256:396ec4e65cc889f69786b3b89478b471cee5a3bcf468b9d9bb03e1a30fb291fc \ + --hash=sha256:39dbacefc411633db5b4378b066a9aca70a3d7e2922c9e578d825f844026eeba \ + --hash=sha256:3a93d9616ddecfb393727a0041a562cf0b15a244e20f2bd25efc7949be4c4f17 \ + --hash=sha256:3d23795802fc8bd72534836d64489bbf0f67c088959091bdb22e10735a5107bf \ + --hash=sha256:434139499bb20b502ed3baa1f169e618f924a97e7a777fea1a49446d80106cf6 \ + --hash=sha256:436e3ffc6310d3c41878c601db29098102fe5d8a467c49da4a4125254e0980f2 \ + --hash=sha256:489505b03f692c3f376394e49194fa7a7f9e8558d6e293a7056a0032b0c38163 \ + --hash=sha256:4a540e2d3192792fc84eced57bef37851ccb2b41f73291bb17408eea77bcd278 \ + --hash=sha256:4a7cdc2a420ca01058182da4253329764d4bfa055564d1eced90e6ba1e8b1d3d \ + --hash=sha256:4bced6e2a6dba6a28f7dd3c6ce14df1b2dd495923f16ea484cad03decd463b2b \ + --hash=sha256:4cf3468d5ec187ffffcaca8e61929a37448f215dafc1386a12c750a72fe53634 \ + --hash=sha256:4e2c4809c14559aa7ef426f27fb35afbb38104c349a903bf8f3600456764bb38 \ + --hash=sha256:4ed644d75aa94a2baf7ec3a96eaa160ea58c742eb9d27c6506053c5c40fc84ed \ + --hash=sha256:4f6e0852a0283b1b1fd776eeb7b766a5f440b3e2bd31ab51af3b400585f3965c \ + --hash=sha256:5066b244f576f91afc8ee3ba029a89f99d39c79b1853fe9d39bea9f0afbec148 \ + --hash=sha256:5086f9975abb1ab531ee6afca1761e4b59a19b446f3f6522ed776963228cfe5a \ + --hash=sha256:50b5bedc9ed8a94fc8857a42ef4f84a81ea88f8d4f05dc8705fb23ee6d8dcca7 \ + --hash=sha256:52704c5d36eb6dda8866493decd61111fff86244c9b1ad225ca01b9e91e5970f \ + --hash=sha256:55ffd6ce583d97dc71dc92e930324c8c0d25aea7e3ade6ae54ef77cedb096811 \ + --hash=sha256:569d65055d367e3dcdf30c3f41119467b73d9ee9faf332bdf40402644f5ac08e \ + --hash=sha256:57f9947a7e57a081c1e3e0a2dd0d2dcf290a4531450e6f611e30084c222a7295 \ + --hash=sha256:5989cb26b2e1efc6a42216a9f6b5ee495ce5ace2e5b352a9af489976b32d1ee2 \ + --hash=sha256:5c22873ad1f0532ba40fa1727f3c0fc1bbbaab6d373d4cbe3f0dc74b2e2521c7 \ + --hash=sha256:5e8b3d0b18fd623afa12ecb2ce8d8becef69f9b5440c6330c7972200e0bb84b0 \ + --hash=sha256:61631e08084be9e21a8967ec3139c7616ed7c5e9368e05c86d1b39562c8a57b6 \ + --hash=sha256:64511c54db4e4987aef4c41923235927428729e8174c5dba488429be70a998ed \ + --hash=sha256:6669c1bf34080161ce49c589cc512ef24d4c704ac9d2b2d3667f519c60418378 \ + --hash=sha256:672d207103e6b16ca098611b0f9efad6bc00afd47c03d6ef62186495ca677dc0 \ + --hash=sha256:6768d67d1bce64270e0fdc2e69309d68b9b18ae56ddf6c711d168e9d051c2cac \ + --hash=sha256:6a45c3d514f2436064db00d7fc8778d888f0236ebfed649b53d13a59e69ad51b \ + --hash=sha256:6bd9e1788e15bfcf6a9082de42e30387e7b85d211ab21e57a939bb8cfaaf8d96 \ + --hash=sha256:6d2a9efe686f9de00d0d1ea32a4a5a86d558a2277501bd78d964214eab625e59 \ + --hash=sha256:6da83a088f8ef93b2d483a8232a4dbf4d69d3d8496b568a03c56becac43e1808 \ + --hash=sha256:7018d4af1cd272e847aa5917983ab5e83e4f6579f9dbfecd4a79c0ca80b144c2 \ + --hash=sha256:71f88e749ea29f67f21f3b36433c1dc54c7729ed2a6d9e2da2e0d9e0d7b224eb \ + --hash=sha256:737c9c3981998eba27f11786f84fddcbabc74068b72a4a1f454ea02094b57b65 \ + --hash=sha256:73e77980c7207854f00fc4e71fb1626868d5740ab4012623d55c7a99ad122a72 \ + --hash=sha256:799c39bdf5e2f1292fedd3009f7b3c9e760f10b2420cb9638d56920840ff6db8 \ + --hash=sha256:7a83aa6e4805df46fed18e989d3d16f86ef60cb50bbc8d9ce3a6be89165fbf6e \ + --hash=sha256:7d3391b2188d18737cb2fa147028b1096236eaa7e156446c650a489fa2cadc91 \ + --hash=sha256:7e1636da3d8dfc220b6dd10264db5f2b165e4888c4518594898fbe381049af8a \ + --hash=sha256:805c8b84534fa10891890f0e4be39f3a99e94615d93e8836bf9fa1fdca2feeb2 \ + --hash=sha256:811d02d5122171c1941357efd8f9bf4ffe907b7f0a1a4e729a880e4be3f46e3e \ + --hash=sha256:8138eb83940ec7299024d92d4dee45f601b9e6c5ffde9d25f4e35e326203c707 \ + --hash=sha256:83b3944fea42a8400edf92fd1770fb8d0d4f7de651353bd2d8525a92dba69a21 \ + --hash=sha256:849dd2bb0e5e4ab2b71c7191726a4a8d5aa8a610daa584728cbee0b710ddc4ef \ + --hash=sha256:8698d70a8081ee8c090dbb394768b5789a1da8b131b5499f89d071dd3cfaf6be \ + --hash=sha256:8781a792a070cf2bd1b86d3aa943894115faaba6e88122a7bf32d62072742453 \ + --hash=sha256:88d59b473bfb03259722600839af9bbd7fa13a2eb514beefeedb95997882f69a \ + --hash=sha256:8909c2f1c6dd65e054ac4b573a91c8384d1492281e55d82d159d653f7a13adf6 \ + --hash=sha256:8965520ac587c94a4ac48b729be3d8b8de00af39699b17585dfb599babe77977 \ + --hash=sha256:8b5d563170ff8ba3181caa967c99a3c804d1dedb702c7cb93a6a7c32247da978 \ + --hash=sha256:8e124f974786f831d6043728e38296969d3579db8896fe004682f5758e613581 \ + --hash=sha256:8f0fac8b13d14bb06c68195f849371924ae53dd7b1c00fed24650f704383b692 \ + --hash=sha256:9240187afb63d2f9ddc3e032c670356fe941f6e20662ea168a5dc3f1f317e1b3 \ + --hash=sha256:925f929d6b59a8b3f8b8c6ac363cd0af7eecc81efb3071770b3c6717c450a369 \ + --hash=sha256:9348cbb300d224fe3b89793262cb093504d4ae927004468463f745188a193e4a \ + --hash=sha256:9388003072b95f2f1e3fd908604194d653ba21330d811961a78b7da1a77e9e36 \ + --hash=sha256:9438a2648b2195980cb2dd8e53ed7b8df91319e2d0b70ae61a9e1d1bc8d3bec9 \ + --hash=sha256:94e4c421742086aeee4c32a506eec8859d7634aad943f7e6aacf70f813478768 \ + --hash=sha256:94f5407f7bc64fa6463906b896f9904beeeb7dd8dc116ee8e9056c8714ff9916 \ + --hash=sha256:971a3bbb75d97ae4e2e8f7d4834236f86f85f0c85e04ab2e191db1123b04f80b \ + --hash=sha256:9e227f3dbe6bde7491cf0a9965d00b88c6b1a4a95d11480ddf88bb96d397c19f \ + --hash=sha256:9e25feb9e330b63edb0278a0acdf85e50d0cb0fbf49c3084abbe4e24ae195346 \ + --hash=sha256:9f098115c247e11d138ab83a28fa0323c77015007ea2df73ba5fd714dfefd67c \ + --hash=sha256:a18f38cafc329bac5e3c2b96c765b4c96d3d103421ed22ab7988c1e3fce27464 \ + --hash=sha256:a4bbd2d87dd233b9fc5812160c3d0ffbe42edc22a26ce0469f58479ede633fe9 \ + --hash=sha256:a5fcffb37e602b0b3c1638a97746b9b96125caa9bcf6fa41d337a9261de231ee \ + --hash=sha256:a8e9f292fcda89b324f2f5c91d13f1424a153e40fc2756f38ee23b15835ff300 \ + --hash=sha256:a9f54054101545a9a9cccefddf54316aa6e4491611fcbef9e91b3b6bebec04f6 \ + --hash=sha256:aa2c838cc024642cc04c6854232f32b43e5e22833dd11119c1766c7873b8370d \ + --hash=sha256:ac0c7c9f1609b0c4c114feb1d7a3409564c7fb77e360bed9e97e5d25dfeaf868 \ + --hash=sha256:add96447a86d205ab616665d53b2950ee81083757f56e6ea833c8b2917646b46 \ + --hash=sha256:ae9dcb8fbe244cb82f8a6458b455b927a03685e383d9bacf1ea5ce180b96dc97 \ + --hash=sha256:b4a635a0487774f841cb1fb62e907e7195cc95bc761e053184b8acc3ceb20733 \ + --hash=sha256:b4d12837e0203bbace818ff4a7461afdcd78bcd782351cea148139180d7bcffe \ + --hash=sha256:b61687d0828e72bf5cda24a2690188f37170bd31c9359ac97e4e66569f120a16 \ + --hash=sha256:b807e598953730f82e4eae3bd30f6a122cf6b31c398c6b504c0e04c13c170429 \ + --hash=sha256:b8cd1f918b26fd7b1832ece557cc18f2d8747309ff8b3f0ef9d4250c5ad67a39 \ + --hash=sha256:b91cc9d336957239ff200f30097e6fea2dc6d6fb3c81e853eaa09eac904fd894 \ + --hash=sha256:bd3ce56ae2cbae3ba82b683bc425cd7e48d2ed8b10f3e818186b6f5646d9271c \ + --hash=sha256:be6cb0c799abb0e2ba3e618e6d28ddddf7e485f6c2ce938dfa237daf3905072c \ + --hash=sha256:befb4158af32106b9a93db8d6d1d1cbbd418c0d5aca0cabb7b1780abf0c89169 \ + --hash=sha256:bf053da3c97a4bc5ecfbb218cdd2983febd91c617be8367d139882aa11e490aa \ + --hash=sha256:c02e8f18bdedba082cef725942ac823b9b60656db07f7e265cb31618dfd00d77 \ + --hash=sha256:c1bc67752d5f21013cfe430df4062441714eab79f65a6a05e01505957e9c35fe \ + --hash=sha256:c61750fadcd119d0825bcb7d7d675dd264dcc89cc05292aab5be68ebdbb374ad \ + --hash=sha256:c90d5b3d4e944e065a301d741b3c1d784f6bd1f503aa68b4967e32b2ba313d85 \ + --hash=sha256:c9a7f43c0b202b334cc9184af09bb8f21d3a209e038efaf106936fb69e6b026e \ + --hash=sha256:cb96e6e088d6cf71c1ea977510948320234824cf226e32f6f6e044f7a9c82b34 \ + --hash=sha256:cf63c214fe879a65e69a386f915e36104fc84254ab141240f8854602d8e0be2a \ + --hash=sha256:d1aca03ede943eb80ab3d63bb082c84b7aab85ea83bd0fd0c200260945fb49d9 \ + --hash=sha256:d2e56fd3b00222722abfb3f5f0759ddbae4b90811b5ad4343c64030ad1bde70c \ + --hash=sha256:d5f93ebbeb8032d47e349328ec8662d973d9b05a70b3c35df1f91fe419b84749 \ + --hash=sha256:d882a373d8093c2941e01291b7ced96e9cbe4781da9a7751ca7e6c70385e5214 \ + --hash=sha256:d920abdfa61279ba1a2ef9484aab07bf03331f8c08a10120fa332353d06e6932 \ + --hash=sha256:da2af0d7aebfc2074080d72efa6ab8317c62481ef1f896f65d9999c1c01f4494 \ + --hash=sha256:dd8ea6ebee7aedbf7c749fa80521d9ccf1ba473e0d1e14805caafbaad281c889 \ + --hash=sha256:de8b364c423ef0a4bad9069657d617f9a5d2b2062457a89b1fa16ee199c399c1 \ + --hash=sha256:df1ae86ff54725a01fa1a0510b914ca53a161b7050be74f6204e24aded5971d0 \ + --hash=sha256:dff05cb7016dff1e9fd68f4122c127b65dfc59de5306cfb7ad92f956f230bee2 \ + --hash=sha256:e1a622f13970d81f95d0c72f9dc090dce9085fccfa4c9f2174377ee32bd15786 \ + --hash=sha256:e49fb0d1ce92cfa0cb198cc5b1b11cdf9d0638658e2a2db2687e39db7c87fc78 \ + --hash=sha256:e5c802729725bd07e2bc3ab7b76dc7e0bbfc53129d8f1eb1c002c24cf774717e \ + --hash=sha256:e841068dc0be4cb6dfb5c890eb88cbdcff2f4a332393c7ec94e8e618bd32c1a8 \ + --hash=sha256:e916035e3e9930cbdfdd10abf48861340221857f45509565898e012263f7b289 \ + --hash=sha256:eba154571c16e032112afac0dc2dfe9e63c2ceb7aedd07bb7eecf2ce26d4dd4c \ + --hash=sha256:f03460ff076f70ab595bb45a0205ccea1971443575b6920c52e755dec2b3fbfe \ + --hash=sha256:f0ec3b750b59375eab5b0fb2b9254810c00a3375be6d789899f1055a1d556237 \ + --hash=sha256:f291bcf42ae98eb5107edb162c3c998b4a89648fd8e99ed4cbd12705292788cd \ + --hash=sha256:f61efe1d2fe0de16158a5fe1d1cf3c14bdb6aecd54d8938fd26512c525c1f624 \ + --hash=sha256:f68edfc67aabac33708941f26f22a7b8e9f81429bc0cf249fcf7d66b23af8d19 \ + --hash=sha256:fa95848c929b6a75f6848d3c9793e59db365ee436776e57db835cdbfa79ba977 \ + --hash=sha256:fd9f8797427910198f95bced71ddfed61130d7e349213bfb8466c9c99e2c46a8 \ + --hash=sha256:fdb4ca07ab75ffadab4a8b135ad59cdbb3156b99310f3d565370da74a15d6bd3 mdurl==0.1.2 \ --hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 \ --hash=sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba @@ -385,145 +447,165 @@ mypy==2.4.1 \ --hash=sha256:ef8d5be90032261197ac388d945d8ff4f476c95880798a1911760af64ddfe71f \ --hash=sha256:f44dd4c5ab22df21206dd926c98381ebdbf5bfd696df37dd38ded2d23143fcb6 \ --hash=sha256:f9118a3f50de264b614861bb11814833a742138ac3c8e2e49a860b6977fb2704 -mypy-extensions==1.1.0 \ - --hash=sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505 \ - --hash=sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558 -openapi-python-client==0.29.1 \ - --hash=sha256:7e05c904fb4840c17b4a9fff05cc53dfd97d45b486d9462ffb7ecf9c98e67e25 \ - --hash=sha256:9820490a2872dc56ce77ffbdea87f4562dae530a70a7207c66e39315ad20a89e +mypy-extensions==1.2.0 \ + --hash=sha256:993e7a20aa5671eb41a7132cf555af30062da99729601601b9a8382b11cae768 \ + --hash=sha256:c6e275a07f1c2fc096b62940452d0eaa3f3af7de45d704787866240a7c6d5a51 +openapi-python-client==0.30.0 \ + --hash=sha256:c0524369c78e4bea2f36dcde8594609e667eb4fab16e8f70d7dc85f2e8c6d767 \ + --hash=sha256:c9383be7b19d65ba20537d8a1325a162ba737e835034f9e52416fb43bc64e561 packaging==26.3 \ --hash=sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79 \ --hash=sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c pathspec==1.1.1 \ --hash=sha256:17db5ecd524104a120e173814c90367a96a98d07c45b2e10c2f3919fff91bf5a \ --hash=sha256:a00ce642f577bf7f473932318056212bc4f8bfdf53128c78bbd5af0b9b20b189 -pluggy==1.6.0 \ - --hash=sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3 \ - --hash=sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746 -pydantic==2.13.5 \ - --hash=sha256:346a034f080da3755d8e9cb5e00e8b07de1d39e4f6e2c87d8ab7cafa0b269a73 \ - --hash=sha256:51a9c5f7b2f8e636f04c6cada605d9b6a3bf1348fdf945a3d8869b19bba0ee08 -pydantic-core==2.46.5 \ - --hash=sha256:013d6f3483d81e02e7c328831808f336c8596ee33b4bd4026b9ffb1e960b8942 \ - --hash=sha256:03b9666e41e35d8909852ba191a0607520f81b74eaf12ccf8737005dbb313821 \ - --hash=sha256:045ab3b6d308439e32b81cc173bba5b9018bc6ed896afd0c65b3b009b1699af5 \ - --hash=sha256:0bddb4020d8f04175865ccd17eff3040874fc11fb593f424edb452653b4b947c \ - --hash=sha256:0cdbada856a1c69a7624a64d3d9aefe79300bd6ef827b43a4f265010b9b55184 \ - --hash=sha256:0fc5be0abd4a407e200d844b404e33639a554e7bd0d448e7b9ae181be4789ac2 \ - --hash=sha256:10416c15b8839ecc4ef4d0885da76da6fd0f67333a0eb8aff6d93c4b8f2910fc \ - --hash=sha256:15f4a94963c95accac15b7b657bb177d3ad82bb90b0d0526d9a9b85079925db5 \ - --hash=sha256:18a09e1e1011b462f2e32774f25859ef1223d5c2b0546a633cf56654710721e0 \ - --hash=sha256:193375f3548919d3f0b60936ca113ada3e38f264f91b9b8e0508efaad57be931 \ - --hash=sha256:1a353f84de772f423b5ffb11d7ae352fbbef0f446f3c0b0af0f8236d7233606e \ - --hash=sha256:1e449def1945a462c464331254e5a44fca7c3b4f9aedf59ec2f50f8066dd8e25 \ - --hash=sha256:1e5aad1220a1192c42341c8fd4a8686657e73ab2a920c970bdc4de334fe3193d \ - --hash=sha256:200aa3dc9f8d54f0754f43247c0bad0999fdcfbfd2488384dd44f37279271fe6 \ - --hash=sha256:2471fd51c61c610e1dcf7de44d7299283661654d11264ab4802b303368d69c47 \ - --hash=sha256:24922243639cbdac66c75fcb6fd6495a9cb52b213d62f9a0d16f0310b1ff8038 \ - --hash=sha256:28a6a556cd3b6066bea827857f9d9cce027c96f776e512f544a581f9e42161f8 \ - --hash=sha256:2bc9419666990c06d7397831f2126a1ecc3594aaa3ff7de5bf2d066802f4e07b \ - --hash=sha256:2cbd9a5eff05e51c447c34dfa4632145b26b09120cf04bd0c871e44c1a5e1c9a \ - --hash=sha256:2d330aaba8621b1edcec8ae2c4050f63b84ccf6d98723a8f212e9684713abf0e \ - --hash=sha256:2d5d76654becf5efd62c9e51c3756c67b49498b0c9a40884934c40807adbd074 \ - --hash=sha256:337639ba62a11acde6ef3aeb08c8ea755f8ef1fe5e513356c0f36a2b0d7568b0 \ - --hash=sha256:347ec774390c87326a2e4929d58d3f7e8763a104d5d35f4cd595a4c952366433 \ - --hash=sha256:356c8368cbc321050b169595683a2e1d63413b1e0e2868b330af9fc14c616d3f \ - --hash=sha256:37ae34309d7bd8c0d61ab839668058f2a7962ea1fc51d105d2db228fe0618034 \ - --hash=sha256:37ea7b83c935e5b0d68c9449b82651accf78a10828b2c02b2f2d9e9496446c21 \ - --hash=sha256:3a3e26b6a8274211bddee2d0e4d0d42778f17a34510f49d2ec44b58abfc41736 \ - --hash=sha256:3aa166e99c4f2985407fb8714aebede877ecb5455cf321b606adca926d30d5a0 \ - --hash=sha256:3d2652072b2d774947ba5cf78a9e59644ac62ee572daf6dd2e1dfe905e15b2b7 \ - --hash=sha256:40375c2d05acec10323e45dfe2077ac44bc74659008614af5069034e2cfc781c \ - --hash=sha256:413a717a410d0c817ef5b786a059415550b3794e1d0c2abffd9efb93a3d9f7b4 \ - --hash=sha256:46c25dda9d092a06c08db76ffe0a197107904d0dfac653f7d5306bbcd6d6119c \ - --hash=sha256:49776eab08766a08dfff7012f8b422dcd7e25e43b316eedf0477c24fcfa84b7c \ - --hash=sha256:4d44cf99ddebf875f9b68cc267aa684c99b7b44fe63ee1cac4ec163807290069 \ - --hash=sha256:4dedce55295becb61921e386b99d4f2706045306e7fa52249a33004c837379fb \ - --hash=sha256:4f8507560a9284e1370bb048ed4282012fbef4e8d109875b95e884d228552061 \ - --hash=sha256:4fdc8b93a41521988916eeaa271173fcca7fa0803d62f87675aac8dcec1c8e29 \ - --hash=sha256:5086029a57366b8cf81b130a43908738095c270c21a8d7f0e8bdfdb89718e2f3 \ - --hash=sha256:52e24eacdb536cade636aa90fb851835222becff8484b7001fdc78cb0290f2aa \ - --hash=sha256:53feb344243bb9510a9dec7bf3cf1b64d88a98af5dc7872a5160465f8b198c8e \ - --hash=sha256:545f26c504b27c3758439a5e6d9349931f0a04f855668d5fe323c89e82300a38 \ - --hash=sha256:54d510bac3ee52247af28ed4bb18a1e799f040ac60fd2bf5ccd4c92f1fbe786f \ - --hash=sha256:5cb482e9e84c851f4e623fe4acc1ced89168cf1fe18f7089db4548c8f5bbb65b \ - --hash=sha256:5e81740c09e310f5aa5cbd3e434a01c154d4bef93241c7877b39f211d2b78ba8 \ - --hash=sha256:5ee239d575f80b08eca11f6e20f90c4c695de7825c67eefe6091fbf20dda648e \ - --hash=sha256:5f194189415698233dd1114a093a9b56e61e2c57e11b469be3b0506f46f0771c \ - --hash=sha256:5f93c5fe914d75fbec9a49209b00da5f08e9e467d69da2b1510c81940cfd10be \ - --hash=sha256:657b40d6240c0a7b6a64b30f22d1e3aa631c7e846c621b0c0f6d1d75e2e15ea6 \ - --hash=sha256:6d30e1a4f138b8951063e9a394752a9179b51da288ffa507b1e659222f4c1793 \ - --hash=sha256:6f7b393a8b3da82f5c1fc0751e6d01ac6c55b93c18226a60bdfba4a724efafd1 \ - --hash=sha256:701b2e04b560eeb4bddf7a25ab8ca476176e34fdbd9a0e18196f0d12d4685f0b \ - --hash=sha256:771cf63ae0b1b50dd22e5f3e3549fab5f3f4ff1635d352a9e1a97fe01c7b2e64 \ - --hash=sha256:79bdfa52f843137045b2d081cc05c120ba6665d29b7559c2c47690906f39279f \ - --hash=sha256:7ac031912d54f3d83ef3b3eb98dfabc1608802e2202263d25957eeed40b94761 \ - --hash=sha256:7b0fc826b16c55e561e5d2a0c5c77b051ba1d92808118c4e4b5390f5e0cf191d \ - --hash=sha256:7c6be839a5a8312626b32029a415644a0846b420bc8b52b95b28cd92da162168 \ - --hash=sha256:816ff0a6550ffc06c098ccd2e0698600f9aa7da192a79eaa6f9af504a35db869 \ - --hash=sha256:82a36973cf8a2ef5406f4fe2edbf8ed0c99629535d959e0b100c76a32535a111 \ - --hash=sha256:837b396ca3d7b74091ca623f6cbd8351bd42d670a79c2683e79fb089f06a2de5 \ - --hash=sha256:850a08d167dde16db8702c274f320c7be9d7da6f6dff2b58b18f9e815bd94f5b \ - --hash=sha256:8816f3d218beb4b787de5c9759c259b8fa61f9dec42dc7811f320a33771778b7 \ - --hash=sha256:892a881d5f68c2b9ea304b7a6c2c60d9343df578a311b0f86b94bc8f1ffe8129 \ - --hash=sha256:895395f8918627b04efb1ad2a4cf605387143300ba03304cd1dfa6d03f5e095e \ - --hash=sha256:8b10e3e8fd7ddc2bd915848a2768e44c15b22936f1cc54c462ad1164deb02655 \ - --hash=sha256:8e24d8f05fa2d28513d94e877e9c75ad66175376209b3977f916e240e623193c \ - --hash=sha256:8feeac04b5794e513e710af2f9c87d49f31a6dc47967bb264a1fed61a8989bec \ - --hash=sha256:9432f3598db432cb51c5b37fdbf29a60fcccc79e30d37a05022776a6bc4ab689 \ - --hash=sha256:976e1128455aa595ea04c79ccfedff1aaeab96ee013fcc916bed120c4f0ad94f \ - --hash=sha256:978e7b97d4824b5be09c69fb70507cbde3b0323fc147332ca40a94d9a6a0ebbf \ - --hash=sha256:97bf8de4d541598c94a59344eeb988a94c08ff76b5723c41f6567ec18c7892ea \ - --hash=sha256:97cf3eb53a8cccacf9d46686a0926186c9bfb5574f2ed66d3639d5fe117cd3a9 \ - --hash=sha256:9b68938dd5b0c783d88ff8e2dcc69451b5eb936fe212d516b21b9d5567f6d464 \ - --hash=sha256:9c4b71f10dd532fb7a5cbc8f58707779e64f03a258c2bf8bfbaecfcd9970b519 \ - --hash=sha256:9f47b8a949e60f027f0aa0a6f6c7b7e9c55cbf4380d10b344e282fa4e7ab1e1b \ - --hash=sha256:a1dee1b804ff4d11c663636cf15d2ea47e9f79cd56c033fb1cbf08924842a48f \ - --hash=sha256:a2468d93d181667a7abd66e1b64bb9f76f361b0fef8faddf687456453576f5ee \ - --hash=sha256:a2a5e1d0ff29adddc9f6d6821a66302e4493f8ca898b715b6b1182c2c201ea0a \ - --hash=sha256:a39ac25a9a2fa4072efdb429833c4a4c8009a51ff9eea3eeae131713cd27991e \ - --hash=sha256:a445486499897b88a7d6c310c88ed64dd37b1b59bfd7ae9107490bbb362f47d6 \ - --hash=sha256:a91c17edf6eea2402cb5457b4c89e99bc5ed1004aa34c4adf1d4258c1a5c22c2 \ - --hash=sha256:ab4b66edffb32d9e951efb3814bd104b8367a7501b81b955cacb5726d897389f \ - --hash=sha256:aca6c767f552b21b10f774aeac128e828eafb796adfa1b666a18bf6321453c3a \ - --hash=sha256:acf8a67ba51f4ca9ddbd0e6b3000a65ac51ab734661778b3e7ba64d99a710f2f \ - --hash=sha256:b10ec717381bdbfafef34607824db4c91de69ff085e4fca3b2af91b4fa17e68a \ - --hash=sha256:b49924c73a235e969511bf2aabdff3beebf9820931f646c80274d5d780010c47 \ - --hash=sha256:b6acfb46a814762367fb7ba0828b0a17d441b92ce249a0e007474c9072662dda \ - --hash=sha256:b7ca9034437b6022f941f4857459562ee00a560b97e7cce8a0ec5a74fc6766e0 \ - --hash=sha256:b98134087d9de723658d17a42c7d0da8d6e2ef08015dee7dc93889047315f5e4 \ - --hash=sha256:b9fe6fb92520e3fd61f2e49000b6911b188824f089b75973ea06d6267f0b476d \ - --hash=sha256:bce57638e08ac148e5778cce7feb968307a727d66f8e2274a543d0cf0c9ad6a3 \ - --hash=sha256:c14ad3bdc85ee7f318742c457ca3968a92126d144b15721c759033bfb06296c2 \ - --hash=sha256:c1c43ad4339643d70ebb8124e1305a7dab423001eff58bb41a0f731adbc98355 \ - --hash=sha256:c3471e5c4a949c26ec00a77f01df59096aa9495877de76fd60a980f8ee6be461 \ - --hash=sha256:c583b927a8838dab890706a6fa7573fbb8b70e24000ef9f7238e2d6f6435a5ed \ - --hash=sha256:c76fe65e607be28c7fd4d56fc3c42b1583aa058ce3408b7ad0fd540171d31f9f \ - --hash=sha256:c7ea57fc63aa7da93a1bd2d644e6577befae10c52c4e36377635eea1056a74f5 \ - --hash=sha256:cd5214352ae68f3b5e9af7768bdc5253695ee069675db3480518420b3be881f2 \ - --hash=sha256:cdbb78909f52b981d3b2d56b97328d71eb0b974c36bd77c920123a7ebb192829 \ - --hash=sha256:cdc8b74ecc48c0cb1e9607a05ec4e9e88db60a19ffcc9a1d5f9088ede40c8dc0 \ - --hash=sha256:d0a24b40877af2de4950252be9d21eaf7fb07660f3c2cae1f56c6b599ada5266 \ - --hash=sha256:d22a945598fb91236b4dd793a6e42e4f3dd7740bb5aace5ebd7d4c08d13bb575 \ - --hash=sha256:d2f9fc07a8042a8f95925b35c4f04f469707c981fc33245b6ca187cf5d2dd290 \ - --hash=sha256:d625a186a65201c23a9e3b8ed9c47e90a026e03256608cc91851c6709096844f \ - --hash=sha256:d925f3d9afd05a8c0fb3a1031463a8d59ebe5e2afad297e29c78be19e13b4e62 \ - --hash=sha256:e64e88d5585bea9ce95861079de72006c7fa6d3df4e3a3b65ba31eb979c15c9f \ - --hash=sha256:e652ab17569c94bff5475520f907b7148b8c24036a8ebbe5cf7cf7493d28579a \ - --hash=sha256:e7b891faeedeafba41b2983e5001a81b6a915b69544c7e7570d1989ce1c36ac7 \ - --hash=sha256:e80675d75ae2cd14372cb65cad5400d9347a3d3f6c13000183f22dfd027283ed \ - --hash=sha256:e9c134bb666dd54b778b9fc0d2b50cbb7f979b9e3716f26a88c9ab3b6fc1dd0f \ - --hash=sha256:eb7d8d0e5886a89a55d2eef490e272fa965a9d57c6b29a5b5088a7997ec2cad1 \ - --hash=sha256:ecb42011e12ee19cafbc312887cbf3546959fe02fbad44f272d4be5baa997615 \ - --hash=sha256:ef3fbbf161dc9351a2fe0422e51b129f9e97e42385bd0320b309c15f7d287dd8 \ - --hash=sha256:efd62a42486f1bda5d24cb4f63d15a3c7768375fe83d36f9417b4ad7a2fb20b3 \ - --hash=sha256:f077d0b97ab11fa7dcc633fca53515f290bca8a8a633e966d5b6d1879d9ed01a \ - --hash=sha256:f332f0e72a5a0400141f830744e141bf9f97917878dbe968669e8a7fefea78ff \ - --hash=sha256:f7b0ec93a2893de856652154d73b7ba622f26fa97726487dcac373de5f4c6084 \ - --hash=sha256:fa10ef4112775900e7a0661068635eb67b2ab824fbde764de6e0e21982a93db0 \ - --hash=sha256:fc5d783bd4a2387e97b8a2d5ec781cfb92b3d893bf82370548e99db5915935d3 \ - --hash=sha256:fc8515076c11f3cfdf4fb142dcca0fe384b1230a3b5415458ac84f3e0903ec13 \ - --hash=sha256:ff218293c9c806138dca139765e3b067621be52bcd93cdc14c7711be7ddc90a9 +pluggy==1.7.0 \ + --hash=sha256:7dd7b0d8832ba3cb632c306926ded123429211b83641b35dc5c41ad2d34f9bec \ + --hash=sha256:d1eaa46ebb595891b860ab086b4d09c8588af65ebd4361b8e8f4bb8920b90ba8 +pydantic==2.14.3 \ + --hash=sha256:1054f237f4d4733e5a30e1e2333bd33a2004ab9ab1510bd053a9a31bb48e232d \ + --hash=sha256:3f7b347782ab7e4cf4c798496ae3a82787d9f21ec12676a9c564355eeef8daa8 +pydantic-core==2.50.4 \ + --hash=sha256:0001d6920e3a5d92758cda460d6dc9f918a78ad6d5d092f1c8b5395e6b775356 \ + --hash=sha256:0574866e05f6adeecc520d87e87dd06210c0a51706341f6ef8421572f5a64444 \ + --hash=sha256:09450778e3ab58d3f565899fcfbf6c82926e31af29e28e799d1d50941316e0cb \ + --hash=sha256:0af56dbf8822ba9f4efcbbfdc15478f8b6fb08f1609860cb50aa2cc8476b3c34 \ + --hash=sha256:0b059a7968b1911be5a2d9a8234827ab0bef9d1e465d4b42da525894143550e8 \ + --hash=sha256:0ec20aca2b067369913716847f7dfe5f4dddf16a46965b7a70bbad5defaaba86 \ + --hash=sha256:0f87ae9db5ba8d8de40dcb93982cf8dd544e6552a80d3345af51941cc2146b80 \ + --hash=sha256:1239daaf063e62213ca1f34d96663900bd7510c42a786e843fd328af70e46445 \ + --hash=sha256:13b6dd62b5279f5b9d72f3bf918a35443ee8bd549241d9dc52d79a2c3b6d7016 \ + --hash=sha256:15bece43a02ad543c621c8305e67dedb5f27d378c5ba741e5a2c36523f8ef37f \ + --hash=sha256:16902a147b3da4840612164a5e67947104d63e978f7a57c395877a5e26690b9c \ + --hash=sha256:1afefe44ec042fbabfb4483ea258c04cf75ff4ff328d754f09b321fdaa232aca \ + --hash=sha256:1de7be9a66fc8536770481ab64a05aae5067c725f2b29a09543af00e6a417b97 \ + --hash=sha256:1e20cbde2b6deb33a51d08cd168454dd9044ec7d4474056f4d98d63f51578783 \ + --hash=sha256:2039e323acee9abfec1fb5f661776e8965fe5928f3b7f8431900a774cba5c317 \ + --hash=sha256:219114f8dcdcbe4720d82ef016b1287ce5a0a67d7c69ca61524eb72e82aac344 \ + --hash=sha256:22e874666bdbd96d6bf629d32cd8ab376fedf1fd62585b52a42b9fa9fa6c20b6 \ + --hash=sha256:23a9ba564b2db709ff16eca990992ba95a19069972b34bff87c81d4b473cd755 \ + --hash=sha256:25e7e1080f9f7ce7cd9d114b31470ce912771bd02f38c824721d3c35d312abff \ + --hash=sha256:26cb012c4b8ca9f847bd0ac15978bd3d0f55b050bfbe6c47355edfc7e945029b \ + --hash=sha256:29358a8ca74e7d81158d14e2b10c904bd18773293ae3788716c0626fe0342347 \ + --hash=sha256:2980a701be88f9128a7470189fa3bcda5387f76c298a6f8e000fc29eb2a6f4e7 \ + --hash=sha256:2a60ec2a57ac3ef3767e526e9bf706ec75aa3d79c4ea134d9d4fcf7c62a297a7 \ + --hash=sha256:2f42584e5785385f681163a42506cab0d51295e17599a648396c52a7046c1372 \ + --hash=sha256:2f5cc5bcb94063fbbdfd285a2b302da34af07491337c10bb35de1d5220fa1583 \ + --hash=sha256:2f6767122b37c780bb756a720a4eef2bc6a050a0a1143428834b3cbc89448bd2 \ + --hash=sha256:300753f71c73302e218124baf995f00058e085cd01869bd9610bcbd0bd4500c1 \ + --hash=sha256:30d4dc35bc0eea52202a90b3820445ee0072c820241bfa710a623a078c9b267b \ + --hash=sha256:32a991aebd165f227b7c7c60bb9d66c2c7de9c24308552da264c9938fde0f8d6 \ + --hash=sha256:32d6dda86383645ec428ea64dfc277036f5cbc60a72238eab28b91a3fdb9a113 \ + --hash=sha256:33b21f69540a12c2053cd1d95766d8bd9667a3897f7c712a642de8aa37eb0865 \ + --hash=sha256:39f489ce31272073e6e146f6781690f9c1ee8c126836e6403361ef91154d89fe \ + --hash=sha256:3a48a5254d15a0ad050318bfc7a9566d4ec740118187e8f303e47a6840287eb7 \ + --hash=sha256:3b8ee2589a082739c522c1fe4be227412fcf108b903abb6672ae2f5570558882 \ + --hash=sha256:3de6c2a4df2af0ac9ab4dc1488746fe8b1a90e27955d870d9edda3187d20092b \ + --hash=sha256:3e0b395648c6cb871bceb2906907f255dc876ec425f2d5b024e129985cea8519 \ + --hash=sha256:3e547ceec1da7382f01f9e13963023e53367a71802c88778b21b9645a077cbdf \ + --hash=sha256:41b2cd8b29dbb5a4c9828a70f50d1abfc92011115c813213d3a91205c6f731b3 \ + --hash=sha256:41f4f8ae714e4fea1d635880f8a1af715ecf080eed4d13c5b04a0f3210f9c61a \ + --hash=sha256:474f7e598c7902165662a5d5160d3fce31037890a2975a9871ebf7c05862300b \ + --hash=sha256:477af785d1846e4e96bf56983b92ea7553aaeccdeb8acdaa55c7cee9eda0ae32 \ + --hash=sha256:49eb1241a969a5994db6880c18c012b6cbe2340343d8f529721571806583e500 \ + --hash=sha256:4c29b8f2d6417069bb1f257e6b9113f5d64dc2f554cc200ea90b4fe2c5cdb733 \ + --hash=sha256:4eb15be588407148ef5937dc8d9256a71f6b115e6cddadb7aa20b6ee384680dc \ + --hash=sha256:4eda7e3fdef382b7d4492745988a5baaf6953923a337f8b9dde5f76fa8afde20 \ + --hash=sha256:523466eba8ee10f7480f3c2057563145978011c583130d2cc01fb1e7af808e25 \ + --hash=sha256:57fa0a9490785139f1a4e4f43891830d55dfe4408845c0c9cb5eff4aeaf75f69 \ + --hash=sha256:5b26e5f1793b96cdc60242bf38da86ff24a27a708aa396214cac9b534bf571c7 \ + --hash=sha256:5bc1811ef2b4d4ba63e8e452f6e332b6374bd1d2cbbfdf66826c8cb1f71dd10d \ + --hash=sha256:5c074454dc6d4f6f4ba6561a56bf33a14db7651d882a5a5321ba3ae8868e082d \ + --hash=sha256:5c1013647be741647895c102831dcf79c34209662dbb683df9efb864417ed7d5 \ + --hash=sha256:601fce6cea9ddeaa85329e12e7f351def38d233075f42a3012b9c48071b02941 \ + --hash=sha256:6118e5a5550e36582e19bac1a403711a748f9f18251b054c326d3db02aaa7a18 \ + --hash=sha256:629eae995185540406e3635df5d5cf1d44f19ea240840b835d3f44541ff694d8 \ + --hash=sha256:6348ad12fa741bcc9c2f173e99fbf27cbc038826d8c31a4a7d836eca27878ba2 \ + --hash=sha256:65376dbe1ab4dbc768ca2b72b7c13993562c035f5925fd3bc7ff9c8c585c515d \ + --hash=sha256:6619d49a89a15cd04334f76fec530c155923bfc60da74ff5d815a52629e1aa6c \ + --hash=sha256:664e74848c2f5fc27db8505fe24e1ecd3ac669412913bf73d176916f86cc08e2 \ + --hash=sha256:67f7cc397e1d5556a801d1cba74de0d27d827eb242e6c036c0ca273c745414f1 \ + --hash=sha256:696613a0c0e7b2b35356e389ba4195ce20cfe7a2fc2e992c87d974d973eabec7 \ + --hash=sha256:6c5687b59b6ba0f663c4f2f15470f68507d6b45ccd3a19ee6d224f95cbee70d8 \ + --hash=sha256:6c7d7b0b596319e9ce79ef96ce57a14054a2eac629c0588a0539187a218be799 \ + --hash=sha256:70dbc9f83c41f37a4faa62dae5203853847223a891da446f48ef2efcfd5df806 \ + --hash=sha256:71395a43da5584bb70556f380387e15f845c0dcf76373c1afbfa0025737576ac \ + --hash=sha256:71ade6d2e445839350d589ff99bbddfde16f3f32db28da5c894a09f99c8b2a03 \ + --hash=sha256:71e03d2ea1a221d020cfc5b6cc8bbbedef23a06704c70fcf4d0afb42965b22d1 \ + --hash=sha256:7210398a1607ad607dc73196e575b3148b00a333cbb602ddbe1b60ba54554f43 \ + --hash=sha256:7472c39480ccc11dda69a196d1b7c7a6b48eb6594b77f05d945599d3e47f731c \ + --hash=sha256:7646353a5a7c553c04167aca628e2550b538f492765b03ccf34321a560acc43c \ + --hash=sha256:76e0065998159244ff4c097a6c05ff08019c6fbb6e597a85846e73044f0215b3 \ + --hash=sha256:789a6453e5ffd18a7ab6b8c3a0dd8403053829197ec258ecb90c604c21ffcc99 \ + --hash=sha256:789f88dea57841cdebef392b5d6e90444d767117e9ff2e0d9172df5c9de6690c \ + --hash=sha256:7ac2769a7ddd661e07e26c12220adc31b17014c48234b2a5a88993b8d4109e09 \ + --hash=sha256:817953730e4a73a09008b010c4a42396cefe799616a22df2ac21d3927b3080cf \ + --hash=sha256:83d2beac85b757bfc404c5c0612df51c4ef33bbb7be65cf4a96b4da7cbc4ff4f \ + --hash=sha256:86c7c4615634b5c57a79770f5b738354e45ae219a89949aeae84f19169a05283 \ + --hash=sha256:8923fcd49f875e8a0448d7223d1fdf1a9973ae2d1f20d4158753ceb8909facd2 \ + --hash=sha256:8cceae48ae7f94990c2f4e36291e9ec9868735e8b0f19e4489a17b0422338466 \ + --hash=sha256:92f8f63df729061bb14558ed740e7a222f6e2aa6c2e6a5bcfb4e706676562049 \ + --hash=sha256:930ad463d3fb7a340d323bcc496ec32dae469ec9974c29ff569f19806b6b03b4 \ + --hash=sha256:94733cb447c37b0ce6f71b39ca1288d5f966a084023a5617b4cc35a852586859 \ + --hash=sha256:9be1cfe715ecaa060ffd5d599ef410b94ef2697a0eed4cee562f788a2aa2175b \ + --hash=sha256:a0c5210d038418a115e7cf8706bfa611bd14add2f5787274dba45aadca3155e0 \ + --hash=sha256:a2f8716344bbbd10443391be0b1f2003b34949e3c4e6883005c2bc498ab6b64b \ + --hash=sha256:a4bb174bd65f795c39ad6642d9d5bdc43351b306b7d0a654ab0d0abb38be245f \ + --hash=sha256:a70d5effebd81ebd8e15a8aabdc7980832367b2b00c36543bac378977004cc80 \ + --hash=sha256:a9ee990bf2cfbd81574c5d4f9f6c9d480a14b5b43d2c4f2ca13f4c6f48089394 \ + --hash=sha256:ab2822bcdcefb54d1e8ca29f5e3ec3afe160fb794bb3a3a73b09d11ed2671104 \ + --hash=sha256:ad92d255a165cde5f9882ff69699eaf5495e0a1f32e97566bbbb80f11e46781f \ + --hash=sha256:aead3b74b68396bf0feab5d57e050b730ded7df55853c1e048a87e00aaf033c6 \ + --hash=sha256:aeb2e123cbf978a905e9f55155c1b8316fbbfa7cf64d04521fe174bab302d100 \ + --hash=sha256:aec3c2d741a8e3ee993de7f95f37afb51e31b169c95dbd29da4cf6688f340914 \ + --hash=sha256:b0cdb655fbd1562c2dfc9986f9103a106f7058cd0915afc6e656d4b1d73f3387 \ + --hash=sha256:b26f39a5be3cd91a2035818be3d0ffdf5282c3e1f5f53d3b80b7024021acee52 \ + --hash=sha256:b2f2d13239487cecaae98c9f4d5904ad0737643cdf8873c88ec6a78b12214f20 \ + --hash=sha256:b300a30304c4c6aeab03ed06809819d9eceacdd58441d3c7dffe41edfd006091 \ + --hash=sha256:b42f64825f5d750228f08318a9bf4d723b7ecb4c472aedcb3013c3ec2dc1f949 \ + --hash=sha256:b67d38e8bb0ade7e6e84575e4bb153fab35b122458077273aeb08fdf12be9d2c \ + --hash=sha256:b867f9fd183d76977f810c626d539265183c25b2284762893a31e8d6cacc81c0 \ + --hash=sha256:b99bed995ed7c41515c11fe2beb86f8a6cc298e5537cae2f736de2f982f74ef0 \ + --hash=sha256:bd46bcc28ed85d3cf71581b42d90b4ebd1f2062f81879519fed209f8a4d1cfc6 \ + --hash=sha256:bee28aab5a580eec673f7b68dfa8dece3dd37bd207ef8d22fafe23a8e9837296 \ + --hash=sha256:c04e9d920e2674f54651fd260a15c5d2843526c73d5242ee4311325ddc9573b3 \ + --hash=sha256:c4c5a1770ecfe8bdb6c6f09f8d81ea4de04f7efb012fac1efa4ad315dccc1fd1 \ + --hash=sha256:c733087ecf7dde06b1d071679bfd5f3ba03266ba77814c1c7253bc48c9adedd9 \ + --hash=sha256:c813ada7a651193acda85b6bc1cf12abd4b37cd25c7c6a75d7183512cc374969 \ + --hash=sha256:c81d98e27d9d9261909dcccab1ba5d6ea1c98b0bb9470e368604614fd1d36ddd \ + --hash=sha256:c81e35862aced259177a537ce1a6264c3a97bae1ced184ca9dc10ea754563688 \ + --hash=sha256:c856e439a9d54d514e81a7131229ba151cdf81df7c408e0f6c89340e5003dfe2 \ + --hash=sha256:c9e70012926e97069cdd09221861aff412aa94e4cac2e019055cdb79485b150c \ + --hash=sha256:ca83a32b2b41653d89f09a3d22b770bca96da72273bef8f7a68136bdd1e8b823 \ + --hash=sha256:cbf0777d54672990b10cb8ca9b0523499e182d7e2ea39f86b138519a902aa601 \ + --hash=sha256:d49127f137f871cde3c5650af33bbbdcee02679dae76e020902fa106f522b8ae \ + --hash=sha256:d690121e80ab16e623415351ab24713534d4e500b3cadff216409cb6826063d4 \ + --hash=sha256:d6a166978f22f10cb91413f70519861605219346decf65bc79008f9257c94afe \ + --hash=sha256:d6e3485a5e5c01fb5339c1ee3d4b9e21e2135a2a9d44caafb71acd994487ee7c \ + --hash=sha256:d7d406709ae924cf0b08b8282ca2f0e1c90526911d93bc040557cbc83b74c55f \ + --hash=sha256:d8201c9f9035520cdcc7dcad383b039ec8123969b87e01cf27c3dd883c02313b \ + --hash=sha256:da779ae50b46f3f7d1e1b5f362fdc0ad376a49fd55f6f3122dc2b6149936cdf7 \ + --hash=sha256:dcf2c7eaaa4cafe8e49b017e5bb49e76e084ab6f0cd712ee4019c812b5cf68b8 \ + --hash=sha256:dd8bed00731a21e3106e5dd6bbffb6c775a2c0bbc7c0c9face534d830057bdc9 \ + --hash=sha256:df1c174796cd63eb6b139f7daf783affe1f3ed659605850e843b24764c21bfc5 \ + --hash=sha256:dfcf6e51000b34f7026322cd9ea9bc340d745637e27e0bbc22f504b4f6b967ee \ + --hash=sha256:e498900bfbf7ddddd862f810440c09e9b81674739e8a11d619b40906dccd4a9a \ + --hash=sha256:e512c75ec5cf4475c1aa50ad975ecdf253f4963b06e152e1a11edd6de4010753 \ + --hash=sha256:e5bd109d095aaae989a0463d5ef0fcc43e9ddd5de125e656d3c119a79e466380 \ + --hash=sha256:e6b4b08d09054310a4dc389fa61ee22a7a5a292cb23ab8a985136ca8828bf924 \ + --hash=sha256:e6da138a1ecc1341c8b788a5ee822670b03788e1f5decf7af9d461de6e508b8e \ + --hash=sha256:ea2f61b0bc12f3592288503961b764579dea0658852d96a0b3d823614d808821 \ + --hash=sha256:ed9c0b6f236648dbf30d57e9f57e1f74878caafa04833a19f529b5ba5164b7a8 \ + --hash=sha256:edbca8789fd10f0de534b660a6b4c71f1fd18039679c918dad392ab044bb37e4 \ + --hash=sha256:edc17549ab592e33cfcaf285f047bb75fcd98f608aa9309af1187fd736ce9641 \ + --hash=sha256:ef8a9ddb2e2a4eae4abb72dc0710eca6c2726779b0664bd10c3ce9fcfaed8c4e \ + --hash=sha256:f08ee8248aad2d054e5bc4c73554d4505464698f6d754f16198dbc5764e9821d \ + --hash=sha256:f1d62fb172db35c6478c9323da34ff37d1f3d37d7d44337a9d94ba8c583e5730 \ + --hash=sha256:f8fd23653a252cefabea11cd041efd7b80bdf403e43a36dea53f9cb0aaa21f0f \ + --hash=sha256:faa4e96385c820ce9d7f7a623486e23d4134ae3c9ba2071e44e0ab5a5a5002c4 \ + --hash=sha256:fb2bb5b557080da398b866408117d98fe9731a12334afd0cdff221b458cdc5dc \ + --hash=sha256:fc04affef30be98c1f36f0c422a4061ef618fdc1dde79f5ad5458dd496fecffa \ + --hash=sha256:ffb616d8d55965839670301dc3bae3abacff560a7e137a89056058a8a9da4d96 pygments==2.21.0 \ --hash=sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9 \ --hash=sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c @@ -533,37 +615,37 @@ pyproject-hooks==1.3.3 \ pytest==9.2.0 \ --hash=sha256:07acdcf88ec174f907dc01af70bf52d49b014bbab03faeeade31c96b18c2e588 \ --hash=sha256:97c4f3b1f3c7414aa36465e09b8220f1d03627993bd51b1282e193753c80557b -pytest-asyncio==1.4.1 \ - --hash=sha256:507afa78ec77c6661164ef1a2368bc7820383fd1a14b2a7f813de8b5a92949cc \ - --hash=sha256:e8266eb094e5ee9ffdb2068c9836f33e209ea77a970eb846933d416b5602669b -python-dateutil==2.9.0.post0 \ - --hash=sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3 \ - --hash=sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427 +pytest-asyncio==1.5.0 \ + --hash=sha256:557f255ee03cc84f84a8d5f438bc9c6e0f714bf86970ae743c7ecb5a38d7e07d \ + --hash=sha256:92c8fa83ca419fd0d4bd6a34df6520dae435841d3733c319343249492adf37f7 +python-dateutil==4.0.0 \ + --hash=sha256:a5e246f79eb80475e691bf93862cead98decd8a498cf53ba0516fcdc0f50dc1c \ + --hash=sha256:d7295ff14fdc0f92f662100bfb6c551d160ca090f2939f1ec5b9794265c03f06 rich==15.0.0 \ --hash=sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb \ --hash=sha256:edd07a4824c6b40189fb7ac9bc4c52536e9780fbbfbddf6f1e2502c31b068c36 ruamel-yaml==0.19.1 \ --hash=sha256:27592957fedf6e0b62f281e96effd28043345e0e66001f97683aa9a40c667c93 \ --hash=sha256:53eb66cd27849eff968ebf8f0bf61f46cdac2da1d1f3576dd4ccee9b25c31993 -ruff==0.17.4 \ - --hash=sha256:0d1f4848fd2ec0499be4046db9b7dfcc952666885f00233cc7033515282556a8 \ - --hash=sha256:13e781c3c5f663e7fba737eaaeb70dd943dd55171daf316afb25cd5268cfe0c7 \ - --hash=sha256:181ae38a9a8fb94925bf7d0794327b48d7fd7f4b50cfd84c0e999cc09ef8d131 \ - --hash=sha256:20e43d7a08e712e33067ba887e6574546c79bd4831596ce8f16803ac7ff9ad90 \ - --hash=sha256:2b08c4ff98dc234f4a3871a3105353b922fa875ea1073ca31001eb8c06bb4d89 \ - --hash=sha256:2cd025509b2e15721b426fc70fd946d71f43b3db3b08e946dfec2d696d911690 \ - --hash=sha256:3971a78cba76298b284c8321e6d40d93045ed348bec5c369d85099efc97fb7cf \ - --hash=sha256:49b77f7b3921669466882a4881168801bdb06ec2cd83fb936049016cf5fdece1 \ - --hash=sha256:5f28cf0dd37cb172fa5a8d2e92e6ada3a9dbd0609f094ed24039929eef0b7524 \ - --hash=sha256:6007e7f3a0e55b0fbdb947af69cf24c21b4928df6be8ef3e767c69b5ccccf496 \ - --hash=sha256:67c5a894fc054cf41f75f7afa24815de5a74329d97634126c2a1015740ff4e8c \ - --hash=sha256:6b21c771b296888e8a35c6f48555f4b44e4483f61675d6ed51810a5203469ce6 \ - --hash=sha256:7e061dcc0933c7031a616ac8d66ac540309b2aa21ab558101a8f53e9ac7a1185 \ - --hash=sha256:7ed2f416349944f908f9574215994602242b0836844eba48eec61473033afca0 \ - --hash=sha256:8ea6e0017c785f7282092b11e46338e4ebed1b9e575ebf2e55a8a1eda968241a \ - --hash=sha256:e3b84eb74f260d1c2dbd236fd9d4c011d4fdd0a52bdf8aea57a10e3a1b71fca5 \ - --hash=sha256:f32d178b50e826e00f6c6c1be3f56333068acb9b67fe167143527fa9b81e890d \ - --hash=sha256:f99e95a1515161138be3cbd1b06c06e739d8feb38ade35564556999fffc3686e +ruff==0.17.5 \ + --hash=sha256:0e5c125c5b31dc8efc948d41357496a4c4a312977565ccba740030efdff83580 \ + --hash=sha256:40ca8afaac309b41a5b2e09e4e7beb1f824826b93c25697c4d74f573324fba4e \ + --hash=sha256:50dfc3c6b3ebd0a932f11dfd579bd42234b0b7137e68940eb6abdbfdb9d69697 \ + --hash=sha256:54c0f67d1be11b55d12c184a819fc229f5eee3ef45c16c4fcad41258e83b4882 \ + --hash=sha256:625e57d80cd43352d12ea81690f3eac46cddc8c0f35026d137fb0f157f94592e \ + --hash=sha256:64a6fd668a336df959c522991de33e9e3c8be463afc0c9ac8f029f9d19ef756e \ + --hash=sha256:6f0db748508f04a04e3fbebcc636a5c8b3bd76274f8ed28f497c44d75c2ea2d7 \ + --hash=sha256:6f6a7b138edf9cc402ca736a59d9525e6d766e5395760b72e7e146e6251ac963 \ + --hash=sha256:86bd1f3b83c25f9b8055c6e796f0685b39d3127ce947322098c3108cf82fd586 \ + --hash=sha256:8e85601bd6d9b6c3e3b95c0e0dccdbac1d23c6bcef006d187fbcddaf8225a5df \ + --hash=sha256:aa415d57c244299279901d776607fee3df7831c2a7435433fbfacde8632c6550 \ + --hash=sha256:b72fbc232e328bdbb9cdddf4f1aedcd61bd1aa64d75fc012114b4add0bd7f26b \ + --hash=sha256:d511dd302982e46a285528942fa6557d57730edc4bdb9def95e86a2603d77396 \ + --hash=sha256:dd0dfe7c6fe5a447fce467c58e69893be1d9a7e4378f5b9906432da33d94a97f \ + --hash=sha256:e1546609b2ad73f1d6c5c076881b788672b7b3cc3283981182cbdbb6524ed88a \ + --hash=sha256:e52622ecf3a0df9d03e796fe3eed4aa085adda65520db7e0619cbd2192a97342 \ + --hash=sha256:ec4ecf40fb4d6e1265b009dbe551727920926fc0f769070c452d6d84b422a74d \ + --hash=sha256:f93d2b7d449ed9545304f6923699ca20d13c675b69f258481709a08ae61076db shellingham==1.5.4 \ --hash=sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686 \ --hash=sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de @@ -576,12 +658,12 @@ tomlkit==0.15.2 \ trove-classifiers==2026.9.21.13 \ --hash=sha256:0a9ebc8d4e2f3e8a22848c5258033035bec17a3012ac3fea16dbaa764489eb71 \ --hash=sha256:8b1ff4f9c191b1040b71c37f1e445ab99732911e3cd91de52838453a854d7a17 -typer==0.27.2 \ - --hash=sha256:269b7eb9d3c202ca84b4bc9618cb04ebb43d3d4d1e567e4c768607232c05f945 \ - --hash=sha256:b3a5fc4342d5fc8fda8fc3010b1cf117e9249aab7fae800c2eff62fd3842d97d +typer==0.29.1 \ + --hash=sha256:00dbc549c13428bec1be55fe1f4d0fb8c6637a310e4f178ef14abe9534ee7b58 \ + --hash=sha256:ab6eb3880bf67ce96147734717f9ec333c06f66e361f3ea947d0be43da39f242 typing-extensions==4.16.0 \ --hash=sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8 \ --hash=sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5 -typing-inspection==0.4.4 \ - --hash=sha256:547274fa6b0a561ccf549cc9524b999a578e737d015d8709d021f9d0d13bea47 \ - --hash=sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147 +typing-inspection==0.4.5 \ + --hash=sha256:7f16c411e7930dc79596d42ab44672a3fe5f60eb34b781a1647e7872363120c7 \ + --hash=sha256:bc210535442b39e1bf2805e0c7a17dfd6a4ace760c84c7f7d16245d23a6b1c39 From cdce4ce0ffe3b0b5f21210a0bcfa9816f8c11fa1 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 18 Nov 2026 00:29:13 +0000 Subject: [PATCH 38/38] Hold incompatible pins so the dev-dependency bump can install openapi-python-client 0.30 needs httpx2 and generates httpx2 clients, and both 0.29.1 and 0.30 require typer<0.28. python-dateutil 4.0 needs tzdata, which the lock does not pin. Keep those three packages at the previous pins, point generation at ruff 0.17.5, and wrap the README call that ruff 0.17.5 reformats. Co-authored-by: Elijah --- README.md | 4 +++- pyproject.toml | 4 ++-- requirements-dev.txt | 18 +++++++++--------- scripts/generate.py | 2 +- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 332efdab..cba574d8 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,9 @@ except ProoflineError as error: ```python requested = client.request_review(organization_id, repository_id, 12) outcome = client.wait_for_review( - organization_id, requested.review_id, head_commit_sha=head_commit_sha, + organization_id, + requested.review_id, + head_commit_sha=head_commit_sha, ) if outcome.status != "COMPLETED": print(outcome.status, outcome.reason) diff --git a/pyproject.toml b/pyproject.toml index 3b5301a1..af00d221 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ dependencies = [ "httpcore==1.0.9", "httpx>=0.27,<0.29", "pydantic>=2.10,<3", - "python-dateutil>=2.8.2,<5", + "python-dateutil>=2.8.2,<3", ] [project.urls] @@ -34,7 +34,7 @@ Repository = "https://github.com/prooflinedev/sdk-python" [project.optional-dependencies] dev = [ - "openapi-python-client==0.30.0", + "openapi-python-client==0.29.1", "ruff==0.17.5", "mypy==2.4.1", "pytest==9.2.0", diff --git a/requirements-dev.txt b/requirements-dev.txt index 16245648..c28cb443 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -450,9 +450,9 @@ mypy==2.4.1 \ mypy-extensions==1.2.0 \ --hash=sha256:993e7a20aa5671eb41a7132cf555af30062da99729601601b9a8382b11cae768 \ --hash=sha256:c6e275a07f1c2fc096b62940452d0eaa3f3af7de45d704787866240a7c6d5a51 -openapi-python-client==0.30.0 \ - --hash=sha256:c0524369c78e4bea2f36dcde8594609e667eb4fab16e8f70d7dc85f2e8c6d767 \ - --hash=sha256:c9383be7b19d65ba20537d8a1325a162ba737e835034f9e52416fb43bc64e561 +openapi-python-client==0.29.1 \ + --hash=sha256:7e05c904fb4840c17b4a9fff05cc53dfd97d45b486d9462ffb7ecf9c98e67e25 \ + --hash=sha256:9820490a2872dc56ce77ffbdea87f4562dae530a70a7207c66e39315ad20a89e packaging==26.3 \ --hash=sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79 \ --hash=sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c @@ -618,9 +618,9 @@ pytest==9.2.0 \ pytest-asyncio==1.5.0 \ --hash=sha256:557f255ee03cc84f84a8d5f438bc9c6e0f714bf86970ae743c7ecb5a38d7e07d \ --hash=sha256:92c8fa83ca419fd0d4bd6a34df6520dae435841d3733c319343249492adf37f7 -python-dateutil==4.0.0 \ - --hash=sha256:a5e246f79eb80475e691bf93862cead98decd8a498cf53ba0516fcdc0f50dc1c \ - --hash=sha256:d7295ff14fdc0f92f662100bfb6c551d160ca090f2939f1ec5b9794265c03f06 +python-dateutil==2.9.0.post0 \ + --hash=sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3 \ + --hash=sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427 rich==15.0.0 \ --hash=sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb \ --hash=sha256:edd07a4824c6b40189fb7ac9bc4c52536e9780fbbfbddf6f1e2502c31b068c36 @@ -658,9 +658,9 @@ tomlkit==0.15.2 \ trove-classifiers==2026.9.21.13 \ --hash=sha256:0a9ebc8d4e2f3e8a22848c5258033035bec17a3012ac3fea16dbaa764489eb71 \ --hash=sha256:8b1ff4f9c191b1040b71c37f1e445ab99732911e3cd91de52838453a854d7a17 -typer==0.29.1 \ - --hash=sha256:00dbc549c13428bec1be55fe1f4d0fb8c6637a310e4f178ef14abe9534ee7b58 \ - --hash=sha256:ab6eb3880bf67ce96147734717f9ec333c06f66e361f3ea947d0be43da39f242 +typer==0.27.2 \ + --hash=sha256:269b7eb9d3c202ca84b4bc9618cb04ebb43d3d4d1e567e4c768607232c05f945 \ + --hash=sha256:b3a5fc4342d5fc8fda8fc3010b1cf117e9249aab7fae800c2eff62fd3842d97d typing-extensions==4.16.0 \ --hash=sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8 \ --hash=sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5 diff --git a/scripts/generate.py b/scripts/generate.py index 2ab56ba8..0e3d4321 100644 --- a/scripts/generate.py +++ b/scripts/generate.py @@ -14,7 +14,7 @@ from pathlib import Path VERSION = "0.29.1" -RUFF_VERSION = "0.17.4" +RUFF_VERSION = "0.17.5" ROOT = Path(__file__).resolve().parents[1] DOCUMENT = ROOT / "openapi.public.json" OUTPUT = ROOT / "proofline" / "_generated"