fix: count old open mirror issues for issue spam multiplier#930
Conversation
173074e to
097f26e
Compare
|
Still debating on merging this — putting a pin in it. |
|
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 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. |
|
|
anderdc
left a comment
There was a problem hiding this comment.
das-github-mirror's since-omitted issues endpoint is now in prod (entrius/das-github-mirror#27). When the issues request omits since, the response is all currently-OPEN issues across mirror-tracked repos, no CLOSED rows. That makes both compatibility paths in this PR obsolete — drop them and call the endpoint with no since directly.
Specifics:
gittensor/utils/mirror/models.py— remove theopen_issue_countfield onMirrorIssuesResponseand its parsing block. It won't be served; the no-sincerequest shape replaced it.gittensor/validator/issue_discovery/mirror_scan.py— replace_resolve_current_open_issue_countwith a singleclient.get_miner_issues(github_id)call (nosince). The result is_count_open_issues(current_response.issues, enabled_names). Drop_OPEN_ISSUE_COUNT_SINCE, theopen_issue_count is not Noneshort-circuit, and theMirrorRequestErrorfallback to the bounded response — a failed open-count fetch should take the samefetch_errors += 1; continuepath the scoring fetch already uses, not silently fall back to the wrong signal.tests/utils/test_mirror_models.py— drop the twoopen_issue_counttests.tests/validator/issue_discovery/test_mirror_scan.py— deletetest_open_issue_count_field_avoids_second_fetch. Keeptest_old_open_issues_outside_scoring_window_still_trip_spambut assert the secondget_miner_issuescall passessince=None(or nosincekwarg), not_OPEN_ISSUE_COUNT_SINCE.
Also rebase on test to clear the conflict.
b6f336d to
d8f8478
Compare
d8f8478 to
6327c35
Compare
Summary
Splits mirror issue-discovery scoring from open-issue spam counting.
The scoring path still uses the lookback-bounded mirror
/issuesresponse, buttotal_open_issuesis now resolved independently so older still-open issues count towardcalculate_open_issue_spam_multiplier().This also adds support for a future mirror
open_issue_countresponse 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
Testing
Commands run:
Checklist