Repository navigation
test(sweep): pin the reviewer-key fallbacks of delayed blunderbuss on a bare pull listing (sweep.ts:208) - #562
Open
hivecommons-hive[bot] wants to merge 1 commit into
Open
hivecommons-hive[bot] wants to merge 1 commit into
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
… a bare pull listing (sweep.ts:208) requestReviewersIfDue reads requested_reviewers ?? [] and requested_teams ?? [] off the pull list entry, but no unit or bundle test listed a delayed-only pull request without those keys, leaving both fallback arms unreached in coverage/ and coverage-e2e/. Serve a due pull with the keys removed on both harnesses and assert reviewers are still requested. Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Contributor
Author
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Agent PRs are held at ACMM L3–L5; an Hive will keep the |
Contributor
|
Please add a kind label with |
11 of 12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Improvement
requestReviewersIfDueinsrc/cronJobs/sweep.ts(line 208) decides the delayed-reviewers skip from(pr.requested_reviewers ?? []).length > 0 || (pr.requested_teams ?? []).length > 0. Neither suite listed a delayed-only pull request whoseGET /pullsentry omits those keys, so both?? []fallback arms were zero-hit incoverage/lcov.infoandcoverage-e2e/lcov.infoate3119ad(BRDA:208,27,1,0,BRDA:208,28,1,0). The existing bare-listing case insweep.test.tsonly exercises the candidate path (sweepPullRequest), not the delayed loop.Two new files, no edits to existing tests:
__tests__/cronJobTest/sweepDelayBareListing.test.ts— unit: a due delayed-only pull served withoutrequested_reviewers/requested_teamsstill gets its timeline and reviews read andPOST /pulls/1/requested_reviewerscalled, withfailures: [].__tests__/bundle/blunderbussDelayBareListing.test.ts— bundle (e2e): same scenario againstdist/index.jsvia the fake GitHub API; asserts{ reviewers: ['bob'] }is requested,already has requested reviewersis not logged, and the only write is the reviewer request.Cluster claimed:
src/cronJobs/sweep.tsrequestReviewersIfDue?? []fallbacks (line 208), unit + bundle. Disjoint from #558 (edits__tests__/cronJobTest/sweep.test.ts; lines 85/244), #559 (edits__tests__/bundle/blunderbussDelay.test.ts; second-sweep guard, arrays always present), #561 (line 80 OWNERS guard, its own new files) and #555 (pagination).Related Issue
Refs #560 — lands the folded
sweep.ts:208variant the hive attached to that tracker; the tracker's originalsweep.ts:80finding is delivered by #561, so #560 stays open until that PR merges.Verification
npx vitest run __tests__/cronJobTest/sweepDelayBareListing.test.ts __tests__/bundle/blunderbussDelayBareListing.test.ts→ 2/2 passnpx eslinton both files → cleanFiled by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1