test(review): cover extractReviewSummary suggestions-merge + sole-reviewer consensus (#6634)#6674
Conversation
…iewer consensus (JSONbored#6634) extractReviewSummary folds each reviewer's free-form `suggestions` into the rendered `nits` (unified-comment.ts:136) and treats a sole reviewer's blocker as a consensus blocker (unified-comment.ts:140) — both already-shipped branches were unexercised: the shared test helper only ever passed the default `suggestions: []`, and the closest single-reviewer-blocker case never asserted `.consensusBlocker`. Adds three cases through the sole entry point `buildUnifiedReviewInput`: - a non-empty `suggestions` array surfaces in `nits`, deduped case-insensitively against explicit nits - a sole reviewer's blocker → `consensusBlocker: true` (and derived status `blocked`) - a sole reviewer with no blocker → `consensusBlocker: false` No production code change — this closes a coverage gap on documented behavior. Closes JSONbored#6634
|
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 #6674 +/- ##
=======================================
Coverage 93.65% 93.65%
=======================================
Files 681 681
Lines 68086 68094 +8
Branches 18688 18695 +7
=======================================
+ Hits 63764 63772 +8
Misses 3347 3347
Partials 975 975
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
Caution 🛑 LoopOver review result - reject/close recommendedReview updated: 2026-07-16 18:36:24 UTC
Review summary Nits — 6 non-blocking
Why this is blocked
📋 Copy for AI agents — paste into your coding agentDecision 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 (Linked issue overlaps another open PR; duplicate of open PR #6673). 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
extractReviewSummary(src/review/unified-comment.ts:130-143) had two already-shipped branches with no test coverage:suggestionsarray into the renderednits(both are non-blocking). The sharedreviewNotetest helper only ever passed the defaultsuggestions: [], so the merge was never exercised through the sole entry pointbuildUnifiedReviewInput.consensusBlocker = reviewersWithBlockers >= 2 || (valid.length === 1 && reviewersWithBlockers === 1)— the documented "a sole reviewer's blocker still counts as consensus" rule. The existing single-reviewer-with-blocker case never asserted on.consensusBlocker, leaving that arm unverified.This adds three cases through
buildUnifiedReviewInput(the sole entry point that reachesextractReviewSummary):suggestionsarray surfaces innits, deduped case-insensitively against an explicit nit;consensusBlocker: true(and derived statusblocked) — thevalid.length === 1 && reviewersWithBlockers === 1arm, distinct from the existing dual-review "lone blocker is a split → held" case;consensusBlocker: false.No production code change —
extractReviewSummary's logic is not in question; this only closes the coverage gap on documented behavior.Closes #6634
Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #6634).Validation
git diff --checknpm run typechecknpx vitest run test/unit/unified-comment.test.ts— 101 passing (3 new)If any required check was skipped, explain why:
test/unit/unified-comment.test.ts; nosrc/**line changes, socodecov/patchhas no patch surface to gate, and no OpenAPI/cf-typegen/migration/UI regeneration applies.Safety
Notes