Skip to content

Runs wait out GitHub's limits instead of failing; refused writes are never "no file" - #499

Merged
nambok merged 1 commit into
mainfrom
runs-wait-out-github-limits
Nov 6, 2026
Merged

nambok merged 1 commit into
mainfrom
runs-wait-out-github-limits

Conversation

@nambok

@nambok nambok commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

A ticket run hit GitHub's hourly limit: every write was refused, then the run failed saying the coder wrote no file and calling it CoderHelm's miss. Reviews on the same limit burned all their retries in minutes. Runs and reviews now wait for the reset and continue.

Changes

  • Rate limits, GitHub 5xx and dropped connections are read as a pause, never a failure (common github_wait)
  • The tool loop gives the model one clear wait message and ends the pass
  • Implement records refused versus rejected writes; the no-file check only fires when no write was attempted
  • Ticket runs requeue as the same run until the reset (hops of up to 900s, at most 8 waits), keeping checkpoint, plan and branch; waits do not count against the run guard
  • Feedback and CI-fix rounds wait the same way
  • Reviews wait for the reset without using an attempt; the gave-up note only comes from service errors
  • Runs carry github_wait text for the run page
  • Replay incident case r_github_limit

Verification

cargo fmt; clippy -D warnings for common, gateway, worker; cargo test: common 1501, gateway 748, worker 1352 passed, 0 failed.

…never "no file"

A fix round hit the installation's hourly GitHub limit: 29 writes and the
diff came back "403 rate limit exceeded", and the run ended "the coder wrote
no file ... That is CoderHelm's miss". The coder had written; GitHub refused.

- GitHub client: outside_wait() tells GitHub refusing for a while (rate
  limit, a 5xx, no answer) from a real answer; a per-installation record
  says when GitHub refuses requests right now. GitHubPaused carries when
  the run goes on.
- Tool loop: the first refused call gets "GitHub's rate limit is reached;
  the run will pause and continue at HH:MM UTC. Do not retry", later calls
  in the turn aren't run, and the pass ends with GitHubPaused.
- Implement: write calls GitHub refused or rejected are recorded; the
  follow-up rounds that swallowed errors pass a pause on.
- Empty-step check: refused writes (or an unreadable diff while GitHub
  refuses) are a wait; writes rejected for a real reason stop with that
  reason; only no write at all is "no write". An unread diff never says
  CoderHelm's miss.
- Ticket runs: a GitHub pause sends the run again as itself at the reset,
  in hops of at most 900s, saying "Waiting for GitHub's hourly limit to
  reset at HH:MM UTC; continues by itself" on the run page. The wait adds
  no step, no continuation, no model retry, and re-entering the pass it
  interrupted is not a new pass for the guard. Bounded by 8 waits, then a
  stop that names GitHub.
- Feedback and CI-fix rounds wait for GitHub the same way.
- Reviews: a rate limit waits for the reset without spending an attempt
  and never ends in the gave-up note.
- API: runs carry github_wait while waiting.
@nambok
nambok merged commit c3404a3 into main Nov 6, 2026
10 checks passed
@nambok
nambok deleted the runs-wait-out-github-limits branch November 6, 2026 22:26
coderhelm Bot pushed a commit that referenced this pull request Dec 3, 2026
Moves dashboardRef from 6593784 to 1002bc7, carrying CoderHelm/coderhelm #502, #514, #513, #527, #530, #531, #533, #529, #536, #535, #499 and #537.
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.

1 participant