Repository navigation
Description
Problem or Motivation
A gh command counts as one request with status 'none' (src/devops_cli/github/rate_limiter.py:1744-1746), and _calculate_effective_cost gives 1 or 2 and ignores --paginate (rate_limiter.py:1814-1820). A 'gh api ... --paginate' read of 400 open items reads 4 pages and counts 1. Status 'none' is 7,744 Service and 27,163 workstation attempts in 24 h, so the GitHub request panels undercount by a share that nobody can measure: no series holds the count that GitHub reports (X-RateLimit-Used). src holds 9 --paginate uses in 6 files.
Proposed Solution & Architectural Design
Move the paginated reads from gh subprocesses to the GitHub session transport (src/devops_cli/github/session_transport.py), which counts each HTTP attempt with its status and sends conditional requests (#3497). Leave the metrics row reads to #3941, which moves them and removes the second open-issue listing. Where a gh call must stay, say why in the pull request. The GitHub count of each resource comes from the rate-limit gauges of #4752. Leave the page count of the scoped intake read to #3670. #4626 changes the read timeout of the same session transport; build after it merges.
Target Subsystem
SDLC, Git & PR Governance (GitHub client and its telemetry).
Existing Tool Considered
The GitHub session transport of this repository (#3497) already counts each HTTP attempt. No new tool.
Acceptance Criteria
- A test: a paginated read of 4 pages through the GitHub fake adds 4 to devops_cli_github_requests_total.
- 'git grep -- --paginate src' returns only the callers that the pull request lists with a reason.
- After feat(github): record the rate limit of each response as gauges #4752 is live: for one hour of the Service, the counted core requests with status other than 304 are within 10 % of the last value of
devops_cli_github_rate_limit_usedfor core before the GitHub window reset.
Files
src/devops_cli/github/session_transport.pysrc/devops_cli/github/rate_limiter.pysrc/devops_cli/github/client.pysrc/devops_cli/commands/gh.pysrc/devops_cli/github/request_classifier.pytests/github/test_github_rate_limiter.py
Dependencies
Related
#3941 (the metrics row reads), #3670 (scoped intake pages).
Source: #4675
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.The undercount affects observability and rate-limit tracking but does not break functionality.Accurate per-page counting is needed for reliable rate-limit monitoring and capacity planning.Requires moving paginated reads to the session transport, updating the rate limiter, and adding a multi-page test across six files.Both work on the GitHub session transport and paginated reads, but #983 is the broader refactor that created the session transport while the candidate fixes the per-page counting that transport now performs.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
fix(github): a paginated devops gh api read sends per_page=100 (#5141)