Skip to content

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
mainfrom
quality/test-sweep-delay-outage
Open

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

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

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) in src/cronJobs/sweep.ts
  • __tests__/bundle/blunderbussDelayOutage.test.ts (new) — the same contract through dist/index.js
  • docs/configuration.md, the blunderbuss.delay paragraph — records the expectation

Disjoint from #555 (fakeGithub.ts, ownersGroups/blunderbussDelay bundle tests), #558 (sweep.test.ts due-window bounds: a PR 1 ms before due.from that is still listed), #559 (blunderbussDelay.test.ts), #561/#562/#565/#566 (their own sweepDelay*/blunderbussDelay* files), #563 (config.ts) and #556 (contributing.md).

case pull requests (delay: 1h) asserts
default lookback (1h), window [now−2h, now−1h] #1 opened/updated 90 min ago; #2 opened/updated 150 min ago, untouched #1 requested and its timeline read; exactly one list page (page=1); no request at all names #2 (/pulls/2*, /issues/2*), sweep: 1 more checked for delayed reviewers
sweep.lookback: 2h, window [now−3h, now−1h] same two #1 is an ordinary candidate, #2 the delayed-only one; both requested, both timelines read, sweep: 1 candidate updated since

Mutant check (per #554's "justify by mutation, not percentage"): changing the list bound in sweep() from due.from to new Date(0) (unbounded catch-up) fails the first unit case (expected [1, 2] to deeply equal [1], the timeline reads) while the existing 42 sweep.test.ts cases and the bundle blunderbussDelay cases 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.delay paragraph now states that the sweep does not catch up past now − delay − lookback, that lookback (capped at 24h) is the knob for riding out missed slots, and that /auto-cc or a manual request covers a pull request missed that way.

Coverage evidence

Verification

  • npx vitest run __tests__/cronJobTest/sweepDelayOutage.test.ts __tests__/bundle/blunderbussDelayOutage.test.ts __tests__/configurationDocs.test.ts __tests__/docsYamlExamples.test.ts — 4 files passed
  • npx eslint on the three changed files — clean

Related 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

…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>
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 22, 2026 14:06
@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.

@github-actions

Copy link
Copy Markdown
Contributor

Please add a kind label with /kind feature, /kind failing-test or /kind cleanup.

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. needs-kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants