Skip to content

fix(backfill): Monolithic backfill stores PR-inclusive count as openIssuesCount - #177

Closed
glorysr1209-png wants to merge 5 commits into
JSONbored:mainfrom
glorysr1209-png:fix/backfill-open-issues-count
Closed

fix(backfill): Monolithic backfill stores PR-inclusive count as openIssuesCount#177
glorysr1209-png wants to merge 5 commits into
JSONbored:mainfrom
glorysr1209-png:fix/backfill-open-issues-count

Conversation

@glorysr1209-png

Copy link
Copy Markdown

Summary

Closes #176.

Use filtered issue count (exclude PR-shaped /issues rows) for openIssuesCount and backfill return payload.

Changes

  • src/github/backfill.ts: openIssueCount = issues.length after PR filter.

Test plan

  • npm test -- backfill.test.ts
  • Manual: backfill repo with mixed /issues page; openIssues matches true open issues only.

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glorysr1209-png the direction makes sense, but this needs tests and a full CI run before I can take it.

A few notes:

  • Filtering /issues results before storing openIssuesCount is the right idea. GitHub’s REST issues endpoint includes pull requests, so using the raw fetched count can overstate issue totals.
  • This only changes the count assignment; it does not add a regression test proving PR-shaped issue rows are excluded from repo_sync_state, snapshots, and the returned backfill result.
  • I also do not see the normal CI validate check on this PR yet, so it is not mergeable even if the patch is small.

Required changes:

  • Add a focused regression test where the REST issues page contains both real issues and PR-shaped entries.
  • Assert openIssuesCount stores only real issues while openPullRequestsCount still comes from the PR endpoint.
  • Get the normal validate workflow green.

Validation expected:

  • npm run typecheck
  • npm run test:coverage

@JSONbored JSONbored added the bug label Jun 1, 2026
@JSONbored JSONbored changed the title [Bug]: Monolithic backfill stores PR-inclusive count as openIssuesCount fix(backfill): Monolithic backfill stores PR-inclusive count as openIssuesCount Jun 3, 2026
@JSONbored
JSONbored self-requested a review June 3, 2026 22:17

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glorysr1209-png this is still blocked by CI.

A few notes:

  • The open issue count bug is in the right backfill area.
  • Current validate fails test/unit/backfill.test.ts: expected openIssues: 201, received 1.
  • The PR body also needs current validation/safety evidence.

Required changes:

  • Fix the failing backfill assertion without weakening the intended behavior.
  • Update the PR body to the current template.

Validation expected:

  • Focused test/unit/backfill.test.ts
  • Full validate pipeline

@JSONbored

Copy link
Copy Markdown
Owner

This is stale, closing - please resubmit with all issues addressed.

@JSONbored JSONbored closed this Jun 4, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 4, 2026
@JSONbored JSONbored added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

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

2 participants