Skip to content

build(mutation): gate each package on a break threshold derived from its baseline - #60

Merged
Mearman merged 4 commits into
mainfrom
build/mutation-thresholds
Oct 12, 2026
Merged

Mearman merged 4 commits into
mainfrom
build/mutation-thresholds

Conversation

@Mearman

@Mearman Mearman commented Oct 12, 2026

Copy link
Copy Markdown
Member

Draft: each package's break threshold is set from this branch's own mutation run, which also measures the web app and the packages with style modules under the new mutate globs. Thresholds, measured scores and the follow-up issues land before this is marked ready.

breakThresholdFromBaseline in stryker.shared.ts derives a threshold from a completed run's counts: the score with every timed-out mutant counted as survived, floored to a whole percentage. Whether a mutant times out depends on runner load; killed, survived and no-coverage verdicts do not, so this is the lowest score the same code and tests can give and needs no hand-picked margin.

Also in here: .css.ts modules leave the mutate set (the Vanilla Extract compiler evaluates them outside the test process, so every mutant in them was no-coverage on main), graph-web gains a Stryker run, and the report upload now matches the targets' directories, which it missed.

Refs #43

@Mearman

Mearman commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-12T09:24:07.020511Z 4152332 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 90cfe94846

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@Mearman
Mearman marked this pull request as ready for review October 12, 2026 09:18
@Mearman
Mearman force-pushed the build/mutation-thresholds branch from 90cfe94 to 83b906c Compare October 12, 2026 09:18
@Mearman

Mearman commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 83b906c3df

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

A target sits at packages/targets/<package>, one level shallower than the
packages in the other layers, so neither upload glob matched it and the
command line's and the bundle's HTML reports never reached the artifact.
The Vite plugin's compiler evaluates a .css.ts module to emit its stylesheet
and class names, so the instrumented copy never runs in the test process and
every mutant in it reports no coverage, which no test can change. Mutating
it only pulls the score of every package with styles down.

The shard planner's comments no longer claim to mirror the mutate globs
exactly, since they leave out more than unit tests.
Its unit tests render the screens in happy-dom with the Vanilla Extract
plugin, as the UI packages' do, and those packages already run under
Stryker, so nothing kept the app out of mutation testing. Its store worker
and style modules stay out through the shared mutate globs.
breakThresholdFromBaseline takes a completed run's killed, timed-out,
survived and no-coverage counts and returns the score with every timeout
counted as survived, floored to a whole percentage. A timeout depends on
runner load and the other verdicts do not, so this is the lowest score the
same code and tests can produce, and the gate needs no hand-picked margin.

The shared config also names the package left out of mutation testing and
why.
@Mearman
Mearman force-pushed the build/mutation-thresholds branch from 83b906c to 4152332 Compare October 12, 2026 09:21
@Mearman

Mearman commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 4152332b51

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@Mearman
Mearman merged commit 1a1a3e3 into main Oct 12, 2026
14 checks passed
@Mearman
Mearman deleted the build/mutation-thresholds branch October 12, 2026 11:11
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.

1 participant