Skip to content

Retry reviews after GitHub request capacity recovers - #5

Merged
dkropachev merged 8 commits into
mainfrom
fix/github-budget-review-retry
Oct 26, 2026
Merged

dkropachev merged 8 commits into
mainfrom
fix/github-budget-review-retry

Conversation

@dkropachev

@dkropachev dkropachev commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Issue

#4: GitHub request-budget exhaustion fails an accepted review before an agent session starts. Successful synchronization does not recover the run, and an automatic-review claim prevents a replacement.

Fix

Keep accepted launches waiting for GitHub with a saved retry deadline. Retry source verification on the normal background cadence and after restart, while preserving the existing run and automatic-review claim. Recheck the current PR head, lifecycle and review policy before starting an agent; cancellation stops the pending retry.

Recover saved pre-agent PR-review failures with the known budget or rate-limit error, while leaving agent execution failures and uncertain publication untouched. Show the waiting reason and retry time in the dashboard, with a cancel action.

This PR targets the development branch from #3, which contains the affected implementation. It does not merge that larger port into main.

Extend PR checks to target sync/local-development as well as main, while keeping push checks limited to main. This gives the focused development-branch fix a checked merge path.

Fixes #4

Decisions

  • Choice: Run CI for pull requests targeting main or sync/local-development. Keep push-triggered CI limited to main. This lets the focused fix PR be checked before merging into the development branch.

@dkropachev
dkropachev force-pushed the fix/github-budget-review-retry branch 3 times, most recently from e881bf4 to 7669de6 Compare October 25, 2026 21:49
@dkropachev
dkropachev force-pushed the sync/local-development branch 2 times, most recently from 8d8978b to 84223ac Compare October 26, 2026 21:33
Keep source verification deferred with its retry deadline instead of clearing
accepted launch intent. Retry the same run after capacity returns, rechecking
its current target and policy without duplicating automatic review claims.

Expose waiting and cancellation in the dashboard, and conservatively recover
saved pre-agent budget failures. Retain ordinary failures and stop authority.

Fixes #4
A rewritten branch can leave the push event predecessor outside the
checkout even with full history. Fetch its exact SHA from origin before
validating the comparison, preserving strict head and commit checks.

Cover missing orphaned push and PR bases with a real temporary remote,
including unavailable, invalid and wrong-head failures without a fallback.
Regenerate specification receipts for the exact previous-head comparison.
A withdrawn and renewed request must not give an older deferred review
permission to start. Validate the current request episode against its saved
claim, and serialize fresh automatic acceptance with deferred retry so both
accepted reviews can eventually run without overlapping agents.

Use the retained source head independently of a custom checkout base and
keep legacy head pins intact. Omit unused retained launch payloads from
periodic polling, reread due candidates in full, and bound regression-test
joins so launch and shutdown failures surface promptly.
Run PR verification for main and sync/local-development while retaining
main-only push and manual checks and main-push-only release eligibility.
Keep the reviewed GitHub retry fix on its authorized development target.

Align the existing routing assertion and maintained CI contract with the
approved branch list. Reconcile the complete PR against the advanced target,
including the deferred UI behavior and preserved retry and claim safeguards.
Retain accepted retry origin through source and workspace preparation so
shutdown cannot turn stale repository polling into a permanent failure.
Durably stop retry intent before provider creation; uncertain startup
remains stopped instead of recreating a potentially accepted session.

Reject occupied automatic retries from compact records before decoding
their saved bundles, while rereading admitted launches in full. Preserve
explicit review intent and the existing limits on legacy recovery.
Restore a durable restart explanation when pre-provider launch preparation
returns to deferred admission. Keep the accepted deadline while capacity
or paused policy delays startup, and leave normal startup error clearing
unchanged.

Extend the real manager restart regression to check the waiting reason
and deadline through tracking before the same accepted run starts once.
Recognize missing review intent from the complete retained historical
prompt format. Persist verified intent with the deferred migration so
live head and author checks still apply after review defaults change.

Reuse the unchanged review and authority suffix writers. Preserve saved
permissions, including generic workspace-write reviews; leave unmatched
overrides and uncertain executions stopped.
Persist cancellation intent and capture the original client and turn under
the manager/session locks, then release both locks before provider I/O.
A slow interrupt can no longer stall unrelated work or retry admission.
Captured targets keep delayed requests tied to the original session.

Correct the reconciliation review to describe additive retry-time and
deferred-status projections. Regenerate the records from successful
verification.
@dkropachev
dkropachev changed the base branch from sync/local-development to main October 26, 2026 22:04
@dkropachev
dkropachev force-pushed the fix/github-budget-review-retry branch from fd4a170 to f41cc54 Compare October 26, 2026 22:04
@dkropachev
dkropachev merged commit 53c80d8 into main Oct 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PR review remains failed after temporary GitHub budget exhaustion

1 participant