Code of the changed-file and reuse runs
-
[V]
scripts/mutation-changes.ts <from> <to>(tests insrc/test/mutation-changes.test.ts, #146) printstrueorfalseand the reasons on stderr. It reads the changed files withgit diff --name-only --no-renames(a moved file counts with its old and its new path) and matches them against themutateglobs ofstryker.config.json(in order, the last matching pattern decides, as in the plan; a test checks that both agree on every file ofsrc/), the test files and the mutation configuration. Whenpnpm-lock.yamlchanged, it compares the keysname@versionof the sectionpackagesof both lockfiles for the tool chain; it fails when the new lockfile names no version of one of the tools, so a changed lockfile format never skips the run unnoticed. „Detect changes“ sets up Node for it (no dependencies) and writes the outputmutation:trueon a push; a pull request into a hotfix branch compares its base with the merge commit. Until #387 it also wrotetruein the full run of the release pull request ofmain(its draft wrotefalsefor every output, #147), and in the release pull request of a hotfix branch the script compared the release tag below the base (git describe --tags --abbrev=0 --match '[0-9]*.[0-9]*.[0-9]*', as the migration check does) with the merge commit and failed without such a tag. Since #387 a release pull request runs no mutation job (it changes only the metadata files): „Detect changes“ writesfalse. Every other pull request asksnode scripts/mutation-partial.ts plan <base> <merge commit>(tests insrc/test/mutation-partial.test.ts, #309):true(everything, in the shards, with the check of #167 forreuse), or the JSON list of the files to mutate, which „Detect changes“ writes asmutation=partialandmutation-files=<list>,[]asmutation=false. Since #370 a partial set of a pull request intomainasksscripts/mutation-nightly.ts checkfirst (a red or missing nightly run turns it intotrue), thenscripts/mutation-partial.ts partswrites the parts asmutation-planandmutation-parts; a push tomainwritesmutation=nightly. -
[V]
scripts/mutation-reuse.ts(tests insrc/test/mutation-reuse.test.ts, #167). „Detect changes“ callsdecide <base> <tested> <head>whenmutation-changes.tssaidtruein a pull request intomainthat is not a release pull request:<tested>is the merge commit the CI checks out (github.sha),<head>the head commit of the branch (pull_request.head.sha), where the check runs are. It printsreusewhen all hold, elsetruewith the reasons on stderr: the head has two parents; the second is an ancestor of the base (a commit ofmain), the first is not (a commit of the pull request); the tested commit has the tree of the head (main did not move after the merge, so the tested code is the head’s); no file of the merge (git diff --no-renamesfirst parent..head) that base..tested changes too is a file of the mutation run (reasonofmutation-changes.tswith themutateglobs of the checked-outstryker.config.json); the merge’s lockfile keeps the test tool chain (lockfileReasonofmutation-changes.ts, a lockfile without a tool version fails and so runs the jobs); and the newest check run (highest id) named exactly „Mutation tests“ of the appgithub-actionson the first parent completed withsuccess(gh api,check_name,filter=all). A skipped one does not count, so a head that took over a result cannot pass it on: the next merge ofmainruns the jobs. Any failing git or API call printstrue. The three mutation jobs then do not run. The CI Gate, withchecks: read, acceptsreuseonly in a pull request whose three mutation jobs were skipped, and only afterverify <head>found the first parent of the head (Git data API) with a green „Mutation tests“ again; for that it checks outscripts/and sets up Node only in that case. A push withreusefails as before (the full suite). -
[V] Measured (2026-11-13, #167) with
mergeOfMainand the check runs of the API on the ten merges ofmaininto #162, #164, #165 and #166 (base = second parent, tested = the merge; whethermainmoved before the CI ran cannot be told afterwards). The earlier rule took over 0 of 10. The revised rule passes 9 of 10 on the files and the tool chain (no merge changed the test tool chain); with the green check run of the first parent, 3 of 10 would have taken over the result:- #162
1729c60: reuse. - #162
fb2c016: first parent6bf7f3ehas no „Mutation tests“ (it was pushed together with the merge). - #164
7931307: reuse. - #164
dc20542: the newest „Mutation tests“ of7f41314was cancelled. - #164
7f41314: first parentb534eb6has no „Mutation tests“. - #165
666a75d: the newest „Mutation tests“ of75c0c53was cancelled. - #165
75c0c53: reuse. - #165
710359d: the newest „Mutation tests“ of0a7f40awas cancelled. - #165
0a7f40a: first parentbddd266has no „Mutation tests“. - #166
29c685c: blocked,mainand the pull request both changesrc/server/game/actions.ts(mutated); its first parent’s run was cancelled too.
- #162
-
[V] Proof run (decision above): „Run workflow“ of „Mutation tests (nightly)“ on a branch runs the complete sharded run there:
gh workflow run mutation.yml --ref <branch>. The display texts leave the mutated code in the same pull request, socatalog.tsand the total differ from a run before it; the like-for-like proof is a branch with the sharding commit only on the samemainas a complete unsharded run (gh workflow run mutation.yml --ref mainbefore the merge). The gate log lists every file with its counts; Stryker’s table of the unsharded run shows the same counts. -
[V] Text module (#131):
src/core/texts.tsexportsBUILD_TEXT,RES_TEXT,SHIP_TEXT,DEF_TEXT(n,ab,ds,ltkeyed by the entry key) andMISSION_TEXT; every catalog entry starts with...BUILD_TEXT.<key>and so on,MISSIONtakes its values fromMISSION_TEXT. The objects are equal to before; only the order of the fields inside an entry changed (texts first). Measured locally (2026-11-13):catalog.tshad 426 mutants, 420 of them static (180 of them the texts); now 246, 240 static (empty objects and lists, drive names,once), score 99.59 % (245 killed, 1 survived) above its floor of 98.76 %, 19 minutes for this file alone with 4 test runners.