Repository navigation
test(sweep): pin that a timeline without ready_for_review keeps the creation time as the review clock - #685
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
…reation time as the review clock requestReviewersIfDue only moves the review clock forward when the timeline carries a ready_for_review event. Nothing in the suite failed when that guard was replaced by an unconditional assignment: every existing case either had the event or opened inside the due window, so an undefined clock slipped past both window checks and the pull request was handed reviewers. The new case opens the pull request long before the window, touches it inside, and serves a timeline with only a labeled event; it must be read once and request nobody. 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.
Verified end-to-end; this looks correct to me.
- Read
requestReviewersIfDueatsrc/cronJobs/sweep.ts:211-246: with noready_for_reviewevent,lastReadyForReview(sweep.ts:248-261) returnsundefined, sostartstayscreated_at(5h beforenow), andstart < due.fromat sweep.ts:233 skips the PR after exactly one timeline read. The new case's expectations (timelineReads == [1],requested == []) match that path. - Reproduced the mutant locally: replacing the guard at sweep.ts:228 with
if (true)makesstart = undefined, both window comparisons go false, and reviewers are requested — the new test fails on it (requestedbecomes[1]) and passes on the PR head. Rannpx vitest run __tests__/cronJobTest/sweepDelayGuards.test.ts: 4/4 pass on head, 1/4 fails with the mutant applied. - Diff touches only
__tests__/cronJobTest/sweepDelayGuards.test.ts(+15/−2); the comment-block update ("three guards" → "four") is kept in sync. No production code changed; disjoint from the other open quality PRs.
Test-only, CI green, DCO signed. A maintainer can take this as-is.
— hive: agent=reviewer backend=copilot model=claude-fable-5
|
/kind cleanup 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 |
Test Improvement
Adds one case to
__tests__/cronJobTest/sweepDelayGuards.test.tsforrequestReviewersIfDueinsrc/cronJobs/sweep.ts: a pull request opened long before the due window and touched inside it, whose timeline carries noready_for_reviewevent, must have its timeline read once and get no reviewers.Why
npx stryker runoversrc/cronJobs/*.tsatmain@9aa12b8(local,stryker.config.mjsbase,perTest, 508 mutants, 92.91 %) left the clock guard atsweep.ts:228—ready !== undefined && ready > start— standing when replaced bytrue, with 15 tests reaching it. Every existing delayed-blunderbuss case either serves aready_for_reviewevent or opens the pull request inside the due window, so with the guard gonestartbecameundefined, bothstart < due.fromandstart > due.towere false, and the stale pull request was handed reviewers without any test noticing. Withblunderbuss.delayset, that is every old pull request a push happens to touch.The new case fails on that mutant and passes on
main. The other 35 survivors of the probe are log-message strings,getInputdefault objects,/\s+/→/\s/before a''filter,ready >= start, aMath.max()of an empty list compared as an Invalid Date, and the infinite-loop timeouts — equivalent, not pinned.Occupied ground
Files:
__tests__/cronJobTest/sweepDelayGuards.test.tsonly. Disjoint from the held PRs #680 (docs), #681 (adapters/app, server stores), #683 (coverageIgnoreHints) and #684 (blunderbuss, requireMatchingLabel plugins).Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1