Repository navigation
Description
Problem or Motivation
The Service sends GitHub requests that cannot succeed, and they use part of its hourly budget of 500 requests (service.github_requests_per_hour). The metrics row asks four traffic endpoints (views, clones, referrers, popular paths) for each repository in every round. All four answer HTTP 403 "Resource not accessible by integration". The Service log shows the warnings on every round for every repository, for example "Failed to query traffic views for dan-petty/devops-cli".
Measured on 2026-10-30 from sum by (repo, row) (increase(devops_cli_github_requests_total{job="roadmap-service"}[1h])):
- The
metricsrow sent about 111 requests fordan-petty/devops-cliand 20 to 25 for each of the six other repositories. That is about 240 of about 420 requests, around 58 percent of the budget. - Four failing calls for each of seven repositories, in 4 rounds an hour (the row runs every 15 minutes), is about 110 requests an hour, around a fifth of the budget.
The budget is full: the Service log says "The Service sent 500 GitHub requests in the last hour, and its budget is 500: no round starts until the window has room." The model-lane rows (refine, stage, implement, alternatives) wait for that room. A user who asked for an implement round with implement: retry saw no Job in 33 minutes.
The 403 follows from #2473, which narrows each installation token to issues, pull requests, contents (write) and checks, actions, metadata (read). The traffic endpoints need a permission that the token no longer has. The row asks for more than its token holds.
Proposed Solution & Architectural Design
- The
metricsrow stops calling the four traffic endpoints in the Service. A workstation run (devopswith a person's login) keeps them. The row's report says that the Service does not collect them, and the dashboards that read them show "no data" for the Service. - The other option is to give the
metricsrow its own token with the extra permission, as feat(security): the App's installation tokens carry only the permissions the roadmap jobs use #2473 describes ("a later feature asks for its own token"). That adds a permission to the App and is the owner's decision, so this item does not choose it. The Service stops the calls that fail now. - A request that GitHub answered with 403 "not accessible by integration" once for a repository and endpoint is not sent again until the Service restarts. This is a guard against the next endpoint that the token does not cover.
Target Subsystem
src/devops_cli/github/metrics.py, src/devops_cli/roadmap/run.py (the metrics adapter), src/devops_cli/telemetry/.
Existing Tool Considered
The GitHub REST documentation for the traffic endpoints (they need push access, and for an App the Administration permission) and the installation token permissions of ADR 0015. Nothing is built but the skip.
Acceptance criteria
- With GitHub faked at the HTTP edge, a Service round of the
metricsrow sends no request to a traffic endpoint, and a run from a workstation still does. - A second 403 of the same kind for the same repository and endpoint is not sent in the same Service process.
increase(devops_cli_github_requests_total{row="metrics"}[1h])for the seven repositories falls by about 110.uv run devops cipasses, anddevops docs generate --sync-readmeis run.
Activity
dan-petty commentedon Oct 30, 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.(telemetry)scope of the title gives the scope.The failed calls consume about 58 percent of the Service budget and block model-lane rounds for over 30 minutes.Removing the calls unblocks all other Service rows and restores the full hourly budget to productive work.The change is limited to one adapter path in metrics.py plus a 403 guard, with a clear Service-versus-workstation split.Stop the Service's metrics row from calling the four traffic endpoints (views, clones, referrers, popular paths) that the scoped token cannot access, so the ~110 failed requests per hour no longer consume the 500-request budget.as the change that both ask for.Both items ask the Service to stop sending the four traffic-endpoint requests that the scoped token cannot read, freeing the same ~110 budget slots per hour.A person closes one of the two if that is so.chore(main): release 0.22.1 (#2765)