Repository navigation
test(sweep): drive the delayed-reviewer pass's failure arm end-to-end and raise the e2e branch floor to 99 - #596
Conversation
… and raise the e2e branch floor to 99 The bundle acceptance run reached every src/ branch but one: the catch of the delayed-only pass in src/cronJobs/sweep.ts (the forEachLimited over delayedOnly), whose String(e) fold had zero e2e hits while the candidate pass's equivalent at :132 is driven by nonErrorRejectionPluginArms.test.ts. __tests__/bundle/blunderbussDelayFailure.test.ts runs the sweep over two delayed-only pull requests and asserts that a failed timeline read, and a review read rejecting with a string via nonErrorRejectionPreload.cjs, are each recorded as 'blunderbuss: …' against that number only, that the other pull request still gets reviewers, and that the run fails once naming it. With no zero-hit e2e branch left (1686/1688, the two misses being the negative-count await artifacts docs/contributing.md describes) the e2e branch floor in vitest.e2e-coverage.config.mjs rises from 98 to 99, the same floor the unit run already enforces. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> 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.
Read the diff against main @ 9acb046 and the code it targets. This looks correct to me.
Verified:
- The claimed zero-hit branch is real:
src/cronJobs/sweep.ts:85's delayed-pass catch folds non-Errors withString(e), and no existing bundle scenario made a delayed-only PR's blunderbuss visit throw (__tests__/bundle/nonErrorRejectionPluginArms.test.tsonly drives the candidate-pass equivalent). - The asserted messages match the tree:
could not read the timeline: ${e}is thrown atsrc/cronJobs/sweep.ts:244, and the finalTypeError: error handling cron job: …wrapper comes fromsrc/cronJobs/handleCronJob.ts:65. - Timing is sound: with
blunderbuss.delay: 1hand the default lookback, PRs updated 90/100 min ago fall in the due window but outside the plain window, so both land indelayedOnly(sweep.ts:62-69) — exactly the pass under test. - The string-rejection scenario reuses the existing
nonErrorRejectionPreload.cjsfail-closed preload unchanged; only a new test file, the threshold bump (98→99 branches invitest.e2e-coverage.config.mjs), and the matching one-number docs edit indocs/contributing.md:50are added. Nosrc/is touched. - The
e2e-coveragecheck on this head (8c71ae9) is green under the raised floor, confirming the new scenario drives the branch. - File-disjointness from held #591/#593/#595 checks out; #595 edits a different
docs/contributing.mdhunk, so no merge conflict.
No findings. A maintainer can take this on the strength of the green e2e-coverage run.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88
|
Merge-order note (quality lane): this PR textually conflicts with #598 in
Suggested order: land #598 first (12 files), then re-apply this PR's one-line doc change on top — the smaller rebase. No action needed from reviewers beyond picking the order; whichever lands second needs a trivial conflict resolution in that one table row. 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
/kind cleanup 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
/kind cleanup |
Test Improvement
Drives the one
src/branch the bundle acceptance run did not reach and raises the e2e branch floor accordingly. Atmain@ 9acb046,npm run test:coverage:e2e(90 files, 542 tests, 100 / 99.82 / 100 / 100) reports exactly one zero-hit branch that is not a documented artifact:the
String(e)fold of the catch in the delayed-reviewers pass (forEachLimited(delayedOnly, …)). The unit run covers it (coverage/lcov.infoBRDA:85,5,1,1), and the candidate pass's equivalent at:132is already driven by__tests__/bundle/nonErrorRejectionPluginArms.test.ts, but no scenario made a delayed-only pull request's blunderbuss visit throw. The finding is recorded on #594 as the folded issue "[quality] e2e branch floor (98) does not require sweep.ts's delayed-pass failure arm; drive it and raise the floor to 99".Files / cluster claimed — one new bundle scenario, the e2e coverage config and one sentence of docs; no
src/,dist/or existing test is touched, so this is disjoint from held #591 (plugin unit tests), #593 (dispatcher/cron/command unit tests, incl.__tests__/cronJobTest/sweepDelayGuards.test.ts, which is unit-only) and #595 (__tests__/setup.ts, config unit tests, the "Mutation checks" paragraph ofdocs/contributing.md— this PR edits thenpm run test:coverage:e2erow of the table above it, a different hunk).__tests__/bundle/blunderbussDelayFailure.test.tsblunderbuss.delay: 1h: (1) a 500 on#2's timeline read →#2 (blunderbuss: could not read the timeline: HttpError: boom),#1still gets reviewers, the run fails once; (2)#2's review read rejecting with a string vianonErrorRejectionPreload.cjs→ the string reaches the failure unwrapped (theString(e)arm), no[object, no unhandled rejection; (3) control: both healthy → both requested, exit 0vitest.e2e-coverage.config.mjsbranches: 98→99(now 1686/1688 = 99.88 %, the two misses being the negative-count await artifactsdocs/contributing.mddescribes; ≈14 branches of headroom, the same margin the unit floor has); figure history in the comment extendeddocs/contributing.mdtest:coverage:e2erow: "Fails below 99 % lines / 99 % branches …"Testing
npx vitest run __tests__/bundle/blunderbussDelayFailure.test.ts— 3 passednpm run test:coverage:e2ebefore the scenario (freshmain@ 9acb046): 90 files,sweep.ts … 98.71 … 85,BRDA:85,5,1,0; after: 91 files, 545 passed, 100 / 99.88 / 100 / 100, no zero-hit branch, threshold 99 passesnpx vitest run— 192 files, 2476 passed, 75 skippednpx eslinton the touched files — clean;npx tsc --noEmit— cleanRelated Issue
Refs #594 (needs-human: the scheduled Stryker run proposed there is a maintainer decision and lives in
.github/workflows/; this PR lands only the folded e2e-floor finding recorded on it and leaves the gate question open). The finding was filed standalone and folded onto #594 by the relay's shared-file-citation rule, so this PR cites the tracker the relay chose.Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88