fix(engine): converge gate-verdict + finding-severity calibration onto reviewer-consensus's zero-weight + malformed-repo handling#6234
Conversation
…o reviewer-consensus's zero-weight + malformed-repo handling
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6234 +/- ##
==========================================
+ Coverage 95.35% 95.59% +0.23%
==========================================
Files 598 598
Lines 47102 47102
Branches 14988 14988
==========================================
+ Hits 44913 45026 +113
+ Misses 1464 1290 -174
- Partials 725 786 +61
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-15 23:39:47 UTC
Review summary Nits — 4 non-blocking
CI checks failing
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://gittensory.aethereal.dev/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.
|
|
LoopOver is closing this pull request on the maintainer's behalf (CI is failing (codecov/patch)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Summary
Three sibling calibration modules share a composite-scorer pattern, but the two older ones diverged from the newest/correct
reviewer-consensus-calibration.tsin two ways. This converges them:gate-verdict-calibration.ts,finding-severity-calibration.ts): both didif (total <= 0) return DEFAULT_COMPOSITE_WEIGHTS, silently restoring the 45/35/20 blend when a caller explicitly zeroes every component. They now return the explicit zeroed weights, so an all-zero config reaches the objective-only fallback in the composite scorer -- matching reviewer-consensus.gate-verdict-calibration.ts): the rejected-row sanitizer usednormalizeRepoFullName(row.repoFullName)alone, which returnsnullfor an already-rejectedinvalid_reporow and drops it. It now usesnormalizeRepoFullName(...) ?? normalizeId(...)(matching the other two files), preserving the raw string.reviewer-consensus-calibration.tsis unchanged -- it is the reference for both fixes.Tests
node:testregressions added topackages/loopover-engine/test/gate-verdict-calibration.test.ts(zero-weight + invalid_repo-survives) and.../finding-severity-calibration.test.ts(zero-weight), mirroring the equivalentsreviewer-consensus-calibration.test.tsalready has.test/unit/engine-calibration-convergence.test.ts) exercises the same changed branches. The calibration modules are otherwise onlynode:test-covered (which does not feed Codecov), so this vitest suite is what covers the changed engine-src lines forcodecov/patch-- including all three branches of the rewritten malformed-repo line (valid repo, invalidbad, non-string).Validation
npm run typecheck-- clean.npm run test --workspace @loopover/engine-- all node:test pass, incl. the 3 new fix(engine): backport reviewer-consensus-calibration.ts's zero-weight and malformed-repo handling to its two older siblings #6170 cases.npx vitest run test/unit/engine-calibration-convergence.test.ts-- 3 passed; asserts objective-only fallback ({objectiveAnchor:1,...}, score 0.4) andbadsurviving sanitization.scripts/check-engine-parity.ts-- ok;git diff --checkclean; rebased onto latestmain.Safety
Closes #6170