Skip to content

test(lgtmBinding): pin hasLgtmLabel's .some and case fold, unbindLgtm's pending body and 140-char bound, and isLgtmBound's per_page=100 - #540

Open
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-lgtm-binding-pins
Open

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-lgtm-binding-pins

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

A single-operator mutation probe over src/plugins/lgtmBinding.ts (38 mutants against the ten suites that exercise the module, 338 tests) left four non-equivalent survivors. This pins each of them in __tests__/plugins/lgtmBinding.test.ts:

line mutant new assertion
38 hasLgtmLabel: .some → .every ['approved', 'lgtm', 'kind/bug'] → true (a PR labelled lgtm and anything else still carries lgtm; tide.ts:184 gates the stale-binding strip on this)
38 hasLgtmLabel: drop .toLowerCase() ['LGTM'] → true
94 unbindLgtm: slice(0, 140) → slice(0, 141) the pending body is read for the first time: exactly { state: 'pending', context: 'prow/lgtm', description: 140 chars } from a 200-char input
114 isLgtmBound: per_page: 100 → 30 per_page=100 on the GET /commits/abc/status URL

Also asserted, as the negative side of the hasLgtmLabel table: ['approved', 'kind/bug'] and [] → false.

Files: __tests__/plugins/lgtmBinding.test.ts only (+34 lines, one import widened). No src/, dist/ or docs change. Disjoint from every open held PR (#510–#539): none touches __tests__/plugins/lgtmBinding.test.ts or src/plugins/lgtmBinding.ts. hasLgtmLabel is pinned here at the unit level rather than through a tide fixture because __tests__/plugins/tide.test.ts is #518's.

Verification (this branch, local)

  • npx vitest run __tests__/plugins/lgtmBinding.test.ts: 23/23 pass (was 18)
  • each of the four mutants applied in turn to src/plugins/lgtmBinding.ts, same command: the .every mutant fails 2 tests, the other three fail exactly 1 each; src/ restored, git status clean apart from the test file
  • npx eslint __tests__/plugins/lgtmBinding.test.ts: clean

Related Issue

Refs #523 — this ticks the lgtmBinding.ts mutation finding folded onto that tracker (filed this kick); the tracker's other folded findings (trigger, approveReview, mergeQueue, run.ts/config.ts v8-ignore, command.ts:23) are separate deliverables, two of which need a src/ change (needs-human: production-file edit outside the quality lane).


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

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

…'s pending body and 140-char bound, and isLgtmBound's per_page=100

A single-operator mutation probe over src/plugins/lgtmBinding.ts left
four non-equivalent survivors: hasLgtmLabel's .some -> .every and its
.toLowerCase() removal, unbindLgtm's slice(0, 140) -> slice(0, 141), and
isLgtmBound's per_page: 100 -> 30. Each now fails at least one test.

Refs #523

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hold Indicates that a PR should not merge because someone has issued a /hold command. needs-kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants