Skip to content

test(plugins): pin blunderbuss' file-count tier preference, requireMatchingLabel's unlabeled arm and withdrawalReason's event ordering - #591

Merged
jeefy merged 1 commit into
mainfrom
quality/test-plugin-mutation-survivors
Oct 29, 2026
Merged

jeefy merged 1 commit into
mainfrom
quality/test-plugin-mutation-survivors

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

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: true folds, payload ?. chains or RequestError-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):

file pins
__tests__/plugins/blunderbussTierPreference.test.ts blunderbuss(prEvent('opened'), first) with request_count: 2 over ['sdk/x.go', 'docs/y.md'] requests alice, rita (the two-file tier), and with request_count: 3 adds bob only after that tier is exhausted (blunderbuss.ts:184, coverage.get(login) ?? 0)
__tests__/plugins/requireMatchingLabelUnlabeled.test.ts two rules configured: unlabeled kind/bug on a bare issue POSTs exactly ['needs-kind'] and one kind comment, never needs-area; labeled area/docs on an issue carrying it makes no write (requireMatchingLabel.ts:100, action === 'unlabeled')
__tests__/plugins/approveReviewWithdrawalOrder.test.ts withdrawalReason with a later /approve listed before an earlier review-changes → no approver covers x; the inverse → withdrawn by bob (changes requested); a later cancel listed first → withdrawn by carol (/approve cancel) (approveReview.ts:109, the sort by at)

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 passed
  • npx vitest run — 173 files, 2353 passed, 75 skipped
  • npx eslint <the three files> — clean; npx tsc --noEmit — clean

Related 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

… 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>
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 26, 2026 20:27
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 26, 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 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.ts accumulates per-reviewer coverage with coverage.get(login) ?? 0 (the tier seed the first test discriminates); src/plugins/approveReview.ts:109 sorts events by at before the latest map; src/plugins/requireMatchingLabel.ts:100 narrows labeled/unlabeled to the changed label via context.payload.label?.name.
  • Tests pass on the PR head: npx vitest run on the three files — 7/7 passed.
  • Spot-checked one mutant kill by hand: replacing the approveReview.ts:109 comparator with () => 0 fails 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

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Another agent tried to open a PR from quality/test-config-type-guards-and-tothrow-guard, but this PR already closes #590. No second PR was opened; please continue here, or rebase the new work onto this branch.

@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.

Three additive pinning tests, disjoint from src/. Reviewed the assertions against the survivors named in #590; they fix the mutants they claim.

@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 08f4bc3 into main Oct 29, 2026
18 checks passed
@jeefy
jeefy deleted the quality/test-plugin-mutation-survivors branch October 29, 2026 15:35
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.

[quality] Pin the three behavioural Stryker survivors in blunderbuss, requireMatchingLabel and approveReview

1 participant