targeted-mutation 0.2.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -3
- package/bin/tmt.mjs +122 -10
- package/docs/analysis.md +2 -2
- package/docs/how-it-works.svg +99 -180
- package/docs/why-targeted.svg +117 -0
- package/package.json +5 -5
- package/src/analysis.mjs +45 -19
- package/src/builtin-mutations.mjs +29 -7
- package/src/builtin-switches.mjs +3 -1
- package/src/checkpoint.mjs +5 -0
- package/src/cli-output.mjs +101 -18
- package/src/conventional.mjs +43 -3
- package/src/operator-analysis.mjs +7 -0
- package/src/project-config.mjs +9 -1
- package/src/shard.mjs +8 -0
- package/src/standard-session.mjs +33 -13
- package/src/targeted-gaps.mjs +9 -2
- package/src/type-equivalence.mjs +411 -0
- package/src/vitest-related-worker.mjs +47 -0
- package/src/vitest.mjs +221 -8
package/README.md
CHANGED
|
@@ -26,11 +26,26 @@ INPUT GAP src/cart.ts:15:45
|
|
|
26
26
|
|
|
27
27
|
A conventional mutation run replaces `>=` with `>` or `<`. It does not try `age >= 17`, the nearest implementation that the inputs 10 and 20 leave open. The [shipping threshold experiment](docs/development.md#shipping-threshold-experiment) compares both approaches on the same suite.
|
|
28
28
|
|
|
29
|
-
##
|
|
29
|
+
## Why Targeted Mutation Testing?
|
|
30
|
+
|
|
31
|
+
Conventional mutation testing treats the test suite as a black box: it enumerates fixed syntactic templates (`>=` → `>`, `+` → `-`, `{ ... }` → `{}`), re-runs tests against every mutant, and returns a list of survivors. That architecture carries three structural limits that Targeted Mutation Testing addresses directly by recording runtime operand observations during the baseline run:
|
|
32
|
+
|
|
33
|
+
- **Finds value-level gaps that syntactic mutators structurally miss.** Fixed syntactic templates cannot cover a numeric or value space. In the [shipping threshold experiment](docs/development.md#shipping-threshold-experiment), tests with ¥4,800 and ¥5,000 kill 100% of StrykerJS mutants on `yen >= 5000`, yet `yen >= 4999` still passes. By observing the actual operands flowing through comparisons, Targeted Mutation Testing computes the closed interval of observationally feasible thresholds (or variable-RHS margins) and synthesizes the nearest undistinguished alternative directly—producing a single boundary witness that rules out every feasible wrong threshold on that side.
|
|
34
|
+
- **Disambiguates `survived` along the RIPR model.** A conventional `survived` verdict conflates two different failures: no test reached a state infection, or infection occurred but was never revealed by an assertion. Because runtime operands are recorded, Targeted Mutation Testing separates **`INPUT GAP`** (no test passed a distinguishing input, naming the exact missing input) from **`ASSERTION GAP`** (naming the exact test whose input diverged at the expression without failing, with concrete assertion suggestions via `--suggest-assertions`).
|
|
35
|
+
- **Reduces cost algorithmically, not just by parallelizing runs.** Rather than paying `O(M · T)` re-executions across blind syntactic mutants, Targeted Mutation Testing shrinks the candidate set, skips provably identical deterministic comparison trials via `tmt-decide` (extracted from Lean 4 proofs), and amortizes Vitest 4 worker startup:
|
|
36
|
+
|
|
37
|
+
| Cost dimension | Conventional | Targeted Mutation Testing |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| Threshold gap search (width `W`) | Not searched (`O(W · T)` by enumeration) | **`O(1)`** trial (synthesized from observed operand extrema) |
|
|
40
|
+
| Deterministic comparison trials (`M`) | `O(M · T)` (re-runs every mutant) | **`O(M_div · T)`** (`tmt-decide` skips provably identical trials) |
|
|
41
|
+
| Runner/environment setup (`S`) | `O(M · (S + T))` (isolated re-runs) | **`O(S + M · T)`** (in-worker switches; [3–6× faster](docs/performance.md#mutation-runs-compared-with-strykerjs) on `--mutators full`) |
|
|
42
|
+
- **Focuses on unguarded behavior, not syntactic noise.** Combining value-aware semantic rules with diff-level reversion (`--since REV --undo-changes`, down to individual added `&&`/`||` terms and object properties) tests the degrees of freedom your suite actually leaves open.
|
|
30
43
|
|
|
31
|
-
|
|
44
|
+

|
|
32
45
|
|
|
33
|
-
|
|
46
|
+
## How it works (and how it differs from conventional mutation testing)
|
|
47
|
+
|
|
48
|
+
During the baseline run, `targeted-mutation` records the runtime values flowing through your code, synthesizes the smallest undistinguished edits from those observations, and classifies every survivor into an actionable test gap.
|
|
34
49
|
|
|
35
50
|

|
|
36
51
|
|
|
@@ -117,6 +132,10 @@ The [analysis guide](docs/analysis.md) covers scope selection, specifications, P
|
|
|
117
132
|
- [Development and verification](docs/development.md)
|
|
118
133
|
- [Releasing](docs/releasing.md)
|
|
119
134
|
|
|
135
|
+
## Prior work
|
|
136
|
+
|
|
137
|
+
The idea of generating mutants from test observations is known as *test-aware mutant generation*. Related lines of work include SEMu (symbolic execution to kill surviving mutants), DSpot (assertion amplification), the W-method (complete test suites for finite state machines), and Meta's ACH (LLM-generated mutants with tests that kill them). `targeted-mutation` occupies the **SMT-solver-free, AI-free** corner of that space: record the runtime trace and solve the feasible interval directly (checked by `tmt-decide`, extracted from Lean 4 proofs). Rather than chasing raw mutation scores across tools with different mutant sets, it optimizes for catching real bugs per minute of CI time.
|
|
138
|
+
|
|
120
139
|
## License
|
|
121
140
|
|
|
122
141
|
[Apache-2.0](LICENSE). Third-party notices are in [NOTICE](NOTICE).
|
package/bin/tmt.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { readFileSync, realpathSync } from 'node:fs';
|
|
3
|
-
import { relative } from 'node:path';
|
|
2
|
+
import { existsSync, mkdirSync, readFileSync, realpathSync, statSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import { basename, dirname, relative, resolve } from 'node:path';
|
|
4
4
|
import { parseArgs } from 'node:util';
|
|
5
|
-
import { chooseFormat, renderText, usage } from '../src/cli-output.mjs';
|
|
5
|
+
import { chooseFormat, formatProgressSummary, renderText, usage } from '../src/cli-output.mjs';
|
|
6
6
|
import { enablePreparedTypeScript } from '../src/typescript-compiler.mjs';
|
|
7
7
|
|
|
8
8
|
try {
|
|
@@ -25,16 +25,26 @@ try {
|
|
|
25
25
|
'isolated-trials': { type: 'boolean' },
|
|
26
26
|
'verify-trials': { type: 'string' },
|
|
27
27
|
timeout: { type: 'string' },
|
|
28
|
+
'baseline-timeout': { type: 'string' },
|
|
29
|
+
'baseline-workers': { type: 'string' },
|
|
28
30
|
runner: { type: 'string' },
|
|
29
31
|
project: { type: 'string', multiple: true },
|
|
30
32
|
config: { type: 'string' },
|
|
31
33
|
test: { type: 'string', multiple: true },
|
|
34
|
+
related: { type: 'boolean' },
|
|
32
35
|
'copy-exclude': { type: 'string', multiple: true },
|
|
33
36
|
'copy-exclude-gitignore': { type: 'boolean' },
|
|
34
37
|
'exclude-rule': { type: 'string', multiple: true },
|
|
38
|
+
'type-check': { type: 'boolean' },
|
|
39
|
+
tsconfig: { type: 'string' },
|
|
35
40
|
'no-config': { type: 'boolean' },
|
|
36
41
|
progress: { type: 'boolean' },
|
|
37
42
|
format: { type: 'string' },
|
|
43
|
+
verbose: { type: 'boolean' },
|
|
44
|
+
'only-gaps': { type: 'boolean' },
|
|
45
|
+
'fail-on-gaps': { type: 'boolean' },
|
|
46
|
+
'json-out': { type: 'string' },
|
|
47
|
+
'sarif-out': { type: 'string' },
|
|
38
48
|
baseline: { type: 'string' },
|
|
39
49
|
'write-baseline': { type: 'string' },
|
|
40
50
|
list: { type: 'boolean' },
|
|
@@ -64,6 +74,8 @@ try {
|
|
|
64
74
|
const runValues = merged.values;
|
|
65
75
|
if (runValues.runner !== undefined && !['vitest', 'playwright'].includes(runValues.runner)) throw new Error('Expected --runner vitest|playwright');
|
|
66
76
|
if (runValues.runner === 'playwright' && runValues['displace-thresholds']) throw new Error('--displace-thresholds requires Vitest');
|
|
77
|
+
if (runValues.related && runValues.runner === 'playwright') throw new Error('--related requires Vitest');
|
|
78
|
+
if (runValues.verbose && runValues['only-gaps']) throw new Error('--verbose cannot be combined with --only-gaps');
|
|
67
79
|
if (runValues.mutators !== undefined && !['targeted', 'full'].includes(runValues.mutators)) throw new Error('Expected --mutators targeted|full');
|
|
68
80
|
const session = runValues.runner !== 'playwright' && !runValues.witnesses && !runValues.audit;
|
|
69
81
|
if ((runValues['isolated-trials'] || runValues['verify-trials'] !== undefined) && !session) {
|
|
@@ -82,6 +94,14 @@ try {
|
|
|
82
94
|
if (!/^[1-9]\d{0,4}$/.test(runValues.timeout)) throw new Error('Expected --timeout to be a number of seconds');
|
|
83
95
|
runValues.timeout = Number(runValues.timeout);
|
|
84
96
|
}
|
|
97
|
+
if (runValues['baseline-timeout'] !== undefined) {
|
|
98
|
+
if (!/^[1-9]\d{0,4}$/.test(runValues['baseline-timeout'])) throw new Error('Expected --baseline-timeout to be a number of seconds');
|
|
99
|
+
runValues['baseline-timeout'] = Number(runValues['baseline-timeout']);
|
|
100
|
+
}
|
|
101
|
+
if (runValues['baseline-workers'] !== undefined) {
|
|
102
|
+
if (!/^[1-9]\d{0,3}$/.test(runValues['baseline-workers'])) throw new Error('Expected --baseline-workers to be a positive integer');
|
|
103
|
+
runValues['baseline-workers'] = Number(runValues['baseline-workers']);
|
|
104
|
+
}
|
|
85
105
|
if (runValues['verify-trials'] !== undefined) {
|
|
86
106
|
if (!/^\d{1,6}$/.test(runValues['verify-trials'])) throw new Error('Expected --verify-trials to be a count');
|
|
87
107
|
runValues['verify-trials'] = Number(runValues['verify-trials']);
|
|
@@ -94,6 +114,38 @@ try {
|
|
|
94
114
|
runValues['exclude-rule'] = runValues['exclude-rule'].flatMap(entry => entry.split(',')).map(s => s.trim()).filter(Boolean);
|
|
95
115
|
}
|
|
96
116
|
const format = chooseFormat(runValues.format, process.stdout.isTTY === true);
|
|
117
|
+
const canonicalOutputKeys = filePath => {
|
|
118
|
+
const abs = resolve(filePath);
|
|
119
|
+
const keys = [];
|
|
120
|
+
// Walk up to the nearest existing ancestor so symlinks above uncreated subdirectories resolve identically.
|
|
121
|
+
const tail = [];
|
|
122
|
+
let cursor = abs;
|
|
123
|
+
while (!existsSync(cursor)) {
|
|
124
|
+
const parent = dirname(cursor);
|
|
125
|
+
if (parent === cursor) break;
|
|
126
|
+
tail.unshift(basename(cursor));
|
|
127
|
+
cursor = parent;
|
|
128
|
+
}
|
|
129
|
+
const resolvedPath = existsSync(cursor) ? resolve(realpathSync(cursor), ...tail) : abs;
|
|
130
|
+
const normPath = process.platform === 'win32' || process.platform === 'darwin' ? resolvedPath.toLowerCase() : resolvedPath;
|
|
131
|
+
keys.push(`path:${normPath}`);
|
|
132
|
+
const st = statSync(abs, { throwIfNoEntry: false });
|
|
133
|
+
if (st?.isFile()) keys.push(`ino:${st.dev}:${st.ino}`);
|
|
134
|
+
return keys;
|
|
135
|
+
};
|
|
136
|
+
const seenOutputs = new Map();
|
|
137
|
+
for (const flag of ['json-out', 'sarif-out', 'write-baseline', 'checkpoint']) {
|
|
138
|
+
if (runValues[flag] === undefined) continue;
|
|
139
|
+
if (!runValues[flag].trim() || runValues[flag].includes('\0')) {
|
|
140
|
+
throw new Error(`Expected --${flag} to be a valid file path`);
|
|
141
|
+
}
|
|
142
|
+
for (const key of canonicalOutputKeys(runValues[flag])) {
|
|
143
|
+
if (seenOutputs.has(key)) {
|
|
144
|
+
throw new Error(`Output paths must be distinct: --${seenOutputs.get(key)} and --${flag} resolve to the same file`);
|
|
145
|
+
}
|
|
146
|
+
seenOutputs.set(key, flag);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
97
149
|
const { parseShard, parseShardingStrategy, listCandidates } = await import('../src/shard.mjs');
|
|
98
150
|
const shard = parseShard(runValues.shard);
|
|
99
151
|
const sharding = parseShardingStrategy(runValues.sharding);
|
|
@@ -120,6 +172,49 @@ try {
|
|
|
120
172
|
runValues['copy-exclude'] = activeExclusions.map(entry => relative(validated.root, entry));
|
|
121
173
|
}
|
|
122
174
|
const logProgress = runValues.progress ? message => process.stderr.write(`[tmt] ${message}\n`) : () => {};
|
|
175
|
+
const seenTypeCheckWarnings = new Set();
|
|
176
|
+
const onTypeCheckWarning = message => {
|
|
177
|
+
const safe = String(message).replace(/[\u0000-\u0008\u000b-\u001f\u007f-\u009f]/g, '?');
|
|
178
|
+
if (seenTypeCheckWarnings.has(safe)) return;
|
|
179
|
+
seenTypeCheckWarnings.add(safe);
|
|
180
|
+
process.stderr.write(`Warning: ${safe}\n`);
|
|
181
|
+
};
|
|
182
|
+
runValues.onTypeCheckWarning = onTypeCheckWarning;
|
|
183
|
+
if (runValues.progress) runValues.onProgress = logProgress;
|
|
184
|
+
if (runValues.related && !runValues.list) {
|
|
185
|
+
const { selectScope } = await import('../src/scope.mjs');
|
|
186
|
+
const relatedTargets = selectScope(validated.root, files, runValues).map(subject => subject.file);
|
|
187
|
+
if (relatedTargets.length) {
|
|
188
|
+
const { inside, resolveRelatedVitestSpecs } = await import('../src/vitest.mjs');
|
|
189
|
+
const relatedTimeoutSeconds = runValues['baseline-timeout'] ?? runValues.timeout;
|
|
190
|
+
const resolved = await resolveRelatedVitestSpecs(validated.root, relatedTargets, {
|
|
191
|
+
config: runValues.config,
|
|
192
|
+
copyExclude: runValues['copy-exclude'],
|
|
193
|
+
onProgress: runValues.onProgress,
|
|
194
|
+
...(relatedTimeoutSeconds ? { timeout: relatedTimeoutSeconds * 1000 } : {}),
|
|
195
|
+
});
|
|
196
|
+
let selectedTests = resolved.tests;
|
|
197
|
+
let selectedSpecs = resolved.specs;
|
|
198
|
+
if (runValues.test?.length) {
|
|
199
|
+
const allowedTests = new Set(runValues.test.map(file => relative(validated.root, inside(validated.root, file))));
|
|
200
|
+
selectedTests = resolved.tests.filter(file => allowedTests.has(file));
|
|
201
|
+
selectedSpecs = resolved.specs.filter(spec => allowedTests.has(spec.file));
|
|
202
|
+
if (!selectedTests.length) {
|
|
203
|
+
throw new Error(`No Vitest test files matched both --related (${resolved.tests.length} related) and --test. Widen --test <file|glob> or omit --related.`);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
runValues.test = selectedTests;
|
|
207
|
+
runValues.testSpecs = selectedSpecs;
|
|
208
|
+
const allNamedProjects = selectedSpecs.length > 0 && selectedSpecs.every(spec => Boolean(spec.project));
|
|
209
|
+
if (allNamedProjects) {
|
|
210
|
+
runValues.testProjects = [...new Set(selectedSpecs.map(spec => spec.project))];
|
|
211
|
+
}
|
|
212
|
+
logProgress(`Selected ${selectedTests.length} related test ${selectedTests.length === 1 ? 'file' : 'files'}.`);
|
|
213
|
+
if (selectedTests.length > 20) {
|
|
214
|
+
process.stderr.write(`Warning: --related selected ${selectedTests.length} test files. Consider narrowing with --test <glob>, or tuning --baseline-timeout <seconds> and --baseline-workers <N>.\n`);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
123
218
|
enablePreparedTypeScript();
|
|
124
219
|
let result;
|
|
125
220
|
if (runValues.list) {
|
|
@@ -157,20 +252,37 @@ try {
|
|
|
157
252
|
if (!runValues.list && baselineIds) {
|
|
158
253
|
result = applyBaseline(result, baselineIds);
|
|
159
254
|
}
|
|
160
|
-
logProgress(
|
|
255
|
+
logProgress(formatProgressSummary(result));
|
|
256
|
+
const jsonPayload = (format === 'json' || runValues['json-out']) ? JSON.stringify(result, null, 2) : null;
|
|
257
|
+
let sarifPayload = null;
|
|
258
|
+
if (format === 'sarif' || runValues['sarif-out']) {
|
|
259
|
+
const { renderSarif } = await import('../src/sarif.mjs');
|
|
260
|
+
const version = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version;
|
|
261
|
+
sarifPayload = JSON.stringify(renderSarif(result, { version }), null, 2);
|
|
262
|
+
}
|
|
263
|
+
if (runValues['json-out']) {
|
|
264
|
+
mkdirSync(dirname(runValues['json-out']), { recursive: true });
|
|
265
|
+
writeFileSync(runValues['json-out'], jsonPayload + '\n', 'utf8');
|
|
266
|
+
}
|
|
267
|
+
if (runValues['sarif-out']) {
|
|
268
|
+
mkdirSync(dirname(runValues['sarif-out']), { recursive: true });
|
|
269
|
+
writeFileSync(runValues['sarif-out'], sarifPayload + '\n', 'utf8');
|
|
270
|
+
}
|
|
161
271
|
if (format === 'json') {
|
|
162
|
-
console.log(
|
|
272
|
+
console.log(jsonPayload);
|
|
163
273
|
} else if (format === 'jsonl') {
|
|
164
274
|
const { renderJsonl } = await import('../src/sarif.mjs');
|
|
165
275
|
console.log(renderJsonl(result));
|
|
166
276
|
} else if (format === 'sarif') {
|
|
167
|
-
|
|
168
|
-
const version = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version;
|
|
169
|
-
console.log(JSON.stringify(renderSarif(result, { version }), null, 2));
|
|
277
|
+
console.log(sarifPayload);
|
|
170
278
|
} else {
|
|
171
|
-
console.log(renderText(result));
|
|
279
|
+
console.log(renderText(result, { verbose: runValues.verbose === true, onlyGaps: runValues['only-gaps'] === true }));
|
|
280
|
+
}
|
|
281
|
+
if (['baseline_error', 'incomplete'].includes(result.evaluation) || result.extraction.some(file => file.path === 'diagnostic')) {
|
|
282
|
+
process.exitCode = 1;
|
|
283
|
+
} else if (runValues['fail-on-gaps'] && (result.diagnostics?.length ?? 0) > 0) {
|
|
284
|
+
process.exitCode = 2;
|
|
172
285
|
}
|
|
173
|
-
if (['baseline_error', 'incomplete'].includes(result.evaluation) || result.extraction.some(file => file.path === 'diagnostic')) process.exitCode = 1;
|
|
174
286
|
} else if (command === 'prototype' && positionals.length === 2) {
|
|
175
287
|
enablePreparedTypeScript();
|
|
176
288
|
const { runPrototype } = await import('../src/prototype.mjs');
|
package/docs/analysis.md
CHANGED
|
@@ -8,7 +8,7 @@ npx targeted-mutation analyze . --lines src/eligibility.ts:1-8 --audit
|
|
|
8
8
|
npx targeted-mutation analyze . --since "$(git merge-base origin/main HEAD)"
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Arguments after the project root select source files. Without files, the CLI discovers TypeScript and TSX sources. The scope comes from explicit line ranges and added or changed lines relative to a Git commit. The CLI parses each selected file before filtering candidate operator positions. The JSON report has a schema version, extraction outcomes, candidate IDs, trial verdicts and diagnostics. A terminal shows a text summary of the same report; a pipe or `--format json` receives the JSON. `--lines FILE:N` selects a single line. A failed baseline lists the failed tests and their messages under `baseline.failedTests`. An extraction diagnostic or a baseline failure exits with status 1. A successful analysis exits with status 0.
|
|
11
|
+
Arguments after the project root select source files. Without files, the CLI discovers TypeScript and TSX sources. The scope comes from explicit line ranges and added or changed lines relative to a Git commit. The CLI parses each selected file before filtering candidate operator positions. The JSON report has a schema version, extraction outcomes, candidate IDs, trial verdicts and diagnostics. A terminal shows a text summary of the same report; a pipe or `--format json` receives the JSON. Pass `--json-out FILE` and/or `--sarif-out FILE` to write machine-readable report files alongside terminal text output (all output paths, including `--write-baseline` and `--checkpoint`, must be distinct). Under `--mutators full`, the summary distinguishes targeted test gaps from non-targeted survivors (`N targeted gap(s) (M other survivor(s))`). `--lines FILE:N` selects a single line. A failed baseline lists the failed tests and their messages under `baseline.failedTests`. An extraction diagnostic or a baseline failure exits with status 1. A successful analysis exits with status 0.
|
|
12
12
|
|
|
13
13
|
### Limit a dogfood or CI run
|
|
14
14
|
|
|
@@ -18,7 +18,7 @@ npx targeted-mutation analyze . packages/example/src/ranges.ts --since HEAD^ \
|
|
|
18
18
|
--copy-exclude benchmarks --audit
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
`--config` selects a project-relative Vitest or Playwright config. Repeat `--test FILE` to run specific, project-relative test files in every phase, including witness runs. With Playwright the files are passed to `playwright test` as path filters, so a suite with several browsers and many specs can start with the one spec that covers the source. The report records the selection and errors if the config collects missing or additional test files. Any conclusions from a selected suite apply to that suite. Repeat `--copy-exclude PATH` to omit local assets or build caches from every temporary copy while leaving the original checkout intact. Missing exclusion paths emit a single warning to `stderr` and are skipped so fixed scripts work on clean checkouts before build artifacts exist. A selected suite should retain the files and build outputs it needs. The runner already omits `.worktree` and `.worktrees`. Source discovery skips excluded paths. Provide exclusions inside the project without traversing symbolic links, and keep `node_modules` available for the test runner.
|
|
21
|
+
`--config` selects a project-relative Vitest or Playwright config. Repeat `--test FILE` to run specific, project-relative test files in every phase, including witness runs. For Vitest projects, `--related` (or `related: true` in project configuration) discovers only the test files and Vitest projects related to the scoped source files via Vitest's dependency graph inside a supervised temporary copy, failing with a clear `--test <FILE>` hint if no related tests exist. `--type-check` (or `typeCheck: true` in project configuration) uses TypeScript's type checker when `strictNullChecks` is enabled to skip statically equivalent `nullish-fallback/v1` and `nullish-equality/v1` edits (while preserving unsound cases such as `number | null` with `?? 0`, indexed access without `noUncheckedIndexedAccess`, `{}`, `void`, and shadowed `undefined`). With Playwright the files are passed to `playwright test` as path filters, so a suite with several browsers and many specs can start with the one spec that covers the source. The report records the selection and errors if the config collects missing or additional test files. Any conclusions from a selected suite apply to that suite. Repeat `--copy-exclude PATH` to omit local assets or build caches from every temporary copy while leaving the original checkout intact. Missing exclusion paths emit a single warning to `stderr` and are skipped so fixed scripts work on clean checkouts before build artifacts exist. A selected suite should retain the files and build outputs it needs. The runner already omits `.worktree` and `.worktrees`. Source discovery skips excluded paths. Provide exclusions inside the project without traversing symbolic links, and keep `node_modules` available for the test runner.
|
|
22
22
|
|
|
23
23
|
Automatic scope includes JavaScript and TypeScript source, including JSX and module-specific extensions. It skips conventional test, spec, declaration and runner configuration filenames. With `--since`, Git supplies tracked and changed paths in bulk. Only changed tracked files in scope need a line diff. A new, untracked file counts as changed unless Git ignores it: generated clients and build output under `.gitignore` are left out of discovery, and naming such a file on the command line still selects it.
|
|
24
24
|
|