supercov 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -233,7 +233,7 @@ Java and Kotlin have no registry of their own here, so a JVM project takes the b
233
233
  | PHP | Coming soon | — | — |
234
234
  | C | Coming soon | — | — |
235
235
 
236
- The `npx` path requires Node.js 22 or newer; the other installs need no Node. Rust support currently uses Rust 1.95; cargo-nextest 0.9.138 and 0.9.140 are supported. Python support requires CPython 3.12 or newer and measures pytest and unittest runs. Ruby support requires Ruby 3.3 or newer (3.4 or newer for full measurement) and measures RSpec, Minitest, test-unit and Cucumber runs. Go support requires Go 1.22 or newer and measures `go test`. Java and Kotlin support requires a JDK 17 or newer with Maven or Gradle, and measures every JUnit Platform engine -- JUnit 5, JUnit 4 through Vintage, Kotest and Spock -- as well as TestNG.
236
+ The `npx` path requires Node.js 22 or newer; the other installs need no Node. Rust support currently uses Rust 1.95; cargo-nextest 0.9.138 and 0.9.140 are supported. Python support requires CPython 3.9 or newer and measures pytest and unittest runs. Ruby support requires Ruby 3.3 or newer (3.4 or newer for full measurement) and measures RSpec, Minitest, test-unit and Cucumber runs. Go support requires Go 1.22 or newer and measures `go test`. Java and Kotlin support requires a JDK 17 or newer with Maven or Gradle, and measures every JUnit Platform engine -- JUnit 5, JUnit 4 through Vintage, Kotest and Spock -- as well as TestNG.
237
237
 
238
238
  ## Supported operating systems and architectures
239
239
 
@@ -245,7 +245,7 @@ The CLI is a single native binary. `npx supercov` selects the build for the mach
245
245
  | Linux | arm64, x64 | glibc 2.28 or newer (Debian 10, Ubuntu 18.10, RHEL 8 and later), or musl (Alpine); chosen automatically |
246
246
  | Windows | arm64, x64 | Windows 10 or newer |
247
247
 
248
- JavaScript, TypeScript, Python, Ruby, Rust, Go, Java and Kotlin suites are verified on Linux, macOS and Windows -- CPython 3.12, 3.13 and 3.14, Ruby 3.3, 3.4 and 4.0, and Go 1.22, 1.25, 1.26 and 1.27 on every one, and JDK 17 and 21 on every one that has them (Temurin publishes no 17 for arm64 Windows, so that pairing is 21 alone). Containers, VMs, and remote executors run the same Linux builds. Every release publishes the same binaries to npm, PyPI (`supercov-cli`, a wheel per platform) and RubyGems (`supercov`, a gem per platform except arm64 Windows, which Ruby has no platform for), and the source to crates.io (`supercov`).
248
+ JavaScript, TypeScript, Python, Ruby, Rust, Go, Java and Kotlin suites are verified on Linux, macOS and Windows -- CPython 3.9 through 3.14 (on arm64 Windows, 3.9 and 3.10 as the x64 builds, since python.org publishes no arm64 build before 3.11), Ruby 3.3, 3.4 and 4.0, and Go 1.22, 1.25, 1.26 and 1.27 on every one, and JDK 17 and 21 on every one that has them (Temurin publishes no 17 for arm64 Windows, so that pairing is 21 alone). Containers, VMs, and remote executors run the same Linux builds. Every release publishes the same binaries to npm, PyPI (`supercov-cli`, a wheel per platform) and RubyGems (`supercov`, a gem per platform except arm64 Windows, which Ruby has no platform for), and the source to crates.io (`supercov`).
249
249
 
250
250
  ## Supported test suites
251
251
 
@@ -322,3 +322,9 @@ npx supercov clean # remove all runs and the build cache
322
322
  ## Free and open source
323
323
 
324
324
  [MIT licensed](LICENSE). Inspect, extend, and run it anywhere.
325
+
326
+ ## Contributors
327
+
328
+ - [@DaVinciTachyon](https://github.com/DaVinciTachyon)
329
+ - [@Uhbif2](https://github.com/Uhbif2)
330
+ - [@maik-intellicoach](https://github.com/maik-intellicoach)
package/docs/cli.md CHANGED
@@ -395,6 +395,12 @@ By default, `clean` removes all stored runs and the isolated build cache.
395
395
  `--keep N` keeps the newest N runs. Cleanup removes only marker-owned Supercov
396
396
  storage.
397
397
 
398
+ If Supercov itself fails to publish a run the tests already paid for, it keeps
399
+ that run's raw evidence in `.supercov/failed-evidence/<run id>` and says so in
400
+ the error. Report the failure with that directory: it is what diagnoses it. Only
401
+ a full `clean` reclaims it -- `--keep N` leaves it alone -- and the summary says
402
+ when it goes.
403
+
398
404
  ## Read bundled documentation
399
405
 
400
406
  ```sh supercov
@@ -410,7 +416,7 @@ terminal or offline environment after the package has been downloaded.
410
416
 
411
417
  | Variable | Use |
412
418
  | --- | --- |
413
- | `SUPERCOV_SOURCE_ROOTS` | Set comma-separated first-party source roots when automatic discovery is ambiguous |
419
+ | `SUPERCOV_SOURCE_ROOTS` | Comma-separated directories or files that hold your own code, in any language; everything else is left out |
414
420
  | `SUPERCOV_TEST_KIND` | Label the wrapped command as a test level such as `unit` or `e2e` |
415
421
 
416
422
  Examples:
package/docs/evidence.md CHANGED
@@ -110,6 +110,14 @@ Preview cleanup first. The final command removes all runs and the isolated build
110
110
  cache; `--keep 20` preserves the 20 newest runs. Cleanup removes only
111
111
  marker-owned Supercov data.
112
112
 
113
+ ### Evidence of a run that failed to publish
114
+
115
+ A suite pays for its measurement in wall clock. If Supercov itself cannot
116
+ publish a run the tests already finished, the run's raw evidence is kept in
117
+ `.supercov/failed-evidence/<run-id>/` rather than going with the work directory,
118
+ and the error names the path. Attach that directory to the bug report. A full
119
+ `clean` reclaims it; `--keep N` does not.
120
+
113
121
  ## Understand test kinds
114
122
 
115
123
  Reports group tests by kind, such as unit, integration or E2E. Supercov uses
@@ -119,7 +119,7 @@ if anything is missing.
119
119
  - for Rust, the Rust 1.95 toolchain;
120
120
  - for Go, Go 1.22 or newer;
121
121
  - for Java and Kotlin, JDK 17 or newer, with Maven or Gradle;
122
- - for Python, CPython 3.12 or newer with pytest or unittest;
122
+ - for Python, CPython 3.9 or newer with pytest or unittest;
123
123
  - for Ruby, Ruby 3.4 or newer with RSpec, Minitest, test-unit or Cucumber (3.3 measures lines, methods and simple branches only).
124
124
 
125
125
  The CLI is a native binary. `npx supercov` picks the build for your operating
@@ -95,6 +95,6 @@ flow, `--view nodes` or `--view edges` pages the details; `--compact` omits repe
95
95
  source text while keeping locations and credit reasons. See
96
96
  [Investigating assertion evidence](assertion-evidence.md#read-a-large-flow).
97
97
 
98
- The disposable `assertions.report.cache.json` file lives beside the map. A missing
99
- or damaged cache is rebuilt. Removing it affects the next query's speed, not
98
+ The disposable `assertions.report.cache.json` and `assertions.summary.cache.json`
99
+ files live beside the map. A missing or damaged cache is rebuilt. Removing it affects the next query's speed, not
100
100
  your saved explanations.
@@ -184,14 +184,16 @@ attribution.
184
184
 
185
185
  | Runner | Attribution | Current requirement |
186
186
  | --- | --- | --- |
187
- | pytest | Exact test, worker, retry, and setup/call/teardown phase identity | CPython 3.12 or newer; run with `npx supercov -- pytest` or `python -m pytest` |
187
+ | pytest | Exact test, worker, retry, and setup/call/teardown phase identity | CPython 3.9 or newer; run with `npx supercov -- pytest` or `python -m pytest` |
188
188
  | pytest-xdist | Exact per worker | Workers inherit the run through the environment |
189
189
  | pytest-rerunfailures | Exact per attempt; flaky tests are reported as such | |
190
190
  | `python -m unittest` | Exact test and setUp/test/tearDown phase identity | Serial in-process; skips and expected failures are recorded; subtest failures roll up to the parent test |
191
191
 
192
192
  Your project runs in place with its own interpreter and virtual environment.
193
- Supercov adds its monitoring and runner hooks through the process environment;
194
- you do not need to rewrite tests or configure a different build.
193
+ Supercov adds its runner hooks through the process environment and places a
194
+ probe for every obligation into each measured module as it is imported --
195
+ nothing on disk changes, and tracebacks keep their line numbers. You do not
196
+ need to rewrite tests or configure a different build.
195
197
 
196
198
  Coverage includes statements, functions, boolean decisions, loops,
197
199
  comprehensions, short-circuit operators, `match` cases and exception paths.
@@ -202,9 +204,11 @@ assertion checks.
202
204
 
203
205
  Interpreters launched with `-I`, `-E` or `-S` ignore the required startup hook
204
206
  and are not measured. Code compiled from strings at runtime has no source
205
- obligations. Completed observations can survive a hard kill, but a corrupt or
206
- exhausted evidence channel fails the run rather than reporting partial data as
207
- complete.
207
+ obligations. A measured module imported before Supercov starts, or compiled
208
+ past the import system, runs without probes; the run names it as a limitation
209
+ rather than reporting it uncovered. What a test executed survives the process
210
+ being killed -- `os._exit`, SIGTERM or SIGKILL -- but a corrupt or exhausted
211
+ evidence channel fails the run rather than reporting partial data as complete.
208
212
 
209
213
  ```sh
210
214
  npx supercov -- pytest
@@ -41,6 +41,20 @@ npx supercov runs latest scope
41
41
  Do not broaden the roots to dependencies or generated output merely to remove a
42
42
  warning. The goal is an honest boundary around code the repository owns.
43
43
 
44
+ ## Too much is measured
45
+
46
+ Vendored or generated code beside your own is measured like the rest of the
47
+ repository. Name the directories or files that hold your own code; this works
48
+ for every language:
49
+
50
+ ```sh supercov
51
+ SUPERCOV_SOURCE_ROOTS=src npx supercov -- pytest
52
+ SUPERCOV_SOURCE_ROOTS=app.py,core.py npx supercov -- python -m unittest
53
+ ```
54
+
55
+ Everything outside the roots is left out, and `npx supercov runs latest scope`
56
+ lists what was.
57
+
44
58
  ## The tests pass but coverage is missing
45
59
 
46
60
  First check runner and source scope:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supercov",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Code quality and coverage for coding agents",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -56,6 +56,7 @@
56
56
  "test:rust-compiler-spikes": "cargo build -p supercov && node scripts/rust-libtest-companion-spike.mjs && node scripts/rust-async-attribution-spike.mjs && node scripts/rust-subprocess-attribution-spike.mjs && node scripts/rust-custom-harness-spike.mjs && node scripts/rust-libtest-builder-lifecycle-spike.mjs",
57
57
  "test": "cargo test --workspace",
58
58
  "test:react": "cargo build -p supercov && node scripts/rust-vitest-projects-integration.mjs && npm --prefix examples/react-verification ci && npm --prefix examples/react-verification run demo && node scripts/react-hydration-compatibility.mjs",
59
+ "test:release-tooling": "node --test tests/release/*.test.mjs",
59
60
  "test:runtime": "node --test tests/runtime/*.test.mjs",
60
61
  "test:fixture": "cargo build -p supercov && node scripts/rust-fixture-matrix.mjs",
61
62
  "test:packed-npx": "cargo build --release -p supercov && node scripts/packed-npx-integration.mjs",
@@ -64,7 +65,8 @@
64
65
  "test:watchdog": "cargo build -p supercov && node scripts/watchdog-integration.mjs",
65
66
  "test:engine-contract": "cargo build -p supercov && node scripts/engine-contract.mjs",
66
67
  "test:agent": "cargo build -p supercov && node scripts/agent-query-eval.mjs",
67
- "test:engine": "cargo fmt --all -- --check && cargo clippy --workspace --all-targets -- -D warnings && cargo test --workspace && cargo build -p supercov && npm run test:runtime && npm run test:rust-assets && node scripts/rust-process-supervision.mjs && node scripts/rust-direct-node-integration.mjs && node scripts/rust-public-run-integration.mjs && node scripts/rust-embedded-runtime-integration.mjs && node scripts/rust-direct-vitest-integration.mjs && node scripts/rust-direct-jest-integration.mjs && node scripts/rust-direct-playwright-integration.mjs && node scripts/rust-custom-browser-playwright-integration.mjs && node scripts/rust-generic-esbuild-integration.mjs && node scripts/rust-generic-tsc-integration.mjs && node scripts/rust-generic-build-matrix.mjs && node scripts/rust-vite-playwright-integration.mjs",
68
+ "test:engine": "cargo fmt --all -- --check && cargo clippy --workspace --all-targets -- -D warnings && cargo test --workspace && npm run test:runtime && npm run test:rust-assets && npm run test:engine-integrations",
69
+ "test:engine-integrations": "cargo build -p supercov && node scripts/rust-process-supervision.mjs && node scripts/rust-direct-node-integration.mjs && node scripts/rust-public-run-integration.mjs && node scripts/rust-embedded-runtime-integration.mjs && node scripts/rust-direct-vitest-integration.mjs && node scripts/rust-direct-jest-integration.mjs && node scripts/rust-direct-playwright-integration.mjs && node scripts/rust-custom-browser-playwright-integration.mjs && node scripts/rust-generic-esbuild-integration.mjs && node scripts/rust-generic-tsc-integration.mjs && node scripts/rust-generic-build-matrix.mjs && node scripts/rust-vite-playwright-integration.mjs",
68
70
  "test:platform": "cargo test --workspace && cargo build -p supercov && node scripts/rust-process-supervision.mjs && node scripts/workspace-crash-integration.mjs",
69
71
  "test:native-package": "cargo build --release -p supercov && node scripts/native-package-integration.mjs && node scripts/native-release-set-integration.mjs",
70
72
  "test:pypi-wheel": "node scripts/pypi-wheel-integration.mjs",
@@ -76,9 +78,9 @@
76
78
  "test:clang-mcdc": "node scripts/clang-mcdc-oracle.mjs",
77
79
  "test:test262": "cargo build --release -p supercov && node scripts/test262-equivalence.mjs",
78
80
  "benchmark:check": "cargo build --release -p supercov && node scripts/rust-transform-benchmark.mjs",
79
- "benchmark:python-monitoring": "cargo build -p supercov && node scripts/python-monitoring-benchmark.mjs",
80
- "check": "cargo fmt --all -- --check && cargo clippy --workspace --all-targets -- -D warnings && npm run test && npm run test:runtime && npm run test:rust-assets && npm run test:assertion-maps && npm run test:sweep-target && npm run test:skip-guard && npm run test:windows-tls && node scripts/package-preflight.mjs && node scripts/verify-binstall-metadata.mjs --offline",
81
- "release:check": "cargo clean && node scripts/sweep-target.mjs && npm run check && npm run test:engine && npm run test:go && npm run test:jvm && npm run test:launcher && npm run test:fixture && npm run test:watchdog && npm run test:engine-contract && npm run test:agent && npm run test:child-attribution && npm run test:host-loader && npm run test:python-monitoring && npm run test:ruby-coverage && npm run test:rust-public-cargo && npm run test:packed-npx && npm run test:clang-mcdc && npm run benchmark:check",
81
+ "benchmark:python": "cargo build -p supercov && node scripts/python-benchmark.mjs",
82
+ "check": "cargo fmt --all -- --check && cargo clippy --workspace --all-targets -- -D warnings && npm run test && npm run test:release-tooling && npm run test:runtime && npm run test:rust-assets && npm run test:assertion-maps && npm run test:sweep-target && npm run test:skip-guard && npm run test:windows-tls && node scripts/package-preflight.mjs && node scripts/verify-binstall-metadata.mjs --offline",
83
+ "release:check": "cargo clean && node scripts/sweep-target.mjs && npm run check && npm run test:engine && npm run test:go && npm run test:jvm && npm run test:launcher && npm run test:fixture && npm run test:watchdog && npm run test:engine-contract && npm run test:agent && npm run test:child-attribution && npm run test:host-loader && npm run test:python && npm run test:ruby-coverage && npm run test:rust-public-cargo && npm run test:packed-npx && npm run test:clang-mcdc && npm run benchmark:check",
82
84
  "release:bump": "node scripts/bump-version.mjs",
83
85
  "sweep": "node scripts/sweep-target.mjs",
84
86
  "oracle:rust": "cargo build --release -p supercov && node scripts/rust-coverage-oracle.mjs",
@@ -86,7 +88,7 @@
86
88
  "prepublishOnly": "npm run release:check",
87
89
  "test:child-attribution": "cargo build -p supercov && node scripts/rust-child-attribution-integration.mjs",
88
90
  "test:host-loader": "cargo build -p supercov && node scripts/rust-host-loader-integration.mjs",
89
- "test:python-monitoring": "cargo build -p supercov && node scripts/python-monitoring-integration.mjs",
91
+ "test:python": "cargo build -p supercov && node scripts/python-integration.mjs",
90
92
  "test:ruby-coverage": "cargo build -p supercov && node scripts/ruby-coverage-integration.mjs",
91
93
  "test:go": "cargo test --no-fail-fast -p supercov-engine --test go_frontend --test go_run",
92
94
  "test:jvm": "cargo test --no-fail-fast -p supercov-engine --test jvm_frontend --test jvm_run -- --include-ignored --test-threads=1",
@@ -103,14 +105,14 @@
103
105
  "test:windows-tls": "node scripts/windows-tls-test.mjs"
104
106
  },
105
107
  "optionalDependencies": {
106
- "@supercov/cli-darwin-arm64": "1.1.0",
107
- "@supercov/cli-darwin-x64": "1.1.0",
108
- "@supercov/cli-linux-arm64-gnu": "1.1.0",
109
- "@supercov/cli-linux-arm64-musl": "1.1.0",
110
- "@supercov/cli-linux-x64-gnu": "1.1.0",
111
- "@supercov/cli-linux-x64-musl": "1.1.0",
112
- "@supercov/cli-win32-arm64": "1.1.0",
113
- "@supercov/cli-win32-x64": "1.1.0"
108
+ "@supercov/cli-darwin-arm64": "1.2.0",
109
+ "@supercov/cli-darwin-x64": "1.2.0",
110
+ "@supercov/cli-linux-arm64-gnu": "1.2.0",
111
+ "@supercov/cli-linux-arm64-musl": "1.2.0",
112
+ "@supercov/cli-linux-x64-gnu": "1.2.0",
113
+ "@supercov/cli-linux-x64-musl": "1.2.0",
114
+ "@supercov/cli-win32-arm64": "1.2.0",
115
+ "@supercov/cli-win32-x64": "1.2.0"
114
116
  },
115
117
  "peerDependencies": {
116
118
  "@playwright/test": ">=1.55.0",