supercov 0.0.21 → 0.0.23
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 -124
- 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/docs/performance.md
CHANGED
|
@@ -1,123 +1,74 @@
|
|
|
1
1
|
# Performance and storage
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
be intentionally non-repeatable.
|
|
3
|
+
Test execution usually dominates a Supercov run. Supercov records the other
|
|
4
|
+
phases separately so you can see whether time is going into workspace setup,
|
|
5
|
+
instrumentation, the test command, or evidence publication.
|
|
7
6
|
|
|
8
|
-
##
|
|
7
|
+
## Read run timings
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
```sh
|
|
10
|
+
npx supercov runs --limit 5
|
|
11
|
+
npx supercov runs latest
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Each run records:
|
|
11
15
|
|
|
12
16
|
| Phase | Includes |
|
|
13
17
|
| --- | --- |
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
18
|
+
| Initialization | Recovery, locking, project discovery, and fingerprints |
|
|
19
|
+
| Workspace preparation | Refreshing the isolated project workspace |
|
|
20
|
+
| Adapter setup | Preparing runner integration and runtime files |
|
|
21
|
+
| Instrumented build | Building instrumented source, or near-zero on an exact cache hit |
|
|
22
|
+
| Test command | The wrapped command, including runner and remote latency |
|
|
23
|
+
| Evidence publication | Validation, archive creation, summary analysis, and atomic publication |
|
|
20
24
|
|
|
21
|
-
The fields are
|
|
22
|
-
|
|
25
|
+
The same fields are available in `run.json` and in `runs --json` when an
|
|
26
|
+
integration needs machine-readable timings.
|
|
23
27
|
|
|
24
|
-
|
|
25
|
-
test script that ordinarily performs its own build may overlap work with the
|
|
26
|
-
instrumented-build phase. True end-to-end overhead must compare equivalent
|
|
27
|
-
cold runs or equivalent warm runs of the same command.
|
|
28
|
+
## Keep repeated runs fast
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
- Use the same complete command for the baseline and final verification.
|
|
31
|
+
- Let the isolated build cache survive between passes.
|
|
32
|
+
- Avoid changing dependencies, build configuration, or toolchains in the
|
|
33
|
+
middle of a coverage loop unless the test requires it.
|
|
34
|
+
- Use a focused test command while iterating, then finish with the full suite.
|
|
35
|
+
- Query the stored run instead of rerunning merely to inspect a different view.
|
|
30
36
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
37
|
+
Supercov reuses an instrumented build only when the relevant source,
|
|
38
|
+
configuration, dependencies, toolchain, build mode, and instrumenter identity
|
|
39
|
+
match exactly. A mismatch causes a fresh build rather than risking stale
|
|
40
|
+
coverage.
|
|
41
|
+
|
|
42
|
+
## Measure end-to-end overhead
|
|
43
|
+
|
|
44
|
+
Supercov never runs the test command a second time automatically because tests
|
|
45
|
+
may write data, call paid services, or be intentionally non-repeatable. To
|
|
46
|
+
measure overhead, compare the original and wrapped command under the same cache
|
|
47
|
+
state:
|
|
34
48
|
|
|
35
49
|
```sh
|
|
36
50
|
/usr/bin/time -p npm test
|
|
37
51
|
/usr/bin/time -p npx supercov -- npm test
|
|
38
52
|
```
|
|
39
53
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
##
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
Supercov
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
produced this warm pair:
|
|
62
|
-
|
|
63
|
-
| Measurement | Duration |
|
|
64
|
-
| --- | ---: |
|
|
65
|
-
| unchanged command | 39.57 s |
|
|
66
|
-
| Supercov total | 45.38 s |
|
|
67
|
-
| end-to-end difference | +5.81 s (+14.7%) |
|
|
68
|
-
| initialization | 0.06 s |
|
|
69
|
-
| workspace preparation | 0.35 s |
|
|
70
|
-
| adapter setup | 0.05 s |
|
|
71
|
-
| instrumented build | 4.87 s |
|
|
72
|
-
| test command inside Supercov | 39.60 s |
|
|
73
|
-
| evidence/report preparation (historical format) | 0.40 s |
|
|
74
|
-
|
|
75
|
-
The test-command durations were effectively identical in this pair. The extra
|
|
76
|
-
instrumented build accounted for about 84% of the measured difference. A
|
|
77
|
-
seven-sample isolated workspace refresh had a 270 ms median and 447 ms maximum.
|
|
78
|
-
The built output grew from 2,781,273 to 3,094,366 logical bytes (+11.3%). A
|
|
79
|
-
cached `npx supercov help` added a 686 ms median over direct CLI startup; the
|
|
80
|
-
first observed `npx` resolution took 2.22 s.
|
|
81
|
-
|
|
82
|
-
Cold VM-image runs were 170.34 s without Supercov and 175.44 s with Supercov in
|
|
83
|
-
the same session, but a single cold pair is too noisy for a general percentage.
|
|
84
|
-
Both spent approximately 124 seconds preparing their VM image.
|
|
85
|
-
|
|
86
|
-
Before raw-evidence-only storage, the reference run retained 4.5 MB of reports
|
|
87
|
-
and 1.7 MB across 178 loose evidence files. Its canonical compressed JSON was
|
|
88
|
-
0.9 MB. The execution evidence alone packed to about 121 KiB; current archives
|
|
89
|
-
also embed the exact denominator manifest and are the sole coverage artifact.
|
|
90
|
-
Every CLI query derives its view from the archive. The first query builds a
|
|
91
|
-
disposable integrity-bound binary index; later queries reuse it while the run
|
|
92
|
-
identity remains valid. The index is an implementation detail and can always be
|
|
93
|
-
deleted and reconstructed.
|
|
94
|
-
These numbers are application- and filesystem-specific optimization baselines.
|
|
95
|
-
An exact matching Vite build is also reused across runs, removing the measured
|
|
96
|
-
4.87-second repeated build; any source/configuration/toolchain-key change falls
|
|
97
|
-
back to a fresh isolated build.
|
|
98
|
-
|
|
99
|
-
The evidence-only Essential SEO validation packed the exact manifest plus 178
|
|
100
|
-
execution-evidence files (2.66 MB uncompressed) into a 248 KiB archive. With
|
|
101
|
-
the 4 KiB `run.json`, the complete immutable run occupies 252 KiB and contains
|
|
102
|
-
no derived report. Its identical warm 29-test run recorded 0 ms for the build
|
|
103
|
-
phase and 40.49 seconds total: 0.07 seconds initialization, 0.36 seconds
|
|
104
|
-
workspace refresh, 0.05 seconds adapter setup, 39.84 seconds in the unchanged
|
|
105
|
-
test command, and 0.12 seconds evidence validation/archive publication. Fresh
|
|
106
|
-
process queries for summary, files, and gaps each took 0.16–0.20 seconds on
|
|
107
|
-
this run before the reusable query index was introduced. Test execution is
|
|
108
|
-
still the dominant and naturally variable part of the total.
|
|
109
|
-
|
|
110
|
-
## Isolation strategy trade-offs
|
|
111
|
-
|
|
112
|
-
| Strategy | Arbitrary-runner compatibility | Failure isolation | Startup/storage |
|
|
113
|
-
| --- | --- | --- | --- |
|
|
114
|
-
| Transactional physical namespace | Highest; ordinary filesystem consumers and opaque mounts see real files | Strong when staging, publication, recovery, locking, and same-filesystem renames are enforced | Recreates directory entries and may copy bytes when reflinks are unavailable |
|
|
115
|
-
| Node loader/Vite plugins | High for observed Node and bundler graphs, incomplete for native readers and hidden remote mounts | Strong because transformed source need not be persisted | Lowest retained storage and usually fastest |
|
|
116
|
-
| FUSE/OS overlay | Potentially broad local read interception, but not portable or zero-install | Adds mount, privilege, kernel/extension, and teardown failure boundaries | Low duplicated storage but operationally expensive |
|
|
117
|
-
| Adaptive hybrid | Fast path where capability is proven; transactional namespace otherwise | Inherits the physical fallback's guarantees when detection is conservative | Best practical balance; more implementation paths must be tested |
|
|
118
|
-
|
|
119
|
-
The safe default remains the transactional physical namespace. The intended
|
|
120
|
-
optimization is an adaptive hybrid that selects a proven loader/plugin path
|
|
121
|
-
and lazily materializes the same transactional fallback whenever an opaque
|
|
122
|
-
runner needs real files. FUSE is not an appropriate portable default for a
|
|
123
|
-
zero-install `npx` tool.
|
|
54
|
+
Use several alternating pairs and compare medians. Do not compare a cold
|
|
55
|
+
package, browser, build, or VM cache with a warm one. A first `npx` download is
|
|
56
|
+
package-acquisition time, not coverage-engine time.
|
|
57
|
+
|
|
58
|
+
## Storage
|
|
59
|
+
|
|
60
|
+
Each completed run stores compressed raw evidence and a small metadata file
|
|
61
|
+
under `.supercov/runs/<run-id>/`. Query views are derived from that evidence;
|
|
62
|
+
Supercov does not retain a separate full report for every filter.
|
|
63
|
+
|
|
64
|
+
The isolated workspace can be larger than a run because it may contain an
|
|
65
|
+
instrumented build cache. Control retention explicitly:
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
npx supercov clean --dry-run
|
|
69
|
+
npx supercov clean --keep 20
|
|
70
|
+
npx supercov clean
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Supercov never prunes runs in the background. Cleanup is explicit so historical
|
|
74
|
+
evidence does not disappear during an unattended agent session.
|
package/docs/supported-suites.md
CHANGED
|
@@ -1,119 +1,98 @@
|
|
|
1
1
|
# Supported suites
|
|
2
2
|
|
|
3
|
-
Supercov
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Supercov supports JavaScript, TypeScript, and Rust today. Support is exact when
|
|
4
|
+
Supercov can identify individual test attempts; otherwise it reports aggregate
|
|
5
|
+
coverage without guessing which test caused a hit.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Languages
|
|
8
8
|
|
|
9
|
-
|
|
|
9
|
+
| Language | Status | Supported commands |
|
|
10
10
|
| --- | --- | --- |
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
11
|
+
| JavaScript | Available | Existing Node-based test commands |
|
|
12
|
+
| TypeScript | Available | Existing Node-based test commands and build pipelines |
|
|
13
|
+
| Rust | Available | `cargo test`, `cargo nextest run` |
|
|
14
|
+
| Python | Coming soon | — |
|
|
15
|
+
| Zig | Coming soon | — |
|
|
16
|
+
| PHP | Coming soon | — |
|
|
17
|
+
| C | Coming soon | — |
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
More languages will follow. The current npm-distributed CLI requires Node.js 22
|
|
20
|
+
or newer for every language.
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
labelled with the runner that executed it and the semantic kind it belongs to.
|
|
22
|
+
## JavaScript and TypeScript runners
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
| Project shape | How instrumentation is applied |
|
|
24
|
+
| Runner | Attribution |
|
|
27
25
|
| --- | --- |
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
26
|
+
| Playwright | Exact per test, worker, retry, outcome, action, and assertion phase |
|
|
27
|
+
| Vitest | Exact per test, with setup execution kept separate |
|
|
28
|
+
| Jest | Exact per test, including concurrent and parameterized tests |
|
|
29
|
+
| `node:test` | Exact per test |
|
|
30
|
+
| AVA, Mocha, and other Node runners | Aggregate structural coverage |
|
|
31
|
+
| Browser component runners without an adapter | Aggregate structural coverage |
|
|
32
|
+
|
|
33
|
+
Aggregate evidence is still included in the full-run view. It is labelled as
|
|
34
|
+
background rather than being assigned to a test that may not have caused it.
|
|
35
|
+
|
|
36
|
+
A single command may launch several runners. Supercov combines their evidence
|
|
37
|
+
into one run and keeps the runner identity where exact attribution is available.
|
|
38
|
+
|
|
39
|
+
## Rust runners
|
|
31
40
|
|
|
32
|
-
|
|
33
|
-
|
|
41
|
+
| Runner | Attribution | Current boundary |
|
|
42
|
+
| --- | --- | --- |
|
|
43
|
+
| Cargo's standard libtest runner | Exact test and attempt identity | Run with `npx supercov -- cargo test` |
|
|
44
|
+
| cargo-nextest | Exact test, attempt, retry, and binary identity | Run with cargo-nextest 0.9.138 or 0.9.140 |
|
|
45
|
+
|
|
46
|
+
Rust support currently follows the Rust 1.95 toolchain and preserves Cargo's
|
|
47
|
+
test selection, scheduling, fail-fast behavior, environment, and exit status.
|
|
48
|
+
`cross` is not supported yet. Unsupported command shapes fail clearly rather
|
|
49
|
+
than falling back to plausible but inaccurate attribution.
|
|
34
50
|
|
|
35
|
-
|
|
36
|
-
between runs, the previous instrumented output and manifest are carried into the
|
|
37
|
-
refreshed workspace and the build is skipped entirely.
|
|
51
|
+
## Builds and source formats
|
|
38
52
|
|
|
39
|
-
|
|
53
|
+
JavaScript and TypeScript projects can use Vite, Vitest, Next, Turbopack,
|
|
54
|
+
Webpack, esbuild, SWC, `tsc`, or no build step. ESM and CommonJS are supported,
|
|
55
|
+
along with modern JavaScript, JSX, TypeScript, and TSX syntax.
|
|
40
56
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
`process.env.TEST_PREVIEW === "true"` check, for example — activates that
|
|
45
|
-
build-only flag, and the decision is printed before the build. Values are never
|
|
46
|
-
guessed for unrelated environment variables.
|
|
57
|
+
Supercov instruments an isolated workspace. It does not add imports, reporters,
|
|
58
|
+
or plugins to the authored project, and it does not overwrite the project's
|
|
59
|
+
ordinary build output.
|
|
47
60
|
|
|
48
61
|
## Browsers
|
|
49
62
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
test
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
Discovery is structural rather than provider-specific. The preload and a
|
|
87
|
-
narrowly gated ESM transform look for a static `build(options)` capability,
|
|
88
|
-
activate only when those options contain a host-to-guest mount that includes the
|
|
89
|
-
isolated project, scope any existing cache or snapshot identity to the run's
|
|
90
|
-
source fingerprint, and follow the returned object graph. A method whose options
|
|
91
|
-
contain `argv`, `cmd` or `command` receives guest-translated Supercov paths and
|
|
92
|
-
a guest-valid Node preload.
|
|
93
|
-
|
|
94
|
-
The execution log records this process and capability graph, but hashes long or
|
|
95
|
-
multiline arguments so embedded shell bodies and credentials are never
|
|
96
|
-
persisted.
|
|
97
|
-
|
|
98
|
-
The boundary is explicit: Supercov follows Node child processes, not arbitrary
|
|
99
|
-
non-Node supervisors, and not a remote control plane that never exposes its
|
|
100
|
-
launches to the local process. CommonJS and pure-ESM executor SDKs,
|
|
101
|
-
object-shaped and positional execution APIs, and opaque returned object graphs
|
|
102
|
-
are all covered when a discoverable build capability exposes the workspace mount
|
|
103
|
-
and an execution capability accepts an environment. Anything that hides all
|
|
104
|
-
launch state behind an out-of-process RPC needs a dedicated adapter, and
|
|
105
|
-
Supercov reports missing evidence rather than claiming those paths are covered.
|
|
106
|
-
|
|
107
|
-
The public regression suite includes provider-neutral CommonJS and pure-ESM
|
|
108
|
-
opaque executors. CI requires Supercov to discover that structure, scope the
|
|
109
|
-
cache identity, translate paths and the Node preload into the guest, run nested
|
|
110
|
-
Vitest and Playwright commands, parse every concurrent trace shard, and produce
|
|
111
|
-
100% fixture coverage.
|
|
112
|
-
|
|
113
|
-
## Distributed runs
|
|
114
|
-
|
|
115
|
-
Each shard produces its own immutable run. `supercov merge` combines runs whose
|
|
116
|
-
source, test, dependency, configuration, instrumenter, schema and denominator
|
|
117
|
-
fingerprints match exactly, publishes a new immutable run atomically, and leaves
|
|
118
|
-
every input untouched. Incompatible shards fail with a clear reason instead of
|
|
119
|
-
being averaged together.
|
|
63
|
+
Playwright coverage supports Chromium, Firefox, and WebKit. It follows pages,
|
|
64
|
+
frames, popups, workers, request contexts, WebSockets, and test-spawned child
|
|
65
|
+
processes where the runner exposes the required identity.
|
|
66
|
+
|
|
67
|
+
## Background processes and servers
|
|
68
|
+
|
|
69
|
+
Node child processes inherit coverage automatically. Long-running servers are
|
|
70
|
+
given a short drain window after the test command finishes so buffered evidence
|
|
71
|
+
can arrive before the run is published.
|
|
72
|
+
|
|
73
|
+
If work arrives without a reliable test identity, Supercov records it as
|
|
74
|
+
background evidence. The default whole-run view includes it; passed-only and
|
|
75
|
+
per-test views do not pretend it belongs to a particular test.
|
|
76
|
+
|
|
77
|
+
## Containers, VMs, and remote execution
|
|
78
|
+
|
|
79
|
+
Supercov can collect from supported processes launched through a container, VM,
|
|
80
|
+
or remote executor when the command exposes a discoverable launch boundary and
|
|
81
|
+
the Supercov runtime can be carried into that environment. Mounted workspaces
|
|
82
|
+
and local child-process launchers are the most direct path.
|
|
83
|
+
|
|
84
|
+
If the remote boundary hides how code is launched or cannot return evidence,
|
|
85
|
+
Supercov reports the missing coverage boundary. It does not silently treat
|
|
86
|
+
remote execution as measured.
|
|
87
|
+
|
|
88
|
+
## Distributed suites
|
|
89
|
+
|
|
90
|
+
Run shards separately, then merge compatible run ids:
|
|
91
|
+
|
|
92
|
+
```sh
|
|
93
|
+
npx supercov merge <shard-a> <shard-b> <shard-c>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
All shards must describe the same source, configuration, toolchain, schema, and
|
|
97
|
+
coverage denominator. Incompatible shards are rejected with the mismatched
|
|
98
|
+
domains listed.
|
package/docs/verification.md
CHANGED
|
@@ -1,102 +1,68 @@
|
|
|
1
1
|
# Verification
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Coverage is useful only if instrumentation preserves program behavior and the
|
|
4
|
+
reported obligations match what actually executed. Supercov fails closed when
|
|
5
|
+
it cannot establish either condition.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## What release checks cover
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
on three axes: return values, thrown errors, and the observable order of side
|
|
11
|
-
effects.
|
|
9
|
+
Every release is checked for:
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
- identical return values, thrown errors, and side-effect order before and
|
|
12
|
+
after instrumentation;
|
|
13
|
+
- short-circuiting, getters, proxies, optional calls, `this` binding, defaults,
|
|
14
|
+
exceptions, loops, async functions, and generators;
|
|
15
|
+
- exact line, branch, decision-vector, and MC/DC results;
|
|
16
|
+
- JavaScript behavior across a pinned TC39 Test262 corpus;
|
|
17
|
+
- supported JavaScript, TypeScript, and Rust runner contracts;
|
|
18
|
+
- Chromium, Firefox, and WebKit browser execution;
|
|
19
|
+
- source isolation, interrupted-run recovery, and atomic publication; and
|
|
20
|
+
- package installation and execution from a clean project.
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
MC/DC cases are also compared with an independent LLVM implementation so a
|
|
23
|
+
self-consistent error in Supercov's own calculation does not pass unnoticed.
|
|
19
24
|
|
|
20
|
-
|
|
21
|
-
ternaries, coercion and thrown expressions on every run. It is deterministic, so
|
|
22
|
-
a regression reproduces exactly rather than appearing once in CI and never
|
|
23
|
-
again.
|
|
25
|
+
## What happens when code cannot be measured safely
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
Supercov does not force a transform through code that observes its own source
|
|
28
|
+
text or creates source dynamically without a stable denominator. It leaves the
|
|
29
|
+
affected behavior uninstrumented and records a completeness blocker with the
|
|
30
|
+
reason and location.
|
|
26
31
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
Similarly, evidence from an unsupported runner or hidden remote boundary is
|
|
33
|
+
reported as aggregate, unattributed, or missing. It is not assigned to a test
|
|
34
|
+
that may not have caused it.
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
Inspect these states with:
|
|
32
37
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
The same three-condition masking-MC/DC golden cases must produce identical
|
|
40
|
-
verdicts under Supercov and under Clang/LLVM source-based MC/DC: 100% for a
|
|
41
|
-
complete witness set and 33.33% for an incomplete one.
|
|
42
|
-
|
|
43
|
-
This is the gate that matters most. MC/DC has enough subtlety — masking versus
|
|
44
|
-
unique-cause, short-circuit evaluation, compound conditions — that agreement
|
|
45
|
-
with an independently implemented, widely audited toolchain is far stronger
|
|
46
|
-
evidence than any self-consistent test suite.
|
|
47
|
-
|
|
48
|
-
## 6. TC39 Test262
|
|
49
|
-
|
|
50
|
-
Release CI shards the pinned Test262 corpus across 16 workers, runs the official
|
|
51
|
-
harness against original and instrumented sources, and rejects any scenario that
|
|
52
|
-
passes originally but fails after transformation.
|
|
53
|
-
|
|
54
|
-
Some categories are excluded by construction, with reason counts printed for
|
|
55
|
-
every shard:
|
|
56
|
-
|
|
57
|
-
| Excluded | Why |
|
|
58
|
-
| --- | --- |
|
|
59
|
-
| Module, async and raw tests | Not comparable under the source-rewrite harness |
|
|
60
|
-
| Parse and resolution negatives | The transform never runs on unparseable input |
|
|
61
|
-
| Annex B sloppy-script extensions | Does not apply to the application modules Supercov instruments |
|
|
62
|
-
| `Function.prototype.toString` and function-source coercion | Exact source reflection necessarily observes a source transform |
|
|
63
|
-
|
|
64
|
-
The last category is handled in the product, not hidden: when application code
|
|
65
|
-
directly coerces or observes a function's source, Supercov leaves that body
|
|
66
|
-
uninstrumented and records a visible `semantic-safety` completeness blocker.
|
|
67
|
-
Dedicated differential fixtures cover the async and generator cases that Test262
|
|
68
|
-
cannot compare.
|
|
69
|
-
|
|
70
|
-
## 7. Performance budgets
|
|
38
|
+
```sh
|
|
39
|
+
npx supercov runs latest
|
|
40
|
+
npx supercov runs latest scope
|
|
41
|
+
npx supercov runs latest gaps
|
|
42
|
+
```
|
|
71
43
|
|
|
72
|
-
|
|
73
|
-
runtime probe overhead are each checked against explicit budgets. A change that
|
|
74
|
-
makes instrumentation correct but unusably slow fails the same way a wrong
|
|
75
|
-
answer does.
|
|
44
|
+
## How to review a coverage change
|
|
76
45
|
|
|
77
|
-
|
|
46
|
+
For a test added by a coding agent, check three things:
|
|
78
47
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
48
|
+
1. The wrapped test command still passes.
|
|
49
|
+
2. `diff` shows the expected obligations gained and no unexplained loss.
|
|
50
|
+
3. The test contains meaningful assertions and does not weaken application
|
|
51
|
+
behavior merely to improve a percentage.
|
|
83
52
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
53
|
+
```sh
|
|
54
|
+
npx supercov diff <baseline-run> <new-run>
|
|
55
|
+
npx supercov runs <new-run> test "new test name"
|
|
56
|
+
```
|
|
87
57
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
changed.
|
|
58
|
+
Store the compared run ids in the review or agent summary when the evidence
|
|
59
|
+
needs to be reproducible later.
|
|
91
60
|
|
|
92
|
-
##
|
|
61
|
+
## Integrity of stored runs
|
|
93
62
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
npm run benchmark:check
|
|
98
|
-
TEST262_DIR=/path/to/test262 npm run test:test262
|
|
99
|
-
```
|
|
63
|
+
Completed runs are immutable and integrity-bound to their evidence,
|
|
64
|
+
fingerprints, and schema. A run whose bytes are missing, corrupt, stale, or
|
|
65
|
+
incompatible is surfaced as such instead of being opened as a plausible report.
|
|
100
66
|
|
|
101
|
-
|
|
102
|
-
|
|
67
|
+
See [Evidence and runs](/docs/evidence) for retention, comparison, and shard
|
|
68
|
+
merging.
|