[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
- Backfill a repo where the issues page includes open PRs alongside issues.
- 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.
[Bug]: Monolithic backfill stores PR-inclusive count as
openIssuesCountDescription
backfillRepository()paginates/issues, which returns both issues and pull requests. The sync state usedissuePage.fetchedCount(raw page size) foropenIssuesCountinstead of filtering outpull_requestentries.That inflates open-issue metrics and breaks downstream logic that compares observed issue counts to required segments (
supplementUnderCountIfNeeded/expectedForRequiredSegment).Steps to reproduce
openIssuesCountto GitHub's open issue count.Expected behavior
openIssuesCountand snapshotopenIssuesuseissues.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.