vdelta 0.5.0 → 0.6.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/dist/adapters/playwright/adapter.d.ts +27 -0
- package/dist/adapters/playwright/adapter.js +175 -0
- package/dist/adapters/playwright/adapter.js.map +1 -0
- package/dist/adapters/playwright/capture.d.ts +119 -0
- package/dist/adapters/playwright/capture.js +12 -0
- package/dist/adapters/playwright/capture.js.map +1 -0
- package/dist/adapters/playwright/recorder.d.ts +65 -0
- package/dist/adapters/playwright/recorder.js +511 -0
- package/dist/adapters/playwright/recorder.js.map +1 -0
- package/dist/adapters/playwright/reporter.cjs +322 -0
- package/dist/adapters/playwright/reporter.cjs.map +1 -0
- package/dist/adapters/playwright/reporter.d.cts +63 -0
- package/dist/adapters/registry.js +2 -1
- package/dist/adapters/registry.js.map +1 -1
- package/dist/schema.d.ts +33 -0
- package/dist/schema.js +2 -2
- package/dist/schema.js.map +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* playwright adapter, recorder side: turns a Capture dump plus execution
|
|
3
|
+
* context into a canonical RunRecord (§3). Composition `playwright-native/1`
|
|
4
|
+
* (docs/compositions/playwright-native-1.md): digest core = exception type +
|
|
5
|
+
* message + line-shift-stable relOffsets + tree-reconstructed
|
|
6
|
+
* `source_region` text; `source-region-text` and `retry-evidence` are
|
|
7
|
+
* declared `pass` (unlike vitest, which declares `source-region-text`
|
|
8
|
+
* `unsupported` — `../vitest/recorder.ts:67-74`); `resolved-config-coverage`
|
|
9
|
+
* is declared `unsupported` because playwright's resolved `FullConfig` never
|
|
10
|
+
* exposes `expect.timeout` to the reporter (doc §4 `expect.timeout` row,
|
|
11
|
+
* architecture decision 6). `resolved-config-coverage` is deliberately not
|
|
12
|
+
* added to `schema.ts`'s `EVIDENCE_CAPABILITY_NAMES` (decision 6 implementation
|
|
13
|
+
* contract): it is an `instrument`-level capability, not an evidence one, so
|
|
14
|
+
* `failure_evidence.degraded_capabilities` never lists it.
|
|
15
|
+
*
|
|
16
|
+
* Test IDs are project-scoped (`${rel}::${project}::${titles.join(' > ')}`)
|
|
17
|
+
* because playwright's own test identity is project-scoped
|
|
18
|
+
* (`TestCase.id`/`titlePath()` — see `../../adapters/playwright/reporter.cts`);
|
|
19
|
+
* without `project` in the id, same-titled tests in different projects would
|
|
20
|
+
* collide.
|
|
21
|
+
*/
|
|
22
|
+
import { readFileSync, realpathSync } from 'node:fs';
|
|
23
|
+
import { isAbsolute, relative } from 'node:path';
|
|
24
|
+
import { AdapterCaptureError, } from '../../adapter.js';
|
|
25
|
+
import { canonicalDigest } from '../../digest.js';
|
|
26
|
+
import { redactText, redactValue } from '../../redact.js';
|
|
27
|
+
import { SCHEMA_VERSION, } from '../../schema.js';
|
|
28
|
+
import { CAPTURE_VERSION, } from './capture.js';
|
|
29
|
+
export const ADAPTER_NAME = 'playwright';
|
|
30
|
+
export const COMPOSITION_ID = 'playwright-native/1';
|
|
31
|
+
/** Env vars whose values (fingerprinted, never stored) are comparison-relevant. */
|
|
32
|
+
export const DECLARED_ENV_VARS = ['CI', 'NODE_ENV', 'TZ', 'LANG'];
|
|
33
|
+
/**
|
|
34
|
+
* A capture the recorder cannot turn into a record: unsupported capture
|
|
35
|
+
* version, or an ambiguity it refuses to guess through (§12 fail-closed).
|
|
36
|
+
* A subtype of `AdapterCaptureError` so the core degrades to raw passthrough
|
|
37
|
+
* (INV-5) without knowing which adapter raised it.
|
|
38
|
+
*/
|
|
39
|
+
export class RecorderError extends AdapterCaptureError {
|
|
40
|
+
constructor(message) {
|
|
41
|
+
super(message);
|
|
42
|
+
this.name = 'RecorderError';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Capability declaration for `playwright-native/1`
|
|
47
|
+
* (docs/compositions/playwright-native-1.md §8, decision 6). Unlike vitest,
|
|
48
|
+
* `source-region-text` is `pass` (tree-reconstructed — provenance below), and
|
|
49
|
+
* `retry-evidence` is `pass` (per-attempt evidence lands in
|
|
50
|
+
* `FailureFinding.annex.attempts`). `resolved-config-coverage` is
|
|
51
|
+
* `unsupported`: playwright's resolved `FullConfig`/`FullProject` never
|
|
52
|
+
* expose `expect.timeout` to the reporter (doc §4 `expect.timeout` row),
|
|
53
|
+
* so `instrumentConfigDigest` below cannot cover it. This capability is
|
|
54
|
+
* intentionally not one of `schema.ts`'s `EVIDENCE_CAPABILITY_NAMES` — it is
|
|
55
|
+
* an instrument-config capability, not an evidence capability, so a report's
|
|
56
|
+
* `failure_evidence.degraded_capabilities` never lists it (decision 6).
|
|
57
|
+
*/
|
|
58
|
+
export const PLAYWRIGHT_CAPABILITIES = {
|
|
59
|
+
verdicts: 'pass',
|
|
60
|
+
'source-location': 'pass',
|
|
61
|
+
suppression: 'pass',
|
|
62
|
+
inventory: 'pass',
|
|
63
|
+
'failure-evidence': 'pass',
|
|
64
|
+
'source-region-text': 'pass', // provenance: tree-reconstructed
|
|
65
|
+
// (spec §3.6 option (b) — error.location [channel-provided
|
|
66
|
+
// pointer] + recorded source tree から sourceLineText を
|
|
67
|
+
// 決定的に再構成。raw error.snippet [channel-provided] は
|
|
68
|
+
// line-shift 不安定なため使用しない。0b-core-1/2 実測、
|
|
69
|
+
// probes/playwright-0b-core/observations/stability-report.json)
|
|
70
|
+
'retry-evidence': 'pass',
|
|
71
|
+
// expect.timeout は resolved FullConfig に公開されない — 同 doc §4
|
|
72
|
+
// expect.timeout 行、決定6
|
|
73
|
+
'resolved-config-coverage': 'unsupported',
|
|
74
|
+
};
|
|
75
|
+
export function buildRunRecord(capture, ctx) {
|
|
76
|
+
if (capture.capture_version !== CAPTURE_VERSION) {
|
|
77
|
+
throw new RecorderError(`unsupported capture version ${capture.capture_version}`);
|
|
78
|
+
}
|
|
79
|
+
const redProjects = new Set();
|
|
80
|
+
for (const t of capture.tests) {
|
|
81
|
+
const final = finalAttemptOf(t);
|
|
82
|
+
if (final.status === 'failed' || final.status === 'timedOut')
|
|
83
|
+
redProjects.add(t.project);
|
|
84
|
+
}
|
|
85
|
+
const depsClosure = transitiveDependencyClosure(capture.config.projects);
|
|
86
|
+
const seenIds = new Set();
|
|
87
|
+
const observations = [];
|
|
88
|
+
const durations = {};
|
|
89
|
+
const suppressed = [];
|
|
90
|
+
const reportedSorted = [...capture.tests].sort((a, b) => compareId(testId(a, ctx.worktree), testId(b, ctx.worktree)));
|
|
91
|
+
for (const t of reportedSorted) {
|
|
92
|
+
const id = testId(t, ctx.worktree);
|
|
93
|
+
if (seenIds.has(id)) {
|
|
94
|
+
// Fail-closed on ambiguity (§12): duplicate canonical IDs are not guessable.
|
|
95
|
+
throw new RecorderError(`duplicate test id: ${id}`);
|
|
96
|
+
}
|
|
97
|
+
seenIds.add(id);
|
|
98
|
+
const obs = toReportedObservation(t, id, ctx);
|
|
99
|
+
observations.push(obs);
|
|
100
|
+
durations[id] = Math.round(finalAttemptOf(t).duration_ms * 1000);
|
|
101
|
+
if (obs.verdict === 'skip' || obs.verdict === 'xfail')
|
|
102
|
+
suppressed.push(id);
|
|
103
|
+
}
|
|
104
|
+
const unreportedSorted = [...capture.unreported_tests].sort((a, b) => compareId(testId(a, ctx.worktree), testId(b, ctx.worktree)));
|
|
105
|
+
for (const t of unreportedSorted) {
|
|
106
|
+
const id = testId(t, ctx.worktree);
|
|
107
|
+
if (seenIds.has(id)) {
|
|
108
|
+
throw new RecorderError(`duplicate test id: ${id}`);
|
|
109
|
+
}
|
|
110
|
+
seenIds.add(id);
|
|
111
|
+
const obs = toUnreportedObservation(t, id, redProjects, depsClosure, ctx);
|
|
112
|
+
observations.push(obs);
|
|
113
|
+
if (obs.verdict === 'skip')
|
|
114
|
+
suppressed.push(id);
|
|
115
|
+
}
|
|
116
|
+
observations.sort((a, b) => compareId(a.test_id, b.test_id));
|
|
117
|
+
const testSources = {};
|
|
118
|
+
for (const t of [...capture.tests, ...capture.unreported_tests]) {
|
|
119
|
+
const rel = relPath(ctx.worktree, t.file_abs);
|
|
120
|
+
if (rel in testSources)
|
|
121
|
+
continue;
|
|
122
|
+
const digest = fileDigest(t.file_abs);
|
|
123
|
+
if (digest !== null)
|
|
124
|
+
testSources[rel] = digest;
|
|
125
|
+
}
|
|
126
|
+
const configSources = {};
|
|
127
|
+
for (const abs of [...new Set(capture.config_files)].sort()) {
|
|
128
|
+
const digest = fileDigest(abs);
|
|
129
|
+
if (digest !== null)
|
|
130
|
+
configSources[configSourceKey(abs, ctx.worktree)] = digest;
|
|
131
|
+
}
|
|
132
|
+
const notRun = observations.filter((o) => o.verdict === 'not_run').length;
|
|
133
|
+
let status = 'complete';
|
|
134
|
+
if (capture.unhandled_errors > 0)
|
|
135
|
+
status = 'crashed';
|
|
136
|
+
else if (capture.status === 'interrupted' ||
|
|
137
|
+
capture.status === 'timedout' ||
|
|
138
|
+
notRun > 0)
|
|
139
|
+
status = 'partial';
|
|
140
|
+
return {
|
|
141
|
+
schema_version: SCHEMA_VERSION,
|
|
142
|
+
repo: {
|
|
143
|
+
identity: ctx.repoIdentity,
|
|
144
|
+
worktree: ctx.worktree,
|
|
145
|
+
branch: ctx.branch,
|
|
146
|
+
cwd: ctx.cwdRel,
|
|
147
|
+
},
|
|
148
|
+
invocation: { command: ctx.command, selector: [...ctx.selector].sort() },
|
|
149
|
+
instrument: {
|
|
150
|
+
adapter: ADAPTER_NAME,
|
|
151
|
+
adapter_version: ctx.adapterVersion,
|
|
152
|
+
composition_id: COMPOSITION_ID,
|
|
153
|
+
config_digest: instrumentConfigDigest(capture),
|
|
154
|
+
capabilities: { ...PLAYWRIGHT_CAPABILITIES },
|
|
155
|
+
},
|
|
156
|
+
environment: {
|
|
157
|
+
runner: capture.runner,
|
|
158
|
+
runner_version: capture.runner_version,
|
|
159
|
+
runtime: `node ${process.version}`,
|
|
160
|
+
os: process.platform,
|
|
161
|
+
env_fingerprint: canonicalDigest(Object.fromEntries(DECLARED_ENV_VARS.map((k) => [k, process.env[k] ?? null]))),
|
|
162
|
+
},
|
|
163
|
+
provenance: {
|
|
164
|
+
head: ctx.head,
|
|
165
|
+
dirty_diff_digest: ctx.dirtyDiffDigest,
|
|
166
|
+
tree_digest: ctx.treeDigest,
|
|
167
|
+
},
|
|
168
|
+
surface: {
|
|
169
|
+
inventory_digest: canonicalDigest([...seenIds].sort()),
|
|
170
|
+
test_sources: testSources,
|
|
171
|
+
config_sources: configSources,
|
|
172
|
+
suppressed,
|
|
173
|
+
},
|
|
174
|
+
completeness: {
|
|
175
|
+
status,
|
|
176
|
+
child_exit_code: ctx.childExitCode,
|
|
177
|
+
module_errors: [],
|
|
178
|
+
},
|
|
179
|
+
observations,
|
|
180
|
+
recording: {
|
|
181
|
+
recorder: 'vdelta-run',
|
|
182
|
+
recorded_at_ms: ctx.recordedAtMs,
|
|
183
|
+
durations_us: durations,
|
|
184
|
+
raw_stdout: redactText(ctx.rawStdout),
|
|
185
|
+
raw_stderr: redactText(ctx.rawStderr),
|
|
186
|
+
capture_reason: capture.status,
|
|
187
|
+
unhandled_errors: capture.unhandled_errors,
|
|
188
|
+
},
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* The §4-judged-`yes` covering set (docs/compositions/playwright-native-1.md
|
|
193
|
+
* §4): every field the resolved `FullConfig`/`FullProject` exposes that can
|
|
194
|
+
* change evidence bytes or test-selection verdicts. `testDir`/`rootDir`/
|
|
195
|
+
* `configFile`/`reporter` are `no` in the judgement table and are absent from
|
|
196
|
+
* `Capture['config']`/`CapturedPwProjectConfig` by construction (never
|
|
197
|
+
* captured at all — see `./capture.ts`), so no extra filtering is needed
|
|
198
|
+
* here. `expect.timeout` is `channel-unavailable` (§4) and is likewise absent
|
|
199
|
+
* from the capture; it is disclosed instead via
|
|
200
|
+
* `PLAYWRIGHT_CAPABILITIES['resolved-config-coverage'] === 'unsupported'`.
|
|
201
|
+
*/
|
|
202
|
+
export function instrumentConfigDigest(capture) {
|
|
203
|
+
return canonicalDigest({
|
|
204
|
+
fully_parallel: capture.config.fullyParallel,
|
|
205
|
+
workers: capture.config.workers,
|
|
206
|
+
shard: capture.config.shard,
|
|
207
|
+
forbid_only: capture.config.forbidOnly,
|
|
208
|
+
max_failures: capture.config.maxFailures,
|
|
209
|
+
grep: capture.config.grep,
|
|
210
|
+
grep_invert: capture.config.grepInvert,
|
|
211
|
+
global_timeout: capture.config.globalTimeout,
|
|
212
|
+
projects: capture.config.projects.map((p) => ({
|
|
213
|
+
name: p.name,
|
|
214
|
+
test_match: p.testMatch,
|
|
215
|
+
test_ignore: p.testIgnore,
|
|
216
|
+
dependencies: p.dependencies,
|
|
217
|
+
retries: p.retries,
|
|
218
|
+
timeout: p.timeout,
|
|
219
|
+
use: p.use,
|
|
220
|
+
})),
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Project-scoped test id: `${rel}::${project}::${titles.join(' > ')}`.
|
|
225
|
+
* `rel` is computed here (not carried in the capture) because the reporter
|
|
226
|
+
* runs in-process without the worktree root; only the recorder — which has
|
|
227
|
+
* `RecordContext.worktree` — can normalize `file_abs` into a worktree-relative
|
|
228
|
+
* path.
|
|
229
|
+
*/
|
|
230
|
+
export function testId(t, worktree) {
|
|
231
|
+
return `${relPath(worktree, t.file_abs)}::${t.project}::${t.titles.join(' > ')}`;
|
|
232
|
+
}
|
|
233
|
+
function compareId(a, b) {
|
|
234
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
235
|
+
}
|
|
236
|
+
function finalAttemptOf(t) {
|
|
237
|
+
const sorted = [...t.attempts].sort((a, b) => a.retry - b.retry);
|
|
238
|
+
const last = sorted.at(-1);
|
|
239
|
+
if (last === undefined) {
|
|
240
|
+
throw new RecorderError(`test ${t.test_case_id} has no attempts`);
|
|
241
|
+
}
|
|
242
|
+
return last;
|
|
243
|
+
}
|
|
244
|
+
function failingAttemptsOf(t) {
|
|
245
|
+
return [...t.attempts]
|
|
246
|
+
.filter((a) => a.status === 'failed' || a.status === 'timedOut')
|
|
247
|
+
.sort((a, b) => a.retry - b.retry);
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* `annotations[].type` marker for a `status: 'skipped'` reported test
|
|
251
|
+
* (contract §5.2-equivalent for playwright): `'skip'`/`'fixme'` when present,
|
|
252
|
+
* else `'runtime'`.
|
|
253
|
+
*/
|
|
254
|
+
function skipMarkerFromAnnotations(annotations) {
|
|
255
|
+
if (annotations.some((a) => a.type === 'skip'))
|
|
256
|
+
return 'skip';
|
|
257
|
+
if (annotations.some((a) => a.type === 'fixme'))
|
|
258
|
+
return 'fixme';
|
|
259
|
+
return 'runtime';
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Verdict channel first (INV-3): the *final* attempt's `status`, refined only
|
|
263
|
+
* by `expected_status`/structured markers — see this file's header for the
|
|
264
|
+
* mapping table (module doc comment references the task's contract).
|
|
265
|
+
*/
|
|
266
|
+
function mapVerdict(t, finalAttempt) {
|
|
267
|
+
const status = finalAttempt.status;
|
|
268
|
+
if (status === 'skipped') {
|
|
269
|
+
return {
|
|
270
|
+
verdict: 'skip',
|
|
271
|
+
suppression: { marker: skipMarkerFromAnnotations(t.annotations) },
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
if (status === 'interrupted')
|
|
275
|
+
return { verdict: 'not_run' };
|
|
276
|
+
const expected = t.expected_status;
|
|
277
|
+
if (status === 'passed' && expected === 'passed')
|
|
278
|
+
return { verdict: 'pass' };
|
|
279
|
+
if ((status === 'failed' || status === 'timedOut') && expected === 'failed')
|
|
280
|
+
return { verdict: 'xfail', suppression: { marker: 'fail' } };
|
|
281
|
+
if (status === 'passed' && expected === 'failed')
|
|
282
|
+
return { verdict: 'fail' };
|
|
283
|
+
if ((status === 'failed' || status === 'timedOut') && expected === 'passed')
|
|
284
|
+
return { verdict: 'fail' };
|
|
285
|
+
// Fail-closed on ambiguity (§12): no other status/expected combination is
|
|
286
|
+
// guessable from playwright's public semantics.
|
|
287
|
+
throw new RecorderError(`unmapped playwright verdict: status=${status} expected=${expected} (test ${t.test_case_id})`);
|
|
288
|
+
}
|
|
289
|
+
function toReportedObservation(t, id, ctx) {
|
|
290
|
+
const finalAttempt = finalAttemptOf(t);
|
|
291
|
+
const { verdict, suppression } = mapVerdict(t, finalAttempt);
|
|
292
|
+
const obs = { test_id: id, verdict };
|
|
293
|
+
if (suppression)
|
|
294
|
+
obs.suppression = suppression;
|
|
295
|
+
if (t.location_line !== null)
|
|
296
|
+
obs.source_ref = {
|
|
297
|
+
file: relPath(ctx.worktree, t.file_abs),
|
|
298
|
+
line: t.location_line,
|
|
299
|
+
};
|
|
300
|
+
const failing = failingAttemptsOf(t);
|
|
301
|
+
if (verdict === 'fail' &&
|
|
302
|
+
(finalAttempt.status === 'failed' || finalAttempt.status === 'timedOut')) {
|
|
303
|
+
// status failed|timedOut & expected passed: build finding from the final
|
|
304
|
+
// (failing) attempt; earlier failed attempts (if any, from retries) are
|
|
305
|
+
// retry evidence (annex.attempts).
|
|
306
|
+
const priorFailing = failing.filter((a) => a.retry !== finalAttempt.retry);
|
|
307
|
+
obs.finding = buildFinding(t, finalAttempt, priorFailing, ctx);
|
|
308
|
+
}
|
|
309
|
+
else if (verdict === 'pass' && failing.length > 0) {
|
|
310
|
+
// outcome 'flaky' (D2 implementation mechanism 1, design doc §7): final
|
|
311
|
+
// attempt passed but an earlier attempt failed. verdict stays 'pass';
|
|
312
|
+
// the finding is built from the last failing attempt, with any earlier
|
|
313
|
+
// failing attempts recorded as retry evidence.
|
|
314
|
+
const primary = failing.at(-1);
|
|
315
|
+
const priorFailing = failing.filter((a) => a.retry !== primary.retry);
|
|
316
|
+
obs.finding = buildFinding(t, primary, priorFailing, ctx);
|
|
317
|
+
}
|
|
318
|
+
return obs;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Computes each project's transitive dependency set from
|
|
322
|
+
* `Capture['config'].projects[].dependencies` (direct deps only, as declared
|
|
323
|
+
* by `FullProject.dependencies`). Cycle-safe (a project cannot depend on
|
|
324
|
+
* itself through the closure).
|
|
325
|
+
*/
|
|
326
|
+
function transitiveDependencyClosure(projects) {
|
|
327
|
+
const direct = new Map();
|
|
328
|
+
for (const p of projects)
|
|
329
|
+
direct.set(p.name, p.dependencies);
|
|
330
|
+
const closure = new Map();
|
|
331
|
+
function resolve(name, seen) {
|
|
332
|
+
const cached = closure.get(name);
|
|
333
|
+
if (cached !== undefined)
|
|
334
|
+
return cached;
|
|
335
|
+
const result = new Set();
|
|
336
|
+
for (const dep of direct.get(name) ?? []) {
|
|
337
|
+
if (seen.has(dep))
|
|
338
|
+
continue;
|
|
339
|
+
result.add(dep);
|
|
340
|
+
const nestedSeen = new Set(seen);
|
|
341
|
+
nestedSeen.add(dep);
|
|
342
|
+
for (const nested of resolve(dep, nestedSeen))
|
|
343
|
+
result.add(nested);
|
|
344
|
+
}
|
|
345
|
+
closure.set(name, result);
|
|
346
|
+
return result;
|
|
347
|
+
}
|
|
348
|
+
for (const p of projects)
|
|
349
|
+
resolve(p.name, new Set([p.name]));
|
|
350
|
+
return closure;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* spec §11.1 floor (never drop an unreported test from `observations`).
|
|
354
|
+
* Per architecture decision (setup-cascade.json realtime observation): the
|
|
355
|
+
* authored/dependency distinction is only meaningful for *reported* tests
|
|
356
|
+
* (onTestEnd fired). A block-cascaded project's unreported tests — including
|
|
357
|
+
* authored `test.skip()` ones — arrive with `annotations: []` and are
|
|
358
|
+
* structurally indistinguishable, so they all synthesize into a single
|
|
359
|
+
* `marker: 'dependency'` observation. Unreported tests whose transitive
|
|
360
|
+
* dependency projects contain no red (failed/timedOut) reported test are
|
|
361
|
+
* `not_run` instead (e.g. `interrupted`/`globalTimeout`/`maxFailures`
|
|
362
|
+
* early-abort — no dependency to blame).
|
|
363
|
+
*/
|
|
364
|
+
function toUnreportedObservation(t, id, redProjects, depsClosure, ctx) {
|
|
365
|
+
const obs = { test_id: id, verdict: 'not_run' };
|
|
366
|
+
if (t.location_line !== null)
|
|
367
|
+
obs.source_ref = {
|
|
368
|
+
file: relPath(ctx.worktree, t.file_abs),
|
|
369
|
+
line: t.location_line,
|
|
370
|
+
};
|
|
371
|
+
const deps = depsClosure.get(t.project) ?? new Set();
|
|
372
|
+
const redDeps = [...deps].filter((d) => redProjects.has(d)).sort();
|
|
373
|
+
if (redDeps.length > 0) {
|
|
374
|
+
obs.verdict = 'skip';
|
|
375
|
+
obs.suppression = {
|
|
376
|
+
marker: 'dependency',
|
|
377
|
+
note: `blocked by red dependency project ${redDeps[0]}`,
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
return obs;
|
|
381
|
+
}
|
|
382
|
+
// biome-ignore lint/suspicious/noControlCharactersInRegex: ANSI escape stripping requires the ESC control char
|
|
383
|
+
const ANSI_PATTERN = /\u001b\[[0-9;]*m/g;
|
|
384
|
+
function stripAnsi(message) {
|
|
385
|
+
return message.replace(ANSI_PATTERN, '');
|
|
386
|
+
}
|
|
387
|
+
const EXCEPTION_TYPE_PATTERN = /^([A-Za-z][A-Za-z0-9]*Error|AssertionError|TimeoutError):/;
|
|
388
|
+
function extractExceptionType(strippedMessage) {
|
|
389
|
+
const m = strippedMessage.match(EXCEPTION_TYPE_PATTERN);
|
|
390
|
+
return m?.[1] ?? 'Error';
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* CE-1 failing source region text, tree-reconstructed (doc §8): prefer
|
|
394
|
+
* `error.location` (channel-provided pointer), else the innermost parsed
|
|
395
|
+
* stack frame that lands inside the test file itself. Raw `error.snippet` is
|
|
396
|
+
* never read (line-shift unstable, `stability-report.json`). Returns
|
|
397
|
+
* `undefined` — key omitted, never a guessed value — when neither a location
|
|
398
|
+
* nor an in-file frame exists (e.g. fixture teardown failures) or the source
|
|
399
|
+
* file cannot be read.
|
|
400
|
+
*/
|
|
401
|
+
function sourceRegion(t, e) {
|
|
402
|
+
let target;
|
|
403
|
+
if (e.location !== undefined) {
|
|
404
|
+
target = { file: e.location.file, line: e.location.line };
|
|
405
|
+
}
|
|
406
|
+
else {
|
|
407
|
+
const inner = e.frames.find((f) => f.file === t.file_abs);
|
|
408
|
+
if (inner !== undefined)
|
|
409
|
+
target = { file: inner.file, line: inner.line };
|
|
410
|
+
}
|
|
411
|
+
if (target === undefined)
|
|
412
|
+
return undefined;
|
|
413
|
+
try {
|
|
414
|
+
const lines = readFileSync(target.file, 'utf8').split('\n');
|
|
415
|
+
const text = lines[target.line - 1];
|
|
416
|
+
return text !== undefined ? text.trim() : undefined;
|
|
417
|
+
}
|
|
418
|
+
catch {
|
|
419
|
+
return undefined;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* CE-3 position stability: per-frame line offsets relative to the test's own
|
|
424
|
+
* declaration line, for frames inside the test module only (same rule as
|
|
425
|
+
* `../vitest/recorder.ts`'s `relOffsets`).
|
|
426
|
+
*/
|
|
427
|
+
function relOffsets(t, e) {
|
|
428
|
+
if (t.location_line === null)
|
|
429
|
+
return [];
|
|
430
|
+
return e.frames
|
|
431
|
+
.filter((f) => f.file === t.file_abs)
|
|
432
|
+
.map((f) => f.line - t.location_line);
|
|
433
|
+
}
|
|
434
|
+
function buildEvidenceError(e, t) {
|
|
435
|
+
const stripped = stripAnsi(e.message);
|
|
436
|
+
const region = sourceRegion(t, e);
|
|
437
|
+
return {
|
|
438
|
+
exception_type: extractExceptionType(stripped),
|
|
439
|
+
message: redactText(stripped),
|
|
440
|
+
rel_offsets: relOffsets(t, e),
|
|
441
|
+
...(region !== undefined ? { source_region: region } : {}),
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
function buildFinding(t, primary, priorFailing, ctx) {
|
|
445
|
+
const errors = primary.errors.map((e) => buildEvidenceError(e, t));
|
|
446
|
+
const consoleEntries = primary.stdio.map((s) => ({
|
|
447
|
+
type: s.type,
|
|
448
|
+
content: redactText(s.text),
|
|
449
|
+
}));
|
|
450
|
+
const attachments = primary.attachments;
|
|
451
|
+
const priorAttempts = [...priorFailing]
|
|
452
|
+
.sort((a, b) => a.retry - b.retry)
|
|
453
|
+
.map((a) => ({
|
|
454
|
+
retry: a.retry,
|
|
455
|
+
errors: a.errors.map((e) => buildEvidenceError(e, t)),
|
|
456
|
+
frames: a.errors.flatMap((e) => e.frames),
|
|
457
|
+
}));
|
|
458
|
+
return {
|
|
459
|
+
evidence_digest: canonicalDigest({ errors }),
|
|
460
|
+
structural_fingerprint: canonicalDigest({
|
|
461
|
+
module: relPath(ctx.worktree, t.file_abs),
|
|
462
|
+
exception_types: errors.map((e) => e.exception_type),
|
|
463
|
+
rel_offsets: errors.map((e) => e.rel_offsets),
|
|
464
|
+
source_regions: errors.map((e) => e.source_region ?? null),
|
|
465
|
+
}),
|
|
466
|
+
evidence: { errors },
|
|
467
|
+
context_digest: canonicalDigest([...consoleEntries, ...attachments]),
|
|
468
|
+
annex: redactValue({
|
|
469
|
+
frames: primary.errors.flatMap((e) => e.frames),
|
|
470
|
+
console: consoleEntries,
|
|
471
|
+
location_line: t.location_line,
|
|
472
|
+
...(priorAttempts.length > 0 ? { attempts: priorAttempts } : {}),
|
|
473
|
+
...(attachments.length > 0 ? { attachments } : {}),
|
|
474
|
+
}),
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Normalizes an absolute path into a `surface.config_sources`/test-file key:
|
|
479
|
+
* a worktree-relative POSIX-style path when the file lives inside the
|
|
480
|
+
* worktree, or `external:<abs path>` when it doesn't. Private duplicate of
|
|
481
|
+
* `../vitest/recorder.ts`'s `configSourceKey` (same convention) — the vitest
|
|
482
|
+
* module is not imported from here, and is not modified by this file.
|
|
483
|
+
*/
|
|
484
|
+
export function configSourceKey(absPath, worktree) {
|
|
485
|
+
const resolvedPath = realpath(absPath);
|
|
486
|
+
const resolvedWorktree = realpath(worktree);
|
|
487
|
+
const rel = relative(resolvedWorktree, resolvedPath);
|
|
488
|
+
if (rel.startsWith('..') || isAbsolute(rel))
|
|
489
|
+
return `external:${resolvedPath}`;
|
|
490
|
+
return rel.replaceAll('\\', '/');
|
|
491
|
+
}
|
|
492
|
+
function relPath(worktree, fileAbs) {
|
|
493
|
+
return relative(realpath(worktree), realpath(fileAbs)).replaceAll('\\', '/');
|
|
494
|
+
}
|
|
495
|
+
function realpath(path) {
|
|
496
|
+
try {
|
|
497
|
+
return realpathSync(path);
|
|
498
|
+
}
|
|
499
|
+
catch {
|
|
500
|
+
return path;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
function fileDigest(path) {
|
|
504
|
+
try {
|
|
505
|
+
return canonicalDigest(readFileSync(path, 'utf8'));
|
|
506
|
+
}
|
|
507
|
+
catch {
|
|
508
|
+
return null;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
//# sourceMappingURL=recorder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recorder.js","sourceRoot":"","sources":["../../../src/adapters/playwright/recorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,EACL,mBAAmB,GAGpB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAKL,cAAc,GAGf,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,eAAe,GAOhB,MAAM,cAAc,CAAA;AAErB,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAA;AACxC,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,CAAA;AACnD,mFAAmF;AACnF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE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