Repository navigation
test(sweep): pin that a second delayed sweep leaves the first run's requested reviewers alone - #559
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
…equested reviewers alone The delayed-blunderbuss bundle suite modelled a pull that already had reviewers only as a static fixture. This drives dist/index.js through two successive sweeps against a fake whose pull list reflects the reviewer request the first sweep made, and asserts the second run neither re-reads the timeline or reviews nor requests reviewers again. Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
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 |
There was a problem hiding this comment.
Read the diff against src/cronJobs/sweep.ts at merge-base. The scenario is sound and pins the right guard:
- The second-sweep skip is the requested-reviewers check at
sweep.ts:208-211, which runs before any timeline or review read inrequestReviewersIfDue, soreviewReads()andtimelineReads()staying at length 1 after the second run is exactly what the guard guarantees — the regressors are real (removing the guard would double both). - The stateful
GET /pullsroute that reflects acceptedrequested_reviewersPOSTs is the correct way to model GitHub between sweeps; it exercises the production path rather than a canned second listing. - The asserted log line
sweep: #1 already has requested reviewersis the literalcore.debugatsweep.ts:209, which the toolkit emits as a::debug::line on stdout regardless of runner debug settings, so the stdout assertion holds in the bundle run.
Not a duplicate of #558: that PR pins the due-window bounds in the unit suite (__tests__/cronJobTest/sweep.test.ts); this one pins the idempotence guard at bundle level in a different file. Test-only, CI green. Looks correct to me.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88
There was a problem hiding this comment.
Read the diff against src/cronJobs/sweep.ts at merge-base. The scenario is sound and pins the right guard:
- The second-sweep skip is the requested-reviewers check at
sweep.ts:208-211, which runs before any timeline or review read inrequestReviewersIfDue, soreviewReads()andtimelineReads()staying at length 1 after the second run is exactly what the guard guarantees — the regressors are real (removing the guard would double both). - The stateful
GET /pullsroute that reflects acceptedrequested_reviewersPOSTs is the correct way to model GitHub between sweeps; it exercises the production path rather than a canned second listing. - The asserted log line
sweep: #1 already has requested reviewersis the literalcore.debugatsweep.ts:209, which the toolkit emits as a::debug::line on stdout regardless of runner debug settings, so the stdout assertion holds in the bundle run.
Not a duplicate of #558: that PR pins the due-window bounds in the unit suite (__tests__/cronJobTest/sweep.test.ts); this one pins the idempotence guard at bundle level in a different file. Test-only, CI green. Looks correct to me.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88
|
/kind cleanup 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Test Improvement
Adds one bundle scenario to
__tests__/bundle/blunderbussDelay.test.ts(dist/index.js delayed blunderbuss): the sweep runs twice against a fake GitHub whoseGET /pullslist reflects everyPOST …/requested_reviewersit has accepted so far. The second run must logsweep: #1 already has requested reviewers, make no further timeline or review reads, and leave exactly one reviewer request on record.This is the Successive sweeps box of #554 ("run again against state updated by the first run … assert no duplicate or unwanted reviewer requests"). The manual-assignment half of that box is already pinned by the existing
a manual reviewer/a manual teamcases in the same file.Cluster claimed:
src/cronJobs/sweep.tsrequestReviewersIfDuerequested-reviewers guard, bundle level only. Disjoint from #555 (pagination), #557 (tide), #558 (__tests__/cronJobTest/sweep.test.tsdue-window bounds);git merge-treeagainst #555 and #558 shows no conflict.Verification
npx vitest run __tests__/bundle/blunderbussDelay.test.ts→ 18/18 ataa71e9anpx eslint __tests__/bundle/blunderbussDelay.test.tscleanrequested()andreviewReads()staying at length 1 after the second run; removing the guard would make both 2.Related Issue
Refs #554 — umbrella tracker; this closes only its successive-sweeps box. Remaining boxes (OWNERS page-two failure, outage recovery, CI enforcement, release) stay open, and the OWNERS page-two failure scenario waits on #555's
fakeGithubheader support landing.Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 requested_by=@mrbobbytables