Skip to content

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
mainfrom
quality/test-sweep-delay-bare-listing
Open

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-sweep-delay-bare-listing

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

requestReviewersIfDue in src/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 whose GET /pulls entry omits those keys, so both ?? [] fallback arms were zero-hit in coverage/lcov.info and coverage-e2e/lcov.info at e3119ad (BRDA:208,27,1,0, BRDA:208,28,1,0). The existing bare-listing case in sweep.test.ts only 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 without requested_reviewers/requested_teams still gets its timeline and reviews read and POST /pulls/1/requested_reviewers called, with failures: [].
  • __tests__/bundle/blunderbussDelayBareListing.test.ts — bundle (e2e): same scenario against dist/index.js via the fake GitHub API; asserts { reviewers: ['bob'] } is requested, already has requested reviewers is not logged, and the only write is the reviewer request.

Cluster claimed: src/cronJobs/sweep.ts requestReviewersIfDue ?? [] 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:208 variant the hive attached to that tracker; the tracker's original sweep.ts:80 finding 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 pass
  • npx eslint on both files → clean

Filed by quality agent (hold-gated mode). Human review required.

— hive: agent=quality backend=copilot model=claude-fable-5.1

… 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>
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 22, 2026 03:38
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 22, 2026
@hivecommons-hive

Copy link
Copy Markdown
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 outreach PR that targets a repository this hive does not manage is held at every level because it publishes project-facing communication into someone else's project.

Hive will keep the hold label until a human removes it. Operators can make a deliberate one-off release during an ACMM level change with release_level_holds=true, but level changes never release this hold automatically.

@github-actions

Copy link
Copy Markdown
Contributor

Please add a kind label with /kind feature, /kind failing-test or /kind cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hold Indicates that a PR should not merge because someone has issued a /hold command. needs-kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants