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
Deduplicate pr_review.py wait's Liveness Triple and Its Back-to-Back Held Q_FULL Reads #2731
scripts/pr_review.py wait carries two duplications that predate #2723 and that its local review raised as out of that change's scope.
The liveness triple is computed in two places.main computes head_review_done(pr, a.min_rounds), answered_outside_review(pr), and reviewer_login_drift(pr) inline on its first Q_LIVE read, and the Copilot poll re-reads the same three each iteration (through live_state once Share One Bounded Backoff Loop Between pr_review.py wait's Two Polls #2723's change lands). A stop reading added to one site and not the other gives the first evaluation a different stop decision from every later one. A pure helper taking the payload and min_rounds, called by both main and live_state, closes that.
A held wait reads Q_FULL twice back to back.snapshot is a Q_FULL read, and the held branch then opens its poll on a second Q_FULL read with nothing written in between. Opening the poll on snapshot saves one GraphQL call per held wait. Several existing held-wait tests count reads, so they move with it.
Done looks like
One helper computes the liveness triple, and both sites call it.
A held wait opens its poll on snapshot rather than a fresh Q_FULL read, with the held-wait tests updated to the new read count.
Activity
Share One Bounded Backoff Loop Between pr_review.py wait's Two Polls (#…
Share pr_review.py wait's Liveness Readings and Open the Held Poll on…