Repository navigation
Conversation
AsyncProoflineClient bounds I/O with anyio, but its Retry-After backoff and wait_for_review polling slept with asyncio.sleep. Under trio a retried request surfaced as a status-0 invalid-response problem and wait_for_review raised "no running event loop". Sleep with anyio so both paths run on any backend that anyio and httpx support, and test the sleeping and deadline paths on asyncio and trio. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GA2KNDKv463GeBmDCYL95
Retain exact-head review polling and every existing dependency lock entry. Exercise retry backoff, pinned-head polling and request deadlines on both asyncio and Trio.
There was a problem hiding this comment.
Proofline has 10 new findings to review. 13 open findings need attention in this pull request.
1 more finding is on the Proofline Check.
| ) | ||
| assert review.incomplete_causes == [ | ||
| "LATER_CAUSE", | ||
| models.IncompleteCauseType0.EVIDENCE_UNAVAILABLE, |
There was a problem hiding this comment.
Warning · Review cause test passes when a known cause decodes as a string
The list comparison in tests/test_generated_operation.py accepts a plain string in place of the expected enum member because they compare equal.
The test would miss a regression where the string fallback in scripts/generate.py shadows known review causes.
Assert that the known cause is the expected enum member using is.
Details
test_checkpoint_keeps_its_positional_result in tests/test_generated_operation.py compares against IncompleteCauseType0.EVIDENCE_UNAVAILABLE, defined in proofline/_generated/models/incomplete_cause_type_0.py as a StrEnum member.
| trio==0.35.0 \ | ||
| --hash=sha256:7efb295c78a0ecd1235c5759e620b5da564ca80d2efcb0055423588547248b96 \ | ||
| --hash=sha256:9a062a029487c1bdbcc1b2543b729a0bde857ce478b1512c84f391f628e0c5c9 |
There was a problem hiding this comment.
Warning · Wheel and sdist smoke tests miss accidental Trio imports
scripts/check.py installs Trio from requirements-dev.txt into both artifact smoke environments, although pyproject.toml does not require it at runtime.
An unconditional Trio import would pass scripts/install_smoke.py but fail in a default installation without Trio.
Keep Trio for backend tests and run both artifact smoke tests in separate environments with runtime dependencies but no Trio.
| } | ||
| ], | ||
| "description": "The deterministic World checks recorded for this assessment." | ||
| "description": "The deterministic environment checks recorded for this assessment.\n Only assessments made by the check evaluator Proofline retired on\n 2026-11-05 carry them. A later assessment records none, and\n `receipt_recorded` is then false." |
There was a problem hiding this comment.
Warning · SDK help omits why current assessments have no check receipt
Both generated assessment models omit the new retirement guidance, and CustomerChecks in proofline/_generated/models/customer_checks.py only says what a missing receipt contains.
SDK users cannot tell that receipt_recorded: false is expected after retirement.
Document the retirement rule on the shared checks schema and regenerate the SDK.
Also at:
| } | ||
| ], | ||
| "description": "The change-level diagram: the changed call path from the pinned code\n index and the relations World declares. Absent when the review\n recorded none." | ||
| "description": "The change-level diagram: the changed call path from the pinned code\n index. A diagram recorded by the check evaluator Proofline retired on\n 2026-11-05 can also show the environment relations it returned.\n Absent when the review recorded none." |
There was a problem hiding this comment.
Warning · Diagram docs credit the retired evaluator with recording the diagram
The new change_diagram wording in openapi.public.json attributes the diagram to the retired evaluator rather than only the historical environment relations it supplied.
Client authors get the wrong provenance for diagrams generated by the server from the stored graph.
Apply the retirement qualifier to the environment relations, not to the diagram, and regenerate the SDK.
Also at:
proofline/_generated/models/customer_review_detail.pylines 94 to 95
| } | ||
| ], | ||
| "description": "The change-level diagram: the changed call path from the pinned code\n index and the relations World declares. Absent when the review\n recorded none." | ||
| "description": "The change-level diagram: the changed call path from the pinned code\n index. A diagram recorded by the check evaluator Proofline retired on\n 2026-11-05 can also show the environment relations it returned.\n Absent when the review recorded none." |
There was a problem hiding this comment.
Warning · Standalone diagram help omits that evaluator relations are historical
ChangeDiagramView.legend in openapi.public.json describes environment provenance without the historical restriction introduced on the parent field.
Readers of standalone schema or SDK help cannot tell whether current diagrams can include those relations.
Qualify evaluator-supplied relations in the legend description and regenerate the SDK.
Also at:
proofline/_generated/models/change_diagram_view.pylines 21 to 22
| "$ref": "#/components/schemas/CustomerChecks" | ||
| } | ||
| ], | ||
| "description": "The deterministic World checks recorded for this assessment." | ||
| "description": "The deterministic environment checks recorded for this assessment.\n Only assessments made by the check evaluator Proofline retired on\n 2026-11-05 carry them. A later assessment records none, and\n `receipt_recorded` is then false." |
There was a problem hiding this comment.
Warning · Completed reviews return INCOMPLETE after evaluator retirement
outcome in proofline/outcomes.py treats every absent receipt as a gap, but CustomerAssessment in openapi.public.json now documents that later assessments record no receipt.
Both sync and async wait_for_review in proofline/client.py return INCOMPLETE for otherwise completed reviews.
Require receipts only when deterministic checks were expected, while preserving other assessment gaps.
Also at:
proofline/client.pylines 567 to 578
| "const": "RUNTIME_INVENTORY_UNAVAILABLE", | ||
| "description": "The check could not read an inventory of the connection's Cloud Run\n services or ECS tasks: Kian retains none, or the read failed or timed\n out. Nothing shows what runs.", | ||
| "description": "The check could not read an inventory of the connection's Cloud Run\n services or ECS tasks. Kian may retain none. When opening the evidence\n database or reading its workspace failed, or the read exceeded its\n deadline, the report records `runtime_read_cause`.", |
There was a problem hiding this comment.
Warning · The inventory gap points to an undocumented diagnostic
The RUNTIME_INVENTORY_UNAVAILABLE description in openapi.public.json directs readers to runtime_read_cause on an unnamed report, but the public deploy and checkpoint schemas expose no such field.
API and SDK consumers have no documented way to distinguish missing inventory from a failed or timed-out read.
Identify where consumers can read runtime_read_cause, or say explicitly that the public response does not distinguish these cases.
Details
get_commit_deploy_verifications in openapi.public.json returns CommitDeployVerifications, which contains CommitDeploy entries with DeployCoverageCheckpoint entries. The DeployCoverageCheckpoint docstring in proofline/_generated/models/deploy_coverage_checkpoint.py lists the gap but does not explain its possible causes. Before this change, the gap description listed the causes without directing readers to a report.
| workflow_run_id: int | None | Unset = UNSET | ||
| rolled_back: bool | Unset = False | ||
| github_deployment_ids: list[int] | Unset = UNSET | ||
| verification_ended: bool | Unset = False |
There was a problem hiding this comment.
Warning · Omitted verification_ended does not deserialize to False
CommitDeploy.from_dict in proofline/_generated/models/commit_deploy.py passes UNSET when verification_ended is omitted, overriding the False default documented in openapi.public.json.
SDK callers receive a sentinel instead of a boolean, so verification_ended is False fails.
Use False as the fallback when parsing an omitted verification_ended.
Details
UNSET in proofline/_generated/types.py is falsey but is not False. The HTTP 200 parser in proofline/_generated/api/default/get_commit_deploy_verifications.py calls CommitDeployVerifications.from_dict in proofline/_generated/models/commit_deploy_verifications.py, which returns the parsed deployments without normalizing the field.
| github_deployment_ids = cast(list[int], d.pop("github_deployment_ids", UNSET)) | ||
|
|
||
| verification_ended = d.pop("verification_ended", UNSET) |
There was a problem hiding this comment.
Warning · Deployment metadata lookups now raise KeyError
CommitDeploy in proofline/_generated/models/commit_deploy.py moves four response keys to attributes, but mapping reads still only check additional_properties.
Existing reads such as deploy["github_deployment_ids"] raise KeyError even when the response includes the key.
Preserve mapping lookup and membership for the four promoted keys when present in the response.
Details
Before this change, the four keys remained in additional_properties. This change removes github_deployment_ids, verification_ended, aws_provider, and aws_run_id from that dictionary during parsing. CommitDeployVerifications in proofline/_generated/models/commit_deploy_verifications.py returns the parsed objects directly; no repository caller was found performing the affected lookup.
| @@ -547,16 +558,41 @@ def _parse_counted_incomplete_causes_item( | |||
| return componentsschemas_credit_refusal_cause_type_0 | |||
| except (TypeError, ValueError, AttributeError, KeyError): | |||
There was a problem hiding this comment.
Warning · Review cause arrays accept non-string entries
The new fallback in both review models returns non-string cause entries unchanged instead of rejecting them.
A response containing a JSON null cause now yields None in the parsed model, where callers expect a string and may call string methods.
Check isinstance(data, str) before each fallback and raise TypeError for non-strings while preserving unknown strings.
Details
Both counted_incomplete_causes and incomplete_causes are affected in ReviewSummary (proofline/_generated/models/review_summary.py) and CustomerReviewDetail (proofline/_generated/models/customer_review_detail.py). The successful detail response passes decoded JSON directly into the model parser in proofline/_generated/api/default/get_review.py.
Also at:
openapi.public.jsonlines 4179 to 4197proofline/_generated/api/default/list_reviews.pylines 134 to 140proofline/_generated/models/customer_review_detail.pylines 1317 to 1331proofline/_generated/models/customer_review_detail.pylines 1444 to 1450proofline/_generated/models/review_page.pylines 76 to 88proofline/_generated/models/review_summary.pylines 251 to 260proofline/_generated/models/review_summary.pylines 658 to 664
Fork-internal PR to evaluate the Trio backend fix proposed in prooflinedev/sdk-python#48.
This PR now uses the same base (
1acf77b) and head (eeae462) as the upstream PR: 6 files, +232/-3. The existing verification of this head passespython scripts/check.py, including 230 tests and all 12 backend regression cases.Review scope correction
The earlier Proofline run compared this branch with the fork's stale
main(bb09db3), which was 50 upstream commits behind. That expanded the review to 93 files and included upstream schema and generated-code changes.Both reported warnings—deploy-verification
commit_shavalidation and the requiredenvironment_external_keyfield—refer toopenapi.public.json, which is identical to current upstreammainand is outside this PR's corrected diff. The fork'smainhas been fast-forwarded to upstream; GitHub now marks both inline threads outdated. This scope correction does not claim to fix or disprove those upstream schema concerns.The previous Proofline report applies to the old comparison. A fresh review should evaluate the corrected six-file diff.
Originally generated by Claude Code.