Skip to content

fix: keep issue discovery scoring when open-count fetch fails#1254

Closed
Matsx901 wants to merge 1 commit into
entrius:testfrom
Matsx901:fix/1249-open-count-soft-fail
Closed

fix: keep issue discovery scoring when open-count fetch fails#1254
Matsx901 wants to merge 1 commit into
entrius:testfrom
Matsx901:fix/1249-open-count-soft-fail

Conversation

@Matsx901
Copy link
Copy Markdown

Summary

Closes #1249.

Issue discovery currently restores cached issue-discovery fields and skips a miner when the secondary open-issue count fetch fails, even if the primary lookback fetch already succeeded. This discards fresh solved-issue evidence because the open-count request is treated as a hard dependency.

This change keeps the successful scoring response and only falls back the open-count input.

Root Cause

run_issue_discovery() performs two mirror requests per miner:

  • lookback-bounded request for scoring data
  • current request for open-issue spam count

The second request failure path restored cached issue-discovery fields and continued, so fresh solved/valid-solved data from the first request was ignored.

Changes

  • Keep first-fetch failures as hard fallback to cached issue-discovery fields.
  • Treat second/open-count fetch failures as soft failures.
  • Use cached total_open_issues when available.
  • Fall back to counting open issues from the already-fetched lookback response when no cache is available.
  • Add regression coverage for cached and no-cache fallback paths.

Out of scope

  • No changes to issue eligibility rules.
  • No changes to open-issue spam multiplier thresholds.
  • No changes to solving PR scoring or cache-miss behavior.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other

Testing

uv run pytest tests/validator/issue_discovery/test_scan.py -q
uv run ruff check .
uv run ruff format --check .
uv run pyright
uv run pytest -q
git diff --check

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

anderdc commented May 13, 2026

Closing — see #1251 for the documented copying of @seroperson's vulture-integration branch (14 of 14 touched files a subset of the source PR, 12 byte-identical, and the linked issue body explicitly cites the source branch by name). With that on the public record, we can't extend the good-faith review this PR would otherwise need.

Closing.

@anderdc anderdc closed this May 13, 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] Issue-discovery drops fresh solved-issue data when the second get_miner_issues call fails (open-count fetch path)

2 participants