Repository navigation
Labels
effort/mediumEffort Mediumpriority/p2-mediumPriority P2: standard worksource/agentFiled by an agenttype/bugType bug: the code does not do what it mustvalue/mediumValue Medium
Description
Problem Description
A review of pull request #2515 (issue #2474) found these gaps on origin/main 6a5447a:
- The last rate limit of a request holds no other worker. The session sets the hold only in
retry_wait, andhandle_rate_limit_errorreturns before it callsretry_waitwhen the retries are spent (src/devops_cli/github/session_transport.py:263).run_ghreturns from_handle_attempt_backoffbeforelimiter.hold_requestswhenattempt >= max_retries(src/devops_cli/github/rate_limiter.py:1727). The refusal that fails the round withGitHubRateLimitErrortherefore holds nothing, and the other workers send requests at once, although GitHub asked forretry-afterseconds with no request. - No test fails when the call
limiter.hold_requests(backoff)inrun_gh's backoff is removed. The roadmap store sends the Service's own writes throughgh api. - No test fails when
devops serve --servicestops givingstate_dirtocreate_service_app. Then a restart clears the halt and the budget window again. - The rule comment above
RoadmapServiceIdentityRefusedink8s/monitoring/prometheus-values.yamlstill says that a refusal stops every round until the pod restarts. The alert description below it says that the halt stays after a restart. - The output string
ServeMessages.state_unreadableuses the contraction "can't". ASD-STE100 does not allow contractions.
Reproduction Steps
- Route three 403 answers with
retry-after: 60to one GitHub session request, and let each retry wait move the clock. - The request fails with
GitHubRateLimitErrorafter the waits[60, 60]. - Send a second request of the same identity. It waits about 0.24 s, not 60 s.
- For gh: call
_handle_attempt_backoffwith a secondary-limit stderr for attempts 0, 1 and 2 ofmax_retries=2. Attempt 2 returns False and does not extend the hold. - Remove
limiter.hold_requests(backoff)fromrate_limiter.py, orstate_dir=state_dir,fromserve.py.tests/test_github_rate_limiter.py,tests/test_service_limits.py,tests/test_roadmap_run.py,tests/test_server_service.pyandtests/test_github_session.pyall pass.
Expected vs Actual Behavior
Expected: every rate-limit answer holds every request of the identity until the wait that GitHub asks for ends, also when the request is not sent again. A test fails when the gh backoff or the serve wiring loses its part. The rule comment and the output string agree with the change and with ASD-STE100.
Actual: the last refusal holds nothing, and the two wiring mutations pass the tests.
Environment Diagnostics
origin/main 6a5447a, Python 3.14, gidgethub 6.0.0.
Source: #2515
Metadata
Metadata
Assignees
Labels
effort/mediumEffort Mediumpriority/p2-mediumPriority P2: standard worksource/agentFiled by an agenttype/bugType bug: the code does not do what it mustvalue/mediumValue Medium
Activity
dan-petty commentedon Oct 28, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
The primary change fixes a bug where the last rate-limit refusal does not hold other workers.The final refusal lets all workers fire at once, which can escalate GitHub throttling, but earlier refusals still hold correctly.It closes a gap in rate-limit protection that can cause a burst of requests against GitHub.The fix touches the hold logic, adds tests for two wiring paths, and corrects a comment and a string across several files.Both address service-wide rate-limit holds, but #2474 built the hold mechanism and the candidate fixes a gap where the final refusal does not extend the hold.fix(service): the last rate limit of a request holds every worker unt…
chore(main): release 0.11.2 (#2533)