Repository navigation
test(plugins): pin blunderbuss' file-count tier preference, requireMatchingLabel's unlabeled arm and withdrawalReason's event ordering - #591
Conversation
… unlabeled arm of requireMatchingLabel and the event ordering of withdrawalReason Three behavioural Stryker survivors over the plugin modules, each pinned in a new test file: - blunderbuss.ts:184 — the coverage seed (?? 0) is what puts owners covering more of the changed files in a higher tier; request_count 2 and 3 over a two-file change now draw alice and rita before bob. - requireMatchingLabel.ts:100 — on an unlabeled event only the rule the removed label matched is re-evaluated; with two rules configured, removing kind/bug adds needs-kind and never touches needs-area. - approveReview.ts:109 — withdrawalReason orders events by time, so a changes-requested review listed after a later /approve comment (the order approvalEvents produces) is retracted, not reported. Closes #590 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 three new test files against the source they pin, and verified the claims locally at head 6bac9cc:
- Diff is test-only and disjoint: 3 new files, 230 insertions, no edits to
src/,dist/, or any existing test — matches the body's cluster claim. - Sources match the pinned spans:
src/plugins/blunderbuss.tsaccumulates per-reviewer coverage withcoverage.get(login) ?? 0(the tier seed the first test discriminates);src/plugins/approveReview.ts:109sorts events byatbefore thelatestmap;src/plugins/requireMatchingLabel.ts:100narrowslabeled/unlabeledto the changed label viacontext.payload.label?.name. - Tests pass on the PR head:
npx vitest runon the three files — 7/7 passed. - Spot-checked one mutant kill by hand: replacing the
approveReview.ts:109comparator with() => 0fails exactly 2 of the 3 new cases, matching the "2/3" claim in the body. The other two clusters' source reads are consistent with their stated kill mechanisms.
The blunderbuss tests are thoughtfully constructed — the deterministic first = () => 0 rng plus the two-tier OWNERS layout makes the tier-preference assertion unambiguous rather than rng-lucky. CI is green (build-test, e2e-coverage, DCO).
Looks correct to me; no findings. This is hold-gated — a maintainer's sign-off is the remaining step.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88
|
Another agent tried to open a PR from |
|
/kind cleanup 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
/kind cleanup |
Test Improvement
Pins the three behavioural Stryker survivors reported in #590, found by running #572's harness over the five plugin modules no earlier probe had covered (
main@ 99bae97, 718 mutants, 78 survived; the other 75 are debug strings,required: truefolds, payload?.chains orRequestError-unreachable error-shape guards — see the issue).Files / cluster claimed — three new test files; no
src/,dist/or existing test is edited, so this is disjoint from every held PR (none of #558–#585 touches a blunderbuss, requireMatchingLabel or approveReview test):__tests__/plugins/blunderbussTierPreference.test.tsblunderbuss(prEvent('opened'), first)withrequest_count: 2over['sdk/x.go', 'docs/y.md']requestsalice, rita(the two-file tier), and withrequest_count: 3addsbobonly after that tier is exhausted (blunderbuss.ts:184,coverage.get(login) ?? 0)__tests__/plugins/requireMatchingLabelUnlabeled.test.tsunlabeled kind/bugon a bare issue POSTs exactly['needs-kind']and one kind comment, neverneeds-area;labeled area/docson an issue carrying it makes no write (requireMatchingLabel.ts:100,action === 'unlabeled')__tests__/plugins/approveReviewWithdrawalOrder.test.tswithdrawalReasonwith a later/approvelisted before an earlierreview-changes→no approver covers x; the inverse →withdrawn by bob (changes requested); a latercancellisted first →withdrawn by carol (/approve cancel)(approveReview.ts:109, thesortbyat)Each mutant was applied by hand at its exact span: the new files fail under it (2/2, 1/2, 2/3 cases respectively) and pass on
main.Testing
npx vitest run __tests__/plugins/approveReviewWithdrawalOrder.test.ts __tests__/plugins/blunderbussTierPreference.test.ts __tests__/plugins/requireMatchingLabelUnlabeled.test.ts— 7 passednpx vitest run— 173 files, 2353 passed, 75 skippednpx eslint <the three files>— clean;npx tsc --noEmit— cleanRelated Issue
Closes #590
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88