Skip to content

test(sweep): pin that a second delayed sweep leaves the first run's requested reviewers alone - #559

Open
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-successive-sweeps
Open

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-successive-sweeps

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

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 whose GET /pulls list reflects every POST …/requested_reviewers it has accepted so far. The second run must log sweep: #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 team cases in the same file.

Cluster claimed: src/cronJobs/sweep.ts requestReviewersIfDue requested-reviewers guard, bundle level only. Disjoint from #555 (pagination), #557 (tide), #558 (__tests__/cronJobTest/sweep.test.ts due-window bounds); git merge-tree against #555 and #558 shows no conflict.

Verification

  • npx vitest run __tests__/bundle/blunderbussDelay.test.ts → 18/18 at aa71e9a
  • npx eslint __tests__/bundle/blunderbussDelay.test.ts clean
  • The regressors are requested() and reviewReads() 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 fakeGithub header 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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 in requestReviewersIfDue, so reviewReads() and timelineReads() 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 /pulls route that reflects accepted requested_reviewers POSTs 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 reviewers is the literal core.debug at sweep.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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 in requestReviewersIfDue, so reviewReads() and timelineReads() 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 /pulls route that reflects accepted requested_reviewers POSTs 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 reviewers is the literal core.debug at sweep.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

@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