Skip to content

test(sweep): pin the ignore_drafts=false arm of delayed reviewers (requestReviewersIfDue, sweep.ts:218) - #566

Open
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-sweep-delay-ignore-drafts
Open

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

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds __tests__/cronJobTest/sweepDelayIgnoreDrafts.test.ts, a unit test for the ignore_drafts false arm of requestReviewersIfDue in src/cronJobs/sweep.ts (line 218). With blunderbuss: { delay: 1h, ignore_drafts: false } it pins that a delayed sweep:

  • requests reviewers on a due draft (opened 70m ago) and never calls issues/:number/timeline, even when that timeline would report a ready_for_review 5 minutes ago — the pull request is timed from created_at alone;
  • still leaves alone a draft opened inside the delay (30m ago): the created_at gate at line 214 applies unchanged, and the draft stays a tide candidate.

It lives in its own file, mirroring #561/#562/#565, so it does not touch the sweep with blunderbuss.delay block of sweep.test.ts that #558 edits.

Evidence (main@e3119ad, local runs)

  • Unit npm run test:coverage: coverage/lcov.info BRDA:218,30,1,0. With this file, a sweep.ts-scoped coverage run of the new test records BRDA:218,30,1,2.
  • E2E npm run test:coverage:e2e: BRDA:218,30,1,1 via __tests__/bundle/blunderbussDelay.test.ts ("uses creation time and requests on a due draft when ignore_drafts is false") — so this was an e2e-only path, priority low.
  • npm run lint -- __tests__/cronJobTest/sweepDelayIgnoreDrafts.test.ts clean; npx vitest run __tests__/cronJobTest/sweepDelayIgnoreDrafts.test.ts 2 passed.

Related Issue

Refs #560 — this lands the folded sweep.ts:218 variant only; the tracker's other folded arms remain with #561 (line 80), #562 (line 208), #563 (config.ts:618) and #565 (line 85).


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

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

…eep.ts:218)

With blunderbuss.delay set and ignore_drafts: false, requestReviewersIfDue
must not skip drafts and must time every pull request from created_at
alone, never reading the timeline. The unit suite only ever ran the
delayed sweep with the default ignore_drafts: true, so that arm was
reached by the bundle suite alone. Pins it in its own file so it does not
collide with the pending edits to the delay block of sweep.test.ts.

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 11:52
@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.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

/kind cleanup


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: e3119ad

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

@github-actions github-actions Bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed needs-kind labels Oct 23, 2026
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants