Skip to content

test(mergeQueue): pin each classify alternative and enqueuedByBot's ^ anchor individually - #529

Merged
mrbobbytables merged 1 commit into
mainfrom
quality/test-merge-queue-classify-arms
Oct 21, 2026
Merged

mrbobbytables merged 1 commit into
mainfrom
quality/test-merge-queue-classify-arms

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds six rows to __tests__/utils/mergeQueue.test.ts, one per non-equivalent mutant of src/utils/mergeQueue.ts that survived the full related suite (60 files / 1166 tests) despite 100 % line and branch coverage. A 23-mutant single-operator probe on main @ 88241f4 (boolean guards, ==/===, regex anchors and flags, each alternative of the classify patterns, >/>=, the position and enqueuer folds) killed 16; these six changed nothing a test asserts, because every existing classify fixture message satisfies two alternatives at once and no login carries github-actions as a suffix:

line mutant new row
153 botLoginPattern drop ^ enqueuedByBot › my-github-actions -> false — a human whose login ends in github-actions is not an automation; the gate must not dequeue their entry (tide.ts:362)
168 drop expected head classifies "expected head did not match" as head_moved
168 drop head oid classifies "the head OID of the pull request has changed" as head_moved
174 drop required classifies "Required reviews are missing" as not_ready
174 drop checks classifies "Checks are still running" as not_ready
177 drop forbidden classifies "Forbidden" as forbidden

classify's kind drives tide.ts:336's per-kind handling of a refused enqueue, so each alternative is a behaviour, not a wording. The one equivalent survivor — $ after \[bot\] — is deliberately not tested: GitHub logins cannot contain [, so [bot] is only ever a suffix.

Files / functions claimed: __tests__/utils/mergeQueue.test.ts (enqueue › classifies "%s" as %s table, enqueuedByBot table). Test-only; no src/, dist/, docs/ or config change. Disjoint from the open held PRs #510–#528: none touches this file or src/utils/mergeQueue.ts (#518 covers tide.ts through __tests__/plugins/tide*.test.ts; #528's mergeQueue.ts:190 is the e2e String(e) arm, which this PR does not touch).

Verification (this branch, local)

  • npx vitest run __tests__/utils/mergeQueue.test.ts: 40 passed (34 on main)
  • same, with each of the six mutants applied in turn to src/utils/mergeQueue.ts: 1 failed / 39 passed for every one (mutants reverted, not committed)
  • npx eslint __tests__/utils/mergeQueue.test.ts: clean

Related Issue

Refs #523 — the hive consolidated this finding onto that tracker (already_existed: true, consolidated: true); its own trigger.ts boxes are #524's and the folded run.ts:40 / config.ts:657 / command.ts:23 v8 ignore entries still need a src/ change (needs-human: production-file edit outside the quality lane), so the tracker stays open. This PR is the complete fix for the six mergeQueue.ts mutants it names.


Filed by quality agent (hold-gated mode). Human review required.

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

… anchor individually

A single-operator mutation probe over src/utils/mergeQueue.ts (23 mutants)
left six non-equivalent survivors against the related suite (1166 tests):
dropping the ^ anchor of botLoginPattern, or any one of the 'expected head',
'head oid', 'required', 'checks' and 'forbidden' alternatives of classify,
changed nothing a test asserts, because every existing fixture message
satisfies two alternatives at once and no login carries github-actions as
a suffix.

Adds one classify row per uncovered alternative and a my-github-actions
login that must not count as a bot.

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 19, 2026 22:24
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 19, 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.

@github-actions

Copy link
Copy Markdown
Contributor

Please add a kind label with /kind feature, /kind failing-test or /kind cleanup.

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

Copilot review performed under the maintainer's explicit authorization to update, review, release reviewed holds, and merge eligible PRs in this cleanup.

Each queue classification alternative has an independent input, and a human login ending in github-actions is explicitly not identified as the bot.

Verified successful build-test, e2e-coverage and DCO results on head 1d6484d. Any folded issue findings remain assigned to the canonical destinations in the updated scope tables.

@mrbobbytables mrbobbytables added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed hold Indicates that a PR should not merge because someone has issued a /hold command. needs-kind labels Oct 21, 2026
@mrbobbytables
mrbobbytables merged commit 210a790 into main Oct 21, 2026
18 checks passed
@mrbobbytables
mrbobbytables deleted the quality/test-merge-queue-classify-arms branch October 26, 2026 20:19
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