Skip to content

fix(issue-discovery): merge fallback open counts#1381

Open
MkDev11 wants to merge 2 commits into
entrius:testfrom
MkDev11:fix/issue-discovery-open-count-fallback
Open

fix(issue-discovery): merge fallback open counts#1381
MkDev11 wants to merge 2 commits into
entrius:testfrom
MkDev11:fix/issue-discovery-open-count-fallback

Conversation

@MkDev11
Copy link
Copy Markdown
Contributor

@MkDev11 MkDev11 commented May 27, 2026

Summary

Fix issue-discovery fallback open counts when the secondary current/open-count fetch fails.

The fallback now starts from OPEN issues visible in the successful lookback payload, then overlays cached per-repo or single-repo top-level counts using the larger value. This keeps cached stale data useful without letting partial cache entries or cached/default zero values erase fresh open-issue evidence and bypass the open-issue spam multiplier.

Related Issues

N/A - no public issue filed for this follow-up.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (describe below)

Testing

  • Tests added/updated
  • Manually tested

Commands run:

./.venv/bin/pytest tests/validator/issue_discovery/test_scan.py -q -k 'open_count_fetch_error or OpenIssueSpamSourceIsMirror'
./.venv/bin/pytest tests/validator/issue_discovery/test_scan.py -q
./.venv/bin/ruff check gittensor/validator/issue_discovery/scan.py tests/validator/issue_discovery/test_scan.py
./.venv/bin/ruff format --check gittensor/validator/issue_discovery/scan.py tests/validator/issue_discovery/test_scan.py
git diff --check

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Changes are documented (if applicable)

@MkDev11 MkDev11 marked this pull request as ready for review May 27, 2026 23:49
@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 27, 2026
@MkDev11
Copy link
Copy Markdown
Contributor Author

MkDev11 commented May 29, 2026

@anderdc can you please review this PR?

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.

1 participant