Repository navigation
test(sweep): pin the no-catch-up recovery of delayed reviewers after missed schedule runs - #567
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
…missed schedule runs After the schedule misses runs for longer than sweep.lookback, a pull request whose review clock expired before now - delay - lookback is neither listed, read nor requested by the delayed-reviewers step, and a longer sweep.lookback is what recovers it. Pinned in a unit suite (__tests__/cronJobTest/sweepDelayOutage.test.ts) and against dist/index.js (__tests__/bundle/blunderbussDelayOutage.test.ts); the blunderbuss.delay paragraph of docs/configuration.md now records the expectation. Refs #554 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> 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
|
Please add a kind label with |
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.
Test Improvement
Pins the Scheduling outage recovery item of #554 ("explicitly document and test the chosen recovery expectation when missed runs exceed the lookback window. The current implementation intentionally excludes sufficiently old PRs; do not silently change this into unlimited catch-up"). No source change.
Files/functions claimed (all new or docs-only, disjoint from every open hold-gated PR):
__tests__/cronJobTest/sweepDelayOutage.test.ts(new) — unit,sweep→recentlyUpdatedPulls(…, due.from)insrc/cronJobs/sweep.ts__tests__/bundle/blunderbussDelayOutage.test.ts(new) — the same contract throughdist/index.jsdocs/configuration.md, theblunderbuss.delayparagraph — records the expectationDisjoint from #555 (
fakeGithub.ts,ownersGroups/blunderbussDelaybundle tests), #558 (sweep.test.tsdue-window bounds: a PR 1 ms beforedue.fromthat is still listed), #559 (blunderbussDelay.test.ts), #561/#562/#565/#566 (their ownsweepDelay*/blunderbussDelay*files), #563 (config.ts) and #556 (contributing.md).delay: 1h)lookback(1h), window[now−2h, now−1h]page=1); no request at all names #2 (/pulls/2*,/issues/2*),sweep: 1 more checked for delayed reviewerssweep.lookback: 2h, window[now−3h, now−1h]sweep: 1 candidate updated sinceMutant check (per #554's "justify by mutation, not percentage"): changing the list bound in
sweep()fromdue.fromtonew Date(0)(unbounded catch-up) fails the first unit case (expected [1, 2] to deeply equal [1], the timeline reads) while the existing 42sweep.test.tscases and the bundleblunderbussDelaycases accept it — the delayed block there always serves a short single page, so the listing bound was unpinned. The cases add no new lines or branches by design.Docs: the
blunderbuss.delayparagraph now states that the sweep does not catch up pastnow − delay − lookback, thatlookback(capped at 24h) is the knob for riding out missed slots, and that/auto-ccor a manual request covers a pull request missed that way.Coverage evidence
npm run test:coverageonmain@e3119ad: 2330 tests, 99.92 % lines / 99.35 % branches;sweep.ts98.33 / 92.3, uncovered85,244(both claimed by test(sweep): pin the delayed-reviewers catch of sweep in its Error and String(e) arms (sweep.ts:85) #565/test(sweep): pin the inclusive due-window bounds and the timeline-read failure of delayed reviewers #558). The four other reported lines (close.ts:39,reopen.ts:36,approve.ts:504,auth.ts:220) are the documented v8 negative-count artifact (docs/contributing.md), not gaps.npm run test:coverage:e2eonmain@e3119ad: 528 tests, 100 % lines / 99.46 % branches;sweep.ts100 / 94.87, uncovered80-85,208(claimed by test(sweep): pin the delayed-reviewers OWNERS guard on a base branch without OWNERS files (sweep.ts:80) #561/test(sweep): pin the delayed-reviewers catch of sweep in its Error and String(e) arms (sweep.ts:85) #565/test(sweep): pin the reviewer-key fallbacks of delayed blunderbuss on a bare pull listing (sweep.ts:208) #562).Verification
npx vitest run __tests__/cronJobTest/sweepDelayOutage.test.ts __tests__/bundle/blunderbussDelayOutage.test.ts __tests__/configurationDocs.test.ts __tests__/docsYamlExamples.test.ts— 4 files passednpx eslinton the three changed files — cleanRelated Issue
Refs #554 — ticks only the "Scheduling outage recovery" box of the P2 cross-request section. The P1 CI-enforcement, release and harness sections and the other P2 boxes stay open there (tracked by #555/#557/#558/#559/#564); a single test PR must not close the tracker.
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 requested_by=@mrbobbytables