Repository navigation
test(mutation): add approve.ts to the nightly Stryker set and pin the set and its break score to docs/contributing.md - #691
Conversation
… 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>
|
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 |
There was a problem hiding this comment.
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.mjsfrommain,__tests__/mutationConfig.test.tsfails 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.mdand 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 incoveringor in no coverage entry),:241(remaining.size > 0— emptycoveragebreaks before[0]),:398(present.length > 0guards an emptyremoveLabels),:460/:486(Set.has(undefined)is false),:514(evaluateOnOwnersRepothrows on a missingpull_requestbeforepull_request?.baseis 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
|
/kind cleanup 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Test Improvement
Adds
src/plugins/approve.tsto the nightly Stryker set (stryker.nightly.config.mjs), documents its 33 reviewed survivors indocs/contributing.md, and adds__tests__/mutationConfig.test.tsso the nightly set and the docs cannot drift apart again.Why.
approve.tscomputes theapprovedlabel thattide.tswaits 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--mutateby hand.tide.tsandmergeQueue.tswere 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 ofapprove.ts" table, following the existingtide.ts/mergeQueue.tstables. No new test was needed to kill any of them.break95 → 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 whatmainreaches", 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.
--dryRunOnlyof the new nightly set instruments 7 files / 1329 mutants (was 793); themutationjob'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 mergefails on currentmain(set istide.ts,mergeQueue.tsonly). It also pins that the nightly set extendsstryker.config.mjs, thatthresholds.breakis the number quoted in both places indocs/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). Nosrc/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