Skip to content

fix: count ALL open issues for spam multiplier instead of lookback-bounded subset (#929)#1174

Closed
alpurkan17 wants to merge 1 commit into
entrius:testfrom
alpurkan17:fix/929-open-issue-spam-count-v2
Closed

fix: count ALL open issues for spam multiplier instead of lookback-bounded subset (#929)#1174
alpurkan17 wants to merge 1 commit into
entrius:testfrom
alpurkan17:fix/929-open-issue-spam-count-v2

Conversation

@alpurkan17
Copy link
Copy Markdown
Contributor

Summary

Mirror issue discovery currently uses the same lookback-bounded get_miner_issues(since=lookback_date) response for both scoring (correct) and counting open issues for the spam multiplier (incorrect). Open issues created before PR_LOOKBACK_DAYS are omitted from total_open_issues and never trigger the open-issue spam gate.

This fix adds a second get_miner_issues call without the lookback window, then counts OPEN issues across mirror-enabled repos from that full response. The scoring path still uses the lookback-bounded list unchanged.

If the unfiltered fetch fails, the lookback-bounded count is used as a fallback approximation (previous behavior).

Validation

  • total_open is derived from get_miner_issues(github_id) (no since) — counts ALL open issues
  • total_open falls back to lookback-bounded count if the unfiltered fetch raises MirrorRequestError
  • Scoring still uses the lookback-bounded filtered list
  • ruff check + ruff format pass

Closes #929

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 12, 2026
@anderdc
Copy link
Copy Markdown
Collaborator

anderdc commented May 12, 2026

Duplicate of #930 which is better scoped. Closing.

@anderdc anderdc closed this May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Mirror issue-discovery spam count ignores open issues older than lookback window

2 participants