Skip to content

fix(github): eliminate bare gh invocations, error masking, and inaccurate quota defaults #237

Closed

Description

@dan-petty

Problem Statement

  1. Quota extraction in _extract_rate_limit_endpoint_response defaulted reset_epoch to 0.0 when missing, and devops gh rate-limit defaulted limits and remaining counts to 5000/0 on failure or missing keys, masking true quota exhaustion.
  2. get_remote_branch_protection and _apply_remote_protection in branch_protection.py suppressed errors and returned None or False on non-404 API failures, treating rate limits and permission errors as unconfigured branches.
  3. Release PR creation in commands/release.py used bare run_subprocess instead of rate-managed run_gh.
  4. Ambient GitHub token injection was not applied in run_subprocess_async for CONST_GH_CLI.

Proposed Changes

  • Prevent defaulting reset_epoch to 0.0 in _extract_rate_limit_endpoint_response and raise GitHubRateLimitError on malformed API responses.
  • Propagate GitHubOperationError in branch_protection.py when API requests fail, only treating HTTP 404 / branch not protected as unconfigured.
  • Route _execute_release_pr through run_gh using CONST_GH_CLI.
  • Centralize _inject_gh_credentials in core/process.py and call in both synchronous and asynchronous subprocess executions.
  • Eliminate fabricated 5000/0 defaults in devops gh rate-limit.

Activity

  1. added this to the v0.2.19 milestone on Sep 18, 2026
  2. added
    type/bug
    scope/github
    priority/p1-high
    on Sep 18, 2026
  3. added a commit that references this issue on Sep 18, 2026
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

    priority/p1-highscope/githubtype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions