fix(engine): converge gate-verdict + finding-severity calibration onto reviewer-consensus's zero-weight + malformed-repo handling - #6251
Conversation
…o reviewer-consensus's zero-weight + malformed-repo handling
|
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 #6251 +/- ##
==========================================
+ Coverage 95.35% 95.60% +0.24%
==========================================
Files 598 598
Lines 47127 47127
Branches 14994 14994
==========================================
+ Hits 44940 45057 +117
+ Misses 1463 1288 -175
- Partials 724 782 +58
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-16 00:03:29 UTC
Review summary Nits — 5 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://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.
|
Summary
Converges the two older calibration modules onto the newest/correct
reviewer-consensus-calibration.tsin two ways it never got backported: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 -- matching reviewer-consensus.gate-verdict-calibration.ts): the rejected-row sanitizer usednormalizeRepoFullName(row.repoFullName)alone (returnsnullfor an already-rejectedinvalid_reporow -> drops it). It now usesnormalizeRepoFullName(...) ?? normalizeId(...)(matching the other two files), preserving the raw string.reviewer-consensus-calibration.tsis unchanged -- the reference for both fixes.Tests
node:testregressions inpackages/loopover-engine/test/gate-verdict-calibration.test.ts(zero-weight + invalid_repo-survives) and.../finding-severity-calibration.test.ts(zero-weight), mirroring reviewer-consensus's equivalents.test/unit/engine-calibration-convergence.test.ts) covers the changed engine-src branches forcodecov/patch(the calibration modules are otherwise onlynode:test-covered, which does not feed Codecov). It exercises both branches of each changedif (total <= 0)line (all-zero -> objective-only, and non-zero -> normalized) and all ternary/??legs of the malformed-repo line (valid / invalidbad/ non-string). Verified 100% branch coverage on the three changed lines locally.Validation
npm run typecheck;npm run test --workspace @loopover/engine(node:test, 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-- 4 passed.scripts/check-engine-parity.ts-- ok;git diff --checkclean; rebased onto latestmain.Safety
Closes #6170