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
fix(github): pace mutations through the clock seam #4666
src/devops_cli/github/rate_limiter.py:1103 calls time.sleep directly for mutation pacing, so ClockFake cannot answer it. An audit hook recorded 4.28 s of real sleep in 21 calls in tests/commands/test_pr_status.py. It recorded about 88 s in the pr and gh command tests (measured): test_pr_cmd 37.9 s, test_pr_update 21.0 s, test_pr_title_labels 12.4 s, test_gh_cmd 7.2 s, test_pr_form_check 4.5 s and test_pr_status 4.3 s. No open issue covers it.
Saving: About 88 s of worker time (measured), which is 5-10 s per shard (estimated).
Found by the CI and test audit of 2026-11-11. The account runs at most 20 hosted jobs at one time (measured), so each job that does no work makes the queue of each pull request longer.
Proposed Solution & Architectural Design
Call devops_cli.core.clock.sleep at rate_limiter.py:1103.
The existing clock seam devops_cli.core.clock and the shared ClockFake (tests/support/fakes/clock.py). No new tool. Cost: about 5,000 tokens and 30 minutes.
Acceptance Criteria
An audit hook records 0 real sleep in tests/commands/test_pr_*.py and tests/commands/test_gh_cmd.py.
The pacing test proves the wait length through ClockFake.
The first acceptance criterion of this issue is not fully met after #5063. Two tests in tests/commands/test_pr_update.py still sleep 6.2 s for real in total. The PR did not change that file, because the deletion of devops pr update changes it now. #4669 records the two tests, their measured times and the fix: #4669 (comment)
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(github)scope of the title gives the scope.Saves about 88 s of CI time but does not block releases or affect users.Reduces CI wall-clock time by about 88 s per full test run.One call-site change from time.sleep to devops_cli.core.clock.sleep plus one test assertion.Both make tests avoid real-time waits, but #1320 is the umbrella for all clock fakes while this fixes one specific sleep call in rate_limiter.py.dan-petty commentedon Nov 12, 2026
The first acceptance criterion of this issue is not fully met after #5063. Two tests in
tests/commands/test_pr_update.pystill sleep 6.2 s for real in total. The PR did not change that file, because the deletion ofdevops pr updatechanges it now. #4669 records the two tests, their measured times and the fix: #4669 (comment)devops-cli-service commentedon Nov 12, 2026
Released in v0.119.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.119.0
devops-cli-service commentedon Nov 12, 2026
Live since 2026-11-12 15:46 UTC