test(engine): cover reviewer-consensus-calibration under root vitest - #8374
Conversation
…SONbored#8349) The engine package already had a full node:test suite for this module, but Codecov's codecov/patch gate only reads root vitest coverage — so the package's largest branch surface (~128 branches) reported ~0% despite real tests one directory over. Mirror every existing scenario (plus remaining branch edges) into test/unit/ so the file reaches 100% line/branch coverage under npm run test:coverage. No source changes.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-24 11:08:00 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://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.
|
|
LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-tests-merge)). 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. |
What
packages/loopover-engine/src/reviewer-consensus-calibration.ts(658 lines, ~128 branches) already had a full, passingnode:testsuite one directory over — but Codecov'scodecov/patchgate only reads root vitest coverage, so the package's largest branch surface reported ~0% despite real tests. Same blind-spot class as #6250.Changes
test/unit/reviewer-consensus-calibration.test.ts(vitest), importing the four public APIs from the engine barrel — matching thetest/unit/calibration-dashboard.test.tspattern.packages/loopover-engine/test/reviewer-consensus-calibration.test.ts, plus remaining branch edges (normalizeOptionalWeightnon-number/non-string, vote/dimension aliases, sanitize malformed rows, empty-dimensions render path, etc.) so the module hits 100% statements/branches/functions/lines undernpm run test:coverage.packages/loopover-engine/src/**orpackages/loopover-engine/test/**.Closes
Closes #8349
Verification
npx vitest run test/unit/reviewer-consensus-calibration.test.ts— 23 passednpx vitest run --coverage --pool=forks test/unit/reviewer-consensus-calibration.test.ts --coverage.include=packages/loopover-engine/src/reviewer-consensus-calibration.ts— 100% stmts/branches/funcs/lines