supercov 4.29.6 → 4.29.7
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 +12 -7
- package/docs/mutation.md +47 -23
- package/package.json +9 -9
package/docs/cli.md
CHANGED
|
@@ -542,9 +542,11 @@ phpunit`). See `docs/design/strong-mutation.md`,
|
|
|
542
542
|
job's run holds its share's verdicts, `merge` keeps them all in the merged
|
|
543
543
|
run, and a later `supercov mutants` keeps each verdict nothing changed could
|
|
544
544
|
move from whichever earlier run holds it (see
|
|
545
|
-
[Combine shards](#combine-shards)). `supercov mutants --shard`
|
|
545
|
+
[Combine shards](#combine-shards)). `supercov mutants --shard` saves into a
|
|
546
546
|
run of its own even on an unchanged checkout, so a job never saves into a
|
|
547
|
-
run it restored, which every job of its round holds a copy of.
|
|
547
|
+
run it restored, which every job of its round holds a copy of. There it
|
|
548
|
+
makes that run from the newest restored run whose command passed, without
|
|
549
|
+
measuring again, and keeps every verdict the restored runs hold.
|
|
548
550
|
- `--critical <glob>` (repeatable): every mutant there must be killed or
|
|
549
551
|
accepted, or the command fails.
|
|
550
552
|
- `--fail-on survived,timeout,no-coverage,error`: fail on any asked mutant with
|
|
@@ -558,9 +560,11 @@ phpunit`). See `docs/design/strong-mutation.md`,
|
|
|
558
560
|
that never ended, Ctrl-C, a killed job) keeps what it decided, and the next
|
|
559
561
|
pass runs the rest. Ctrl-C or SIGTERM stops every process the pass started,
|
|
560
562
|
and the pass ends within seconds: 8 s after the signal at the latest.
|
|
561
|
-
- `--budget <seconds>` stops the pass once it is spent
|
|
562
|
-
|
|
563
|
-
|
|
563
|
+
- `--budget <seconds>` stops the pass once it is spent, counted from the
|
|
564
|
+
command's start (with `supercov mutants`, measuring included): it ends as a
|
|
565
|
+
finished pass, its verdicts saved, and says how many mutants it left for the
|
|
566
|
+
next, and what measuring took where that was half the budget or more. The
|
|
567
|
+
cheapest mutants run first, by their tests' recorded times.
|
|
564
568
|
- `--timeout-factor <x>`: a Playwright test that runs with a mutant is
|
|
565
569
|
stopped past x times its baseline + 5 s (default 1.5, StrykerJS's), and the
|
|
566
570
|
mutant is a `timeout`. `SUPERCOV_STRONG_TIMEOUT_FACTOR` sets it where the
|
|
@@ -1231,8 +1235,9 @@ another measured again lends none either. Split a strong pass across jobs this
|
|
|
1231
1235
|
way: each job measures and runs `supercov mutants --shard k/n -- <command>`,
|
|
1232
1236
|
and the last merges (see `docs/mutation.md`, A pass split across jobs). A
|
|
1233
1237
|
second round on the same commit restores the first round's runs and does the
|
|
1234
|
-
same: each job
|
|
1235
|
-
|
|
1238
|
+
same: each job saves into a run of its own, made from a restored one without
|
|
1239
|
+
measuring again, which keeps the restored runs' verdicts and replaces them,
|
|
1240
|
+
and the last job's `merge` takes the new runs.
|
|
1236
1241
|
|
|
1237
1242
|
A run named twice is refused (`Each merged run must be unique: r1 is named
|
|
1238
1243
|
more than once`): copies of one run that several jobs saved verdicts into
|
package/docs/mutation.md
CHANGED
|
@@ -104,10 +104,16 @@ summary gives the mutation score, every verdict counted, and ends with the
|
|
|
104
104
|
mutants the tests let survive.
|
|
105
105
|
|
|
106
106
|
- **Unchanged checkout.** The next `supercov mutants` reads the same run again
|
|
107
|
-
and runs nothing it already decided. With `--shard` it
|
|
108
|
-
own
|
|
109
|
-
run
|
|
110
|
-
|
|
107
|
+
and runs nothing it already decided. With `--shard` it saves into a run of
|
|
108
|
+
its own, so that each job's share is saved into a run no other job writes:
|
|
109
|
+
made from the newest run of the checkout whose command passed, without
|
|
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 measured where
|
|
112
|
+
there is none (see [A pass split across jobs](#a-pass-split-across-jobs)).
|
|
113
|
+
An earlier run measured on the same files, byte for byte, keeps every
|
|
114
|
+
verdict a pass reached, whatever the two measurements recorded: a test
|
|
115
|
+
whose path depends on the time, or that failed in one of them, moves no
|
|
116
|
+
verdict.
|
|
111
117
|
- **After an edit.** It measures the checkout again and keeps an earlier
|
|
112
118
|
verdict for each mutant whose file is as it was and whose candidate tests,
|
|
113
119
|
and their test files, nothing changed could reach, as `runs latest tests
|
|
@@ -115,9 +121,13 @@ mutants the tests let survive.
|
|
|
115
121
|
edit the tests that ran the changed code. Each mutant's verdict comes from
|
|
116
122
|
the newest earlier run of the same command, dependencies and configuration
|
|
117
123
|
that holds one it can keep, so a pass split across jobs, each holding part
|
|
118
|
-
of the verdicts in its own run, is kept whole.
|
|
119
|
-
|
|
120
|
-
|
|
124
|
+
of the verdicts in its own run, is kept whole. A test that failed in the
|
|
125
|
+
earlier run counts as reached only where the change reaches code that run
|
|
126
|
+
covered. The rest run, and the summary says how many verdicts were kept and
|
|
127
|
+
from which runs (`193 verdict(s) kept from runs r2, r1: nothing they depend
|
|
128
|
+
on changed`), and how many were not, by why (`6 earlier verdict(s) not kept,
|
|
129
|
+
so run again: 4 their file changed, 2 a test that could kill them could
|
|
130
|
+
reach a change`). An error is never kept: it runs again.
|
|
121
131
|
- **Interrupted.** Each verdict is saved as it is made. A pass stopped by
|
|
122
132
|
Ctrl-C, a killed job or a test worker that never ended keeps what it
|
|
123
133
|
decided, and the next pass runs only the rest. Sent SIGINT or SIGTERM, the
|
|
@@ -125,10 +135,15 @@ mutants the tests let survive.
|
|
|
125
135
|
not ended 8 s after the signal is ended, what it decided saved first.
|
|
126
136
|
- **Order and budget.** The cheapest mutants run first, by the recorded times
|
|
127
137
|
of the tests each runs against, so a pass cut short has decided as many as
|
|
128
|
-
it could. `--budget <seconds>`
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
138
|
+
it could. `--budget <seconds>` is the whole command's, measuring and
|
|
139
|
+
planning included: once it is spent the pass stops and ends as a finished
|
|
140
|
+
one, its verdicts saved, so a job ends when its budget says. The summary
|
|
141
|
+
says how many mutants it left for the next pass (`budget of 2400 s spent:
|
|
142
|
+
812 mutant(s) left without a verdict, for the next pass`), and, where
|
|
143
|
+
measuring took half the budget or more, what it took (`measuring took 310 s
|
|
144
|
+
of the 450 s budget, which leaves the pass 140 s`). A measurement is never
|
|
145
|
+
cut short, since one stopped halfway records nothing: one that outlasts the
|
|
146
|
+
budget leaves the pass nothing, and the pass runs nothing.
|
|
132
147
|
- **Exit codes.** `0` with an answer; `1` when `--fail-on` or `--critical`
|
|
133
148
|
finds a mutant; `2`, after the answer, when the measured command failed (a
|
|
134
149
|
failing test kills nothing, so the verdicts cannot gate) or no mutant could
|
|
@@ -225,8 +240,8 @@ npx supercov runs latest mutants test --plan --json
|
|
|
225
240
|
- `--shard k/n` runs one of n shares of the mutants, of about the same cost,
|
|
226
241
|
for parallel jobs (see
|
|
227
242
|
[A pass split across jobs](#a-pass-split-across-jobs)).
|
|
228
|
-
- `--budget <seconds>` stops the pass once that time is spent
|
|
229
|
-
saved, and leaves the rest for the next pass.
|
|
243
|
+
- `--budget <seconds>` stops the pass once that time is spent since the
|
|
244
|
+
command started, its verdicts saved, and leaves the rest for the next pass.
|
|
230
245
|
- `--timeout-factor <x>` (or `SUPERCOV_STRONG_TIMEOUT_FACTOR`) sets a
|
|
231
246
|
Playwright test's time limit when it runs with a mutant: x times its
|
|
232
247
|
baseline, + 5 s (default 1.5, StrykerJS's `timeoutFactor`). See
|
|
@@ -285,7 +300,8 @@ the latest one saved for its commit, or else the latest one saved.
|
|
|
285
300
|
|
|
286
301
|
`supercov mutants --shard k/n -- <command>` is `supercov -- <command>` with
|
|
287
302
|
the mutants' probes on, then `runs latest mutants test --shard k/n`, keeping
|
|
288
|
-
earlier verdicts as after an edit.
|
|
303
|
+
earlier verdicts as after an edit. On a checkout unchanged since a run it
|
|
304
|
+
restored, it measures nothing, as below. Name the command after `--`: without it,
|
|
289
305
|
`supercov mutants` takes the latest run's, which after a merge is the merge.
|
|
290
306
|
Every job must measure the same commit with the same dependencies, as for any
|
|
291
307
|
merge ([CLI reference](cli.md#combine-shards)).
|
|
@@ -295,9 +311,10 @@ merge ([CLI reference](cli.md#combine-shards)).
|
|
|
295
311
|
every share gets its part of the costly ones. A mutant's cost there is what
|
|
296
312
|
the plan lists of it, the copies of test files it starts and the tests they
|
|
297
313
|
run, not the tests' times, which differ between jobs.
|
|
298
|
-
- **The budget.** `--budget <seconds>` ends a job
|
|
299
|
-
`timeout` around it:
|
|
300
|
-
|
|
314
|
+
- **The budget.** `--budget <seconds>` ends a job in time without a
|
|
315
|
+
`timeout` around it: it counts from the command's start, measuring
|
|
316
|
+
included, and past it the pass stops, saves what it decided, and exits as
|
|
317
|
+
a finished pass. Within a pass the cheapest mutants
|
|
301
318
|
run first, so a job cut short has decided as many as it could, and the
|
|
302
319
|
mutants it left run in the next commit's pass, where the restored runs lend
|
|
303
320
|
the rest of their verdicts.
|
|
@@ -310,11 +327,16 @@ merge ([CLI reference](cli.md#combine-shards)).
|
|
|
310
327
|
that run has no verdict for it, as a unit run merged with an end-to-end run
|
|
311
328
|
can, the mutant is left undecided, and a pass over the merged run runs it.
|
|
312
329
|
Verdicts of another mutant set are not kept, and the merge says whose.
|
|
313
|
-
- **Another round.** On the commit the restored runs measured, each job
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
330
|
+
- **Another round.** On the commit the restored runs measured, each job saves
|
|
331
|
+
into a run of its own: `supercov mutants --shard` never saves into a run it
|
|
332
|
+
restored, of which every job of the round holds a copy. It makes that run
|
|
333
|
+
from the newest restored run whose command passed and that recorded its
|
|
334
|
+
mutants' values, without measuring again: the run holds that run's evidence
|
|
335
|
+
under an id of its own. It keeps every verdict a pass reached that the
|
|
336
|
+
restored runs hold (`1317 verdict(s) kept from runs r8, r7, r6, r5: the
|
|
337
|
+
checkout is unchanged since them`), and the shares are of what is left.
|
|
338
|
+
Mutants the plan decides without running, such as a survivor no test
|
|
339
|
+
infected, are decided again, not kept. Each job's run replaces the
|
|
318
340
|
restored ones of its command, so the last job's `supercov merge` takes this
|
|
319
341
|
round's runs, whose verdicts hold the earlier rounds'. It says how many
|
|
320
342
|
verdicts came from each run (`1265 strong verdict(s) kept from runs r8, r7,
|
|
@@ -331,7 +353,9 @@ merge ([CLI reference](cli.md#combine-shards)).
|
|
|
331
353
|
so every job of a second round wrote its share into a copy of one run. The
|
|
332
354
|
copies share an id, one directory of `.supercov/runs` holds one of them, and
|
|
333
355
|
`supercov merge` refuses a run named more than once, saying so. Run that
|
|
334
|
-
round again: each job now
|
|
356
|
+
round again: each job now saves into a run of its own. In 4.29.6 that run
|
|
357
|
+
was measured again, which cost each job the suite's time and could drop a
|
|
358
|
+
verdict where a test failed in one of the measurements.
|
|
335
359
|
|
|
336
360
|
### Runners without a driver
|
|
337
361
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supercov",
|
|
3
|
-
"version": "4.29.
|
|
3
|
+
"version": "4.29.7",
|
|
4
4
|
"description": "Coverage, security and code quality for coding agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"coverage",
|
|
@@ -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.7",
|
|
129
|
+
"@supercov/cli-darwin-x64": "4.29.7",
|
|
130
|
+
"@supercov/cli-linux-arm64-gnu": "4.29.7",
|
|
131
|
+
"@supercov/cli-linux-arm64-musl": "4.29.7",
|
|
132
|
+
"@supercov/cli-linux-x64-gnu": "4.29.7",
|
|
133
|
+
"@supercov/cli-linux-x64-musl": "4.29.7",
|
|
134
|
+
"@supercov/cli-win32-arm64": "4.29.7",
|
|
135
|
+
"@supercov/cli-win32-x64": "4.29.7"
|
|
136
136
|
},
|
|
137
137
|
"peerDependencies": {
|
|
138
138
|
"@playwright/test": ">=1.55.0",
|