Repository navigation
test(sweep): pin the delayed-reviewers OWNERS guard on a base branch without OWNERS files (sweep.ts:80) - #561
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
…without OWNERS files Both suites left the false arm of the branchHasOwners guard ahead of requestReviewersIfDue in src/cronJobs/sweep.ts with zero hits: every delayed-blunderbuss case served an OWNERS file on master. Add one unit case and one dist/index.js scenario, each in its own file, that configure blunderbuss.delay, serve an empty master tree and a due pull request, and assert the tree is probed once while the timeline, reviews and requested_reviewers endpoints are never touched. Both fail when the guard is replaced by `|| true`. Fixes #560 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
Author
|
/kind cleanup 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 |
This was referenced Oct 22, 2026
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.
Description
Pins the false arm of the
branchHasOwnersguard that precedesrequestReviewersIfDuein the delayed-reviewers loop ofsrc/cronJobs/sweep.ts(line 80): a pull request that is due for delayed blunderbuss but whose base branch carries no OWNERS files must be left alone — no timeline read, no review read, norequested_reviewerswrite.Files/functions claimed (both new, so #558
__tests__/cronJobTest/sweep.test.ts, #559 / #555__tests__/bundle/blunderbussDelay.test.ts, #553auth.ts, #556 e2e floor and #557tide.test.tsare untouched):__tests__/cronJobTest/sweepDelayWithoutOwners.test.tsblunderbuss.delay: 1h, emptymastertree, one PR created/updated 70 min agosweepresolves{ candidates: [], merged: [], enqueued: [], failures: [] };git/trees/masterread; timeline, reviews andrequested_reviewershandlers never called__tests__/bundle/blunderbussDelayWithoutOwners.test.tsdist/index.json thescheduleevent::error::,sweep: 0 candidates updated since,sweep: 1 more checked for delayed reviewers, exactly onegit/trees/master?recursive=trueread, zero timeline/review reads, zero non-GET requests, and the only non-config requests are the pull list and the tree readSource under test is unchanged.
Fixes #560
Mutation check
if (await branchHasOwners(...))→if (await branchHasOwners(...) || true)insrc/cronJobs/sweep.ts:sweep: 1 pull request(s) failed: #1 (blunderbuss: [MSW] Cannot bypass a request …)— the mutant reaches an endpoint the test deliberately does not servenpm run pack:coverage, run withPROW_BUNDLE_PATH=.coverage-bundle/index.js) fails:::error::… sweep: 1 pull request(s) failed: #1 (blunderbuss: could not read the timeline: HttpError: Not Found (fake))Before this PR the same mutant is accepted by all 46 cases of
sweep.test.tsand by the whole bundle suite.Coverage evidence
npm run test:coverageonmain@e3119ad(2330 tests, 99.92 % lines / 99.35 % branches):sweep.ts98.33 / 92.3;coverage/lcov.infohasBRDA:80,4,1,0. With this PR the same record readsBRDA:80,4,1,1.npm run test:coverage:e2eonmain@e3119ad(528 tests, 100 % lines / 99.46 % branches):sweep.ts100 / 94.87, uncovered80-85,208;coverage-e2e/lcov.infohasBRDA:80,4,1,0. With this PR it readsBRDA:80,4,1,1. Lines 85 and 208 are test(sweep): pin the inclusive due-window bounds and the timeline-read failure of delayed reviewers #558's and test(sweep): pin that a second delayed sweep leaves the first run's requested reviewers alone #559's and are not touched here.docs/contributing.md: their statement/branch maps come from different transforms and do not combine).Testing
npx vitest run __tests__/cronJobTest/sweepDelayWithoutOwners.test.ts— 1 passednpx vitest run __tests__/bundle/blunderbussDelayWithoutOwners.test.ts— 1 passed (against committeddist/index.js)npm run pack:coverage && PROW_BUNDLE_PATH=.coverage-bundle/index.js npx vitest run __tests__/bundle/blunderbussDelayWithoutOwners.test.ts— 1 passednpx eslinton both files — cleanChecklist
dist/change (tests only)Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1