Repository navigation
test(stryker-js): draw only valid mutants in the planMutantTests generators - #293
Merged
Merged
Conversation
…rators orderedCommandArb and staticKillerCommandArb clear status but kept the drawn subsumption, so a drawn Subsumed mutant failed Mutant's struct filter (a Subsumed mutant is Ignored, from #273) and the laws fell over before any step ran. Both now keep a drawn subsumption only when it matches the status, through the helper coverageCommandArb already used inline.
…ant-tests-subsumption
…ant-tests-subsumption
…ant-tests-subsumption
ryanleecode
approved these changes
Oct 12, 2026
ryanleecode
left a comment
Contributor
There was a problem hiding this comment.
Verified at 915911f: up to date with main ce66cd7; check, all 5 e2e legs, checker-parity and Nix green; 0 open threads. Test-only (one property-test generator + changeset 'none'): generators clear subsumption when they clear status, matching Mutant.subsumptionMatchesStatus; the same invalid-draw cause #303 independently measured (5-15 of 2000 draws). Only red: bench typescript-checker leg, failing on every PR until bench leaves the PR path.
This was referenced Oct 12, 2026
systemfsoftware-maker
added a commit
that referenced
this pull request
Oct 12, 2026
…d fixture bakes, LPT planner Takes #303's per-project lockfile closure digest, #311's npm-ci fixture bakes from committed locks, #301's shard planner, and #293's lawful planMutantTests generators. - The incremental cache version moves to 7. Main and this branch each moved it from 5 to 6 for different layouts, so neither may read the other's file. runInputsDigestOf keeps #303's lockfile closure input, and the store key reaches it through the same function. #303's closure files, tests and oracle fixtures are byte-identical to main. - incremental-reuse.integration.test.ts keeps this branch's version: #303's only edit there was the version number in the incrementalSources scenario this branch deletes. - plan-request.schema.ts keeps #301's PlanShardsRefused and drops the two schemas this branch retired. - The planMutantTests law file takes #293's lawfulSubsumptionOf and drops this branch's untestedOf, which fixed the same draw. - The e2e closure install is per fixture, so only fixtures that request the S3 driver install it, and it carries #311's devDependency map. The harness stages each fixture's planned dependencies into its manifest, and the bake runs npm ci. fixtures:lock regenerated the locks: the verdict-store fixture gains its own lock, and the other seven gain the yaml dependency #303 added to the engine. - The docs say a store is shared only between checkouts at the same absolute path, because mutant ids hash the absolute file path.
systemfsoftware-maker
added a commit
that referenced
this pull request
Oct 12, 2026
…I wiring Supersedes the verdict-store plan with KTD17. turbo query (2.10.12) shows the mutation task is cache: false and invalidated per package: a one-file test change (#293) marks @systemfsoftware/stryker-js#mutation changed. A turbo task cache cannot carry the store across differing hashes, so the store keeps actions/cache under the house rule's exception. This layer adds no task cache, hash cache, change classifier or affected gate. The .turbo/cache transport on main goes to Stream K's audit.
This was referenced Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three
planMutantTestsproperty laws no longer fail at random. They failed because their generators builtMutantvalues that theMutantschema refuses.Cause
#273 added a struct filter to
Mutant(Mutant.schema.ts:144-147): aSubsumedmutant must beIgnored, and aReadmittedmutant must not be.orderedCommandArbandstaticKillerCommandArbclearedstatusbut kept thesubsumptionthey drew. Whenever that draw wasSubsumed,Mutant.Mutant.makethrew before the law ran any step (Schema validation failed, "Failing step: no step ran").Laws that failed this way:
∀o_OrderedCoveringTests_≡ThePreviousKillerLeadsThenAscendingDryRunTime(orderedCommandArb)∀r_CoveredRun_≡NeverPublishesKillerTestIds(orderedCommandArb)∀s_StaticPriorKiller_≡TheRunPublishesItsKnownKillerTestIdsInTheirOrder(staticKillerCommandArb)Fix
lawfulSubsumptionOf(mutant, status)keeps a drawnsubsumptiononly if it is valid for the status the generator sets. The check isMutant.subsumptionMatchesStatus, the same predicate the struct filter uses. With no status, onlySubsumeddraws are dropped. WithIgnored, onlyReadmitteddraws are dropped. All three generators use the helper;coverageCommandArbalready did this inline. The struct filter, every law's assertions and the run counts are unchanged.Runs of
plan-mutant-tests.workflow.property.test.tsmainat3cb134232, before the fix9a4db283bmainat815754693On the merged head,
pnpm typecheck, oxlint on the changed file,dprint checkandgritlint checkpass. The changeset isnonebecause no shipped code changes.Follow-up
statusReasongap (pre-existing, onmainsincecfde427d1).coverageCommandArbalways sets the inputstatusReasontoundefined, so∀r_IgnoredEarlyResult_≡ItsReasonIsForwardedOrNamesARulecan't catch a planner that drops a closed mutant's real reason. The generator should draw a valid reason when the mutant is closed. That is out of scope here.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.