fix(engine): align computeMinerGoalLaneFit's no-preference score with computeLaneFit - #9006
Conversation
… computeLaneFit computeMinerGoalLaneFit returned 1 for the "no preferredLabels configured" case while computeLaneFit's equivalent "no preference configured" rule returns the neutral 0.5, an unexplained 2x scoring divergence between the two lane-fit scorers. Align the label-only scorer to the same 0.5 neutral default and update its rank-score-dependent test fixtures accordingly.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9006 +/- ##
==========================================
+ Coverage 90.56% 93.87% +3.31%
==========================================
Files 96 807 +711
Lines 22490 80465 +57975
Branches 3884 24397 +20513
==========================================
+ Hits 20367 75537 +55170
- Misses 1945 3560 +1615
- Partials 178 1368 +1190
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-26 16:05:57 UTC
Review summary Nits — 1 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Closes #8870
computeMinerGoalLaneFit and computeLaneFit disagreed on what "no preference configured" should score: computeLaneFit's rule 2 returns the neutral 0.5 when neither wantedPaths nor preferredLabels is set, but computeMinerGoalLaneFit's label-only equivalent returned 1 for an unconfigured preferredLabels — a silent 2x divergence that skewed issue-ranking for autonomous targeting toward repos with no configured label preference at all.
Aligned computeMinerGoalLaneFit's no-preference branch to return 0.5 and added a doc comment cross-referencing computeLaneFit's rule so the two scorers stay in sync going forward. Updated the direct unit-test assertions in both
packages/loopover-engine/test/miner-goal-lane-fit.test.tsandtest/unit/miner-goal-lane-fit.test.tsto expect 0.5.This neutral-score change flows into
buildMetadataRankInput's composite rankScore, so two existing threshold-based tests (test/unit/metadata-min-score.test.ts,test/unit/metadata-top-min-score.test.ts) that relied on unconfigured-label candidates scoring a full 1 needed their fixed thresholds recalibrated from 0.1 to 0.05 — the filtered/ordered issue-number expectations are unchanged, only the threshold value that was tuned against the old (incorrect) neutral score.No UI files touched — this is a pure
src//test/scoring-logic change with no visible output, so no screenshot evidence applies.Validation
npx turbo run build --filter=@loopover/engine && npx turbo run build --filter=@loopover/mcp && npx turbo run build:tsc build:verify --filter=@loopover/miner— greennpx vitest run --changed=upstream/main --passWithNoTests— 110 files / 1754 tests passednpm test— 1177 files / 22009 tests passed (one pre-existing, unrelated environmental failure in check-ui-kit-package.test.ts, resolved by runningnpm run build --workspace @loopover/ui-kitfirst)Residuals
None — the issue's full scope (align the value, update tests, keep coverage on the changed branch) is covered in this PR.