test(signals): cover buildReviewRiskExplanation's 5-way branch logic (#9287) - #9338
Conversation
…SONbored#9287) Existing coverage only checked REST/MCP parity for the shared review-risk builder, never asserting what each of the five recommendation branches (likely_duplicate, maintainer_lane, needs_author, review, watch) actually resolves to. Add direct unit tests with minimal fixtures for each branch.
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-27 13:31:16 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://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
buildReviewRiskExplanation(src/signals/review-risk.ts) previously only had REST/MCP parity coverage — no test asserted what each of its five recommendation branches actually resolves to.test/unit/review-risk.test.tswith one direct unit test per branch (likely_duplicate,maintainer_lane,needs_author,review,watch), each using minimal fixture inputs to deterministically trigger that branch, and asserting bothrecommendationandsummary.test/unit/contributor-readiness-band.test.tsper the issue's guidance. No implementation changes — coverage-only.Closes #9287
Scope
test/unit/)src/signals/review-risk.tsor any other implementation filesite/,CNAME, VitePress, or GitHub PagesValidation
npx vitest run test/unit/review-risk.test.ts— 5/5 passingnpx turbo run build --filter=@loopover/engine— greennpx turbo run build --filter=@loopover/mcp— greennpx turbo run build:tsc build:verify --filter=@loopover/miner— greennpm run test:ci— not completed locally before submission (interrupted by session timeout); test file only exercises existing exported functions/types with no src changes, so risk is lowSafety
Notes
This is a coverage-only PR requested by #9287; the function under test is unchanged.