Skip to content

feat(mutation-testing): print a wall-clock estimate before a mutation run - #10415

Merged
melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-9689-40441527211-1
Oct 27, 2026
Merged

melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-9689-40441527211-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #9689

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Adds scripts/estimate-run.sh, which turns a mutant count and a timed per-mutant build-and-test into the line Estimated wall-clock: <h>h <m>m (<n> mutants x <s>s per build-and-test) in exact integer arithmetic, rounded up to the minute, with a black-box test. The audit skill's Phase 1 step 5 (the step before any mutation run) now times one build plus test run of the selected tests, takes the mutant count from the tool's dry run or listing, and prints the helper's line in place of the old baseline-suite-ms x mutants estimate; --full confirms against the same line. For a .NET test set the timing sums every dotnet-test-selection.sh line rather than one, because each mutant runs every line (context/tool-test-restriction.md "Running a .NET test set"), and a timing whose build could not be made to recompile is reported as a floor.

Not verified

  • bash plugins/mutation-testing/scripts/estimate-run.test.sh and bash plugins/mutation-testing/scripts/estimate-run.sh --mutants 120 --seconds 45 were not executed: this lane runs only its named wrappers, and check-affected without --tests does not run suites. Every expectation was worked by hand an
  • bash scripts/affected-tests.sh --run (an issue Done-when item) not run here for the same reason; left to the PR's CI.
  • typos check skipped by check-affected (typos not installed); CI runs it.
  • The issue says to time one dotnet-test-selection.sh project line; the skill sums every line instead, since each mutant runs every line. A reviewer should confirm that reading.

Fix

  • plugins/mutation-testing/scripts/estimate-run.sh: new helper; validates --mutants (up to 9 digits) and --seconds (above zero, up to 6 digits and 3 decimal places, read as decimal), scales seconds to milliseconds and prints the estimate line; exit 2 with nothing on stdout on any usage error.
  • plugins/mutation-testing/scripts/estimate-run.test.sh: new contract test; the issue's 120 x 45 case, zero mutants, fractional times (7 x 2.5, 24 x 2.5 exact minute, 25 x 2.5, 1 x 0.001), 3 x 1200.5, 1500 x 180, leading zeros, either flag order, and 14 refusal cases.
  • plugins/mutation-testing/skills/audit/SKILL.md: Phase 1 step 5 times one build plus test run of the cached selection, takes the count from the tool's dry run or listing, and prints the estimate-run.sh line; --full points at that line; the --exercised Phase 0 and Phase 1 paragraphs no longer name the
  • plugins/mutation-testing/skills/audit/evals/evals.json: case 5 (--full) expects the timed run and the estimate-run.sh line instead of baseline-suite-ms times the mutant count.
  • plugins/mutation-testing/skills/setup/templates/config-template.md: the baseline-suite-ms comment no longer says the audit estimates from it.
  • .changes/mutation-testing/feat-9689-estimate-run-4d1b7e93.md: minor-bump fragment (Added: the script; Changed: the audit's estimate basis).

Verification

The runner ran each check from the base copy against 98f8e30:

  • scripts/check-changelog-fragments.sh --check: passed

The run reports:

  • .lane/checks/bin/check-changelog-fragments: all 9 fragments valid.
  • .lane/checks/bin/check-affected: 11 passed, 6 skipped (typos not installed; ruff no .py; changed-skills and three validate-plugins parts run checked-tree code), 0 failed, over 6 changed files.
  • .lane/verify/bin/check-evals-quality plugins/mutation-testing/skills/audit/evals/evals.json: PASS with 5 warnings; the one new warning is Q4 on case 5 naming scripts/estimate-run.sh, the same shape case 3 already carries for suppression-lint.sh.
  • .lane/verify/bin/cant-fail-scan --file plugins/mutation-testing/scripts/estimate-run.test.sh --check: PASS, no gating findings.
  • Fresh-context review subagent over the whole diff: worked every test expectation by hand and found them correct; its should-fix findings (estimate timed on a cached build, stale baseline-suite-ms comment, stale cost-base wording) and nits (as-given printing, changelog wording) were all fixed.
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40441527211

Left out: the items under Not verified.

Related

#9689

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 239352d740825f3ef1cafb856a102b1997b563fa: 0 finding(s), 0 as inline comments.

Incremental security review (98f8e30 → 239352d), covering plugins/mutation-testing/skills/audit/SKILL.md and the new plugins/mutation-testing/skills/audit/context/run-estimate.md.

I found no security issues. The change reflows prose and moves the Phase 1 step 5 estimate instructions into the new context file. Under the instruction-surface lens, I checked each moved or reworded rule and found none deleted or softened:

  • The seconds measurement is intact, including timing a mutant as it pays for it and the floor caveat.
  • The mutant-count source is intact, including the tool: manual case.
  • The three-decimal limit on --seconds is intact.
  • "Never do the arithmetic yourself" is intact.
  • "A truncated run must never read as a clean one" stays in SKILL.md.
  • The regime refusal rule (in-tree per mutant with no per-mutant observability or interrupt safety) is unchanged apart from line breaks.

The invocation of scripts/estimate-run.sh is unchanged, and the new file adds no commands, paths, or grants. Neither file matches a trusted path, and no plugin manifest changed, so there are no manifest <field> lines. Nothing in the change draws on spend.

critical-findings: 0

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 239352d740825f3ef1cafb856a102b1997b563fa: 0 finding(s), 0 as inline comments.

Incremental review of plugins/mutation-testing/skills/audit/SKILL.md and the new context/run-estimate.md, covering only the change since 98f8e30. I found nothing to flag.

The change moves the step 5 timing and mutant-count guidance out of SKILL.md into context/run-estimate.md. The moved text is the same as before:

  • The cached build-plus-test timing.
  • The sum over every dotnet-test-selection.sh line.
  • The "floor" caveat.
  • The mutant count from the tool's dry run or listing, or from the Phase 2 mutants under tool: manual.
  • The three-decimal --seconds.
  • "Never do the arithmetic yourself."

SKILL.md keeps the estimate-run.sh invocation line and the truncation warning. The link context/run-estimate.md resolves to a file this change adds. The --full flag text still points at Phase 1 step 5. Evals case 5 still matches the step. The other edits are re-wrapped lines (the Phase 0 paragraph, and the regime paragraph, where two sentences are now joined with no content change).

I read the diff and the files above but did not run estimate-run.sh or its test. No closing-issue criterion is affected by this change. No manifest items are hit, and this change introduces no trusted-path or cost concern.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 239352d740825f3ef1cafb856a102b1997b563fa.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 7d5f5b8 Oct 27, 2026
38 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-9689-40441527211-1 branch October 27, 2026 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(mutation-testing): print a wall-clock estimate before a mutation run

0 participants