You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Share One Bounded Backoff Loop Between pr_review.py wait's Two Polls #2723
scripts/pr_review.py wait carries two inline copies of one bounded backoff loop. The Copilot review poll and the held-head check poll (added for #2685) each index delays[min(i, len(delays) - 1)], check time.monotonic() - start against --timeout, sleep, then re-read. A later fix to the timeout check, the delay schedule, or the overshoot past --timeout (up to one 120-second delay) has to be applied to both sites, and one copy is easy to miss.
Done looks like
One helper owns the backoff loop, taking the read to repeat and the condition to keep polling on, and both wait sites call it.
The Copilot poll keeps its current stop conditions, including the --ignore-quota-signal path that forces done false before the loop starts.
The existing wait tests pass unchanged, and a test pins the helper's timeout and delay schedule once.
Also in scope: the held-head check poll reads the full Q_FULL document on every iteration, though the loop needs only the reviews, comments, review requests, state, merge state, and rollup that holds, local_cover, unrecognized_shapes, and held_checks_open read. Review threads and the files window are needed only by the final digest. A narrower poll document with Q_FULL kept for the final read would cut each iteration's cost. Raised in local review on #2722.
Activity
ptr727 commentedon Oct 10, 2026
Also in scope: the held-head check poll reads the full
Q_FULLdocument on every iteration, though the loop needs only the reviews, comments, review requests, state, merge state, and rollup thatholds,local_cover,unrecognized_shapes, andheld_checks_openread. Review threads and the files window are needed only by the final digest. A narrower poll document withQ_FULLkept for the final read would cut each iteration's cost. Raised in local review on #2722.Poll an Attested Head's Checks in pr_review.py wait (#2722)
Share One Bounded Backoff Loop Between pr_review.py wait's Two Polls (#…