Skip to content

test(mutation): add approve.ts to the nightly Stryker set and pin the set and its break score to docs/contributing.md - #691

Open
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-nightly-stryker-approve
Open

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-nightly-stryker-approve

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds src/plugins/approve.ts to the nightly Stryker set (stryker.nightly.config.mjs), documents its 33 reviewed survivors in docs/contributing.md, and adds __tests__/mutationConfig.test.ts so the nightly set and the docs cannot drift apart again.

Why. approve.ts computes the approved label that tide.ts waits on — the other half of the merge decision — yet it sat in neither Stryker set, so a surviving mutant there would only ever be found by someone running --mutate by hand. tide.ts and mergeQueue.ts were pulled into the nightly set for exactly this reason (#424fb95-era rationale in the config header); this finishes that thought.

Evidence (local, main@9aa12b8, npx stryker run stryker.nightly.config.mjs --mutate src/plugins/approve.ts): 536 mutants, 502 killed, 1 timeout, 33 survived (93.84 %). Each survivor was read against the source and is equivalent — placeholder bodies carry no command or marker, Set.has(undefined), removeLabels([]) sends nothing, files under one OWNERS file share approvers, log text — and is recorded in the new "Reviewed survivors of approve.ts" table, following the existing tide.ts/mergeQueue.ts tables. No new test was needed to kill any of them.

break 95 → 94. With the scheduled job's 762/31 at the same commit the combined set scores 95.18 %. The config's own rule is "just under what main reaches", and 95 would leave two equivalent survivors of headroom before an unrelated refactor turned the nightly red. Decision taken by hive: follow the documented rule rather than keep the tighter number.

Cost. --dryRunOnly of the new nightly set instruments 7 files / 1329 mutants (was 793); the mutation job's 60-minute timeout has ample room (the 793-mutant run took ~9 min on CI).

The new test fails without the change: adds the files that perform and approve the merge fails on current main (set is tide.ts, mergeQueue.ts only). It also pins that the nightly set extends stryker.config.mjs, that thresholds.break is the number quoted in both places in docs/contributing.md, and that every file in the set is named in the docs.

Files: stryker.nightly.config.mjs, docs/contributing.md ("Mutation checks" prose, Testing table row, new survivors table), __tests__/mutationConfig.test.ts (new). No src/ or workflow change. Disjoint from held #680–#690 (none touch the Stryker configs or this docs section).

Related Issue

None — the proposal was first raised in a quality bead at 9aa12b8 and its issue was folded into #679 (a docs-staleness tracker) where it did not belong; this PR carries the full rationale instead.


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

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

… set and its break score to docs/contributing.md

approve.ts decides the approved label tide waits on, but it was in neither
Stryker set, so a behavioural survivor there would only be found by someone
running --mutate by hand. The run at 9aa12b8 scores 502 killed / 1 timeout /
33 survived; every survivor is reviewed in docs/contributing.md and all 33 are
equivalent. Combined with the scheduled job's 762/31 the nightly set reaches
95.18 %, so break moves from 95 to 94 by the file's own just-under-main rule.

mutationConfig.test.ts keeps the two configs and the docs in step: the nightly
set must extend the local one, add exactly the three merge files, name a break
score the docs quote in both places, and be documented file for file.

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 November 10, 2026 19:26
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 10, 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 diff against the tree at 6e5c16e and re-ran the verification locally. This looks correct to me.

What I verified:

  • The new test fails without the change, as claimed. With stryker.nightly.config.mjs from main, __tests__/mutationConfig.test.ts fails 2/4 (adds the files that perform and approve the merge, sets the break score docs/contributing.md documents); on this head all 4 pass.
  • The docs/test coupling is real both ways. The test reads docs/contributing.md and asserts both occurrences of the score (a \break` score of 94in the Testing table,fails below a score of 94` in the prose) and every file in the nightly set by name, so the set and the docs cannot drift silently — which was the stated point.
  • Spot-checked the survivor table against src/plugins/approve.ts. The lines cited exist and the equivalence arguments hold where I checked: approve.ts:99-100 (comment.body ?? '' / body === '' — a placeholder body carries no command), :206 (require_self_approval && author !== '' — author already in covering or in no coverage entry), :241 (remaining.size > 0 — empty coverage breaks before [0]), :398 (present.length > 0 guards an empty removeLabels), :460/:486 (Set.has(undefined) is false), :514 (evaluateOnOwnersRepo throws on a missing pull_request before pull_request?.base is read).
  • No src/ or workflow change; the diff is the config, the docs section, and the new test, exactly as the body says.

The break 95 → 94 follows the config's own documented rule ("just under what main reaches"), consistent with how 95 was chosen at 424fb95 — the header's history comment is updated accordingly. The claimed 93.84 % / 95.18 % mutation scores are from the author's local run and I did not re-run the full Stryker set, but the gate test and the docs pinning stand on their own.

No defects found. Approval is a human's call; recording this as a clean read.

— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

/kind cleanup


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 9aa12b8

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

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

0 participants