Skip to content

test(prefixed): pin /stage and /status exclusive replacement, two-value /remove-lifecycle, mixed-case allowlist values and the first protected offender - #539

Merged
mrbobbytables merged 1 commit into
mainfrom
quality/test-prefixed-exclusive-casing
Oct 21, 2026
Merged

mrbobbytables merged 1 commit into
mainfrom
quality/test-prefixed-exclusive-casing

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

src/labels/prefixed.ts is 100 % covered by both suites, but six single-operator mutants survived npx vitest related src/labels/prefixed.ts --run (722 tests) on main @ 88241f4. This pins each one; no src/ or dist/ change.

__tests__/label/lifecycle.test.ts (built-in /lifecycle, /stage, /status):

  • it.each: /stage beta over stage/alpha and /status in-review over status/in-progress → ['DELETE <stale>', 'POST <label>'] — kills exclusive: true → false on the /stage (line 32) and /status (line 33) registry entries; only /lifecycle and /priority had a replacement case
  • /remove-lifecycle stale frozen with both on the issue → two DELETEs — kills .some → .every in the present filter (line 136); every other /remove-* case names one value
  • with a mixed-case yaml value (lifecycle:\n - Frozen\n):
    • /lifecycle frozen → POST lifecycle/Frozen — kills the dropped value.toLowerCase() key in requestedLabels' canonical map (line 239)
    • the same with lifecycle/frozen already present → POST only, nothing deleted — kills sameLabel's a === b.toLowerCase() (line 266) on the exclusive stale filter
    • /remove-lifecycle frozen over lifecycle/frozen → DELETE lifecycle%2Ffrozen — kills the same mutant on the removal path

__tests__/label/label.test.ts › protected labels:

  • /label hold lgtm is refused naming hold — kills find → findLast on the protected-label offender (line 255)

Files: __tests__/label/lifecycle.test.ts, __tests__/label/label.test.ts. Disjoint from every open hold PR #510–#537: none touches either file or src/labels/prefixed.ts (#512 edits __tests__/label/remove.test.ts only).

Verification (this branch, local)

  • npx vitest run __tests__/label/lifecycle.test.ts __tests__/label/label.test.ts: 54 passed (47 before)
  • each of the six mutants re-applied to src/labels/prefixed.ts against those two files: every one now fails, and only the test(s) named above fail for it
  • npm run test:coverage: 163 files / 2213 passed, 100 / 99.75 / 100 / 100 (unchanged floor; the four remaining branch records are the docs(contributing): record the four negative-count BRDA branches as a v8 await artifact, not a gap #511 artifacts)
  • npx eslint on both files: clean

Related Issue

Closes #538


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

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

…ue /remove-lifecycle, mixed-case allowlist values and the first protected offender

Six single-operator mutants of src/labels/prefixed.ts survived the full
related suite: the /stage and /status registry entries with exclusive
flipped off, .some -> .every in the /remove-<cmd> present filter, the
allowlist key fold at requestedLabels, sameLabel's requested-side fold
and find -> findLast on the protected-label offender. Each new case
fails exactly the mutant it is named for.

Closes #538

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 15:12
@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.

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

The cases assert exclusive stage/status replacement, multi-label removal, both sides of configured-value casing, and the first protected-label refusal without a label write.

Verified successful build-test, e2e-coverage and DCO results on head 54d5849. 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 30f2716 into main Oct 21, 2026
17 checks passed
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

1 participant