Skip to content

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

Closed

Description

@dan-petty

Problem

After a failed token lookup or App mint, _session_github_token(retry_now=False) (src/devops_cli/core/process.py) gives each network git child no token for 60 s (DEFAULT_GH_AUTH_TOKEN_RETRY_SECONDS), with no error. A gh call in the same window raises GitHubUnauthenticatedError. So in App mode (runner Jobs and the Service), a failed mint shows as a git error on a private repository ("could not read Username"), not as the real cause.

Change

  • When devops-cli acts as the GitHub App, a failed lookup or mint fails at once with a clear error, for git children as for gh calls. The next round mints again.
  • On the person path, drop the 60 s window with no token: git runs with no token, so the remote gives its own error. A person with no gh login can still fetch a public repository, a Gitea remote or a file:// remote.
  • Add no retry loop, wait or cap.

Acceptance criteria

  • In App mode, a git child after a failed mint gets a clear error that names the failed mint.
  • On the person path with no gh login, a git fetch of a public repository works.

Decision

The owner approved this change on 2026-11-21 ("Proceed as recommended"), after an audit of the git use of devops-cli. It does not fix #5529, which is a delay on the GitHub side.

Source

Source: #5529

Activity

  1. added
    type/bug
    source/agent
    status/new
    value/medium
    on Nov 21, 2026
  2. added
    effort/low
    on Nov 21, 2026
  3. dan-petty commented on Nov 21, 2026

    @dan-petty
    OwnerAuthor
  4. added
    priority/p2-medium
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 21, 2026
  5. added 4 commits that reference this issue on Nov 21, 2026
    9671b3f
    8dd7ff6
    ab368c2
    b2c8655
  6. added
    status/in-review
    and removed
    status/in-progress
    on Nov 21, 2026
  7. removed
    status/in-review
    owner/agent
    on Nov 21, 2026
  8. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-21 21:03 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions