fix(ranker): only flag default-goal-spec use when every ranked repo lacks one (#7226) - #7255
Conversation
|
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 #7255 +/- ##
=======================================
Coverage 93.81% 93.81%
=======================================
Files 704 704
Lines 69491 69491
Branches 18912 18912
=======================================
Hits 65195 65195
Misses 3302 3302
Partials 994 994
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-19 10:49:38 UTC
Review summary Nits — 2 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionNot yet addressed 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.
|
Summary
rankedUsesDefaultGoalSpec(opportunity-ranker.js) decided whether a ranked batch fell back to thebuilt-in default goal spec with
ranked.some(repo lacks a supplied spec)— so it returnedtruethemoment any ranked repo lacked a per-tenant spec, even when other repos in the same batch genuinely
had one supplied and applied.
discover-cli.jsthen printed the blanket note "ranked with the built-indefault goal spec (no per-tenant
.loopover-miner.ymlsupplied)" for the whole run, misreporting amixed batch as fully-default.
The note is only truthful when the entire batch fell back to the default, so this changes
.someto
.every:usedDefaultGoalSpecis nowtrueonly when every ranked repo lacks a supplied spec. Theexisting empty-batch guard (
ranked.length === 0 → specRepos.length === 0) is unchanged, so.every'svacuous-true case is never reached. All-default and all-supplied batches behave exactly as before; only
the mixed case is corrected.
Closes #7226
Scope
site//CNAME/lovable; no new dependency.Closes #7226).Validation
git diff --checknpm run typecheck(root — clean)npm run test:coverageon the changed module — 100% of the changed line + branches covered. Newregression: a two-repo batch where only
acme/widgetshas a supplied spec (andacme/gadgetsdoes not)now yields
usedDefaultGoalSpec: false; it wastruebefore the fix. Existing all-default (true) andall-supplied (
false) cases still pass unchanged.npm run build:miner(node --checkpasses).If any required check was skipped, explain why:
packages/loopover-miner/lib/**(one module + one test); CI runs the full suite.Safety