Skip to content

feat(ci): promote mutation testing and the web e2e suite to required checks - #1210

Merged
Mearman merged 5 commits into
mainfrom
chore/promote-required-checks
Sep 11, 2026
Merged

feat(ci): promote mutation testing and the web e2e suite to required checks#1210
Mearman merged 5 commits into
mainfrom
chore/promote-required-checks

Conversation

@Mearman

@Mearman Mearman commented Sep 11, 2026

Copy link
Copy Markdown
Member

Closes #1194.

The promotion path the issue named, measured rather than assumed:

  • fix(pdf-codec): budget the mutation dry run for the instrumented STIX test -- the live failure PR feat(ooxml.js): associate a docx Caption paragraph with the figure it describes #1201 hit: Stryker's initial dry run timed out at 90s on the heavy STIX Two Math font test under instrumentation. The mutation timeout is now budgeted for the instrumented reality of that suite, following Stryker's own guidance that the budget should be a multiple of the slowest test.
  • feat(ci): gate each measured package on its first CI mutation baseline -- Stryker shard runs on main were already reporting real per-package scores without ever gating on them. Each package's thresholds.break is derived from its first measured baseline (floored score minus that package's own Timeout-classified share, rounded up, minimum one point -- Timeout is the one classification that legitimately flaps with runner load, so the margin absorbs every timeout re-classifying while anything beyond it is a real regression). Packages whose mutation runs have never completed stay ungated until one does; the derivation rule lives once on PackageStrykerOptions.breakThreshold.
  • e2e promotion: the web e2e suite is now a required check, with its mutation-mode vitest config restated for jsdom.
  • README and document-mcp docs rows updated to match (the "not yet a required check" notes are gone).

vite.config.ts declares environment: "jsdom" inside the "unit" project
entry, but vitest.mutation.config.ts replaces the whole test block for
Stryker's vitest-runner, so the key never survived the replacement and
the DOM-rendering tests executed in plain node under mutation runs --
the first one ("document is not defined") failed Stryker's initial dry
run, which is why the web package has never produced a mutation score.
Restating it on the replacement block keeps the mutation run identical
to the plain unit suite: dry run verified green locally (47 tests).
… test

Stryker's initial dry run runs the whole unit suite through mutant
instrumentation, which multiplies per-call cost by around two orders of
magnitude: math-stretch.test.ts's whole-Unicode-range glyphId enumeration
measures ~28s instrumented on a fast local machine (well under 200ms
plain) and exceeded its own 90s per-test ceiling on a GitHub mutation
runner, failing the dry run before a single mutant was tested. Raise the
test's ceiling to 300s (headroom above the worst instrumented case, not
a match for it) and give pdf-codec's stryker config a 15-minute
dry-run budget through a new packageStrykerConfig option, since the
enumeration test plus the rest of the instrumented suite leaves the
default 5-minute budget too little room on a loaded runner.
Stryker runs were already reporting real per-package scores from
main-branch shard runs without ever gating on them. Derive each
package's thresholds.break from its first measured baseline through a
new packageStrykerConfig option: floor the measured score and subtract
that package's own Timeout-classified share of valid mutants (rounded
up, minimum one point), because Timeout is the one mutant
classification that legitimately flaps between runs -- runner load
alone decides whether the same mutant times out or survives -- so the
margin absorbs every timeout re-classifying while anything beyond it
is a real regression. A package whose mutation run has never completed
(documents.js, pdf-codec, web) passes no break yet and stays ungated
until one does; the derivation rule and its rationale live once on
PackageStrykerOptions.breakThreshold.
…eck shape

The e2e suite has run unattended on every pull request and main push
since it landed, and its only observed red run tracked a regression on
that pull request's own branch and cleared when the branch was fixed,
so it meets the bar its job comment set for gating merges: requiredness
is recorded in the comment and README, and test-e2e joins deploy-site's
needs so a main-branch e2e failure blocks deploying the site the suite
drives a browser through. Mutation testing gains a mutation-result
aggregation job: the shard matrix's width varies with the affected
package set, so no individual shard context can be required by name
without stranding a pull request that produced fewer shards -- the
always-running aggregate is the one stable context for the ruleset,
once every package completes a green run behind its new thresholds.
@Mearman
Mearman force-pushed the chore/promote-required-checks branch from 796f172 to d391a61 Compare September 11, 2026 03:20
@Mearman
Mearman marked this pull request as ready for review September 11, 2026 03:52
@Mearman
Mearman merged commit ebb6b31 into main Sep 11, 2026
22 checks passed
@Mearman
Mearman deleted the chore/promote-required-checks branch September 11, 2026 03:52
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 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-09-11T03:59:30.219201Z d391a61 Draft marked ready
ℹ️ 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.

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 4.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

promote mutation testing and the web e2e suite to required checks

1 participant