Repository navigation
test(lgtmBinding): pin hasLgtmLabel's .some and case fold, unbindLgtm's pending body and 140-char bound, and isLgtmBound's per_page=100 - #540
Conversation
…'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>
|
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 |
|
Please add a kind label with |
mrbobbytables
left a comment
There was a problem hiding this comment.
Copilot review performed under the maintainer's explicit authorization to update, review, release reviewed holds, and merge eligible PRs in this cleanup.
The cases distinguish any matching LGTM label from all labels matching, preserve case-insensitive recognition, and assert the pending status body, truncation and pagination.
Verified successful build-test, e2e-coverage and DCO results on head b37a76e. Any folded issue findings remain assigned to the canonical destinations in the updated scope tables.
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:hasLgtmLabel:.some→.every['approved', 'lgtm', 'kind/bug']→true(a PR labelledlgtmand anything else still carrieslgtm;tide.ts:184gates the stale-binding strip on this)hasLgtmLabel: drop.toLowerCase()['LGTM']→trueunbindLgtm:slice(0, 140)→slice(0, 141)pendingbody is read for the first time: exactly{ state: 'pending', context: 'prow/lgtm', description: 140 chars }from a 200-char inputisLgtmBound:per_page: 100→30per_page=100on theGET /commits/abc/statusURLAlso asserted, as the negative side of the
hasLgtmLabeltable:['approved', 'kind/bug']and[]→false.Files:
__tests__/plugins/lgtmBinding.test.tsonly (+34 lines, one import widened). Nosrc/,dist/or docs change. Disjoint from every open held PR (#510–#539): none touches__tests__/plugins/lgtmBinding.test.tsorsrc/plugins/lgtmBinding.ts.hasLgtmLabelis pinned here at the unit level rather than through a tide fixture because__tests__/plugins/tide.test.tsis #518's.Verification (this branch, local)
npx vitest run __tests__/plugins/lgtmBinding.test.ts: 23/23 pass (was 18)src/plugins/lgtmBinding.ts, same command: the.everymutant fails 2 tests, the other three fail exactly 1 each;src/restored,git statusclean apart from the test filenpx eslint __tests__/plugins/lgtmBinding.test.ts: cleanRelated Issue
Refs #523 — this ticks the
lgtmBinding.tsmutation 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 asrc/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