Skip to content

test(sweep): drive the delayed-reviewer pass's failure arm end-to-end and raise the e2e branch floor to 99 - #596

Merged
jeefy merged 1 commit into
mainfrom
quality/test-sweep-delayed-blunderbuss-failure
Oct 29, 2026
Merged

jeefy merged 1 commit into
mainfrom
quality/test-sweep-delayed-blunderbuss-failure

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Drives the one src/ branch the bundle acceptance run did not reach and raises the e2e branch floor accordingly. At main @ 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:

SF:src/cronJobs/sweep.ts BRDA:85,5,1,0

the String(e) fold of the catch in the delayed-reviewers pass (forEachLimited(delayedOnly, …)). The unit run covers it (coverage/lcov.info BRDA:85,5,1,1), and the candidate pass's equivalent at :132 is 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 of docs/contributing.md — this PR edits the npm run test:coverage:e2e row of the table above it, a different hunk).

file change
__tests__/bundle/blunderbussDelayFailure.test.ts two delayed-only pull requests under blunderbuss.delay: 1h: (1) a 500 on #2's timeline read → #2 (blunderbuss: could not read the timeline: HttpError: boom), #1 still gets reviewers, the run fails once; (2) #2's review read rejecting with a string via nonErrorRejectionPreload.cjs → the string reaches the failure unwrapped (the String(e) arm), no [object, no unhandled rejection; (3) control: both healthy → both requested, exit 0
vitest.e2e-coverage.config.mjs branches: 98 → 99 (now 1686/1688 = 99.88 %, the two misses being the negative-count await artifacts docs/contributing.md describes; ≈14 branches of headroom, the same margin the unit floor has); figure history in the comment extended
docs/contributing.md the test:coverage:e2e row: "Fails below 99 % lines / 99 % branches …"

Testing

  • npx vitest run __tests__/bundle/blunderbussDelayFailure.test.ts — 3 passed
  • npm run test:coverage:e2e before the scenario (fresh main @ 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 passes
  • npx vitest run — 192 files, 2476 passed, 75 skipped
  • npx eslint on the touched files — clean; npx tsc --noEmit — clean

Related 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

… 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>
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 27, 2026 07:00
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 27, 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.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 with String(e), and no existing bundle scenario made a delayed-only PR's blunderbuss visit throw (__tests__/bundle/nonErrorRejectionPluginArms.test.ts only drives the candidate-pass equivalent).
  • The asserted messages match the tree: could not read the timeline: ${e} is thrown at src/cronJobs/sweep.ts:244, and the final TypeError: error handling cron job: … wrapper comes from src/cronJobs/handleCronJob.ts:65.
  • Timing is sound: with blunderbuss.delay: 1h and the default lookback, PRs updated 90/100 min ago fall in the due window but outside the plain window, so both land in delayedOnly (sweep.ts:62-69) — exactly the pass under test.
  • The string-rejection scenario reuses the existing nonErrorRejectionPreload.cjs fail-closed preload unchanged; only a new test file, the threshold bump (98→99 branches in vitest.e2e-coverage.config.mjs), and the matching one-number docs edit in docs/contributing.md:50 are added. No src/ is touched.
  • The e2e-coverage check 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.md hunk, 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

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Merge-order note (quality lane): this PR textually conflicts with #598 in docs/contributing.md.

git merge-tree --write-tree pr-596 pr-598 (both heads fetched 2026-10-27, base main@9acb046) reports CONFLICT (content): docs/contributing.md. The hunks are adjacent lines in the commands table: this PR rewrites the npm run test:coverage:e2e row (branch floor 98 → 99) and #598 inserts a new npm run test:shuffle row immediately above it. Both changes are wanted; the resolution is to keep the inserted row and this PR's rewritten row.

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: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 9acb046

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

/kind cleanup


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 9acb046

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

@jeefy jeefy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drives the one e2e-dark branch and raises the e2e branch floor to 99. main is at 99.18 after #615 so the floor holds; merged ahead of #598, which needs a rebase for the adjacent contributing.md row.

@jeefy jeefy removed the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 29, 2026
@jeefy

jeefy commented Oct 29, 2026

Copy link
Copy Markdown
Member

/kind cleanup

@jeefy
jeefy merged commit d4cd912 into main Oct 29, 2026
16 checks passed
@jeefy
jeefy deleted the quality/test-sweep-delayed-blunderbuss-failure branch October 29, 2026 15:37
mrbobbytables added a commit that referenced this pull request Oct 29, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant