From 1b6a5489e2b22b55b33db9fe964d741da21deeac Mon Sep 17 00:00:00 2001 From: Daniel Boles Date: Sun, 6 Dec 2026 06:49:18 +0700 Subject: [PATCH] Document the async wait_for_review like the sync one Who: async SDK users reading help() or editor hints. What: give the async wait_for_review the contract the sync one gained in #155 (back-off, the move before the deadline, the commit pin). Where: proofline/client.py, async wait_for_review. Why: both methods share one contract; only the sync one described it. How verified: ruff check, ruff format --check, pytest (244 passed; the known Windows body-stream test flaked once and passed on rerun). --- proofline/client.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/proofline/client.py b/proofline/client.py index 22f8afaf..fd911d7c 100644 --- a/proofline/client.py +++ b/proofline/client.py @@ -962,6 +962,14 @@ async def wait_for_review( timeout: float = 300, head_commit_sha: str | None = None, ) -> ReviewOutcome: + """Wait for recorded review completion or return TIMED_OUT. + + The same contract as the sync `wait_for_review`: reads back off from + 5 to 60 seconds apart, a read that would fall in the last five seconds + moves to five seconds before the deadline, and head_commit_sha holds + the outcome to that commit. + """ + 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)