supercov 0.0.22 → 0.0.24
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 +147 -402
- package/docs/agent-loop.md +66 -129
- package/docs/cli.md +74 -87
- package/docs/coverage-model.md +79 -129
- package/docs/evidence.md +60 -91
- package/docs/getting-started.md +71 -97
- package/docs/performance.md +57 -106
- package/docs/supported-suites.md +82 -103
- package/docs/verification.md +49 -83
- package/docs/workspace-isolation.md +67 -115
- package/package.json +7 -7
- package/runtime/javascript/capability.js +19 -0
- package/runtime/javascript/register.mjs +5 -1
package/README.md
CHANGED
|
@@ -1,421 +1,166 @@
|
|
|
1
|
-
|
|
1
|
+

|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
suites.
|
|
3
|
+
**Coverage for coding agents working overnight.**
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
**Supercov gives the agent the next test to write.** Each run returns the uncovered paths. The agent adds focused tests, reruns the suite, and continues while useful gaps remain.
|
|
6
|
+
|
|
7
|
+
Supercov wraps the test command you already run, records immutable local evidence, and returns bounded queries about the code paths that remain uncovered. Your agent writes the tests; Supercov tells it where.
|
|
8
|
+
|
|
9
|
+
No account, config file, import, custom reporter, or hosted service is required. Your source and coverage evidence stay on your machine. Supercov is free, open source, and MIT licensed.
|
|
10
|
+
|
|
11
|
+
Supported by [Supercorp](https://supercorp.ai). Learn more at [supercov.com](https://supercov.com).
|
|
12
|
+
|
|
13
|
+
## Installation & Usage
|
|
14
|
+
|
|
15
|
+
Run your existing test command through Supercov:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
7
18
|
npx supercov -- npm test
|
|
8
19
|
```
|
|
9
20
|
|
|
10
|
-
|
|
11
|
-
before running commands (for example `AGENTS.md` or `CLAUDE.md`):
|
|
21
|
+
Everything after `--` is your command, executed exactly as written. If your project uses a different command, pass that instead:
|
|
12
22
|
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
|
|
23
|
+
```bash
|
|
24
|
+
npx supercov -- npx playwright test
|
|
25
|
+
npx supercov -- pnpm test:e2e
|
|
26
|
+
npx supercov -- npm run test:unit && npx supercov -- npm run test:e2e
|
|
27
|
+
npx supercov -- cargo test
|
|
28
|
+
npx supercov -- cargo nextest run
|
|
16
29
|
```
|
|
17
30
|
|
|
18
|
-
`npx
|
|
19
|
-
`npx supercov docs agent-loop` prints the bounded query workflow as Markdown.
|
|
31
|
+
Supercov requires Node.js 22 or newer. Rust projects currently use the Rust 1.95 toolchain; cargo-nextest 0.9.138 and 0.9.140 are supported. Package tools such as `npx` may contact the npm registry to download Supercov when it is not already cached; the Supercov CLI itself does not contact a Supercov service during a coverage run.
|
|
20
32
|
|
|
21
|
-
|
|
22
|
-
the checkout globally. Consumer repositories still remain untouched:
|
|
33
|
+
## Language support
|
|
23
34
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
npm
|
|
27
|
-
npm
|
|
28
|
-
|
|
35
|
+
| Language | Status | Start with |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| JavaScript | Available | `npx supercov -- npm test` |
|
|
38
|
+
| TypeScript | Available | `npx supercov -- npm test` |
|
|
39
|
+
| Rust | Available | `npx supercov -- cargo test` |
|
|
40
|
+
| Python | Coming soon | — |
|
|
41
|
+
| Zig | Coming soon | — |
|
|
42
|
+
| PHP | Coming soon | — |
|
|
43
|
+
| C | Coming soon | — |
|
|
44
|
+
|
|
45
|
+
More languages are planned.
|
|
46
|
+
|
|
47
|
+
## Give it to your coding agent
|
|
48
|
+
|
|
49
|
+
Paste this into Claude Code, Codex, Cursor, Copilot, Gemini, or any coding agent that can run terminal commands:
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
Use `npx supercov` to improve coverage. Only write tests. Keep going while
|
|
53
|
+
useful gaps remain.
|
|
29
54
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
- Rust unit and golden tests cover transformation semantics, complete
|
|
39
|
-
obligation manifests, evidence validation, attribution, MC/DC witnesses,
|
|
40
|
-
storage, lifecycle recovery and agent JSON contracts;
|
|
41
|
-
- syntax and behavior matrices execute original and instrumented modern
|
|
42
|
-
JavaScript, JSX, TypeScript and TSX under Node, Chromium, Firefox and WebKit;
|
|
43
|
-
- coverage oracles assert exact decision vectors, MC/DC witnesses and branch
|
|
44
|
-
alternatives independently of program behavior;
|
|
45
|
-
- the same three-condition masking-MC/DC golden cases must report 100% for a
|
|
46
|
-
complete witness set and 33.33% for an incomplete one under both Supercov
|
|
47
|
-
and Clang/LLVM source-based MC/DC;
|
|
48
|
-
- the pinned TC39 Test262 corpus runs through the official harness before and
|
|
49
|
-
after instrumentation and rejects any originally passing scenario that
|
|
50
|
-
changes behavior;
|
|
51
|
-
- black-box fixtures exercise node:test, Vitest, Playwright, opaque remote
|
|
52
|
-
execution, Vite, Next, Webpack, esbuild, SWC and TypeScript compilation; and
|
|
53
|
-
- checked performance and filesystem gates cover transform latency,
|
|
54
|
-
transactional workspace preparation, output expansion, signal handling,
|
|
55
|
-
crash recovery and runtime probe overhead.
|
|
56
|
-
|
|
57
|
-
```sh
|
|
58
|
-
npm test
|
|
59
|
-
npm run test:clang-mcdc
|
|
60
|
-
npm run benchmark:check
|
|
61
|
-
|
|
62
|
-
# One-time contributor setup. The corpus stays inside this checkout and is
|
|
63
|
-
# ignored by Git because it is a large, reproducible test dependency.
|
|
64
|
-
git clone --depth 1 https://github.com/tc39/test262.git .cache/test262
|
|
65
|
-
|
|
66
|
-
# Uses .cache/test262 by default.
|
|
67
|
-
npm run test:test262
|
|
55
|
+
Start with `npx supercov -- npm test`. Then use
|
|
56
|
+
`npx supercov runs latest gaps --limit 5` to choose one useful target.
|
|
57
|
+
Write one focused test, rerun the same full suite through Supercov, and verify
|
|
58
|
+
the gain with `npx supercov diff <previous-run-id> latest`.
|
|
59
|
+
|
|
60
|
+
Only edit tests. Never weaken assertions or change application code to make
|
|
61
|
+
coverage easier. Stop when no useful gaps remain.
|
|
68
62
|
```
|
|
69
63
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
script and runtime-negative scenario, while dedicated differential fixtures
|
|
94
|
-
cover async functions and generators. Every semantic-equivalence failure
|
|
95
|
-
blocks the trusted-publishing workflow.
|
|
96
|
-
|
|
97
|
-
## Agent query workflow
|
|
98
|
-
|
|
99
|
-
Each run is stored locally under `.supercov/runs/<run-id>/`. Its immutable
|
|
100
|
-
`evidence.raw.gz` archive and `run.json` metadata are the source of truth. The archive
|
|
101
|
-
contains the exact coverage denominator manifest plus raw per-worker and
|
|
102
|
-
background evidence. The first query lazily reconstructs the complete coverage
|
|
103
|
-
model and atomically writes a disposable, integrity-checked `query-index.v1.json.gz`;
|
|
104
|
-
later queries reuse it. A changed archive, incompatible Supercov/schema version,
|
|
105
|
-
or corrupt index causes automatic reconstruction, so the index can be deleted at
|
|
106
|
-
any time without losing coverage data.
|
|
107
|
-
Loose evidence is removed only after the whole run directory is atomically
|
|
108
|
-
visible. HTML is not generated during a test run; agents should use bounded
|
|
109
|
-
CLI queries instead of loading the complete derived model into context.
|
|
110
|
-
|
|
111
|
-
```sh
|
|
112
|
-
# Orient using only a few lines.
|
|
64
|
+
Replace `npm test` with the repository's complete test command when needed.
|
|
65
|
+
|
|
66
|
+
## How it works
|
|
67
|
+
|
|
68
|
+
Each run returns fresh, executable evidence, so coding agents can keep iterating without loading a large HTML report into context.
|
|
69
|
+
|
|
70
|
+
1. **Run the suite.** Supercov executes the command after `--` inside an isolated workspace without modifying your source, tests, runner configuration, or ordinary build output.
|
|
71
|
+
2. **Measure what happened.** It records a fixed coverage denominator and immutable evidence for the run.
|
|
72
|
+
3. **Ask what is open.** Short, paginated CLI queries identify uncovered files, lines, branches, decisions, and value paths without loading a large HTML report into an agent's context.
|
|
73
|
+
4. **Write and prove one test.** Your coding agent adds a focused test, reruns the suite, and uses `diff` to verify exactly what improved.
|
|
74
|
+
|
|
75
|
+
Supercov supplies the coverage signal and evidence. It does not host, schedule, or replace your coding agent.
|
|
76
|
+
|
|
77
|
+
## Use leftover tokens on coverage
|
|
78
|
+
|
|
79
|
+
Before a reset—or overnight—turn idle agent time into coverage that stays with the repository. Every pass should close a small number of useful gaps and finish with evidence that the tests still pass and coverage improved.
|
|
80
|
+
|
|
81
|
+
## Read the result
|
|
82
|
+
|
|
83
|
+
Start with the summary, then narrow to one useful target:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Recent runs and the latest summary
|
|
113
87
|
npx supercov runs --limit 5
|
|
114
88
|
npx supercov runs latest
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
npx supercov runs latest
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
npx supercov runs latest
|
|
121
|
-
npx supercov runs latest
|
|
122
|
-
npx supercov runs latest
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
# Drill into one target selected from the gap list.
|
|
127
|
-
npx supercov runs latest file app/routes/example.ts
|
|
128
|
-
npx supercov runs latest file app/routes/example.ts --metric mcdc
|
|
129
|
-
npx supercov runs latest decision app/routes/example.ts:42
|
|
130
|
-
npx supercov runs latest line app/routes/example.ts:57
|
|
131
|
-
|
|
132
|
-
# Understand redundancy/contribution and validate a newly written test. Replace
|
|
133
|
-
# "latest" with the immutable run ID when an agent continues work later.
|
|
134
|
-
npx supercov runs latest test "test title fragment"
|
|
135
|
-
npx supercov runs latest minimize --filter passed
|
|
136
|
-
npx supercov runs latest minimize --filter passed --metric mcdc --target 80
|
|
137
|
-
npx supercov diff <older-run> <newer-run>
|
|
138
|
-
|
|
139
|
-
# Combine compatible shards without deleting their immutable source runs.
|
|
140
|
-
npx supercov merge <first-run-id> <second-run-id>
|
|
89
|
+
|
|
90
|
+
# The most useful open coverage obligations
|
|
91
|
+
npx supercov runs latest gaps --limit 10
|
|
92
|
+
|
|
93
|
+
# Details for one file or source location
|
|
94
|
+
npx supercov runs latest file app/checkout/session.ts
|
|
95
|
+
npx supercov runs latest decision app/checkout/session.ts:64
|
|
96
|
+
npx supercov runs latest line app/checkout/session.ts:64
|
|
97
|
+
|
|
98
|
+
# Prove what changed between two runs
|
|
99
|
+
npx supercov diff <previous-run-id> latest
|
|
141
100
|
```
|
|
142
101
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
that
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
caller can paginate or narrow it instead of flooding an agent context.
|
|
192
|
-
`coverage minimize` is an exact branch-and-bound
|
|
193
|
-
solver: line, statement, function, and branch obligations use per-test
|
|
194
|
-
provenance, while MC/DC obligations retain complete independence-witness pairs
|
|
195
|
-
and are recomputed for every candidate subset. Its result is therefore a
|
|
196
|
-
proved minimum, not a greedy approximation.
|
|
197
|
-
It intentionally refuses a view containing background/unattributed evidence:
|
|
198
|
-
there is no honest way to claim an exact test subset when the runner did not
|
|
199
|
-
expose test boundaries.
|
|
200
|
-
|
|
201
|
-
`merge` accepts only runs with identical source, test, dependency,
|
|
202
|
-
configuration, instrumenter, schema, and denominator fingerprints. It rewrites
|
|
203
|
-
the run scope inside every evidence record, namespaces shard paths, publishes a
|
|
204
|
-
new immutable run atomically, and leaves all input runs untouched. This is the
|
|
205
|
-
distributed/multi-host primitive; incompatible shards fail clearly instead of
|
|
206
|
-
producing a plausible but invalid aggregate. A rejection names each exact
|
|
207
|
-
domain that differs instead of presenting a generic list of possibilities.
|
|
208
|
-
|
|
209
|
-
For a JavaScript or TypeScript project, the CLI:
|
|
210
|
-
|
|
211
|
-
1. refreshes a stable isolated source namespace under
|
|
212
|
-
`supercov/workspace/<project>/`, links the existing
|
|
213
|
-
dependency tree, and creates generated runner configuration and build output
|
|
214
|
-
only there; file data uses copy-on-write reflinks where the filesystem
|
|
215
|
-
supports them, and falls back to copying where it does not; the stable path
|
|
216
|
-
lets VM/container snapshot systems reuse a coverage build without touching
|
|
217
|
-
the application's ordinary build; when the complete source/config/toolchain
|
|
218
|
-
fingerprint is unchanged, the prior instrumented output and manifest are
|
|
219
|
-
carried into the refreshed source snapshot and the build is skipped;
|
|
220
|
-
2. inventories first-party source from package entry points, workspaces,
|
|
221
|
-
conventional source directories, and TypeScript roots. Every candidate is
|
|
222
|
-
retained as included, excluded, or ambiguous; ambiguity blocks a complete
|
|
223
|
-
verdict and is inspectable with `scope`. Set
|
|
224
|
-
`SUPERCOV_SOURCE_ROOTS` for an explicit authoritative scope;
|
|
225
|
-
3. instruments through the existing Vite graph when available, or instruments
|
|
226
|
-
only the disposable source copy before the project's unchanged
|
|
227
|
-
Next/Turbopack, Webpack, esbuild, SWC, or other build command. No-build ESM
|
|
228
|
-
and CommonJS projects use the same disposable direct path;
|
|
229
|
-
4. runs the exact command following `--`, propagating coverage through every
|
|
230
|
-
Node child process it launches. Generated adapters provide exact test,
|
|
231
|
-
worker, retry, and outcome scopes for Playwright, Vitest, and
|
|
232
|
-
`node:test` without changing test imports or configs;
|
|
233
|
-
5. attributes source hits and decision vectors to individual tests where an
|
|
234
|
-
exact adapter is active,
|
|
235
|
-
automatically wraps Playwright actions and assertions, and records the
|
|
236
|
-
action/assertion phase responsible for each correlated hit; and
|
|
237
|
-
6. atomically publishes the exact denominator and raw evidence into one gzip
|
|
238
|
-
archive under `.supercov/`, then
|
|
239
|
-
removes loose evidence and terminal per-run work state, retaining only the
|
|
240
|
-
immutable run and disposable isolated build namespace. The
|
|
241
|
-
ordinary application build is never read as an input, overwritten, or
|
|
242
|
-
rebuilt afterward.
|
|
243
|
-
|
|
244
|
-
Only the Supercov-owned `.supercov/` run store and marker-protected
|
|
245
|
-
`supercov/workspace/` cache are modified in the user's checkout. A user-created
|
|
246
|
-
`supercov/` directory without Supercov's ownership marker remains ordinary
|
|
247
|
-
project source; Supercov selects a deterministic non-dotted fallback container
|
|
248
|
-
instead. A per-project lock rejects overlapping runs before either can build. Run state is durably written
|
|
249
|
-
through preparing/building/testing/publishing phases; SIGINT, SIGTERM,
|
|
250
|
-
and SIGHUP are forwarded to the entire child process group. If the process is
|
|
251
|
-
killed without a cleanup opportunity, the next invocation marks the dead PID's
|
|
252
|
-
run abandoned and refreshes the isolated namespace before using it. Cache
|
|
253
|
-
refresh is transactional: a new sibling generation is prepared completely,
|
|
254
|
-
the stable name is switched only at publication, and the prior complete
|
|
255
|
-
generation is retained until that switch succeeds. The next invocation
|
|
256
|
-
discards orphan staging trees or restores the prior generation if a host crash
|
|
257
|
-
landed between the two same-filesystem renames. Evidence archive, metadata, and
|
|
258
|
-
state writes use sibling-temp files, fsync, and atomic rename; lock acquisition
|
|
259
|
-
uses exclusive creation and fsync. Published `run.json` is the durable terminal
|
|
260
|
-
record, so terminal work state is not retained.
|
|
261
|
-
|
|
262
|
-
Retention is deterministic because run records store their UTC start time:
|
|
263
|
-
|
|
264
|
-
```sh
|
|
265
|
-
npx supercov clean # removes all stored runs and the shared build cache
|
|
266
|
-
npx supercov clean --dry-run # previews the default full cleanup
|
|
267
|
-
npx supercov clean --keep 20 # explicitly retains the 20 newest runs
|
|
102
|
+
Add `--json` to any query for the stable machine-readable format. Collections accept `--limit` and `--offset` and print a copyable next-page command.
|
|
103
|
+
|
|
104
|
+
## Coverage agents can act on
|
|
105
|
+
|
|
106
|
+
From lines and branches to MC/DC, every gap becomes the next test to write. Supercov measures more than a line percentage:
|
|
107
|
+
|
|
108
|
+
- lines, statements, functions, and branches;
|
|
109
|
+
- MC/DC independence witnesses;
|
|
110
|
+
- optional-chain, default-value, and logical-assignment paths;
|
|
111
|
+
- `try`/`catch` and zero-iteration control-flow paths; and
|
|
112
|
+
- per-test provenance where the runner exposes exact test boundaries.
|
|
113
|
+
|
|
114
|
+
The denominator is derived from source structure before the run, so adding or removing tests cannot silently change what 100% means. Ambiguous source scope, uninstrumented code, and missing evidence remain visible as completeness blockers instead of being rounded away.
|
|
115
|
+
|
|
116
|
+
## Works with your existing test suite
|
|
117
|
+
|
|
118
|
+
Runner support differs by attribution level. Supercov uses exact per-test attribution where an adapter is available and reports aggregate structural coverage rather than guessing for other runners.
|
|
119
|
+
|
|
120
|
+
| Runner | Attribution |
|
|
121
|
+
| --- | --- |
|
|
122
|
+
| Playwright | Exact per test, worker, retry, outcome, action, and assertion phase |
|
|
123
|
+
| Vitest | Exact per test, with setup execution kept separate |
|
|
124
|
+
| Jest | Exact per test, including concurrent and parameterized tests |
|
|
125
|
+
| `node:test` | Exact per test |
|
|
126
|
+
| AVA, Mocha, and other Node runners | Aggregate structural coverage |
|
|
127
|
+
| Cargo's standard libtest runner | Exact test and attempt identity |
|
|
128
|
+
| cargo-nextest | Exact test, attempt, retry, and binary identity |
|
|
129
|
+
|
|
130
|
+
Supercov works with Vite, Next, Turbopack, Webpack, esbuild, SWC, and projects with no build step. A single command can collect evidence from several supported runners into one run.
|
|
131
|
+
|
|
132
|
+
See [Supported suites](https://supercov.com/docs/supported-suites) for exact compatibility and attribution boundaries.
|
|
133
|
+
|
|
134
|
+
## Any coding agent
|
|
135
|
+
|
|
136
|
+
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot—and more. Any coding agent that can run terminal commands can use Supercov's concise text output or optional machine-readable format.
|
|
137
|
+
|
|
138
|
+
## Local and zero-edit
|
|
139
|
+
|
|
140
|
+
Every run is stored locally under `.supercov/runs/<run-id>/`. Supercov also maintains a marker-protected isolated build cache under `supercov/workspace/`.
|
|
141
|
+
|
|
142
|
+
It does not rewrite your source files, tests, imports, reporter list, runner configuration, dependency tree, or ordinary build output. An existing user-created `supercov/` directory is never adopted.
|
|
143
|
+
|
|
144
|
+
Storage is controlled explicitly:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
npx supercov clean --dry-run # preview a full cleanup
|
|
148
|
+
npx supercov clean --keep 20 # retain the 20 newest runs
|
|
149
|
+
npx supercov clean # remove all runs and the build cache
|
|
268
150
|
```
|
|
269
151
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
which Supercov never executes automatically because an arbitrary test command
|
|
286
|
-
may have side effects or external cost. See
|
|
287
|
-
[Performance and storage](docs/performance.md) for the comparison methodology,
|
|
288
|
-
strategy trade-offs, and a measured real-suite reference.
|
|
289
|
-
|
|
290
|
-
The automatic exact-attribution adapters support standard Playwright suites
|
|
291
|
-
(ESM and CommonJS specs in arbitrary project directories), project-owned
|
|
292
|
-
Playwright fixture packages, Vitest and `node:test`. A single command can collect several
|
|
293
|
-
runners into one run. Unsupported runners such as AVA or Mocha still receive
|
|
294
|
-
aggregate first-party structural coverage through inherited process
|
|
295
|
-
instrumentation, but their hits remain background/unattributed rather than
|
|
296
|
-
being guessed onto tests. Browser component runners without a recognized
|
|
297
|
-
adapter have the same explicit boundary.
|
|
298
|
-
|
|
299
|
-
Remote execution discovery is structural rather than provider-specific. The
|
|
300
|
-
preload and narrowly gated ESM transform observe exports for a static
|
|
301
|
-
`build(options)` capability,
|
|
302
|
-
activate only when those options contain a host-to-guest mount that includes
|
|
303
|
-
the isolated project, scopes an existing cache/snapshot identity to the run's
|
|
304
|
-
source fingerprint, and follows the opaque returned object graph. A method
|
|
305
|
-
whose options contain `argv`, `cmd`, or `command` receives guest-translated
|
|
306
|
-
Supercov paths and a guest-valid Node preload. The execution log records this
|
|
307
|
-
process/capability graph but hashes long or multiline arguments so embedded
|
|
308
|
-
shell bodies and credentials are never persisted.
|
|
309
|
-
|
|
310
|
-
This zero-edit mechanism has explicit boundaries. It follows Node child
|
|
311
|
-
processes, not arbitrary non-Node supervisors or a remote control plane that
|
|
312
|
-
never exposes launches to the local process. CommonJS and pure-ESM executor
|
|
313
|
-
SDKs, object-shaped and positional execution APIs, and opaque returned object
|
|
314
|
-
graphs are covered when a discoverable build capability exposes the workspace
|
|
315
|
-
mount and an execution capability accepts an environment. Providers that hide
|
|
316
|
-
all launch state behind an out-of-process RPC still need an adapter. Supercov
|
|
317
|
-
reports missing evidence rather than claiming those paths are covered.
|
|
318
|
-
|
|
319
|
-
The public regression suite includes provider-neutral CommonJS and pure-ESM
|
|
320
|
-
opaque executors. Each exposes only a static build capability, a host-to-guest mount,
|
|
321
|
-
an existing snapshot key, an opaque image/pool/machine chain, and an
|
|
322
|
-
argv-shaped execution method. CI requires Supercov to discover that structure,
|
|
323
|
-
scope the cache identity, translate paths and the Node preload into the guest,
|
|
324
|
-
run nested Vitest and Playwright commands, parse every concurrent trace shard,
|
|
325
|
-
and produce 100% fixture coverage. A separate clean-room gate packs the npm
|
|
326
|
-
tarball and invokes it through `npx` in a project with no build step, asserting
|
|
327
|
-
that no source or configuration file changes.
|
|
328
|
-
|
|
329
|
-
Before the isolated build, Supercov also compares the invoked npm/pnpm/yarn/bun
|
|
330
|
-
script with explicit string-valued `process.env` mode checks in the project's
|
|
331
|
-
build config. A semantic match such as `test:preview` and
|
|
332
|
-
`process.env.TEST_PREVIEW === "true"` activates that build-only flag and is
|
|
333
|
-
printed before the build. It never guesses values for unrelated environment
|
|
334
|
-
variables.
|
|
335
|
-
|
|
336
|
-
Each test carries two independent provenance fields:
|
|
337
|
-
|
|
338
|
-
- `runner`: the process that executed it, such as `playwright` or `vitest`;
|
|
339
|
-
- `kind`: its semantic level, such as `e2e`, `integration`, `component`, or
|
|
340
|
-
`unit`.
|
|
341
|
-
|
|
342
|
-
Kind is resolved in descending confidence from an explicit
|
|
343
|
-
`SUPERCOV_TEST_KIND`, Playwright project name, test path, then runner
|
|
344
|
-
default (Playwright is E2E; Vitest is unit). The report preserves how the label
|
|
345
|
-
was established, so an inferred kind is never presented as user-declared.
|
|
346
|
-
Vitest module-import/setup execution is retained as a separate setup scope,
|
|
347
|
-
not mislabeled as a test case.
|
|
348
|
-
|
|
349
|
-
Filtered queries recompute every obligation from the selected tests. MC/DC is
|
|
350
|
-
especially important: the command recomputes independence witness pairs rather
|
|
351
|
-
than filtering an already-computed percentage. Therefore a witness assembled
|
|
352
|
-
from one unit vector and one E2E vector counts for the combined suite but not
|
|
353
|
-
for either filtered subset. With `--kind e2e`, gap and file queries also
|
|
354
|
-
distinguish obligations covered only by other test levels from obligations
|
|
355
|
-
uncovered everywhere.
|
|
356
|
-
|
|
357
|
-
The query model reconstructed from the archive contains both per-test and
|
|
358
|
-
per-test-file coverage data. MC/DC stores vector-level provenance rather than
|
|
359
|
-
only a decision-level test list, so the exact minimizer recomputes valid
|
|
360
|
-
independence pairs for every proposed subset. This matters because the two
|
|
361
|
-
vectors in a witness pair may come from different tests.
|
|
362
|
-
|
|
363
|
-
The reconstructed query model also contains an action/assertion trace without requiring spec
|
|
364
|
-
changes. Calls such as `page.goto()`, `locator.click()`, and `locator.fill()`
|
|
365
|
-
open action phases; Playwright `expect()` matchers open assertion phases. The
|
|
366
|
-
phase travels on browser requests into automatically wrapped Remix loaders,
|
|
367
|
-
actions, and the server document renderer. Node async context preserves that
|
|
368
|
-
ID through awaited helpers. An assertion also retains the preceding action ID,
|
|
369
|
-
making chains such as “click -> application lines/decisions -> visible
|
|
370
|
-
assertion” queryable in JSON.
|
|
371
|
-
|
|
372
|
-
Server evidence is safe when Playwright uses multiple workers against one
|
|
373
|
-
application server. Every routed request carries a run/worker/test/retry scope;
|
|
374
|
-
Node async context retains that scope and its current phase across awaited
|
|
375
|
-
work. The server writes to a distinct attempt path, and the collecting fixture
|
|
376
|
-
accepts only records bearing that attempt ID. No worker deletes, reads, or
|
|
377
|
-
attributes another worker's live evidence file.
|
|
378
|
-
|
|
379
|
-
Detached work is never silently dropped or guessed onto the currently active
|
|
380
|
-
test. HTTP callbacks inherit the carrier automatically; child processes inherit
|
|
381
|
-
it through their environment; and exported queue helpers support BullMQ,
|
|
382
|
-
Bee-Queue, pg-boss, Agenda, and in-process schedulers. Evidence that arrives
|
|
383
|
-
without a carrier is persisted under a first-class `background/unattributed`
|
|
384
|
-
scope. It is visible in the all-attempt view and excluded from passed-only
|
|
385
|
-
per-test coverage.
|
|
386
|
-
|
|
387
|
-
The Playwright adapter covers the page and request fixtures, API request
|
|
388
|
-
contexts, user-created browser contexts/pages, popups and all their frames,
|
|
389
|
-
dedicated/service workers, WebSocket handshake headers, and test-spawned child
|
|
390
|
-
processes. A two-worker generic fixture exercises these surfaces without
|
|
391
|
-
changing its test imports or Playwright config.
|
|
392
|
-
|
|
393
|
-
Every run stores SHA-256 fingerprints for source, tests, dependency lockfiles,
|
|
394
|
-
test/build configuration, and the instrumenter, plus its evidence schema and Git
|
|
395
|
-
revision/dirty state. Queries compare the stored fingerprint with the current
|
|
396
|
-
workspace, visibly mark stale runs, and reject evidence carrying a different
|
|
397
|
-
run scope.
|
|
398
|
-
|
|
399
|
-
For Chromium documents exposed through the page target, a pre-document probe
|
|
400
|
-
also installs the phase before application JavaScript starts. Chromium may run
|
|
401
|
-
a newly created cross-origin iframe in a separate target that cannot be safely
|
|
402
|
-
paused and attached during navigation; its earliest browser probes use the
|
|
403
|
-
timing fallback until the frame is live. This affects only action-level causal
|
|
404
|
-
precision, not structural coverage or exact test-case provenance.
|
|
405
|
-
|
|
406
|
-
Code reached outside a recognized Playwright action, such as setup work or a
|
|
407
|
-
project-specific helper that performs HTTP requests directly, still has exact
|
|
408
|
-
test-case attribution but may not have an explicit action-phase ID. The report
|
|
409
|
-
labels explicit browser/server events separately from events assigned by the
|
|
410
|
-
isolated VM's timing fallback. Only explicit phases can raise confidence to
|
|
411
|
-
`asserted`; a timing-correlated event remains execution-only. Each line, point,
|
|
412
|
-
branch alternative, vector, and MC/DC condition therefore distinguishes
|
|
413
|
-
unexecuted, executed, action-linked, and assertion-linked evidence, as well as
|
|
414
|
-
unit-only versus E2E coverage.
|
|
415
|
-
|
|
416
|
-
The v2 denominator additionally measures optional-chain short-circuiting,
|
|
417
|
-
logical assignments, parameter/destructuring defaults, try versus catch,
|
|
418
|
-
zero versus entered `for-in`/`for-of`, and implicit switch no-match. Direct
|
|
419
|
-
`eval`/`Function` source cannot receive a stable pre-run denominator; when such
|
|
420
|
-
code is discovered the evidence records its exact location as a completeness
|
|
421
|
-
blocker instead of allowing a misleading 100% verdict.
|
|
152
|
+
## Documentation
|
|
153
|
+
|
|
154
|
+
- [Getting started](https://supercov.com/docs/getting-started)
|
|
155
|
+
- [Agent loop](https://supercov.com/docs/agent-loop)
|
|
156
|
+
- [CLI reference](https://supercov.com/docs/cli)
|
|
157
|
+
- [Coverage model](https://supercov.com/docs/coverage-model)
|
|
158
|
+
- [Supported suites](https://supercov.com/docs/supported-suites)
|
|
159
|
+
- [Evidence and runs](https://supercov.com/docs/evidence)
|
|
160
|
+
- [Verification](https://supercov.com/docs/verification)
|
|
161
|
+
- [Workspace isolation](https://supercov.com/docs/workspace-isolation)
|
|
162
|
+
- [Performance and storage](https://supercov.com/docs/performance)
|
|
163
|
+
|
|
164
|
+
## Free and open source
|
|
165
|
+
|
|
166
|
+
[MIT licensed](LICENSE). Inspect, extend, and run it anywhere.
|