targeted-mutation 0.3.0 → 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 +54 -10
- package/docs/how-it-works.svg +99 -180
- package/docs/why-targeted.svg +117 -0
- package/package.json +5 -5
- package/src/analysis.mjs +32 -13
- package/src/checkpoint.mjs +3 -0
- package/src/cli-output.mjs +66 -16
- package/src/conventional.mjs +40 -4
- package/src/operator-analysis.mjs +5 -0
- package/src/project-config.mjs +6 -0
- package/src/shard.mjs +6 -1
- package/src/standard-session.mjs +33 -19
- package/src/type-equivalence.mjs +193 -27
- package/src/vitest.mjs +179 -17
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
|
@@ -25,6 +25,8 @@ 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' },
|
|
@@ -34,9 +36,13 @@ try {
|
|
|
34
36
|
'copy-exclude-gitignore': { type: 'boolean' },
|
|
35
37
|
'exclude-rule': { type: 'string', multiple: true },
|
|
36
38
|
'type-check': { type: 'boolean' },
|
|
39
|
+
tsconfig: { type: 'string' },
|
|
37
40
|
'no-config': { type: 'boolean' },
|
|
38
41
|
progress: { type: 'boolean' },
|
|
39
42
|
format: { type: 'string' },
|
|
43
|
+
verbose: { type: 'boolean' },
|
|
44
|
+
'only-gaps': { type: 'boolean' },
|
|
45
|
+
'fail-on-gaps': { type: 'boolean' },
|
|
40
46
|
'json-out': { type: 'string' },
|
|
41
47
|
'sarif-out': { type: 'string' },
|
|
42
48
|
baseline: { type: 'string' },
|
|
@@ -69,7 +75,7 @@ try {
|
|
|
69
75
|
if (runValues.runner !== undefined && !['vitest', 'playwright'].includes(runValues.runner)) throw new Error('Expected --runner vitest|playwright');
|
|
70
76
|
if (runValues.runner === 'playwright' && runValues['displace-thresholds']) throw new Error('--displace-thresholds requires Vitest');
|
|
71
77
|
if (runValues.related && runValues.runner === 'playwright') throw new Error('--related requires Vitest');
|
|
72
|
-
if (
|
|
78
|
+
if (runValues.verbose && runValues['only-gaps']) throw new Error('--verbose cannot be combined with --only-gaps');
|
|
73
79
|
if (runValues.mutators !== undefined && !['targeted', 'full'].includes(runValues.mutators)) throw new Error('Expected --mutators targeted|full');
|
|
74
80
|
const session = runValues.runner !== 'playwright' && !runValues.witnesses && !runValues.audit;
|
|
75
81
|
if ((runValues['isolated-trials'] || runValues['verify-trials'] !== undefined) && !session) {
|
|
@@ -88,6 +94,14 @@ try {
|
|
|
88
94
|
if (!/^[1-9]\d{0,4}$/.test(runValues.timeout)) throw new Error('Expected --timeout to be a number of seconds');
|
|
89
95
|
runValues.timeout = Number(runValues.timeout);
|
|
90
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
|
+
}
|
|
91
105
|
if (runValues['verify-trials'] !== undefined) {
|
|
92
106
|
if (!/^\d{1,6}$/.test(runValues['verify-trials'])) throw new Error('Expected --verify-trials to be a count');
|
|
93
107
|
runValues['verify-trials'] = Number(runValues['verify-trials']);
|
|
@@ -158,21 +172,47 @@ try {
|
|
|
158
172
|
runValues['copy-exclude'] = activeExclusions.map(entry => relative(validated.root, entry));
|
|
159
173
|
}
|
|
160
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;
|
|
161
184
|
if (runValues.related && !runValues.list) {
|
|
162
185
|
const { selectScope } = await import('../src/scope.mjs');
|
|
163
186
|
const relatedTargets = selectScope(validated.root, files, runValues).map(subject => subject.file);
|
|
164
187
|
if (relatedTargets.length) {
|
|
165
|
-
const { resolveRelatedVitestSpecs } = await import('../src/vitest.mjs');
|
|
188
|
+
const { inside, resolveRelatedVitestSpecs } = await import('../src/vitest.mjs');
|
|
189
|
+
const relatedTimeoutSeconds = runValues['baseline-timeout'] ?? runValues.timeout;
|
|
166
190
|
const resolved = await resolveRelatedVitestSpecs(validated.root, relatedTargets, {
|
|
167
191
|
config: runValues.config,
|
|
168
192
|
copyExclude: runValues['copy-exclude'],
|
|
169
|
-
|
|
193
|
+
onProgress: runValues.onProgress,
|
|
194
|
+
...(relatedTimeoutSeconds ? { timeout: relatedTimeoutSeconds * 1000 } : {}),
|
|
170
195
|
});
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
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
|
+
}
|
|
176
216
|
}
|
|
177
217
|
}
|
|
178
218
|
enablePreparedTypeScript();
|
|
@@ -236,9 +276,13 @@ try {
|
|
|
236
276
|
} else if (format === 'sarif') {
|
|
237
277
|
console.log(sarifPayload);
|
|
238
278
|
} else {
|
|
239
|
-
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;
|
|
240
285
|
}
|
|
241
|
-
if (['baseline_error', 'incomplete'].includes(result.evaluation) || result.extraction.some(file => file.path === 'diagnostic')) process.exitCode = 1;
|
|
242
286
|
} else if (command === 'prototype' && positionals.length === 2) {
|
|
243
287
|
enablePreparedTypeScript();
|
|
244
288
|
const { runPrototype } = await import('../src/prototype.mjs');
|
package/docs/how-it-works.svg
CHANGED
|
@@ -1,188 +1,107 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 476" width="960" height="476" role="img" aria-label="How targeted-mutation works">
|
|
2
2
|
<defs>
|
|
3
3
|
<style>
|
|
4
|
-
.
|
|
5
|
-
.
|
|
6
|
-
.
|
|
7
|
-
.
|
|
8
|
-
.code { font-family: ui-monospace, 'SFMono-Regular', Menlo, Monaco, Consolas, monospace; font-size:
|
|
9
|
-
.edge-label { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 11.5px; font-weight: 600; }
|
|
4
|
+
.heading { font-family: 'Virgil', 'Segoe Print', 'Bradley Hand', 'Chalkboard SE', cursive, sans-serif; font-size: 15.5px; font-weight: 700; }
|
|
5
|
+
.label { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 12px; font-weight: 700; }
|
|
6
|
+
.body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 11.5px; }
|
|
7
|
+
.small { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 10.8px; }
|
|
8
|
+
.code { font-family: ui-monospace, 'SFMono-Regular', Menlo, Monaco, Consolas, monospace; font-size: 11px; }
|
|
10
9
|
</style>
|
|
10
|
+
<marker id="arrow-gray" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6.5" markerHeight="6.5" orient="auto-start-reverse">
|
|
11
|
+
<path d="M 0 1.5 L 8.5 5 L 0 8.5 z" fill="#64748b"/>
|
|
12
|
+
</marker>
|
|
13
|
+
<marker id="arrow-purple" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6.5" markerHeight="6.5" orient="auto-start-reverse">
|
|
14
|
+
<path d="M 0 1.5 L 8.5 5 L 0 8.5 z" fill="#6741d9"/>
|
|
15
|
+
</marker>
|
|
16
|
+
<marker id="arrow-teal" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6.5" markerHeight="6.5" orient="auto-start-reverse">
|
|
17
|
+
<path d="M 0 1.5 L 8.5 5 L 0 8.5 z" fill="#0ca678"/>
|
|
18
|
+
</marker>
|
|
19
|
+
<marker id="arrow-green" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6.5" markerHeight="6.5" orient="auto-start-reverse">
|
|
20
|
+
<path d="M 0 1.5 L 8.5 5 L 0 8.5 z" fill="#2f9e44"/>
|
|
21
|
+
</marker>
|
|
22
|
+
<marker id="arrow-red" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6.5" markerHeight="6.5" orient="auto-start-reverse">
|
|
23
|
+
<path d="M 0 1.5 L 8.5 5 L 0 8.5 z" fill="#e03131"/>
|
|
24
|
+
</marker>
|
|
25
|
+
<marker id="arrow-orange" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6.5" markerHeight="6.5" orient="auto-start-reverse">
|
|
26
|
+
<path d="M 0 1.5 L 8.5 5 L 0 8.5 z" fill="#d9480f"/>
|
|
27
|
+
</marker>
|
|
11
28
|
</defs>
|
|
12
29
|
|
|
13
|
-
<!-- Clean card background
|
|
14
|
-
<rect x="0" y="0" width="
|
|
15
|
-
<rect x="1" y="1" width="
|
|
16
|
-
|
|
17
|
-
<!--
|
|
18
|
-
<
|
|
19
|
-
<text x="
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
<text x="
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
<
|
|
34
|
-
<
|
|
35
|
-
<
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
<!--
|
|
39
|
-
<
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
<
|
|
44
|
-
<text x="
|
|
45
|
-
<text x="
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
<rect x="
|
|
49
|
-
<
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
<
|
|
59
|
-
<
|
|
60
|
-
<
|
|
61
|
-
<path d="M 940.1 90.1 Q 939.9 101.3 939.9 112.0" fill="none" stroke="#868e96" stroke-width="1.9" stroke-linecap="round" opacity="1" stroke-dasharray="5 4"/>
|
|
62
|
-
<path d="M 939.9 90.1 Q 939.9 100.9 940.1 112.0" fill="none" stroke="#868e96" stroke-width="1.6" stroke-linecap="round" opacity="0.65" stroke-dasharray="5 4"/>
|
|
63
|
-
<path d="M 940.0 112.0 Q 937.5 107.6 935.0 103.3" fill="none" stroke="#868e96" stroke-width="1.9" stroke-linecap="round" opacity="1"/>
|
|
64
|
-
<path d="M 940.0 112.0 Q 937.5 107.6 935.0 103.3" fill="none" stroke="#868e96" stroke-width="1.6" stroke-linecap="round" opacity="0.65"/>
|
|
65
|
-
<path d="M 940.0 112.0 Q 942.5 107.7 945.0 103.3" fill="none" stroke="#868e96" stroke-width="1.9" stroke-linecap="round" opacity="1"/>
|
|
66
|
-
<path d="M 940.0 112.0 Q 942.4 107.7 945.0 103.3" fill="none" stroke="#868e96" stroke-width="1.6" stroke-linecap="round" opacity="0.65"/>
|
|
67
|
-
<rect x="492.6" y="82.0" width="110.8" height="17" rx="4" fill="#ffffff" opacity="0.92"/>
|
|
68
|
-
<text x="548.0" y="94.0" text-anchor="middle" class="edge-label" fill="#868e96">git diff hunks</text>
|
|
69
|
-
|
|
70
|
-
<!-- Arrows: Baseline -> Track A (Comparison / Lean) and Track B (20 Value-Aware Rules) -->
|
|
71
|
-
<path d="M 440.7 196.3 Q 329.1 222.9 216.9 247.9" fill="none" stroke="#6741d9" stroke-width="1.9" stroke-linecap="round" opacity="1"/>
|
|
72
|
-
<path d="M 440.7 195.1 Q 329.3 221.7 217.6 248.5" fill="none" stroke="#6741d9" stroke-width="1.6" stroke-linecap="round" opacity="0.65"/>
|
|
73
|
-
<path d="M 217.0 248.0 Q 220.7 244.6 224.3 241.2" fill="none" stroke="#6741d9" stroke-width="1.9" stroke-linecap="round" opacity="1"/>
|
|
74
|
-
<path d="M 217.0 248.0 Q 220.6 244.6 224.3 241.2" fill="none" stroke="#6741d9" stroke-width="1.6" stroke-linecap="round" opacity="0.65"/>
|
|
75
|
-
<path d="M 217.0 248.0 Q 221.9 249.4 226.6 250.9" fill="none" stroke="#6741d9" stroke-width="1.9" stroke-linecap="round" opacity="1"/>
|
|
76
|
-
<path d="M 217.0 248.0 Q 221.8 249.4 226.6 250.9" fill="none" stroke="#6741d9" stroke-width="1.6" stroke-linecap="round" opacity="0.65"/>
|
|
77
|
-
<rect x="242.4" y="210.0" width="125.2" height="17" rx="4" fill="#ffffff" opacity="0.92"/>
|
|
78
|
-
<text x="305.0" y="222.0" text-anchor="middle" class="edge-label" fill="#6741d9">comparison sites</text>
|
|
79
|
-
<path d="M 620.3 195.8 Q 608.5 222.6 596.7 248.3" fill="none" stroke="#0ca678" stroke-width="1.9" stroke-linecap="round" opacity="1"/>
|
|
80
|
-
<path d="M 619.7 195.9 Q 608.6 222.6 596.9 248.3" fill="none" stroke="#0ca678" stroke-width="1.6" stroke-linecap="round" opacity="0.65"/>
|
|
81
|
-
<path d="M 597.0 248.0 Q 596.4 243.0 595.9 238.1" fill="none" stroke="#0ca678" stroke-width="1.9" stroke-linecap="round" opacity="1"/>
|
|
82
|
-
<path d="M 597.0 248.0 Q 596.5 243.0 596.0 238.1" fill="none" stroke="#0ca678" stroke-width="1.6" stroke-linecap="round" opacity="0.65"/>
|
|
83
|
-
<path d="M 597.0 248.0 Q 601.0 245.1 605.1 242.1" fill="none" stroke="#0ca678" stroke-width="1.9" stroke-linecap="round" opacity="1"/>
|
|
84
|
-
<path d="M 597.0 248.0 Q 601.0 245.0 605.1 242.1" fill="none" stroke="#0ca678" stroke-width="1.6" stroke-linecap="round" opacity="0.65"/>
|
|
85
|
-
<rect x="589.8" y="211.0" width="132.4" height="17" rx="4" fill="#ffffff" opacity="0.92"/>
|
|
86
|
-
<text x="656.0" y="223.0" text-anchor="middle" class="edge-label" fill="#0ca678">20 semantic rules</text>
|
|
87
|
-
|
|
88
|
-
<!-- Track A: Comparison Sites + Lean 4 -->
|
|
89
|
-
<rect x="43.0" y="254.0" width="355.0" height="132.0" rx="12" fill="#000000" opacity="0.045"/>
|
|
90
|
-
<rect x="39.8" y="249.9" width="355.0" height="132.0" rx="12" fill="#f3f0ff"/>
|
|
91
|
-
<path d="M 52.9 249.8 Q 218.2 250.0 383.5 249.9 Q 395.5 249.8 396.0 262.0 Q 395.1 315.9 396.1 369.8 Q 395.2 382.0 383.5 382.1 Q 218.2 381.8 52.9 381.5 Q 40.6 382.2 40.6 369.8 Q 40.6 315.9 40.7 262.0 Q 41.1 249.6 52.9 250.3" fill="none" stroke="#6741d9" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round" opacity="0.95"/>
|
|
92
|
-
<path d="M 52.6 250.7 Q 218.2 249.6 383.9 250.1 Q 396.4 249.8 396.3 262.4 Q 394.7 315.7 395.7 369.0 Q 396.3 381.2 383.9 380.9 Q 218.2 379.8 52.6 381.3 Q 40.4 381.4 41.3 369.0 Q 41.4 315.7 40.9 262.4 Q 40.8 250.6 52.6 250.0" fill="none" stroke="#6741d9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" opacity="0.55"/>
|
|
93
|
-
<text x="217.0" y="277.0" text-anchor="middle" class="heading" fill="#5f3dc4">Lean 4 Solver (tmt-decide)</text>
|
|
94
|
-
<text x="217.0" y="300.0" text-anchor="middle" class="body" fill="#3b2c68">Computes exact feasible [lo, hi] intervals for:</text>
|
|
95
|
-
<text x="217.0" y="318.0" text-anchor="middle" class="code" fill="#5f3dc4">constant-RHS & variable-RHS margins</text>
|
|
96
|
-
<text x="217.0" y="336.0" text-anchor="middle" class="body" fill="#3b2c68">Synthesizes nearest open edit (age >= 17, rhs - 1)</text>
|
|
97
|
-
<text x="217.0" y="354.0" text-anchor="middle" class="body" fill="#3b2c68">With --deterministic: proves safe replay skips</text>
|
|
98
|
-
|
|
99
|
-
<!-- Track B: 20 Value-Aware Rules -->
|
|
100
|
-
<rect x="423.0" y="254.0" width="355.0" height="132.0" rx="12" fill="#000000" opacity="0.045"/>
|
|
101
|
-
<rect x="420.5" y="250.5" width="355.0" height="132.0" rx="12" fill="#e6fcf5"/>
|
|
102
|
-
<path d="M 431.1 250.1 Q 597.4 249.7 763.7 250.2 Q 776.2 249.7 775.4 261.9 Q 775.6 316.4 775.7 370.9 Q 775.7 382.8 763.7 383.6 Q 597.4 382.6 431.1 382.8 Q 418.6 382.4 418.9 370.9 Q 418.4 316.4 419.6 261.9 Q 418.8 250.0 431.1 250.1" fill="none" stroke="#0ca678" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round" opacity="0.95"/>
|
|
103
|
-
<path d="M 431.5 249.5 Q 597.6 248.9 763.8 249.2 Q 776.0 249.9 775.6 261.5 Q 776.8 315.9 775.8 370.3 Q 775.4 382.1 763.8 382.5 Q 597.6 381.5 431.5 381.9 Q 419.6 381.7 418.9 370.3 Q 419.5 315.9 418.9 261.5 Q 419.2 249.8 431.5 250.1" fill="none" stroke="#0ca678" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" opacity="0.55"/>
|
|
104
|
-
<text x="597.0" y="277.0" text-anchor="middle" class="heading" fill="#087f5b">20 Value-Aware Targeted Rules</text>
|
|
105
|
-
<text x="597.0" y="300.0" text-anchor="middle" class="body" fill="#125442">spread-property-drop, startsWith->includes, replaceAll</text>
|
|
106
|
-
<text x="597.0" y="318.0" text-anchor="middle" class="body" fill="#125442">clamp-bound, literal-set-prune, merge-precedence,</text>
|
|
107
|
-
<text x="597.0" y="336.0" text-anchor="middle" class="body" fill="#125442">??/||, ==/=== null, Math, sequence ends, finally cleanup</text>
|
|
108
|
-
<text x="597.0" y="354.0" text-anchor="middle" class="code" fill="#087f5b">Records "agreed" vs "differed in T" per test</text>
|
|
109
|
-
|
|
110
|
-
<!-- Arrows: Track A & Track B -> Vitest Worker Session -->
|
|
111
|
-
<path d="M 216.8 381.4 Q 267.8 406.0 320.7 428.0" fill="none" stroke="#6741d9" stroke-width="1.9" stroke-linecap="round" opacity="1"/>
|
|
112
|
-
<path d="M 217.7 381.7 Q 269.0 403.7 320.6 427.2" fill="none" stroke="#6741d9" stroke-width="1.6" stroke-linecap="round" opacity="0.65"/>
|
|
113
|
-
<path d="M 320.0 428.0 Q 315.1 428.6 310.0 429.0" fill="none" stroke="#6741d9" stroke-width="1.9" stroke-linecap="round" opacity="1"/>
|
|
114
|
-
<path d="M 320.0 428.0 Q 315.1 428.6 310.0 429.0" fill="none" stroke="#6741d9" stroke-width="1.6" stroke-linecap="round" opacity="0.65"/>
|
|
115
|
-
<path d="M 320.0 428.0 Q 317.0 424.0 314.1 419.9" fill="none" stroke="#6741d9" stroke-width="1.9" stroke-linecap="round" opacity="1"/>
|
|
116
|
-
<path d="M 320.0 428.0 Q 317.0 423.9 314.1 419.9" fill="none" stroke="#6741d9" stroke-width="1.6" stroke-linecap="round" opacity="0.65"/>
|
|
117
|
-
<path d="M 596.4 382.5 Q 547.5 403.9 499.9 428.0" fill="none" stroke="#0ca678" stroke-width="1.9" stroke-linecap="round" opacity="1"/>
|
|
118
|
-
<path d="M 597.0 382.4 Q 549.9 405.3 500.0 427.3" fill="none" stroke="#0ca678" stroke-width="1.6" stroke-linecap="round" opacity="0.65"/>
|
|
119
|
-
<path d="M 500.0 428.0 Q 502.9 423.9 505.7 419.8" fill="none" stroke="#0ca678" stroke-width="1.9" stroke-linecap="round" opacity="1"/>
|
|
120
|
-
<path d="M 500.0 428.0 Q 502.8 423.9 505.7 419.8" fill="none" stroke="#0ca678" stroke-width="1.6" stroke-linecap="round" opacity="0.65"/>
|
|
121
|
-
<path d="M 500.0 428.0 Q 505.0 428.4 509.9 428.8" fill="none" stroke="#0ca678" stroke-width="1.9" stroke-linecap="round" opacity="1"/>
|
|
122
|
-
<path d="M 500.0 428.0 Q 505.0 428.3 509.9 428.8" fill="none" stroke="#0ca678" stroke-width="1.6" stroke-linecap="round" opacity="0.65"/>
|
|
123
|
-
|
|
124
|
-
<!-- Step 2: Vitest 4 Worker Session -->
|
|
125
|
-
<rect x="138.0" y="434.0" width="550.0" height="82.0" rx="12" fill="#000000" opacity="0.045"/>
|
|
126
|
-
<rect x="134.3" y="429.2" width="550.0" height="82.0" rx="12" fill="#fff9db"/>
|
|
127
|
-
<path d="M 148.0 429.9 Q 410.8 429.6 673.7 430.6 Q 686.1 429.7 685.1 442.0 Q 685.5 470.7 685.2 499.4 Q 685.4 511.8 673.7 511.7 Q 410.8 510.2 148.0 511.9 Q 135.5 511.4 136.3 499.4 Q 135.8 470.7 136.1 442.0 Q 135.9 429.7 148.0 429.7" fill="none" stroke="#e67700" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round" opacity="0.95"/>
|
|
128
|
-
<path d="M 147.7 430.1 Q 410.1 429.1 672.4 429.5 Q 684.9 429.9 684.6 441.5 Q 684.2 470.5 684.8 499.4 Q 684.1 510.9 672.4 511.1 Q 410.1 510.3 147.7 511.6 Q 135.6 511.6 136.2 499.4 Q 136.1 470.5 136.3 441.5 Q 135.2 429.7 147.7 428.9" fill="none" stroke="#e67700" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" opacity="0.55"/>
|
|
129
|
-
<text x="410.0" y="458.0" text-anchor="middle" class="heading" fill="#d9480f">2. Switched Vitest 4 Worker Session</text>
|
|
130
|
-
<text x="410.0" y="480.0" text-anchor="middle" class="body" fill="#6c4200">Runs only tests that reach each edit via in-worker runtime switches.</text>
|
|
131
|
-
<text x="410.0" y="497.0" text-anchor="middle" class="body" fill="#6c4200">Immediate post-trial control run catches state leaks (auto-fallback to fresh run).</text>
|
|
30
|
+
<!-- Clean card background for GitHub light & dark themes -->
|
|
31
|
+
<rect x="0" y="0" width="960" height="476" rx="14" fill="#ffffff"/>
|
|
32
|
+
<rect x="1" y="1" width="958" height="474" rx="13" fill="none" stroke="#e9ecef" stroke-width="1.5"/>
|
|
33
|
+
|
|
34
|
+
<!-- Row 1: Source -> Baseline -> Optional Diff Track -->
|
|
35
|
+
<rect x="28" y="34" width="196" height="62" rx="10" fill="#f8f9fa" stroke="#adb5bd" stroke-width="1.5"/>
|
|
36
|
+
<text x="126" y="59" text-anchor="middle" class="heading" fill="#212529">Source + Tests</text>
|
|
37
|
+
<text x="126" y="79" text-anchor="middle" class="small" fill="#495057">Vitest 4 or Playwright</text>
|
|
38
|
+
|
|
39
|
+
<line x1="224" y1="65" x2="270" y2="65" stroke="#64748b" stroke-width="1.6" marker-end="url(#arrow-gray)"/>
|
|
40
|
+
|
|
41
|
+
<rect x="276" y="34" width="380" height="62" rx="10" fill="#e7f5ff" stroke="#1971c2" stroke-width="1.6"/>
|
|
42
|
+
<text x="466" y="58" text-anchor="middle" class="heading" fill="#1864ab">1. Baseline Run + Value Probes</text>
|
|
43
|
+
<text x="466" y="79" text-anchor="middle" class="body" fill="#1c4f7a">Records (lhs, rhs) operands & per-test agreement</text>
|
|
44
|
+
|
|
45
|
+
<!-- Optional side track -->
|
|
46
|
+
<path d="M 126 34 L 126 16 L 814 16 L 814 29" fill="none" stroke="#868e96" stroke-width="1.3" stroke-dasharray="4 3" marker-end="url(#arrow-gray)"/>
|
|
47
|
+
<rect x="440" y="8" width="96" height="15" rx="3" fill="#ffffff"/>
|
|
48
|
+
<text x="488" y="19" text-anchor="middle" class="small" fill="#868e96">git diff hunks</text>
|
|
49
|
+
|
|
50
|
+
<rect x="696" y="34" width="236" height="62" rx="10" fill="#f1f3f5" stroke="#868e96" stroke-width="1.4" stroke-dasharray="5 3"/>
|
|
51
|
+
<text x="814" y="54" text-anchor="middle" class="label" fill="#343a40">Optional: --undo-changes</text>
|
|
52
|
+
<text x="814" y="71" text-anchor="middle" class="small" fill="#495057">Reverts hunks & AST sub-hunks</text>
|
|
53
|
+
<text x="814" y="87" text-anchor="middle" class="code" fill="#c92a2a">-> UNTESTED CHANGE</text>
|
|
54
|
+
|
|
55
|
+
<!-- Arrows: Baseline -> Track A & Track B -->
|
|
56
|
+
<path d="M 380 96 L 236 134" fill="none" stroke="#6741d9" stroke-width="1.6" marker-end="url(#arrow-purple)"/>
|
|
57
|
+
<path d="M 552 96 L 616 134" fill="none" stroke="#0ca678" stroke-width="1.6" marker-end="url(#arrow-teal)"/>
|
|
58
|
+
|
|
59
|
+
<!-- Row 2: Two synthesis tracks -->
|
|
60
|
+
<rect x="28" y="140" width="404" height="84" rx="10" fill="#f3f0ff" stroke="#6741d9" stroke-width="1.6"/>
|
|
61
|
+
<text x="230" y="164" text-anchor="middle" class="heading" fill="#5f3dc4">2a. Lean 4 Solver (tmt-decide)</text>
|
|
62
|
+
<text x="230" y="185" text-anchor="middle" class="body" fill="#3b2c68">Feasible threshold & margin intervals -> nearest open edit</text>
|
|
63
|
+
<text x="230" y="205" text-anchor="middle" class="small" fill="#5f3dc4">--deterministic: proves zero-reexecution replay skips</text>
|
|
64
|
+
|
|
65
|
+
<rect x="456" y="140" width="476" height="84" rx="10" fill="#e6fcf5" stroke="#0ca678" stroke-width="1.6"/>
|
|
66
|
+
<text x="694" y="164" text-anchor="middle" class="heading" fill="#087f5b">2b. 20 Value-Aware Rules</text>
|
|
67
|
+
<text x="694" y="185" text-anchor="middle" class="body" fill="#125442">spread drop, startsWith->includes, replaceAll, clamp, ??/||, finally...</text>
|
|
68
|
+
<text x="694" y="205" text-anchor="middle" class="small" fill="#087f5b">Tracks "agreed" vs "differed in T" per test</text>
|
|
69
|
+
|
|
70
|
+
<!-- Arrows: Tracks -> Worker Session -->
|
|
71
|
+
<path d="M 230 224 L 356 260" fill="none" stroke="#6741d9" stroke-width="1.6" marker-end="url(#arrow-purple)"/>
|
|
72
|
+
<path d="M 694 224 L 568 260" fill="none" stroke="#0ca678" stroke-width="1.6" marker-end="url(#arrow-teal)"/>
|
|
73
|
+
|
|
74
|
+
<!-- Row 3: Switched Vitest 4 Workers -->
|
|
75
|
+
<rect x="210" y="264" width="540" height="60" rx="10" fill="#fff9db" stroke="#e67700" stroke-width="1.6"/>
|
|
76
|
+
<text x="480" y="289" text-anchor="middle" class="heading" fill="#d9480f">3. Switched Vitest 4 Worker Session</text>
|
|
77
|
+
<text x="480" y="309" text-anchor="middle" class="body" fill="#6c4200">In-worker runtime switches + post-trial control run (auto-fallback on state leak)</text>
|
|
132
78
|
|
|
133
79
|
<!-- Arrows: Session -> 3 Outcomes -->
|
|
134
|
-
<path d="M
|
|
135
|
-
<
|
|
136
|
-
<
|
|
137
|
-
|
|
138
|
-
<
|
|
139
|
-
<
|
|
140
|
-
<
|
|
141
|
-
|
|
142
|
-
<path d="M
|
|
143
|
-
<
|
|
144
|
-
<
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
<
|
|
148
|
-
<
|
|
149
|
-
<text x="
|
|
150
|
-
<
|
|
151
|
-
|
|
152
|
-
<
|
|
153
|
-
<
|
|
154
|
-
<
|
|
155
|
-
<
|
|
156
|
-
|
|
157
|
-
<
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
<
|
|
161
|
-
<rect x="40.3" y="562.0" width="225.0" height="118.0" rx="12" fill="#ebfbee"/>
|
|
162
|
-
<path d="M 51.8 562.5 Q 152.3 562.5 252.9 562.0 Q 264.6 562.5 264.5 574.3 Q 264.4 621.2 264.9 668.1 Q 264.4 679.6 252.9 679.4 Q 152.3 679.1 51.8 680.6 Q 39.7 680.0 39.3 668.1 Q 39.3 621.2 40.0 574.3 Q 39.6 562.1 51.8 562.6" fill="none" stroke="#2f9e44" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round" opacity="0.95"/>
|
|
163
|
-
<path d="M 51.1 563.1 Q 152.5 564.0 253.8 562.7 Q 266.4 563.4 265.8 574.9 Q 266.1 621.1 266.1 667.3 Q 265.8 679.3 253.8 678.6 Q 152.5 679.6 51.1 678.9 Q 38.6 678.9 39.7 667.3 Q 38.1 621.1 39.5 574.9 Q 39.2 563.3 51.1 562.7" fill="none" stroke="#2f9e44" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" opacity="0.55"/>
|
|
164
|
-
<text x="152.0" y="590.0" text-anchor="middle" class="heading" fill="#2b8a3e">killed</text>
|
|
165
|
-
<text x="152.0" y="615.0" text-anchor="middle" class="body" fill="#21572c">At least one test failed.</text>
|
|
166
|
-
<text x="152.0" y="633.0" text-anchor="middle" class="body" fill="#21572c">Your suite already</text>
|
|
167
|
-
<text x="152.0" y="651.0" text-anchor="middle" class="body" fill="#21572c">distinguishes this edit.</text>
|
|
168
|
-
|
|
169
|
-
<!-- Outcome 2: INPUT GAP -->
|
|
170
|
-
<rect x="293.0" y="566.0" width="365.0" height="118.0" rx="12" fill="#000000" opacity="0.045"/>
|
|
171
|
-
<rect x="290.4" y="562.2" width="365.0" height="118.0" rx="12" fill="#fff5f5"/>
|
|
172
|
-
<path d="M 302.6 561.5 Q 473.3 560.5 644.0 561.7 Q 656.3 561.0 656.1 573.2 Q 656.2 620.6 655.5 668.0 Q 655.8 680.0 644.0 680.6 Q 473.3 679.0 302.6 680.0 Q 290.5 679.6 290.7 668.0 Q 289.8 620.6 290.0 573.2 Q 290.8 561.0 302.6 561.6" fill="none" stroke="#e03131" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round" opacity="0.95"/>
|
|
173
|
-
<path d="M 301.8 561.8 Q 472.9 563.0 644.0 562.4 Q 655.6 561.5 656.1 573.7 Q 654.7 620.8 656.7 667.9 Q 655.7 680.5 644.0 679.5 Q 472.9 681.1 301.8 679.8 Q 289.7 679.7 290.4 667.9 Q 290.0 620.8 289.7 573.7 Q 290.3 562.2 301.8 561.0" fill="none" stroke="#e03131" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" opacity="0.55"/>
|
|
174
|
-
<text x="472.0" y="590.0" text-anchor="middle" class="heading" fill="#c92a2a">INPUT GAP (missing case)</text>
|
|
175
|
-
<text x="472.0" y="613.0" text-anchor="middle" class="body" fill="#691b1b">Edit agreed on every observed evaluation.</text>
|
|
176
|
-
<text x="472.0" y="631.0" text-anchor="middle" class="body" fill="#691b1b">Names the exact missing input or boundary:</text>
|
|
177
|
-
<text x="472.0" y="649.0" text-anchor="middle" class="code" fill="#a61e4d">expect(isAdult(18)).toBe(true)</text>
|
|
178
|
-
|
|
179
|
-
<!-- Outcome 3: ASSERTION GAP -->
|
|
180
|
-
<rect x="683.0" y="566.0" width="400.0" height="118.0" rx="12" fill="#000000" opacity="0.045"/>
|
|
181
|
-
<rect x="680.5" y="562.2" width="400.0" height="118.0" rx="12" fill="#fff4e6"/>
|
|
182
|
-
<path d="M 691.9 561.7 Q 879.5 562.4 1067.1 562.7 Q 1079.5 561.6 1079.8 574.1 Q 1080.3 621.2 1079.8 668.4 Q 1078.7 680.4 1067.1 680.8 Q 879.5 679.6 691.9 680.0 Q 680.2 680.1 680.4 668.4 Q 680.5 621.2 679.6 574.1 Q 679.8 562.6 691.9 562.5" fill="none" stroke="#d9480f" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round" opacity="0.95"/>
|
|
183
|
-
<path d="M 691.4 561.8 Q 879.3 560.9 1067.2 560.8 Q 1079.6 561.4 1079.8 573.5 Q 1078.7 620.8 1078.9 668.2 Q 1079.5 679.9 1067.2 680.7 Q 879.3 678.8 691.4 680.7 Q 679.7 679.8 678.7 668.2 Q 678.2 620.8 679.4 573.5 Q 679.6 561.8 691.4 560.9" fill="none" stroke="#d9480f" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" opacity="0.55"/>
|
|
184
|
-
<text x="880.0" y="590.0" text-anchor="middle" class="heading" fill="#d9480f">ASSERTION GAP (weak test)</text>
|
|
185
|
-
<text x="880.0" y="613.0" text-anchor="middle" class="body" fill="#6e2b07">Edit produced a different value in test T, yet T passed.</text>
|
|
186
|
-
<text x="880.0" y="631.0" text-anchor="middle" class="body" fill="#6e2b07">With --suggest-assertions, narrows to changed field:</text>
|
|
187
|
-
<text x="880.0" y="649.0" text-anchor="middle" class="code" fill="#b53a08">expect(res.fee).toBe(600)</text>
|
|
80
|
+
<path d="M 330 324 L 154 366" fill="none" stroke="#2f9e44" stroke-width="1.6" marker-end="url(#arrow-green)"/>
|
|
81
|
+
<rect x="196" y="335" width="66" height="16" rx="4" fill="#ffffff"/>
|
|
82
|
+
<text x="229" y="347" text-anchor="middle" class="small" fill="#2f9e44" font-weight="700">test fails</text>
|
|
83
|
+
|
|
84
|
+
<line x1="480" y1="324" x2="480" y2="365" stroke="#e03131" stroke-width="1.6" marker-end="url(#arrow-red)"/>
|
|
85
|
+
<rect x="424" y="335" width="112" height="16" rx="4" fill="#ffffff"/>
|
|
86
|
+
<text x="480" y="347" text-anchor="middle" class="small" fill="#e03131" font-weight="700">all pass + agreed</text>
|
|
87
|
+
|
|
88
|
+
<path d="M 630 324 L 806 366" fill="none" stroke="#d9480f" stroke-width="1.6" marker-end="url(#arrow-orange)"/>
|
|
89
|
+
<rect x="668" y="335" width="132" height="16" rx="4" fill="#ffffff"/>
|
|
90
|
+
<text x="734" y="347" text-anchor="middle" class="small" fill="#d9480f" font-weight="700">all pass + differed</text>
|
|
91
|
+
|
|
92
|
+
<!-- Row 4: 3 Outcomes -->
|
|
93
|
+
<rect x="28" y="370" width="252" height="82" rx="10" fill="#ebfbee" stroke="#2f9e44" stroke-width="1.6"/>
|
|
94
|
+
<text x="154" y="396" text-anchor="middle" class="heading" fill="#2b8a3e">killed</text>
|
|
95
|
+
<text x="154" y="418" text-anchor="middle" class="body" fill="#21572c">Suite already distinguishes</text>
|
|
96
|
+
<text x="154" y="435" text-anchor="middle" class="body" fill="#21572c">this edit.</text>
|
|
97
|
+
|
|
98
|
+
<rect x="304" y="370" width="352" height="82" rx="10" fill="#fff5f5" stroke="#e03131" stroke-width="1.6"/>
|
|
99
|
+
<text x="480" y="396" text-anchor="middle" class="heading" fill="#c92a2a">INPUT GAP</text>
|
|
100
|
+
<text x="480" y="416" text-anchor="middle" class="small" fill="#691b1b">Names exact missing input or boundary:</text>
|
|
101
|
+
<text x="480" y="436" text-anchor="middle" class="code" fill="#a61e4d">expect(isAdult(18)).toBe(true)</text>
|
|
102
|
+
|
|
103
|
+
<rect x="680" y="370" width="252" height="82" rx="10" fill="#fff4e6" stroke="#d9480f" stroke-width="1.6"/>
|
|
104
|
+
<text x="806" y="396" text-anchor="middle" class="heading" fill="#d9480f">ASSERTION GAP</text>
|
|
105
|
+
<text x="806" y="416" text-anchor="middle" class="small" fill="#6e2b07">Names weak test T (+ --suggest-assertions):</text>
|
|
106
|
+
<text x="806" y="436" text-anchor="middle" class="code" fill="#b53a08">expect(res.fee).toBe(600)</text>
|
|
188
107
|
</svg>
|