Skip to content

fix(git): a failed token mint fails clearly in App mode - #6673

Merged
dan-petty merged 4 commits into
mainfrom
fix/6671-token-mint-fails-clearly
Nov 21, 2026
Merged

dan-petty merged 4 commits into
mainfrom
fix/6671-token-mint-fails-clearly

Conversation

@dan-petty

@dan-petty dan-petty commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

When the process acts as the GitHub App and the mint fails, a git child that reaches a remote now fails at once with the mint's error, as a gh call does.

  • A refusal (HTTP 401, a suspended account, a key that cannot sign) stays GitHubUnauthenticatedError, and the Service halts.
  • A mint that GitHub does not answer (5xx or no connection) raises GitHubUnreadError, and a rate-limited mint raises GitHubRateLimitError. The round fails and the next round mints again. This also stops the halt that such a mint caused for a gh call.
  • When a renewal fails, the kept token serves until it expires.
  • A person's git child runs with no token, and the remote gives its own error.
  • A failed lookup is not kept. The 60 s window and DEFAULT_GH_AUTH_TOKEN_RETRY_SECONDS are removed.

Closes #6671

Change: openspec/changes/archive/2026-11-21-6671-token-mint-fails-clearly/

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/git Git commands, git configuration, and git credential handling labels Nov 21, 2026
When the process acts as the GitHub App and the mint fails, a git child
that reaches a remote raises GitHubUnauthenticatedError with the mint's
reason before it starts, as a gh call does. A person's git child runs
with no token, and the remote gives its own error. A lookup that finds
no token is not kept, so the next call looks again. The 60 second
window and DEFAULT_GH_AUTH_TOKEN_RETRY_SECONDS are removed.

Closes #6671
A mint that GitHub does not answer (5xx or no connection) raises
GitHubUnreadError, which the Service does not read as a refused
identity: the round fails and the next round mints again. A refusal
stays GitHubUnauthenticatedError. When a renewal fails, the kept
installation token serves until it expires.

Refs #6671
@dan-petty
dan-petty force-pushed the fix/6671-token-mint-fails-clearly branch from 57480d2 to 8dd7ff6 Compare November 21, 2026 19:49
Comment thread src/devops_cli/core/process.py Fixed
The mint returns the token and the reason together, so the warning
holds a fixed text only. The request metric keeps the mint's status.

Refs #6671
A rate-limited exchange (HTTP 429, a secondary limit, no quota) raises
GitHubRateLimitError with the App's login, as a 5xx raises
GitHubUnreadError. The kept token serves until it expires, and research
goes on with no token.

Refs #6671
@dan-petty
dan-petty marked this pull request as ready for review November 21, 2026 20:36
@dan-petty
dan-petty merged commit fd1b859 into main Nov 21, 2026
31 checks passed
@dan-petty
dan-petty deleted the fix/6671-token-mint-fails-clearly branch November 21, 2026 20:36
dan-petty pushed a commit that referenced this pull request Nov 21, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.189.0](v0.188.4...v0.189.0)
(2026-11-21)


### Features

* **roadmap:** run implement as prepare, agent and publish phases
([#6670](#6670))
([54de847](54de847)),
closes [#3702](#3702)


### Bug Fixes

* **git:** a failed token mint fails clearly in App mode
([#6673](#6673))
([fd1b859](fd1b859))
* **roadmap:** fix-conflict settles the version lines of uv.lock
([#6682](#6682))
([82ba605](82ba605)),
closes [#6623](#6623)

---
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/git Git commands, git configuration, and git credential handling type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(core): a failed token mint fails clearly in App mode

2 participants