Skip to content

Changelog

  • The documentation moved to https://trimtest.dev. trimtest init now writes #:schema https://trimtest.dev/schema/trimtest.schema.json (the old trimtest.rabinapps.com schema URL in config files made by 0.1.1 keeps working only while that domain redirects; replace it with the new one). robots.txt names the AI crawlers and agents it allows.
  • Release assets: the per-archive .sha256 files that install.sh and install.ps1 download were never uploaded, so both installers failed on 0.1.0, and SHA256SUMS was missing the newline after each Windows entry. Both are fixed, and the release workflow now verifies SHA256SUMS before publishing (also on manual dry runs). The code is identical to 0.1.0; use 0.1.1.

First release.

  • Xcode: test runs pass -collect-test-diagnostics never. On an iOS Simulator a failing test made xcodebuild collect diagnostics for up to ten minutes (a 6 s failing run took 200 s or more, which looked like a hang); TRIMTEST_XCODE_DIAGNOSTICS overrides it. Bench: a guarded runner (attempt_timeout) is reset and retried once, and a run it gives up on is reported as inconclusive instead of caught.

  • Bench: xcodeshop, a bundled Xcode project (two frameworks, a host app, three test bundles, one Objective-C test class; macOS only) with zero misses, static and recorded. Repos can now declare a required tool and macos, and are skipped with a reason when the machine lacks them.

  • New adapter: Xcode projects (*.xcodeproj). project.pbxproj is read for targets, the files each builds (build phases and Xcode 16 synchronised folders with their exceptions), target dependencies, test hosts and test bundles; a test depends on every target it is built after, hosted by or links, and an edit reaches the tests of those bundles. Tests run with xcodebuild test -scheme S -destination D -only-testing:Bundle/Class through a shared scheme or test plan (a test no scheme runs is reported unrunnable); TRIMTEST_XCODE_DESTINATION picks the destination and [runner] xcode prefixes the command. record --coverage uses -enableCodeCoverage and xccov: function-level for Swift, file-level for Objective-C. project.pbxproj, xcconfig, test plans, schemes, Info.plist, entitlements, Podfile.lock, Package.resolved and local Swift packages run everything. Verified against real xcodebuild (Xcode 27, macOS app with a hosted test bundle); iOS simulators, UI tests and CocoaPods were not run.

  • Objective-C beside Swift in SwiftPM packages (same swiftpm adapter). XCTest classes written in .m/.mm are recognised as tests; @import, #import <Module/Header.h>, #import "path.h" (by directory and by header-path suffix) and Module-Swift.h become edges between targets, so an Objective-C-only target that uses another target is no longer invisible to selection; .modulemap, .hh, .cxx and .hxx are tracked. C-family files now have a comment-aware fingerprint (they were hashed byte for byte): comments and formatting select nothing, while strings, macros and the line structure of preprocessor directives count. Test runs filter by @implementation class and record --coverage records Objective-C tests (file-level). Static tests only: no Swift toolchain was available, so swift test on Objective-C targets has not been run, and Xcode projects are supported by their own adapter (see the entry above).

  • New adapter: SQL / PostgreSQL. pgTAP scripts run with pg_prove, plain scripts with psql -X -v ON_ERROR_STOP=1 -f, against the database the PG* variables describe (trimtest never creates one). Static tier only: a file provides the objects it creates, alters or writes to and depends on every name it mentions, so alter table users selects the tests that reference users; \i/\ir includes are file edges; EXECUTE, \gexec and \i :variable make a file depend on every non-test file. Comments and whitespace do not count, dollar-quoted bodies, strings and psql meta-commands do. Migrations, sqitch.plan and schema.sql run everything. [[project]] kind = "sql" forces a project; [runner] sql = "..." prefixes the commands (docker compose exec -T db). Verified against real psql and pg_prove (PostgreSQL 16, pgTAP 1.3.2); a begin; .. rollback; test provides nothing, so pgTAP tests that all create the extension do not select one another.

  • A file an adapter owns can now also be declared shared data (Adapter::shares_data, true for .sql), so other projects’ tests that name it (a Python test loading db/seed.sql) are still selected by the “mentions this file” rule.

  • Fix: [runner] keys for Ruby and PHP were reported as unused by trimtest check.

  • Fix: a test that loads code through a computed path was not traced in Jest, Vitest, Playwright, pytest, Java/Kotlin and Go, so editing the loaded file could select nothing. Such a test now depends on every non-test file of its project (one shared rule in select::scan, spec trimtest:any); literal loads stay precise. require('./x/' + n) and template literals with ${} count as computed, as do jest.requireActual/jest.mock/vi.mock and require.context.

  • Fix (found by benching jshttp/negotiator and ai/nanoid): in the JS runners require('..') / import '..' of the project root resolved to nothing, so a source file reached only through the package entry was “unobserved” and selected no test; it now resolves to index.* (or, for a directory with a package.json and no index, to every file below it). A JS test that starts child processes (child_process, execa, workers, …) now depends on every non-test file in the static tier, as the recorded tier already did, because the script it runs is not in the import graph.

  • New runners, all static unless noted: Flutter Patrol (patrol test --target, separate from flutter test), Maestro, Detox and Android instrumented (androidTest, no longer handed to gradle test); Mocha and node:test (recorded through V8 coverage), Bun, Deno, Cypress and WebdriverIO; Python unittest, nose2 and behave (recorded through coverage.py); Ruby (RSpec, Minitest), PHP (PHPUnit, Pest), .NET (xUnit, NUnit, MSTest via dotnet test) and Elixir (ExUnit via mix test). Config, lock files and native projects run everything; dynamic loading makes a test depend on every project file, so more tests run, never fewer. New [[project]] kind values: patrol, maestro, detox, android-instrumented, dotnet, elixir, ruby, php.

  • bin/, obj/ (next to a .csproj) and _build/, deps/ (next to mix.exs) are skipped as build output.

  • Recorded tier for Playwright (record --coverage, Chromium), file-level. A hook loaded into the Playwright worker collects Chromium JS coverage for every page, and trimtest maps the scripts to repository files through source maps (inline, .map files, webpack://, /@fs/, ?t= URLs). It only adds to the static graph and [map]: editing a script the page never loaded selects nothing, editing one it ran selects the spec, and backend, CSS, HTML, config and spec-imported code keep their static edges. Untraceable first-party scripts and web/service workers make the spec depend on every project file; non-Chromium specs and specs that never open a page stay on the static graph.

  • Fix: include globs under optimizeDeps, coverage and similar keys of vite.config.* / vitest.config.* were read as Vitest test files, so every source file became a “test” and failed when run alone under record --coverage.

  • Flutter: edits to assets, fonts and shaders declared in pubspec.yaml, and to any .arb file, now run every test of the package instead of being reported as unobserved. Goldens and fixtures a Dart source names by string literal select the tests that use them.

  • A test with a recording that ran a file reading a changed data file (include_str!, go:embed, a Dart File('x.csv')) is now selected; before, the recording replaced the static edge and the edit was skipped.

  • Flutter recorded tier: files outside lib/ that the coverage report never lists (fakes under testing/) now count as executed by every test that depends on them; before, an edit to one selected nothing.

  • Dart/Flutter is verified against real flutter test with testWidgets, and benchmarked on compass_app (bench/bench.py compass); the bench no longer mutates integration_test/.

  • Recorded tier for Go (record --coverage via go test -coverprofile), file-level.

  • Recorded tier for Dart (dart test --coverage) and Flutter (flutter test --coverage), file-level.

  • Recorded tier for Swift (record --coverage via swift test --enable-code-coverage), file-level.

  • Function-level selection for Go: an edit to a function or method no test ran no longer selects that test. Types (fields, embedded types, the declared method set), var/const/import, every init, functions with no statements and added or removed methods still do. Files with build constraints, //line directives or cgo stay at file level.

  • Function-level selection for Swift: an edit to a function, initializer, subscript or computed property no test ran no longer selects that test. Stored properties and observers, enum cases, imports, top-level declarations and added or removed members still do. Files with #if stay at file level.

  • bench/bench.py --test-timeout SECONDS: kill a mutant that loops forever instead of waiting out the run.

  • Function-level selection for Rust: an edit to a function or method no test ran no longer selects that test. Constants, structs, macros, use/mod lines and added or removed methods still do.

  • Function-level selection for Dart and Flutter: an edit to a function or method no test ran no longer selects that test. Fields, constants, imports and added or removed members still do.

  • Function-level selection for Java: an edit to a method no test ran no longer selects that test. Field, initializer, signature and import changes still do.

  • Function-level selection for Kotlin (Gradle, Maven, JaCoCo): an edit to a function, secondary constructor or custom property accessor no test ran no longer selects that test, default arguments and expression bodies included. Property initializers, init blocks, primary-constructor parameters, supertypes, enum entries, imports, top-level properties, added or removed members and every inline/reified function (JaCoCo credits inlined code to the caller) still do. Files that do not parse, including classes whose body starts on the same line as the declaration, stay at file level.

  • Maven projects that already run the JaCoCo agent in their own build, or inherit it from a parent pom (commons-codec), are now measured. A second injected agent crashed the JVM, so every test unit silently fell back to the static graph.

  • Fixed Java fingerprints: a /* inside a comment (for example '/*' in Javadoc) was read as a nested comment and hid every later edit in the file, so those edits selected nothing. Kotlin still nests comments.

  • Fixed a panic fingerprinting Java, Kotlin, Rust, Go or Zig files with non-ASCII text inside a block comment.

  • Static selection for Python (pytest), JS/TS (Jest, Vitest, Playwright), Rust, Go, Dart/Flutter, Java/Kotlin (Gradle, Maven), Swift (SwiftPM) and Zig, from a semantic-fingerprint baseline or --base <ref>.

  • Recorded tier (record --coverage) for Python (function-level), Jest/Vitest (function-level), Rust (cargo llvm-cov) and Java/Kotlin (JaCoCo).

  • Safety rules: full runs for lockfile/build-config changes, untraceable changes, deleted files nothing depends on, and --strict; failed tests always rerun.

  • run --timeout and --total-timeout (kills the runner and everything it started), --shard, --project, --format github, explain, check, exit codes 0/1/2/3.

  • Soundness bench over real projects: zero misses on both tiers (bench/RESULTS.md).

  • Linux and macOS (x86_64, arm64) and Windows 10/11 (x86_64, arm64): native process-tree kill, .cmd/.bat shim and python/py resolution, CRLF-insensitive fingerprints, Windows path mapping for every coverage tool, a PowerShell installer, and zip releases (also via cargo-binstall; Scoop and winget manifests are in packaging/).