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
Review Pass: wait until a pull request's head has been quiet before reviewing it #1974
A review --author <login>Pass takes a pull request as soon as its head is unreviewed, even if the author pushed it seconds ago and is still working. A Review session runs for 20 to 45 minutes, so an author who pushes again in that time makes the run fail at delivery with the branch moved during Review run. Its fixes are stranded (#1961), and the session's work is wasted.
Observed on 2026-11-10 (thirdshift 0.27.0, a private repository, one Review Pass every two minutes):
Time (UTC)
Event
17:08
Author commits head A
17:10
Review run starts on A
17:17
Author pushes B; the run later fails at delivery, and its fixes are stranded
18:46, 19:08
Author pushes twice more
19:14
The next Review run starts on the latest head, 6 minutes after it was pushed
An earlier run on another pull request failed the same way (pull request changed during Review run).
Proposed behavior (for triage to decide)
Treat a pull request's head as waiting only once it has been quiet for a while. This mirrors pickup.wait_minutes, which keeps an issue out of a Pickup run until 30 minutes after its latest shaping event (src/config.rs):
A new User config setting, review.wait_minutes (default to be decided, 0 disables). The Review Pass skips a pull request whose head was pushed less than that many minutes ago, and still takes a later eligible one.
review <PR URL> typed by hand ignores it, as pickup.wait_minutes is ignored for an Issue URL.
This prevents most #1961 cases. #1961 is still needed for the rest.
Decisions needed
What counts as the push time? The committer date can be older than the push. The timeline's head_ref_force_pushed and committed events, or the head's check-suite creation time, are closer.
Should marking a draft ready for review also restart the wait?
Confirmed against selected Base commit 6f4ba5d (thirdshift 0.28.0): Review Pass admission has no head-age check. src/github/review.rs:122 selects by author, eligibility, reviewed-head markers and stacked-base review status, then sorts by issue number. src/processes/review.rs:38 reserves and rechecks candidates before dispatch. A freshly pushed, unreviewed head can therefore start immediately.
src/processes/review/delivery.rs:228 refuses publication when the remote head differs from the captured head. The existing regression address_mode_reports_a_moved_head_but_stops_publication_after_base_or_eligibility_changes confirms that fixes remain unpublished after concurrent head movement. src/worktree/review_recovery.rs:309 requires a retained checkout's captured head to match the requested head. A quiet period can reduce starts during active push bursts; it cannot prevent later pushes or replace #1961 recovery.
The issue's Pickup analogy needs updating: src/config.rs:186 defaults pickup.wait_minutes to 5 minutes, not 30. src/config/review.rs currently supports only commands_by_repo and rejects unknown settings.
Recommended direction
Use branch activity as the primary push clock. GitHub's repository activity API supports branch filtering and returns timestamps with before/after SHAs. Read-only queries in this repository confirmed these fields for normal pushes and force pushes. Correlate the latest relevant activity with the current branch and head; account for pagination, branch creation, merges and rewinds.
After the Day shift settles the policies below, add review.wait_minutes as a nonnegative whole-minute duration, with 0 disabling waiting. Apply it to both addressing and recommendation-only author Passes; explicit PR URLs bypass it. Pass over settling candidates and continue to later eligible PRs. Recheck quietness for the actual captured head before starting a session: today's reservation recheck compares PR URLs, so adding an age check only to the initial listing would leave a selection race. Preserve Delivery's head checks and push lease.
Cover threshold boundaries, old commits pushed recently, normal/force pushes, absent activity, pagination, head changes during selection, later-candidate selection, disabled waiting, explicit-URL bypass and the chosen draft policy. Update config defaults/setup coverage, GLOSSARY.md, docs/guide.md and the hand-written site's Review Pass description; regenerate the manual.
Validation
cargo test --test review_pass -- --test-threads=3: 14 passed, 1 ignored fixture entry point. cargo test --test review_run address_mode_reports_a_moved_head_but_stops_publication_after_base_or_eligibility_changes -- --exact --test-threads=1: passed. scripts/affected-tests main: no changed files; no affected tests.
No duplicate quiet-period issue was found in open-issue searches. Keep #1961 retained-work recovery, #1962 conflict visibility, #1800 stale-start handling and #1965 Triage settling separate. Recommend ready-for-human for the remaining product decisions and proposed split, not for missing reporter evidence.
Questionnaire
For the Day shift deciding #1974: repository investigation confirms that Review Passes accept fresh unreviewed heads and that concurrent pushes prevent delivery. GitHub's branch activity API supplies a usable push clock. These decisions remain before implementation:
What should review.wait_minutes default to? Recommend 30 minutes as an initial policy, with 0 disabling waiting. This is a latency tradeoff, not an empirically established optimum; Pickup currently defaults to 5 minutes.
Should marking a draft ready for review restart the window even when its head is unchanged? Recommend yes, measuring from the later of head activity and readiness. This determines whether a long-lived draft can start immediately when published.
What should happen when matching branch activity is absent or unreadable? Recommend a durable first-observed-head timer for missing history, reset when the branch/head changes, and holding the candidate with a diagnostic on API errors. Approve this conservative fallback or choose a different policy; commit and check-suite dates cannot reliably establish push time.
Activity
JacobStephens2 commentedon Nov 11, 2026
Investigation summary
Confirmed against selected Base commit 6f4ba5d (thirdshift 0.28.0): Review Pass admission has no head-age check. src/github/review.rs:122 selects by author, eligibility, reviewed-head markers and stacked-base review status, then sorts by issue number. src/processes/review.rs:38 reserves and rechecks candidates before dispatch. A freshly pushed, unreviewed head can therefore start immediately.
src/processes/review/delivery.rs:228 refuses publication when the remote head differs from the captured head. The existing regression address_mode_reports_a_moved_head_but_stops_publication_after_base_or_eligibility_changes confirms that fixes remain unpublished after concurrent head movement. src/worktree/review_recovery.rs:309 requires a retained checkout's captured head to match the requested head. A quiet period can reduce starts during active push bursts; it cannot prevent later pushes or replace #1961 recovery.
The issue's Pickup analogy needs updating: src/config.rs:186 defaults pickup.wait_minutes to 5 minutes, not 30. src/config/review.rs currently supports only commands_by_repo and rejects unknown settings.
Recommended direction
Use branch activity as the primary push clock. GitHub's repository activity API supports branch filtering and returns timestamps with before/after SHAs. Read-only queries in this repository confirmed these fields for normal pushes and force pushes. Correlate the latest relevant activity with the current branch and head; account for pagination, branch creation, merges and rewinds.
Do not substitute commit dates: the timeline committed event has no documented push timestamp (event documentation). Check suites can be reused across branches (check-suite documentation), and GraphQL pushedDate is unsupported (Commit documentation).
After the Day shift settles the policies below, add review.wait_minutes as a nonnegative whole-minute duration, with 0 disabling waiting. Apply it to both addressing and recommendation-only author Passes; explicit PR URLs bypass it. Pass over settling candidates and continue to later eligible PRs. Recheck quietness for the actual captured head before starting a session: today's reservation recheck compares PR URLs, so adding an age check only to the initial listing would leave a selection race. Preserve Delivery's head checks and push lease.
Cover threshold boundaries, old commits pushed recently, normal/force pushes, absent activity, pagination, head changes during selection, later-candidate selection, disabled waiting, explicit-URL bypass and the chosen draft policy. Update config defaults/setup coverage, GLOSSARY.md, docs/guide.md and the hand-written site's Review Pass description; regenerate the manual.
Validation
cargo test --test review_pass -- --test-threads=3: 14 passed, 1 ignored fixture entry point. cargo test --test review_run address_mode_reports_a_moved_head_but_stops_publication_after_base_or_eligibility_changes -- --exact --test-threads=1: passed. scripts/affected-tests main: no changed files; no affected tests.
No duplicate quiet-period issue was found in open-issue searches. Keep #1961 retained-work recovery, #1962 conflict visibility, #1800 stale-start handling and #1965 Triage settling separate. Recommend ready-for-human for the remaining product decisions and proposed split, not for missing reporter evidence.
Questionnaire
For the Day shift deciding #1974: repository investigation confirms that Review Passes accept fresh unreviewed heads and that concurrent pushes prevent delivery. GitHub's branch activity API supplies a usable push clock. These decisions remain before implementation: