Repository navigation
·
29 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Features
- A workspace package that looks published gets a
publicPackageshint. A package looks published when itspackage.jsonis not"private": trueand has anexports,mainormodulefield. WhenpublicPackagesdoes not list such a package and its entry file exports names or members with findings,workspace_diagnostics[]gets apublic-package-candidateentry. Human, Markdown and SARIF output show the hint. A--workspacerun shows only the hints of the selected packages, and a--changed-since, diff or--filerun shows none. The entry changes no finding, no count and no gate. (#5335) fallow mutationreports the worker mode of the mutant runs. The newrunner.worker_modesobject of the JSON report gives the number of mutant runs and their time in each mode of the Vitest companion. The modes areisolated,sharedandreused. When a run is slow, a highisolatedvalue shows why. (#5423)fallow mutation --reach-selectionskips the dry run of each test file that cannot run a mutant. With--reach-selection on, a run records indry-runs.jsonwhich functions each test file enters. A later run skips a test file when its record proves that the file cannot run a mutant of the run. Withcheck, fallow dry-runs each file and lists each mutant that a dropped file covers. If the list is not empty, fallow exits with code 2. The config key ismutation.reachSelection, and the selection is off by default. On one project, 7 test files reach a changed file through a barrel file, and 1 of them runs it. After a change of a function body, the dry run went from 22 seconds to 1 second, with the same verdicts. (#5425)
Changed
fallow mutationis faster with more than one companion.- fallow divides the dry run over the
--concurrencycompanions, and each companion keeps its share for the mutant runs. On a project with 7 test files, 6 of which wait 10 seconds, the dry run went from 61 to 21 seconds. The mutant phase went from 62 to 3 seconds, with the same verdict for each mutant. (#5413) - With Vitest, a companion that starts later takes the test index of the first dry run and does no dry run of its own. (#5419)
- With Vitest, a mutant that would outlast the work of the other workers runs in parts on the idle workers. A kill in any part decides
killed. (#5422) - Each companion now runs the self-check of the first job for the tests in its own share. This happens when those tests are in more than one share. (#5444)
- fallow divides the dry run over the
fallow mutationreuses the dry run of each unchanged test file. On a project with 7 test files, a repeat run with no change went from 21 seconds to 1 second. Each mutant kept its verdict. A test file with a failed baseline test no longer turns the cache off for the other files.--no-cachedisables the dry-run cache. (#5424, #5482)coverage analyze --cloudkeeps hot-path, blast-radius and importance IDs on a line move. The IDs hash the file and the function name, or thestable_idwhen the file has more than one function of that name. Thus an edit above a function no longer gives it a new ID. Each entry also haslegacy_idwith the old ID for a transition window.coverage analyze --cloudfills the local structure on cloud rows. When a cloud row has no caller graph, complexity or owners, fallow fillscaller_count,caller_count_weighted_by_traffic, the risk band,cyclomaticandowner_countfrom the local AST. Before, these fields read as0.coverage analyze --cloudcapssafe_to_deletewhen the local join is incomplete. When under 80% of the cloud functions match the local AST, eachsafe_to_deletefinding becomesreview_requiredwith medium confidence. The report adds thecloud_local_join_incompletewarning.- The blast-radius
risk_bandfollows the importer count alone.highstarts at 20 importer files, andmediumstarts at 5. Without--production, the local count includes test importers. Traffic no longer moves the band, incoverage analyze --cloudand inhealth --runtime-coverage. When a cloud row has no caller count and fallow cannot fill it,risk_bandisunknown. A script that validates the JSON strictly must acceptunknown. caller_count_weighted_by_trafficis the sum of the production hits in the importer files, and can benull. The value isnullwhen no importer file has runtime data, and in a localhealth --runtime-coveragerun. A script that validates the JSON strictly must acceptnullfor this field.- fallow refuses a
--changed-sinceor--baseref that searches commit messages or names a range. Examples aremain^{/fix},:/fixandmain...HEAD. fallow also refuses a ref with nested braces. Use a branch, a tag, a commit SHA, or a form such asHEAD~3ormain@{upstream}.
Bug fixes
Detection
- fallow reads
build.rolldownOptions.inputin a Vite 8 config. The Vite plugin readsinputunderrollupOptionsandrolldownOptions, inbuildand inenvironments.<name>.build. The Electron plugin does the same for electron-vite configs. (#5385) - The Vite plugin is enabled when the manifest lists only
vite-plus. Avite-plusdependency or avpscript now enables the Vite plugin. The build inputs ofvite.config.*then count as entry points. (#5386) unresolved-importskips more imports of generated files. fallow no longer reports an extensionless relative import of a file that.gitignoreignores. fallow also skips a type-only import of the+typesof a parent route, such as../+types/layout.unused-class-memberfollows a local wrapper of a factory. Inconst setup = () => newService(Service, options), the reads on the result ofsetup()now credit the class of the factory. (#5366)--type-awareno longer reports an optional hook of a library interface. fallow no longer reports an optional member that a class declares for an interface of a dependency. The type-aware protocol is now version 11. Install the companion of this version withfallow type-aware setupor from npm.invalid-client-exportreports only App Router entry files. fallow checks only apage,layoutorroutefile belowapp/orsrc/app/, as Next.js does. (#5405)unused-component-emitcredits theupdate:<key>event of a VueUse model ref. A write of auseVModeloruseVModelsref, in the script or in the template, marks the event as used. (#5403)unused-component-inputcredits an Angular input that a@HostBindingon the same member reads. (#5404)- A composite action credits a script that
$GITHUB_ACTION_PATHnames. Arun:orgithub-scriptstep that names a script through$GITHUB_ACTION_PATHnow credits that script in the action folder. (#5414) Thanks @aloneangel45 for the patch in #5415. - A directory argument of a test runner no longer makes its index file an entry point. In
vitest run src/lib/, the index file ofsrc/libis no longer an entry point. Only a script runtime (node,tsx,bun,deno run) resolves a directory to its index file.bash scripts/deploy.shno longer creditsscripts/deploy.ts. In an Nxrun-commandstarget, a Vite+ task or a CI step,node scripts/process-messagesnow creditsscripts/process-messages/index.js. (#5370) fallow dupescompares the type arguments of calls andnewexpressions. fallow no longer reports calls that differ only in their type arguments as clones. fallow rebuilds the duplication token cache once. (#5401) Thanks @neumaennl for the report.- A boundary preset and the Sass and Less keyframes check no longer panic. A boundary preset no longer panics on a tsconfig
rootDirsuch assrc[. ArootDirsuch assrc[a]now matches as a literal folder. The keyframes check of Sass and Less files no longer panics on a statement that starts with a multibyte character.
Mutation testing
fallow mutationsuggests a--setup-timeoutvalue that is longer than the value that failed. The example is two times the failed value, with a minimum of5m. (#5389)fallow mutationwith Vitest no longer counts a__tests__helper as a test file. A file below__tests__is a test file only when its name has a test marker, or when a runner test pattern selects it. (#5391)fallow mutation --time-budgetno longer ends a run early. Before, a run ended early by about the time of the first dry run, with mutantspending. (#5421)
Output and CI
- The composite action runs its scripts on Windows runners. Every
run:step quotesGITHUB_ACTION_PATH, so bash keeps the backslashes of the Windows action path. (#5352) Thanks @lidongze1002 for the patch in #5408. - Compact dependency and duplicate-export lines name a path and a line. The lines now have the form
<tag>:<path>:<line>:<name>. A script that splits a line on:now finds the name in field 4, not in field 2.unlisted-depandduplicate-exportwrite one line for each location, so they can write more lines than before. (#5017) Thanks @1abdala for the patch in #5372. fallow coverage upload-inventoryand the other API requests send compact JSON. An inventory body is about a quarter smaller, which fixes an HTTP 413 on large repositories. (#5453) Thanks @chbert for the report.- Text output escapes control characters in project strings. A line break or a terminal sequence in a path or a name now prints as a visible escape, such as
\n. A CI runner can no longer read such a name as a workflow command. JSON output keeps the raw values. next_steps[].commandstays one shell command. A value with a space or a shell character is now in single quotes.fallow ciposting steps check who wrote a comment and where its marker is.ci post-pr-commentupdates only a comment of the bot account with the marker as a full line.ci post-reviewandci reconcile-reviewread review markers only from the marker lines at the end of a comment.ci post-reviewalways posts a GitHub review with theCOMMENTevent. A GitLab note for a finding without a diff position escapes control characters in the file path.
Hardening
These fixes limit what a file in a cloned repository can make fallow read, write or run, and how long a run takes:
- fallow runs no git hook of the repository, and no
diff.externalprogram or textconv filter. Each git diff also ends its revisions with--, so a tracked file namedHEADno longer stops--changed-since. - Cache loaders read only regular files of a limited size inside the cache directory. A malformed cache file gives a cold run, not a panic.
fallow fixwithout--dry-runreads and writes no parse or graph cache. - fallow writes and removes no mutation run directory, through a symlink that leaves the project. A symlink at
<cache>/mutation,runsorcompanionstops the run withFALLOW_MUTATION_UNSAFE_CACHE_DIR, also when it points inside the project. - fallow writes no
pr-comment-*sidecar file through a symlink that resolves outside the project, the Git work tree, the CI workspace or the temp directory. The GitLab comment and review jobs refuse a symlink at a result file. - fallow checks a path that a project file names against the project before it tests whether the file exists. This applies to
package.jsonentries, plugin setup files, Nuxt layers, source map sources, lockfiles, workspace globs, and theinit,migrateandhookscommands. - Symlink checks follow a link target one step at a time. Thus the result is the same on each machine. Coverage paths with
..also match the same file on each machine. - Write refusals name the given path, not the link target.
fallow mutation inspect,export,tasksandrecheck,fallow inspect --cloud,fallow agent statusandfallow hooks statusread only files inside the project. The binary map reads only regularnode_modulesmanifests within the read limit.- fallow reads an ignore file only when it is a regular file of at most 1 MiB, or a link to one inside the project. Above the project root, fallow reads a link to any regular file. fallow skips other files with a warning, so a FIFO or a device no longer stops a run. A skipped file below the root removes its directory from the run.
- GitLab requests send
GITLAB_TOKENasAuthorization: Bearer. A token goes only to the same host on a redirect. A redirect of the GitHub or Fallow Cloud API to the same host now keeps the token, which fixes requests for a renamed private repository. - The project id from the git remote no longer contains the user part of the URL.
fallow agent install --approveapproves the MCP server only when.mcp.jsonhas the entry that fallow wrote.fallow coverage setupno longer takes a default answer when stdin ends. When stdin is not a terminal, pass--yes.- The import of an old in-repo Impact store keeps the user decisions unset.
- Repeated or very large config input stays within limits. This covers
extendslists, rule packs, plugin files, regexes, YAML aliases, alias spreads in bundler configs, and expandedpackage.jsonscripts. A config glob that does not compile is now a config error with exit code 2, not a panic. Real configs stay far below these limits.
Performance
fallow mutationwith Vitest decides the worker mode for each set of test files. On a public TypeScript monorepo, a run of 73 mutants took 470 s in place of 1,165 s, with the same verdicts. (#5423)- Import resolution makes fewer file system calls. A probe for a missing path costs one
lstat, not arealpathlookup of each component. On a large public repository,fallow dead-codewith all threads spent about 23% less system time and about 10% less CPU time, with the same output. - fallow writes the parse cache and the graph cache without
fsync. After a one-file edit, the parse cache save takes 5 to 9 ms less on small and medium projects. - A bare
fallowrun with health keeps one copy of the parsed modules. The peak memory decreased by 3.3% to 4.3% on two public projects. - Extraction copies a bounded amount of data for long chains, long callees and repeated names. The output for real projects does not change. The first run after the upgrade parses each file again.
Upgrade notes
- Install the type-aware companion of this version. The protocol is now version 11.
- In compact output, the name of a dependency or
duplicate-exportline is now in field 4.unlisted-depandduplicate-exportcan write more lines than before. risk_bandcan beunknown, andcaller_count_weighted_by_trafficcan benull.fallow coverage setupwithout a terminal on stdin needs--yes.fallow fixwithout--dry-runruns without the cache, so it is slower on large projects.- The first run after the upgrade rebuilds the parse, extraction, graph and duplication caches.
Full Changelog: v3.50.0...v3.51.0