Skip to content

fix(github): the label taxonomy metrics count every open issue across all pages and no pull requests #1541

Closed

Description

@dan-petty

Found by the roadmap Service recompute audit requested by the owner on 2026-10-10 (#1539).

Problem

Checked at release/v0.2.33.

  • get_label_taxonomy_metrics (src/devops_cli/github/metrics.py:363-392) counts open issues by taxonomy label from one request: repos/{repo}/issues?state=open&per_page=100 with no pagination (src/devops_cli/github/metrics.py:366-368).
  • This repository has about 295 open issues, so the label gauges count only the first 100.
  • The REST issues endpoint also returns pull requests, so open pull requests with type/* or scope/* labels are counted as issues.

Proposed design

  • Read every page with the client's existing pagination: GhCliClient.api(endpoint, paginate=True) (src/devops_cli/github/client.py:414) parsed by parse_paginated_json (src/devops_cli/github/client.py:282), and skip entries that have a pull_request key.

Acceptance criteria

  • A test with the shared GitHub fake returning 250 open issues over three pages, plus two pull requests with labels, counts 250 issues and no pull request (tests/test_github_metrics.py).
  • The metrics job's dry run still makes zero requests.

Feasibility

Fits one pull request: one function and its test.

Activity

  1. added
    type/bug
    scope/telemetry
    scope/github
    source/agent
    on Oct 10, 2026
  2. dan-petty-bot commented on Oct 10, 2026

    @dan-petty-bot
    Collaborator

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Priority: P2-Medium. Inaccurate label-taxonomy gauges mislead roadmap decisions but do not crash the service or expose data, so it is important but not urgent.
    • Value: Medium. Roadmap and release-planning decisions rely on these gauges, so wrong counts have real operational impact, yet the tool still functions.
    • Effort: Low. The fix is one function change to enable pagination and skip pull_request entries, plus one test, as the candidate notes it fits a single pull request.
  3. dan-petty commented on Oct 24, 2026

    @dan-petty
    OwnerAuthor

    Not a duplicate of #931 (owner decision, 2026-10-24): #931 asked that the project metrics read every page and fail closed, and was closed as not planned on 2026-10-03; this item is the label taxonomy metrics, a different counter, which must count every open issue across all pages and no pull requests. It stays open as a P2 bug. GitHub refused to add it to the board (addProjectV2ItemById: "Something went wrong"), the same GitHub-side failure as #1324, #1344 and #1549.

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

    scope/githubscope/telemetrysource/agenttype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions