Repository navigation
fix(service): count each GitHub request with its HTTP status - #3686
Conversation
Plan the first slice of #3497: a status label on the request counter and DEBUG pace lines.
The request counter names the status of each answer, so a 304 is told from a 200. Each paced attempt of the session counts after its answer, and a gh command or an attempt with no answer counts with status none. The two pace lines of the rate limiter log at DEBUG.
The first slice of #3497 is live: the request counter names the HTTP status, and the pace lines log at DEBUG. The later slices stay open.
This reverts commit 1e01066b01fd53b366d2942420ab9401baa170a2.
The token of a GitHub App is minted when it is read, so the read waits until the request has its turn on the ledger. A refused mint still counts the paced attempt, with status none, and the refusal reaches the caller. The count of a 304 keeps its one sample.
The docstrings of the request counter, the session pacing and the tests now say what the status label holds. The description of devops_cli_github_requests_total and docs/TELEMETRY.md say that the status is none for a gh command or for an attempt with no answer.
The session sends a lost GET again (#3506). The count of the request status holds for each attempt of that loop. The Service guide names the status label.
|
Results of the local runs. Fail-to-pass. Full gate. After that run. origin/main moved by 4 commits, and #3680 conflicted in Moved criteria. #3667 holds criteria 2, 3, 4 and 10. #3670 holds criterion 6. #3671 holds criterion 7. #3672 holds criterion 8. The live sum query against the baseline of 39248 is in #3667, so this change does not measure it. |
🤖 I have created a release *beep* *boop* --- ## [0.63.0](v0.62.7...v0.63.0) (2026-11-05) ### Features * **roadmap:** let a negative search verify check more than one name ([#3678](#3678)) ([5a4364c](5a4364c)) * **telemetry:** count the tool calls of the stage planner by outcome ([#3679](#3679)) ([45da6dd](45da6dd)) ### Bug Fixes * **ci:** count tests and specs as hardening guardrails ([#3684](#3684)) ([1d75506](1d75506)) * **security:** mask the user name of a URL with no password ([#3676](#3676)) ([bc1cd9c](bc1cd9c)) * **service:** count each GitHub request with its HTTP status ([#3686](#3686)) ([b39dcba](b39dcba)) * **telemetry:** Service counters read true across pods and repos ([#3680](#3680)) ([05544ab](05544ab)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
The Service spends most of its GitHub budget on reads, and the request counter does not show whether an answer is a 304 or a 200. So the share of answers that find no change is not known. The rate limiter also logs its pace lines at INFO, and these lines wrote 53.6% of a log sample.
Each paced attempt now counts once, and its status label holds the HTTP status of the answer. An attempt with no answer and a gh command count with status none. The counter keeps its name and its total. The two pace lines log at DEBUG. The limiter keeps the charge of a 304, because no measure shows that GitHub does not count it.
This delivers criteria 1, 5 and 9 of the issue. The other criteria moved to #3667, #3670, #3671 and #3672.
Closes #3497
Change:
openspec/changes/archive/2026-11-05-3497-cut-unchanged-github-reads/