Skip to content

fix: count old open mirror issues for issue spam multiplier#930

Open
MkDev11 wants to merge 7 commits intoentrius:testfrom
MkDev11:fix/929-mirror-issue-open-spam-count
Open

fix: count old open mirror issues for issue spam multiplier#930
MkDev11 wants to merge 7 commits intoentrius:testfrom
MkDev11:fix/929-mirror-issue-open-spam-count

Conversation

@MkDev11
Copy link
Copy Markdown
Contributor

@MkDev11 MkDev11 commented May 1, 2026

Summary

Splits mirror issue-discovery scoring from open-issue spam counting.

The scoring path still uses the lookback-bounded mirror /issues response, but total_open_issues is now resolved independently so older still-open issues count toward calculate_open_issue_spam_multiplier().

This also adds support for a future mirror open_issue_count response field. Until the mirror serves that field, the validator falls back to a separate all-time current-open issue fetch and filters it to mirror-enabled repos.

Related Issues

Fixes #929

Type of Change

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

Testing

  • Tests added/updated
  • Manually tested

Commands run:

uv run pytest tests/validator/issue_discovery/test_mirror_scan.py tests/utils/test_mirror_models.py tests/utils/test_mirror_client.py
uv run ruff check gittensor/utils/mirror/models.py gittensor/validator/issue_discovery/mirror_scan.py tests/validator/issue_discovery/test_mirror_scan.py tests/utils/test_mirror_models.py
uv run ruff format --check gittensor/utils/mirror/models.py gittensor/validator/issue_discovery/mirror_scan.py tests/validator/issue_discovery/test_mirror_scan.py tests/utils/test_mirror_models.py
uv run pyright
git diff --check

Checklist

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

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 1, 2026
@MkDev11 MkDev11 force-pushed the fix/929-mirror-issue-open-spam-count branch 2 times, most recently from c9dd095 to 173074e Compare May 1, 2026 21:57
@anderdc
Copy link
Copy Markdown
Collaborator

anderdc commented May 6, 2026

Still debating on merging this — putting a pin in it.

@MkDev11
Copy link
Copy Markdown
Contributor Author

MkDev11 commented May 6, 2026

thanks @anderdc , totally understand you.

My only push for merging is that this is the exact follow-up called out in #796: scoring should stay lookback-bounded, but the open-issue spam count should be current open issue load.

The PR keeps the scoring fetch unchanged. It only separates total_open_issues, prefers the future open_issue_count field when present, and falls back to current behavior if the extra count fetch fails.

If the concern is the temporary second mirror request, I can drop that fallback and only wire the future field, but that would leave #929 unfixed until the mirror serves it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked 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