supercov 4.29.12 → 4.29.14
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/docs/cli.md +47 -8
- package/docs/mutation.md +47 -16
- package/package.json +10 -10
package/docs/cli.md
CHANGED
|
@@ -419,7 +419,9 @@ The output names the base, the merge base and how many changed lines hold a
|
|
|
419
419
|
mutant, then lists the mutants the tests leave alive, not infected first and
|
|
420
420
|
then not reached, each with the part it changes and why, and counts the rest
|
|
421
421
|
in one line. `--json` lists every mutant of the change, survivors first, with
|
|
422
|
-
`diff` (`base`, `mergeBase`, `commit`, `changedLines`, `linesWithMutants
|
|
422
|
+
`diff` (`base`, `mergeBase`, `commit`, `changedLines`, `linesWithMutants`, and
|
|
423
|
+
`unrunLines`: the changed lines of code no test of the run ran, by file).
|
|
424
|
+
Each mutant listed has `lineTests`: how many of the run's tests ran its line.
|
|
423
425
|
|
|
424
426
|
`--format markdown` writes a table for a pull request's comment: the counts in
|
|
425
427
|
one line, then up to 25 not-infected and not-reached mutants (or those
|
|
@@ -428,9 +430,15 @@ their status and why, and the command that lists the rest. Once `mutants test`
|
|
|
428
430
|
gave verdicts, a second line has the mutation score, with how many mutants it
|
|
429
431
|
is over (or, with none, why there is no score), and every verdict counted
|
|
430
432
|
(killed, timed out, survived, no coverage, unviable, error, not run for want
|
|
431
|
-
of a driver, and those with none yet), and the table lists
|
|
432
|
-
mutants that survived or that no test covers, then those
|
|
433
|
-
no test can kill, each with its weak status, its strong
|
|
433
|
+
of a driver, survived so far, and those with none yet), and the table lists
|
|
434
|
+
the survivors: the mutants that survived or that no test covers, then those
|
|
435
|
+
weak mutation shows no test can kill, each with its weak status, its strong
|
|
436
|
+
verdict and why. Every table says how many of the run's tests ran each
|
|
437
|
+
mutant's line. A change's comment names its lines of code no test ran, file
|
|
438
|
+
by file. Survivors that only change a log line (`logOnly`) are folded apart
|
|
439
|
+
in a `<details>`, and so are the mutants `survived so far` (a first tier of
|
|
440
|
+
their candidates passed, the rest not run yet): not survivors, and not in the
|
|
441
|
+
score. A CI can post the file as it is.
|
|
434
442
|
|
|
435
443
|
#### Mutation reports other tools read
|
|
436
444
|
|
|
@@ -549,7 +557,11 @@ phpunit`). See `docs/design/strong-mutation.md`,
|
|
|
549
557
|
run of its own even on an unchanged checkout, so a job never saves into a
|
|
550
558
|
run it restored, which every job of its round holds a copy of. There it
|
|
551
559
|
makes that run from the newest restored run whose command passed, without
|
|
552
|
-
measuring again, and keeps every verdict the restored runs hold.
|
|
560
|
+
measuring again, and keeps every verdict the restored runs hold. A run whose
|
|
561
|
+
command failed only because tests failed is made into one too, where none
|
|
562
|
+
passed: a failed test is no candidate, and the shard says which it leaves
|
|
563
|
+
out. A run whose command failed otherwise (no test failed, or no exit
|
|
564
|
+
status) is not, and the shard measures, saying what kept that run out.
|
|
553
565
|
- `--critical <glob>` (repeatable): every mutant there must be killed or
|
|
554
566
|
accepted, or the command fails.
|
|
555
567
|
- `--fail-on survived,timeout,no-coverage,error`: fail on any asked mutant with
|
|
@@ -1033,9 +1045,13 @@ TypeScript helper that only gained functions affects none), and every test
|
|
|
1033
1045
|
where Supercov cannot read the imports. A dependency,
|
|
1034
1046
|
lockfile, configuration or toolchain change affects every test and is reported
|
|
1035
1047
|
as such; a test runner's settings affect only the runs that used that runner.
|
|
1036
|
-
A source file
|
|
1037
|
-
|
|
1038
|
-
|
|
1048
|
+
A JavaScript or TypeScript source file added since the run, under the roots it
|
|
1049
|
+
measured, is outside every test's record: it affects the tests whose own file,
|
|
1050
|
+
or a file they ran code in, imports it now, directly or through other files
|
|
1051
|
+
(`src/new.ts added since the run (imported by src/app.ts, which this test ran
|
|
1052
|
+
code in)`). One that nothing of theirs imports is named as `unknown, new file`;
|
|
1053
|
+
run what can reach it in full. `--json` lists each under `newFiles`, with
|
|
1054
|
+
`importedBy` or `"reach": "unknown, new file"`.
|
|
1039
1055
|
|
|
1040
1056
|
A Rust test loads what it names by path: a fixture, a data file or a script
|
|
1041
1057
|
named in its own function (or in its entry of a macro that declares a test
|
|
@@ -1061,6 +1077,15 @@ others. A mock keeps its state between tests, so a mock's files count whole,
|
|
|
1061
1077
|
not route by route; a file the application's server loaded, a preload of its
|
|
1062
1078
|
own, affects every test it served.
|
|
1063
1079
|
|
|
1080
|
+
A changed file no test's import places -- a fixture another program reads, a
|
|
1081
|
+
file a command names, or another runner's test or helper -- is one any test
|
|
1082
|
+
may load. A Playwright run keeps what each of its Node processes (the
|
|
1083
|
+
runner, its workers, the servers) loaded and read, and then such a file
|
|
1084
|
+
affects its tests only where one of them did, or where it is in the tree of
|
|
1085
|
+
a configuration of a runner the run used (`tests/e2e/` for
|
|
1086
|
+
`tests/e2e/playwright.config.ts`): a changed integration test or its helper
|
|
1087
|
+
selects none of an e2e run's tests.
|
|
1088
|
+
|
|
1064
1089
|
### Which affected tests check the change
|
|
1065
1090
|
|
|
1066
1091
|
When the run has an [assertion assessment](assertions.md), `tests affected`
|
|
@@ -1278,6 +1303,20 @@ saved into the latest of them; run such a round again.
|
|
|
1278
1303
|
reusing the answers saved when its parts were assessed. `tests affected` of a
|
|
1279
1304
|
merged run is answered from the runs it was merged from, which hold the record
|
|
1280
1305
|
of what each test ran; a test in several of them is affected where any says so.
|
|
1306
|
+
The merged run keeps what each of them answers with (in its `parts/`
|
|
1307
|
+
directory: each run's metadata, its record of what each test ran, and the
|
|
1308
|
+
few entries of its archive that say what its tests loaded), so it answers
|
|
1309
|
+
alone, with its runs gone from `.supercov/runs`: a merged baseline can be
|
|
1310
|
+
cached and restored by itself. A merge made by a Supercov before 4.29.14 kept
|
|
1311
|
+
none of that, and needs its runs.
|
|
1312
|
+
|
|
1313
|
+
A file a server of the run reads that the measured command itself wrote, and
|
|
1314
|
+
that git does not track -- a local stack's settings that a harness writes with
|
|
1315
|
+
each machine's ports and keys -- is not an input of the run: a later checkout
|
|
1316
|
+
cannot change it under the run, and each machine's part of a suite reads its
|
|
1317
|
+
own. The run leaves it out of what it records (and says so), so such parts
|
|
1318
|
+
merge, and a change to it affects no test. A tracked file the command
|
|
1319
|
+
rewrites, such as a mock's data it saves, stays an input.
|
|
1281
1320
|
|
|
1282
1321
|
## Add coverage measured elsewhere
|
|
1283
1322
|
|
package/docs/mutation.md
CHANGED
|
@@ -108,12 +108,36 @@ mutants the tests let survive.
|
|
|
108
108
|
its own, so that each job's share is saved into a run no other job writes:
|
|
109
109
|
made from the newest run of the checkout whose command passed, without
|
|
110
110
|
measuring again (`not measuring: the checkout is unchanged since run r4, so
|
|
111
|
-
this shard saves its verdicts into run r9, made from it`), or
|
|
112
|
-
|
|
111
|
+
this shard saves its verdicts into run r9, made from it`), or, where none
|
|
112
|
+
passed, from the newest whose command failed only because tests failed,
|
|
113
|
+
which are no candidates (`continuing from run r4, whose command failed: 1
|
|
114
|
+
test failed while measuring and is not a candidate: checkout > pays`), or
|
|
115
|
+
measured where there is none, saying why (see
|
|
116
|
+
[A pass split across jobs](#a-pass-split-across-jobs)).
|
|
113
117
|
An earlier run measured on the same files, byte for byte, keeps every
|
|
114
118
|
verdict a pass reached, whatever the two measurements recorded: a test
|
|
115
119
|
whose path depends on the time, or that failed in one of them, moves no
|
|
116
120
|
verdict.
|
|
121
|
+
- **A baseline of the checkout.** Where no run of the command can be read or
|
|
122
|
+
continued, a run of the checkout as it is that holds the tests the command
|
|
123
|
+
runs is: a merge of a suite measured in parts on several machines (a
|
|
124
|
+
weekly baseline restored into `.supercov/runs`), or a run of the whole
|
|
125
|
+
suite. The pass's run is made from it with those tests' records alone, as
|
|
126
|
+
measuring them would record, and nothing is measured (`not measuring: run
|
|
127
|
+
r4 of this checkout holds the tests the command runs (18 test(s) in 6 of
|
|
128
|
+
its 61 test file(s)); this pass saves its verdicts into run r9, made from
|
|
129
|
+
it with those tests alone`). The command's tests are every test of a merge
|
|
130
|
+
whose runs were each measured with the command itself, and otherwise those
|
|
131
|
+
of the test files the command names, by path or by the end of one
|
|
132
|
+
(`tests/e2e/billing.spec.ts`, `billing.spec.ts`), anywhere in its words,
|
|
133
|
+
where the run holds every one of them that any run holds; a command that
|
|
134
|
+
names none is measured. The baseline must be of the checkout
|
|
135
|
+
as it is, by its fingerprint: on a pull request, whose checkout differs, the
|
|
136
|
+
command is measured, so narrow it to the specs `tests affected --files`
|
|
137
|
+
names; the change's own mutants are run only by tests that ran changed
|
|
138
|
+
code, which those are. A test that failed in the baseline is no candidate.
|
|
139
|
+
It needs a merged run made by this release, which keeps what its runs
|
|
140
|
+
answer with.
|
|
117
141
|
- **After an edit.** It measures the checkout again and keeps an earlier
|
|
118
142
|
verdict for each mutant whose file is as it was and whose candidate tests,
|
|
119
143
|
and their test files, nothing changed could reach, as `runs latest tests
|
|
@@ -153,8 +177,9 @@ mutants the tests let survive.
|
|
|
153
177
|
merge and in a later round: a candidate a change could reach runs again.
|
|
154
178
|
The Playwright driver records them.
|
|
155
179
|
- **A first tier.** A Playwright mutant with more candidates than its first
|
|
156
|
-
tier holds (32, or more where the run's kills come later
|
|
157
|
-
|
|
180
|
+
tier holds (32, or more where the run's kills come later, or as many as
|
|
181
|
+
take 60 s of their tests' time, at least four, whichever comes first)
|
|
182
|
+
runs against that tier first, every such mutant before any runs the rest. One the tier
|
|
158
183
|
lets live is `survived-so-far` until the rest runs, in the same pass where
|
|
159
184
|
it has the time: listed with the survivors as such, never in the score
|
|
160
185
|
(`docs/design/strong-mutation.md`, A first tier, then the rest).
|
|
@@ -210,17 +235,22 @@ npx supercov mutants --diff origin/main --fail-on survived
|
|
|
210
235
|
npx supercov mutants --diff origin/main --format markdown --output mutants.md
|
|
211
236
|
```
|
|
212
237
|
|
|
213
|
-
- `--format markdown` writes a
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
that
|
|
238
|
+
- `--format markdown` writes a pull request's comment, ready to post as it
|
|
239
|
+
is: the counts, the change's lines of code no test ran, then up to 25
|
|
240
|
+
mutants left alive with where they are, what they change, how many of the
|
|
241
|
+
run's tests ran their line and why, and the command that lists the rest.
|
|
242
|
+
Once a strong pass gave verdicts, it has the mutation score and lists the
|
|
243
|
+
survivors. Those that only change a log line are folded in a `<details>` of
|
|
244
|
+
their own, and so are those `survived so far` (counted apart, never with
|
|
245
|
+
the survivors). `supercov mutants` takes `--format markdown` and
|
|
246
|
+
`--output <file>` too, and writes its own answer that way.
|
|
219
247
|
- A survivor that only changes a log line (its change lies wholly inside the
|
|
220
|
-
arguments of `console.*`,
|
|
221
|
-
`debug`, `trace` or `log
|
|
222
|
-
|
|
223
|
-
only
|
|
248
|
+
arguments of `console.*`, of a method named `info`, `warn`, `error`,
|
|
249
|
+
`debug`, `trace` or `log`, or of what makes a logger: `createLogger(...)`,
|
|
250
|
+
`getLogger(...)`, `pino(...)`, and `.child(...)` of a logger) is still
|
|
251
|
+
`survived`, but marked `(only changes a log line)` (`logOnly` in JSON) and
|
|
252
|
+
counted on its own: `survived 185 (109 only change a log line)`. Triage can
|
|
253
|
+
set those aside.
|
|
224
254
|
- `--fail-on` exits `1` when a mutant asked about has one of the statuses
|
|
225
255
|
given. On `runs latest mutants` they are weak statuses, from the run alone;
|
|
226
256
|
on `supercov mutants` and `mutants test` they are verdicts: `survived`,
|
|
@@ -349,8 +379,9 @@ merge ([CLI reference](cli.md#combine-shards)).
|
|
|
349
379
|
- **Another round.** On the commit the restored runs measured, each job saves
|
|
350
380
|
into a run of its own: `supercov mutants --shard` never saves into a run it
|
|
351
381
|
restored, of which every job of the round holds a copy. It makes that run
|
|
352
|
-
from the newest restored run
|
|
353
|
-
|
|
382
|
+
from the newest restored run that recorded its mutants' values and whose
|
|
383
|
+
command passed, or failed only in tests that failed, without measuring
|
|
384
|
+
again: the run holds that run's evidence
|
|
354
385
|
under an id of its own. It keeps every verdict a pass reached that the
|
|
355
386
|
restored runs hold (`1317 verdict(s) kept from runs r8, r7, r6, r5: the
|
|
356
387
|
checkout is unchanged since them`), and the shares are of what is left.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supercov",
|
|
3
|
-
"version": "4.29.
|
|
3
|
+
"version": "4.29.14",
|
|
4
4
|
"description": "Coverage, security and code quality for coding agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"coverage",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"eval:skill": "claude plugin eval plugins/supercov --scaffold --trust-plugin --no-publish --model claude-sonnet-5 --judge-model claude-haiku-4-5 --threshold 0.66 --tag behavior trigger --allow-tools Bash Edit Write --max-cost-usd 15",
|
|
84
84
|
"eval:skill-triggers": "claude plugin eval plugins/supercov --scaffold --trust-plugin --no-publish --model claude-sonnet-5 --judge-model claude-haiku-4-5 --threshold 0.66 --tag trigger --ablation none --max-cost-usd 5",
|
|
85
85
|
"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",
|
|
86
|
-
"test:engine-integrations": "cargo build -p supercov && node scripts/html-report-integration.mjs && node scripts/mutation-report-formats.mjs && 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-nested-vitest-integration.mjs && node scripts/rust-direct-jest-integration.mjs && node scripts/mocha-failure-output.mjs && node scripts/failure-output.mjs node ava tap && node scripts/side-by-side.mjs node && node scripts/merge-across.mjs && node scripts/import-line-evidence.mjs && node scripts/mock-reach.mjs && node scripts/rust-direct-playwright-integration.mjs && node scripts/rust-custom-browser-playwright-integration.mjs && node scripts/cross-origin-requests.mjs && node scripts/leaving-page.mjs && node scripts/shared-page.mjs && node scripts/context-script-copies.mjs && node scripts/context-headers.mjs && node scripts/context-cookies.mjs && node scripts/hidden-request-emit.mjs && node scripts/js-syntax-zoo.mjs && node scripts/ruby-syntax-zoo.mjs && node scripts/rust-syntax-zoo.mjs && node scripts/python-syntax-zoo.mjs && node scripts/go-syntax-zoo.mjs && node scripts/java-syntax-zoo.mjs && node scripts/background-by-time.mjs && node scripts/python-server-playwright.mjs && node scripts/ruby-server-playwright.mjs && node scripts/go-server-playwright.mjs && node scripts/jvm-server-playwright.mjs && node scripts/docker-server-playwright.mjs && node scripts/docker-clients-playwright.mjs && node scripts/docker-exec-playwright.mjs && node scripts/rust-classic-browser-integration.mjs && node scripts/exec-handover.mjs && node scripts/rust-region-container.mjs && node scripts/rust-top-packages-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 && node scripts/workspace-crash-integration.mjs",
|
|
86
|
+
"test:engine-integrations": "cargo build -p supercov && node scripts/html-report-integration.mjs && node scripts/mutation-report-formats.mjs && 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-nested-vitest-integration.mjs && node scripts/rust-direct-jest-integration.mjs && node scripts/mocha-failure-output.mjs && node scripts/failure-output.mjs node ava tap && node scripts/side-by-side.mjs node && node scripts/merge-across.mjs && node scripts/import-line-evidence.mjs && node scripts/mock-reach.mjs && node scripts/generated-inputs.mjs && node scripts/baseline-continuation.mjs && node scripts/rust-direct-playwright-integration.mjs && node scripts/rust-custom-browser-playwright-integration.mjs && node scripts/cross-origin-requests.mjs && node scripts/leaving-page.mjs && node scripts/shared-page.mjs && node scripts/context-script-copies.mjs && node scripts/context-headers.mjs && node scripts/context-cookies.mjs && node scripts/hidden-request-emit.mjs && node scripts/js-syntax-zoo.mjs && node scripts/ruby-syntax-zoo.mjs && node scripts/rust-syntax-zoo.mjs && node scripts/python-syntax-zoo.mjs && node scripts/go-syntax-zoo.mjs && node scripts/java-syntax-zoo.mjs && node scripts/background-by-time.mjs && node scripts/python-server-playwright.mjs && node scripts/ruby-server-playwright.mjs && node scripts/go-server-playwright.mjs && node scripts/jvm-server-playwright.mjs && node scripts/docker-server-playwright.mjs && node scripts/docker-clients-playwright.mjs && node scripts/docker-exec-playwright.mjs && node scripts/rust-classic-browser-integration.mjs && node scripts/exec-handover.mjs && node scripts/rust-region-container.mjs && node scripts/rust-top-packages-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 && node scripts/workspace-crash-integration.mjs",
|
|
87
87
|
"test:platform": "cargo test --workspace && cargo build -p supercov && node scripts/rust-process-supervision.mjs && node scripts/workspace-crash-integration.mjs",
|
|
88
88
|
"test:native-package": "cargo build --release -p supercov && node scripts/native-package-integration.mjs && node scripts/native-release-set-integration.mjs",
|
|
89
89
|
"test:pypi-wheel": "node scripts/pypi-wheel-integration.mjs",
|
|
@@ -125,14 +125,14 @@
|
|
|
125
125
|
"test:windows-tls": "node scripts/windows-tls-test.mjs"
|
|
126
126
|
},
|
|
127
127
|
"optionalDependencies": {
|
|
128
|
-
"@supercov/cli-darwin-arm64": "4.29.
|
|
129
|
-
"@supercov/cli-darwin-x64": "4.29.
|
|
130
|
-
"@supercov/cli-linux-arm64-gnu": "4.29.
|
|
131
|
-
"@supercov/cli-linux-arm64-musl": "4.29.
|
|
132
|
-
"@supercov/cli-linux-x64-gnu": "4.29.
|
|
133
|
-
"@supercov/cli-linux-x64-musl": "4.29.
|
|
134
|
-
"@supercov/cli-win32-arm64": "4.29.
|
|
135
|
-
"@supercov/cli-win32-x64": "4.29.
|
|
128
|
+
"@supercov/cli-darwin-arm64": "4.29.14",
|
|
129
|
+
"@supercov/cli-darwin-x64": "4.29.14",
|
|
130
|
+
"@supercov/cli-linux-arm64-gnu": "4.29.14",
|
|
131
|
+
"@supercov/cli-linux-arm64-musl": "4.29.14",
|
|
132
|
+
"@supercov/cli-linux-x64-gnu": "4.29.14",
|
|
133
|
+
"@supercov/cli-linux-x64-musl": "4.29.14",
|
|
134
|
+
"@supercov/cli-win32-arm64": "4.29.14",
|
|
135
|
+
"@supercov/cli-win32-x64": "4.29.14"
|
|
136
136
|
},
|
|
137
137
|
"peerDependencies": {
|
|
138
138
|
"@playwright/test": ">=1.55.0",
|