Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
e28b03a
Add on_poll callback to wait_for_review in sync and async clients
abhish12345 Nov 20, 2026
67eeae4
Address Proofline review findings: bound async callback await by rema…
abhish12345 Nov 21, 2026
68588e4
Address all 4 Proofline review findings: classify review before on_po…
abhish12345 Nov 21, 2026
1014242
Address remaining Proofline review findings: preserve classified outc…
abhish12345 Nov 21, 2026
cee9565
Address Proofline findings: document on_poll delivery bounds, record …
abhish12345 Nov 21, 2026
b0c5a0a
Address Proofline findings: pass deepcopy of review to on_poll, decou…
abhish12345 Nov 21, 2026
d494e22
Address Proofline findings: document on_poll exception propagation, h…
abhish12345 Nov 21, 2026
e644ecc
Address Proofline findings: cancel and observe AsyncTask on expired b…
abhish12345 Nov 21, 2026
6081d63
Address Proofline findings: document non-interruptibility of synchron…
abhish12345 Nov 21, 2026
8cf6718
Address Proofline findings: recheck deadline before callback delivery…
abhish12345 Nov 21, 2026
2d64b3b
Address Proofline findings: document cancellation-time exception cons…
abhish12345 Nov 21, 2026
f734620
Address Proofline findings: qualify mismatch outcome regarding callba…
abhish12345 Nov 21, 2026
1141343
Address Proofline findings: sync docstring on_poll propagation, inlin…
abhish12345 Nov 21, 2026
c548eca
Address Proofline findings: clarify sync on_poll in README, record do…
abhish12345 Nov 21, 2026
5624118
Address Proofline findings: close unstarted callback coroutine on can…
abhish12345 Nov 21, 2026
1416b98
Address Proofline findings: wait on futures directly, seed deepcopy w…
abhish12345 Nov 21, 2026
8d6fb95
Address Proofline findings: require timely observation for future res…
abhish12345 Nov 21, 2026
41b673d
Address Proofline findings: guard coroutine close, clarify callable o…
abhish12345 Nov 21, 2026
21d5ef1
Address Proofline findings: deadline-aware snapshotting, drain comple…
abhish12345 Nov 21, 2026
ee8e3cc
Address Proofline findings: iterative snapshotting to prevent Recursi…
abhish12345 Nov 21, 2026
3363289
Address Proofline findings: incremental bounded snapshotting, retriev…
abhish12345 Nov 21, 2026
bfa56be
Address Proofline findings: iterative tuple snapshotting, check loop …
abhish12345 Nov 21, 2026
9ebe0a2
Address Proofline findings: reject foreign-loop futures, reuse memoiz…
abhish12345 Nov 21, 2026
ffd492b
Address Proofline findings: leave foreign-loop futures untouched, exa…
abhish12345 Nov 21, 2026
dd2f57d
Address Proofline findings: reject already-suspended coroutines, clos…
abhish12345 Nov 21, 2026
0e26f24
Address Proofline findings: document unstarted coroutines, check dead…
abhish12345 Nov 21, 2026
758d45b
Address Proofline findings: safe wrapper cancellation, recompute rema…
abhish12345 Nov 21, 2026
448f5c6
Address Proofline findings: slot descriptors, dict key aliases, set m…
abhish12345 Nov 22, 2026
d085c9c
Address Proofline findings: detach overdue callbacks, current task gu…
abhish12345 Nov 22, 2026
9124465
Address Proofline findings: safe cancellation wrapper, built-in Futur…
abhish12345 Nov 22, 2026
1949270
Address Proofline findings: non-overridable Future operations, corout…
abhish12345 Nov 22, 2026
0167ff7
Address review 31 findings: base future methods, loop ownership check…
abhish12345 Nov 22, 2026
c5661f9
Address review 32 findings: detach overdue callbacks without cancelli…
abhish12345 Nov 22, 2026
2b097c9
Address review 33 findings: built-in set operations bypassing subclas…
abhish12345 Nov 22, 2026
c190067
Address review 34 findings: plain completion futures for callback awa…
abhish12345 Nov 22, 2026
7e04e4e
Address review 35 findings: deferred hash insertion for sets and dict…
abhish12345 Nov 22, 2026
098ec67
Address review 36 findings: identity-keyed detachment dictionaries, h…
abhish12345 Nov 22, 2026
6217096
Address review 37 findings: frozenset deferred construction, closure …
abhish12345 Nov 22, 2026
0dcc1b4
Address review 38 findings: unresolved tuple slot sentinel, defaultdi…
abhish12345 Nov 22, 2026
51ec572
Address review findings: safe builtin class allowlist for defaultdict…
abhish12345 Nov 22, 2026
b5120d8
Address review run 40 findings: pre-sleep deadline guard for on_poll,…
abhish12345 Nov 22, 2026
d303cd3
Address review run 41 findings: restore deadline check after get_revi…
abhish12345 Nov 22, 2026
88894d3
Address review run 42 findings: reject functions with closure cells, …
abhish12345 Nov 22, 2026
74786d2
Address review run 43 findings: reject FunctionType mutable snapshots…
abhish12345 Nov 22, 2026
72eb91a
Address review run 44 findings: reject extension classes with mutable…
abhish12345 Nov 22, 2026
59a8a58
Address review run 45 findings: reconstruct strided/sliced memoryview…
abhish12345 Nov 22, 2026
573ec0d
Address review run 46 findings: slice buffer by byte offset and byte …
abhish12345 Nov 22, 2026
1c1911b
Address review run 47 findings: clear transport deadline around on_po…
abhish12345 Nov 22, 2026
2f9987a
Address review run 48 findings: cast exporter view to B for typed sli…
abhish12345 Nov 22, 2026
3f99b15
Address review run 49 findings: keep detached tasks in id-keyed dict …
abhish12345 Nov 22, 2026
c50789f
Address review run 50 findings: guard close lookup and invocation, di…
abhish12345 Nov 23, 2026
c786c4a
Address review run 51 findings: document set/frozenset size limits in…
abhish12345 Nov 23, 2026
26063ff
Address review run 52 findings: race startup wait in case 1, close un…
abhish12345 Nov 23, 2026
a775d5e
Address review run 53 findings: guard cleanup marker lookup and use e…
abhish12345 Nov 23, 2026
47c73c0
Address review run 54 findings: fix custom awaitable closing, set len…
abhish12345 Nov 23, 2026
85e914d
Address review run 55 findings: native array size check, memoryview e…
abhish12345 Nov 23, 2026
25277b8
Address review run 56 findings: track seen identities in _is_immutabl…
abhish12345 Nov 23, 2026
32a033b
Address review run 57 findings: iterative __self__ walk in _is_immuta…
abhish12345 Nov 23, 2026
6e61d39
Address review run 58 findings: callable-only __self__ inspection, tu…
abhish12345 Nov 23, 2026
fd127f7
Address review run 59 findings: native array typecode and size check,…
abhish12345 Nov 23, 2026
992d34e
Address review run 60 findings: instance __dict__ memo cloning, pendi…
abhish12345 Nov 23, 2026
ab10a01
Address review run 61 findings: frozenset dict installation, reject m…
abhish12345 Nov 23, 2026
372f111
Address review run 62 findings: frozenset slot byte limit, task done …
abhish12345 Nov 23, 2026
22e6ad5
Address review run 63 findings: mmap backing buffer isolation, tuple …
abhish12345 Nov 23, 2026
b127bd4
Address review run 64 findings: direct datetime subclass allocation, …
abhish12345 Nov 23, 2026
c0fa8eb
Address review run 65 findings: ctypes array and view preservation, w…
abhish12345 Nov 23, 2026
a212bdd
Address review run 66 findings: ctypes layout validation, byte offset…
abhish12345 Nov 23, 2026
0f80f2c
Address review run 67 findings: negative slice stop, strict deadline …
abhish12345 Nov 23, 2026
9b9475b
Address review run 68 findings: pointer-bearing ctypes rejection, pen…
abhish12345 Nov 24, 2026
766f577
Address review run 69 findings: recursive ctypes aggregate checking, …
abhish12345 Nov 24, 2026
9e6c2b9
Address review run 70 findings: multidimensional ctypes view reconstr…
abhish12345 Nov 24, 2026
fd2d3f4
Address review run 71 findings: UUID cloning and memoization, 2D ctyp…
abhish12345 Nov 24, 2026
5e0b1ba
Address review run 72 findings: UUID subclass and is_safe cloning, N-…
abhish12345 Nov 24, 2026
f41b91f
Address review feedback on watchdog clock, wrapper result, and snapsh…
abhish12345 Nov 24, 2026
4a7dcf1
Address Run 74 findings on enum slots, 0-row view slicing, task facto…
abhish12345 Nov 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,17 @@ outcome = client.wait_for_review(
organization_id,
requested.review_id,
head_commit_sha=head_commit_sha,
on_poll=lambda review: print(f"Review status: {review.status}"),
)
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.
`on_poll` is optional; when supplied to `ProoflineClient`, it must be a synchronous callback and must return `None` (returning an awaitable or any return value other than `None` raises `TypeError`). `on_poll` receives each `CustomerReviewDetail` fetched and validated before the callback is reached; deadline expiry can suppress delivery. Tuples with more than 1,000 items, immutable bytes, mutable buffers, or memoryviews with more than 65,536 bytes (the 65,536-byte limit applies to immutable bytes, mutable buffers, and memoryviews, including any view backed by a buffer larger than 65,536 bytes), sets, frozensets, or deques with more than 65,536 items in review extension data skip `on_poll` snapshot delivery even with time remaining, and snapshot copy errors on unsupported mutable values propagate before `on_poll` runs. `on_poll` exceptions and callback return-validation errors propagate even when a terminal outcome has already been determined and can prevent the waiter from returning a classified outcome. Synchronous callbacks must return before a terminal result can be delivered and the polling deadline cannot interrupt them.

With `AsyncProoflineClient`, `wait_for_review` can be awaited; `on_poll` must be a callable that accepts the review snapshot and returns `None` or an awaitable (such as a coroutine or future). Any coroutines returned by `on_poll` must be unstarted, and any pending futures must belong to the polling event loop. Callbacks cannot return the running polling task (doing so raises `ValueError`). Deadline expiry before invocation (including during snapshot copying) can skip `on_poll` without discarding an already-classified outcome. Tuples with more than 1,000 items, immutable bytes, mutable buffers, or memoryviews with more than 65,536 bytes (the 65,536-byte limit applies to immutable bytes, mutable buffers, and memoryviews, including any view backed by a buffer larger than 65,536 bytes), sets, frozensets, or deques with more than 65,536 items in review extension data skip `on_poll` snapshot delivery even with time remaining, and snapshot copy errors on unsupported mutable values propagate before `on_poll` runs. Callbacks must return promptly even when they return an awaitable, because the polling deadline cannot interrupt the invocation. Return-validation errors and inline failures propagate and can prevent the waiter from returning a classified outcome (cancellation requested during callback invocation takes precedence over return validation). Failure propagation depends on the awaitable type and the polling deadline: already-done futures must be returned before the deadline to propagate (failures of already-done futures returned after expiry are detached and suppressed), coroutines propagate if their wrapper task completes before the deadline (timed at wrapper completion rather than when the waiter retrieves them, except for wrappers cancelled before their first step which are timed when their done callback runs), and pending future failures propagate only if their done callback executes before the deadline expires (cutting off at done-callback execution and allowing any classified outcome to be returned). When the deadline expires or when the wait is cancelled, unstarted coroutines returned by `on_poll` are closed without entering their body (a wrapper task may already have been scheduled; cancelling the waiter through an underlying pending future can leave unresumed tasks unflagged until resumption unless observed through the pending future), while already-running callback tasks and pending futures are detached without cancellation and may continue running (detached callback coroutines suppress late SystemExit and KeyboardInterrupt signals; waiter cancellation propagates without cancelling detached callback work).

`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, and its outcome is `INCOMPLETE` whatever the review's own status (unless a callback exception, callback return-validation error, snapshot copy error, waiter cancellation during inline callback invocation, or waiter cancellation while callback work is pending propagates), 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

Expand Down
Loading