Repository navigation
v3.52.0: test-run facts for mutation, stale duplication suppressions and a config-gated LSP
LatestFeatures
-
With Vitest,
fallow mutationcan take its dry-run facts from the test step of the project. A CI job no longer has to run the tests of a change two times. To set it up, follow these steps:- Add
fallowto thedevDependencies. - Add
plugins: [fallowMutation()]fromfallow/vitestto the Vitest config. - Run the test step as
fallow mutation test-run <scope flags> -- <test command>. - Run
fallow mutationwith the same scope in the same CI job.
The mutation run uses the facts of each test file whose dry-run key is equal, and dry-runs the other files. A file with a failed or retried test falls back. A test run with an option that changes the facts gives no facts, for example
isolate: false, a test name filter or--shard. A test step with coverage on gives no facts unless you setfallowMutation({ coverage: true }). The wrapper always exits with the exit code of the test command.The new
cache.test_runobject of the JSON report gives the used files and the reason of each fallback. We measured a public monorepo with about 8,000 unit tests in November 2026, in a container with 4 cores. In two measurements, the dry run of the mutation step fell from 77 s to 2 s and from 146 s to 5 s. Each mutant kept the same status. (#5535) - Add
-
The test step also gives the facts of a run with reach selection.
fallow mutation test-runnow records the reach probes of each test file when--reach-selectionisonorcheck. The first run of a pull request then needs no full dry run. A test file gets no record when it cannot prove that it has each of its probes, or when it has a skipped ortodotest. The next dry run keeps such a file. (#5556) -
The GitHub Action and the GitLab template can run the test command with the test-run facts. Set the
mutation-test-commandinput of the Action, or theFALLOW_MUTATION_TEST_COMMANDvariable of the template, for example tonpx vitest run. The Vitest config must loadfallowMutation()fromfallow/vitest. The job then runs the tests one time. A failed command fails the job with its exit code. The Action job summary and the template job log show aTest run:line. (#5555) -
fallow mutationcaps the test time of one mutant. A mutant with thousands of covering tests could cost minutes when it survived.--mutant-time-cap(config keymutation.mutantTimeCap, default3m,offturns it off) caps the test time of one mutant. A kill inside the cap iskilled. A capped mutant with no kill ispendingwithpending_reason: "mutant-time-cap", neversurvived.The JSON report gives the cap in
time_cap_ms.summary.mutant_time_cappedcounts these mutants. The run completion ispartial. A--kill-matrixrun has no default cap. The cap compares the measured test time, so a mutant gets the same status in each run of the same change. The mutants with the lowest estimated test time now run first, also without--time-budget. (#5501, #5538) -
fallow mutation --retry-scope coveringmakes the confirmation of survivors cheaper. The default retry runs each passing test of the test files of a survivor. That retry can cost many times the first run. With--retry-scope covering(config keymutation.retryScope), a survivor runs again with the tests of its first run only. The report marks such a survivor withretry_scope: "covering", because it is weaker evidence. The default staysfile.The new
timings.retry_wide_worker_msfield gives the time of the wide retries, summed over the workers. It is not a wall time, so it can be larger thanretry_ms. (#5488) -
The
fallow mutationreport names why it kept a test file, and which mutants got no retry. Thekept_bylist ofcache.reach_selectionnames the changed item that kept each test file. The human report of--reach-selection onsays why the run left out no test file. Asurvivedortimeoutmutant that got no retry before the time budget ended hasunretried: true.runner.worker_modes.checksgives the number and time of the worker checks. (#5524, #5533, #5542, #5526) -
fallow dupesreports acode-duplicationsuppression that hides no clone as stale. Before, such a marker stayed after the duplicated code changed, and it could then hide a new copy without notice. Nowfallow dupes, the barefallowrun andfallow auditlist it instale_suppressions, with the severity of thestale-suppressionsrule. Aterror, or with--fail-on-issues, thedupescommand and the bare run fail. (#5406) Thanks @neumaennl for the report. -
fallow auditmarks the new copy of an introduced clone group. In the JSON output, each instance of an introduced clone group hasadded, and each audit clone group haseffective_severity. A tool that reads the JSON can now point a finding at the new copy, not at the old copy that comes first in path order. The GitHub Action audit summary now points each clone row at the new copy. (#5016) Thanks @cr101 for the report. -
The language server can run only in projects with a Fallow config file. Set the
requireConfigFileinitialization option totrue. The server then publishes no diagnostics while the workspace has no config file that the CLI finds and noconfigPath. A new config file starts the diagnostics, and a removed config file clears them. In Zed, setlsp.fallow.initialization_options.requireConfigFile. The option is off by default. (#3036) Thanks @cloud-walker for the report. -
A
server-only-importcandidate names the imported server-only module.fallow security --format jsonnow setscandidate.sink.calleeto the specifier, for example"node:fs","server-only"or"next/headers". Theevidencetext names the same specifier. (#5586) Thanks @cr101 for the report. -
fallow securityreports open redirects forreact-router-domand Remix 3 imports. When the project declaresreact-router-dom, thereact-router-open-redirectcategory also matchesredirect,redirectDocumentandreplacefrom it. The newremix-open-redirectcategory (CWE-601) reports a non-literal target ofredirectandcreateRedirectResponsefromremix/response/redirector@remix-run/response/redirect. That category is active when the project declaresremixor@remix-run/response. (#5594) Thanks @cr101 for the report and the reproduction.
Changed
fallow mutationuses each core of a small CI runner by default. Without--concurrencyormutation.concurrency, a run starts one runner process for each usable core up to 4 cores. Above 4 cores it keeps half the cores, with a minimum of 4. The CPU and memory limits of the container cap the count. Without a memory limit, the physical memory caps it. On a 4-core, 16 GB Linux runner, the dry run of a pull request in a large monorepo took 84 s instead of 158 s. The human output shows a newWorkers:line. (#5529)- The dry run and the mutant phase of
fallow mutationtake less time.- The dry run companions take test files in batches from one queue, so no companion waits for another with slow files. (#5503)
- The Vitest companions share their module transforms through a cache in the run directory. (#5503)
- A mutant first runs up to 3 tests that killed other mutants of the same function. On a project with 40 slow test files, one such mutant went from 22 seconds to 2 seconds. With more than one killing test,
killed_bycan name another test than before, and with more than one worker it can differ between two runs. (#5500) fallow mutationskips a worker check that costs more time than it can save. On a project with 40 slow test files, the mutant phase took 41% less time. (#5526)--time-budgetruns the cheapest retries first. (#5488)--reach-selectionkeeps fewer test files for a changed export, for a type-only runner config import, and for code that holds a module object. The dry-run cache format goes to version 7. (#5502, #5524)
fallow audit --format sarifgrades clone results by theintroduced-clone-grouprule. Before, each clone instance result had the levelwarning. Now a group that counts for the audit verdict takes the level of the rule, and a group that does not count takesnote. Under thenew-onlygate, the new copy takes the rule level and the old copies takenote. Each result lists the other copies inrelatedLocations. Locations and fingerprints do not change, so code scanning keeps each alert. Underintroduced-clone-group: error, the code scanning check of a pull request can now fail on a new copy.fallow dupes --format sarifdoes not change.fallow auditkeeps its base snapshots in a private directory on Unix. The snapshots are now infallow-audit-snapshots-<uid>inside the temp dir, with mode 0700. Fallow refuses that path when it is a link, is not a directory, belongs to another user, or gives access to other users. The audit then prints a warning and exits with code 2. Module resolution and project discovery in a snapshot stop at the snapshot root.- A walk inside a repository applies no
.ignorefile from above the repository top level. Git treats.gitignorethe same way. A root inside a nested repository no longer gets the.ignorefiles of the outer repository. - A named export of
vite.config.*needs an importer in a project that lists onlyvite-plus. Vite and Vite+ read only thedefaultexport of the config. Remove such an export, or import it from the module that needs it. (#5565) - Entry point discovery reads the commands of package scripts with about 13% fewer instructions. The entry points stay the same. (#5493)
Bug fixes
Detection
fallow dead-codereports the unused exports of a helper below__tests__/when Vitest defines inline projects. Inlinetest.projectsnow replace the static entry patterns, as a roottest.includedoes. (#5554) Thanks @neumaennl for the report.fallow dead-codeno longer reports the setup file or the test files of a Vitest project behind a spread intest.projects. Fallow now reads a spread of an array literal in a config array, also in a conditional spread. (#5566)- A local in a class static block or in a switch case no longer hides a namespace import after that scope. A later read such as
e.usedError()now counts, sousedErroris no longer an unused export. (#5317) unresolved-importno longer reports a root-absolute stylesheet link that no file holds. An example is<link rel="stylesheet" href="/custom.css">in a SvelteKitsrc/app.html, where a server route serves the URL. A relative stylesheethrefand a module scriptsrcmust still resolve. (#5395)- A dependency finding points at the entry in its own
package.jsonsection. Before, a package that was also in, for example,peerDependenciesoroverridescould get the line of that other entry. (#5450) Thanks @aloneangel45 for the patch in #5459. fallow dupestokenizes the type annotation of a variable declaration.let value: Alpha<One>;andlet value: Beta<Two>;no longer give the same tokens. The duplication token cache is rebuilt once. (#5435) Thanks @aloneangel45 for the patch in #5485.- A
fallow-ignore-next-line stale-suppressioncomment now hides the stale suppression below it. Each stale-suppression finding offers this comment as itssuppress-lineaction, and before it had no effect. (#5580) fallow audit --basekeeps an old Tailwind arbitrary value inherited when another file also uses it. The audit base snapshot cache is rebuilt once. (#5537) Thanks @aloneangel45 for the first fix in #5546, and @kanpai-coder for the report.
Type-aware analysis
--type-awarekeeps the type-aware pass for a class that implements two framework lifecycle interfaces. The companion now relates a lifecycle hook only to the interface that declares it, so Fallow no longer rejects the answer. (#5552) Thanks @PedroMartpico for the report and the first patch.--type-awarekeeps a class member that a library calls, also when only a test file calls it. An example isprocessof aWorkerHostsubclass from@nestjs/bullmqunder--production. Such a member is nowcontract-preserved. (#5567) Thanks @PedroMartpico for the report.fallow health --type-couplingno longer reports complete evidence when no public API entry point resolves. Each such project adds ano-api-entry-pointomission, so the report ispartialand--type-aware-require completefails. The coupling summary has a newapi_entry_point_countfield. The companion protocol is now version 12. If you installed the companion withfallow type-aware setup, run that command again. (#5506) Thanks @Smrtnyk for the report.- The JSON output of a type-aware
fallowrun with health now has the type-aware data of health. The data is at_meta.health.type_aware. With--type-aware-require complete, an--only healthrun now fails on an incomplete coupling query, asfallow healthdoes. (#5585) Thanks @PedroMartpico for the report. - The type-aware config hash no longer times out or fails on shared tsconfig
extendsandreferencesentries. A very large config graph gets a new hash once. When a run then reports an incompatible analysis identity, save the type-aware baseline again.
Security candidates
- A redirect to a path that a same-origin check validated is no longer an open-redirect candidate. Fallow accepts a
new URL(value, origin)check that rejects another origin and a//path, inline or in a local helper. (#5541) Thanks @cr101 for the report. - A type-only import of a server-only module no longer gives a
server-only-importcandidate. This coversimport typeand an inlineimport { type Stats }. (#5588)
Mutation testing
fallow mutation --runner-projectno longer reports the test files of the other Vitest projects as undiscovered. (#5507) Thanks @Smrtnyk for the report.fallow mutationwithbun testornode:testruns the test files in the order of the request. The file that kills a mutant can now run before a slow file whose name sorts first. (#5315) Thanks @yamatakeru for the report.fallow mutationgives fewertimeoutstatuses that come from host load. (#5528)- A worker check of
fallow mutationno longer runs past the time budget. A shared Vitest worker now runs the test file order that its check proved. (#5542) fallow mutation --reach-selectionkeeps a test file that can read a changed export throughthis. Before, the selection could leave out such a file and give a false survivor. (#5524)fallow mutation --reach-selection onkeeps a test file when a new or removed export can clash between twoexport *statements. (#5530)fallow mutationno longer writes its results into the journal of another run. (#5515)fallow mutation --resumeno longer runs a mutant again that no target killed in the target-first mode.- An edit of the root
package.jsonthat no test run reads keeps the mutation result cache and the dry-run cache. The cache key now holds only the fields that a test run can read, so an edit ofscripts,keywordsorlicensekeeps the stored results. The CI cache key of the GitHub Action and the GitLab template no longer holdspackage.json. The first run after the update stores new results. (#5581)
Output and CI
fallow coverage upload-inventorysends churn only for the files of the inventory. On a large repository, the extra entries pushed the request over the 25 MiB limit, and the upload failed with HTTP 413. (#5522) Thanks @chbert for the report.fallow fixapplies the scope flags.--workspace,--changed-workspaces,--changed-since, the package baselines and diff input now narrow the fixes, not only the report. An unknown workspace exits with code 2. This also applies to theworkspaceparameter of the MCPfix_previewandfix_applytools, and to the Action withcommand: fix.fallow fixskips a file with a bare CR line ending. The file getsskip_reason: "mixed_line_endings", and the run exits with code 2.fallow fix --type-awareremoves more unused class methods.fallow auditno longer compares against a wrong base commit when another audit holds the base snapshot.fallow auditno longer reuses a base snapshot that a cache removal left half deleted.- The LSP server no longer queues one analysis per save behind a long run. (#5512)
- The LSP server no longer shows old diagnostics on a file that was closed, opened again and edited during a run. (#5513)
fallow watchruns again after the kernel drops file events, and when a nested.gitignoreor.git/info/excludechanges. It also no longer follows directory links when it sets up the watch.fallow telemetry statusno longer reports a mixed state while another process changes the setting. (#5508)- Two MCP servers no longer ask for telemetry consent at the same time, and an event is no longer sent twice. (#5514)
- A baseline save no longer leaves a partial file.
- Ctrl-C during
fallow fixno longer leaves temp files in the project.
Hardening
These fixes stop a file in a cloned repository, or another local user, from making Fallow read or write outside the project or run too long:
- A small source file with repeated or nested references no longer makes a run use all memory or run without end. The extraction and duplication cache versions change, so the first run after an upgrade parses all files again.
- A long comparison chain or nested lists in JSX text, a template or a script block no longer make the parse use gigabytes of memory. A file past the budget gets the
source-nesting-too-deepdiagnostic. The parse cache and the duplication token cache are rebuilt once. - A dense group of circular imports no longer makes the cycle check run for minutes. The check stops after 500,000 imports per group and marks the group as capped.
- A V8 coverage source map that points past its script no longer slows
fallow health. - A cloud answer with more than 48 million JSON values now gives a clear error.
- A
code_executesnippet of the MCP server now always ends near itstimeout_ms. The MCP server also ends the CLI process tree of each call that it drops. - Fallow no longer follows a shell helper path, a tsconfig reference, a lockfile or a
pnpm-workspace.yamlthat leaves the project. fallow agent installkeeps a normal indent in an MCP config file with a very wide indent.- The audit cache reads its
.shaand.last-usedfiles only when the user owns them. - The commit gate of
fallow hooks installfollowscdsteps the way the shell does.
Upgrade notes
- The type-aware companion protocol is now version 12. If you installed the companion with
fallow type-aware setup, run that command again. fallow mutationcaps the test time of one mutant at3mby default. A mutant over the cap with no kill ispending, notsurvived. Set--mutant-time-cap offto keep the old result.- A stale
code-duplicationsuppression is now a finding. Aterror, or with--fail-on-issues,fallow dupesand the bare run fail on it. - Under
introduced-clone-group: error,fallow audit --format sarifgives the new copy of a clone group the levelerror. fallow fixexits with code 2 when it skips a file with a bare CR line ending.- The extraction, parse and duplication caches, the dry-run cache and the cache of
fallow auditbase snapshots are rebuilt once.
Full Changelog: v3.51.0...v3.52.0