Skip to content

[Bug]: Monolithic backfill stores PR-inclusive count as openIssuesCount #176

Description

@glorysr1209-png

[Bug]: Monolithic backfill stores PR-inclusive count as openIssuesCount

Description

backfillRepository() paginates /issues, which returns both issues and pull requests. The sync state used issuePage.fetchedCount (raw page size) for openIssuesCount instead of filtering out pull_request entries.

That inflates open-issue metrics and breaks downstream logic that compares observed issue counts to required segments (supplementUnderCountIfNeeded / expectedForRequiredSegment).

Steps to reproduce

  1. Backfill a repo where the issues page includes open PRs alongside issues.
  2. Compare stored openIssuesCount to GitHub's open issue count.

Expected behavior

openIssuesCount and snapshot openIssues use issues.filter(i => !i.pull_request).length.

Actual behavior

PRs are counted as open issues.

Impact

Incorrect repo sync metrics and under/over-count compensation in the data spine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.gittensor:priorityMaintainer-selected Gittensor priority — scores a 1.5x multiplier.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions