fix: apply fixed_base_score repo override on issue-discovery cache-miss path (#1172)#1173
Conversation
a7ff4d6 to
aafebea
Compare
aafebea to
b418c4c
Compare
anderdc
left a comment
There was a problem hiding this comment.
Tighten the signature — the function only ever looks one repo up, so passing the whole dict is more than it needs.
Change _resolve_solving_pr_score to take repo_config: Optional[RepositoryConfig] (or just fixed_base_score: Optional[float]) instead of mirror_repos: Dict[str, RepositoryConfig]. The caller _score_miner_mirror_issues already resolves repo_config = mirror_repos.get(issue.repo_full_name) at scan.py:419 — hoist that lookup above the call and pass the resolved value. The override branch inside the function then just checks the passed-in config directly.
Behavior is correct as-is; this is purely a signature cleanup so the helper stops knowing about the full config map.
|
Fixed per review: hoisted |
e32b996 to
d9e94a1
Compare
|
Thank you for the review @anderdc! Glad to contribute. 🚀 |
Summary
PR #1115 introduced
RepositoryConfig.fixed_base_scoreto decouple PR base scoring from token math for configured repos. The override is applied correctly in OSS scoring (score_mirror_pr) but was missing on the issue-discovery cache-miss path (_resolve_solving_pr_score).On a cache miss (typical when the solver is a non-miner contributor), the solving PR's
base_scorewas computed purely from tokenized files, ignoringrepo_config.fixed_base_score. This meant two miners filing equivalent issues in the samefixed_base_scorerepo could receive different discovery base scores depending on whether their issue was solved by a registered miner (cache hit → override applied) or an outside contributor (cache miss → override skipped).This fix threads
mirror_reposinto_resolve_solving_pr_scoreand applies the samefixed_base_scoreoverride that OSS scoring uses, sodiscovery_base_scoreis consistent regardless of solver identity.Validation
mirror_repos(already available in the caller_score_miner_mirror_issues) is passed to_resolve_solving_pr_scoreas a new parameterrepo_config.fixed_base_scoreis applied if present (matchingscore_mirror_prat scoring.py L164–L167)Closes #1172