Skip to content

Hold wait_for_review to the commit the caller names - #49

Merged
mohsen1 merged 1 commit into
prooflinedev:mainfrom
jargnar:wait-for-review-head-commit
Nov 17, 2026
Merged

mohsen1 merged 1 commit into
prooflinedev:mainfrom
jargnar:wait-for-review-head-commit

Conversation

@jargnar

@jargnar jargnar commented Nov 15, 2026

Copy link
Copy Markdown

Three pull requests, each waited for as the SDK does today and then with head_commit_sha

wait_for_review takes head_commit_sha in both clients. With it, a review pinned to another commit ends the wait on the read that shows it, and is never COMPLETED.

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. If an agent has force-pushed or a bot has pushed since, wait_for_review can return COMPLETED for code the caller is not shipping, and nothing in ReviewOutcome says so. The CLI has this check on its own CI path: ci review accepts only a review whose head is the commit under test. The SDK had none. I run many coding agents in parallel, and the case I know is the harness that decides what ships: it holds one commit for each agent.

The review's head Outcome
the commit named what it is today
another commit the wait ends on that read: INCOMPLETE, last gap HEAD_COMMIT_MISMATCH, reason set
none, and the review has settled last gap HEAD_COMMIT_UNAVAILABLE, reason set, so not COMPLETED
none, and the review is pending or running the wait goes on

A value that is not a full SHA (40 or 64 hexadecimal characters) raises ValueError before any request. Without the keyword nothing changes.

Validation: python scripts/check.py --artifacts artifacts, the CI command, passes on Python 3.13.12 at 0664d1d: the generation check, the contracts, ruff check, ruff format --check, mypy, 150 tests (140 on main), the builds, and the install smoke of the wheel and the sdist. The 5 new tests run for both clients, and their 10 cases failed first, each with a TypeError for the unknown keyword. python scripts/check.py also passes on Python 3.11.18, 3.12.16 and 3.14.8. This ran locally on Linux arm64. GitHub Actions has not run it, and nothing was run against the live API.

Self-review: the change is in proofline/client.py and proofline/outcomes.py, with tests and a README section. Generated code, the contract and scripts/contracts.py are untouched, and there is no new dependency, method or type. A mismatch is an outcome and not an exception: INCOMPLETE with a reason code is how this SDK already reports a result that does not cover what was asked, so a caller that fails on anything but COMPLETED needs no new branch. reason is fixed text and holds no commit. Not included: finding a review from a commit alone, which prooflinedev/sdk-typescript#44 proposes there.

The recording is demo.py against a stand-in for the API on 127.0.0.1, with no account: demo.py, its output as text.

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@mohsen1
mohsen1 merged commit d24543f into prooflinedev:main Nov 17, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants