@molecule/api-ai-tools 1.17.0 → 1.17.2
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 +17 -7
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/playwright-feedback-process.d.ts +14 -0
- package/dist/playwright-feedback-process.d.ts.map +1 -0
- package/dist/playwright-feedback-process.js +189 -0
- package/dist/playwright-feedback-reporter.d.ts +1 -1
- package/dist/playwright-feedback-reporter.d.ts.map +1 -1
- package/dist/playwright-feedback-reporter.js +11 -2
- package/dist/playwright-feedback-types.d.ts +7 -3
- package/dist/playwright-feedback-types.d.ts.map +1 -1
- package/dist/playwright-feedback.d.ts +1 -0
- package/dist/playwright-feedback.d.ts.map +1 -1
- package/dist/playwright-feedback.js +99 -15
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +17 -5
- package/dist/types.d.ts +2 -2
- package/dist/utilities.d.ts +2 -0
- package/dist/utilities.d.ts.map +1 -1
- package/dist/utilities.js +24 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-11-
|
|
6
|
+
Generated: 2026-11-06T17:48:40.314Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/api-ai-tools
|
|
@@ -448,7 +448,7 @@ interface PlaywrightFeedbackFailure {
|
|
|
448
448
|
spec: string
|
|
449
449
|
line: number
|
|
450
450
|
error: string
|
|
451
|
-
/** The native runner's locator or
|
|
451
|
+
/** The native runner's locator, assertion or timed-out browser operation, apart from redaction. */
|
|
452
452
|
locator: string
|
|
453
453
|
/** Playwright's own failure-time accessibility snapshot, when recorded. */
|
|
454
454
|
rendered?: string
|
|
@@ -466,7 +466,7 @@ interface PlaywrightFeedbackResult {
|
|
|
466
466
|
spec: string
|
|
467
467
|
revision: number
|
|
468
468
|
durationMs: number
|
|
469
|
-
status: 'passed' | 'failed' | 'unavailable'
|
|
469
|
+
status: 'passed' | 'failed' | 'unavailable' | 'cancelled'
|
|
470
470
|
failures: PlaywrightFeedbackFailure[]
|
|
471
471
|
/** Native counts for this one diagnostic selection, never whole-suite proof. */
|
|
472
472
|
nativeStats?: PlaywrightReportStats
|
|
@@ -486,6 +486,8 @@ interface PlaywrightFeedbackOptions {
|
|
|
486
486
|
sources: string[],
|
|
487
487
|
revision: number,
|
|
488
488
|
emit: (result: PlaywrightFeedbackResult) => void,
|
|
489
|
+
/** Stop the owned native process group when cancelled; never wait for the tests to finish. */
|
|
490
|
+
signal: AbortSignal,
|
|
489
491
|
) => Promise<PlaywrightFeedbackResult>
|
|
490
492
|
/** Only current native failures are delivered. Passing apps receive no note. */
|
|
491
493
|
onFailures?: (result: PlaywrightFeedbackResult) => void
|
|
@@ -503,6 +505,8 @@ A nonblocking source-change subscription.
|
|
|
503
505
|
interface PlaywrightFeedback {
|
|
504
506
|
changed: (paths: readonly string[]) => void
|
|
505
507
|
takeFailures: () => PlaywrightFeedbackResult[]
|
|
508
|
+
/** Cancel speculation before foreground work. Release after that work; nested callers are safe. */
|
|
509
|
+
pause: () => Promise<() => void>
|
|
506
510
|
/** Wait only in tests or shutdown; file writes and deploys must never await this. */
|
|
507
511
|
settled: () => Promise<void>
|
|
508
512
|
close: () => Promise<void>
|
|
@@ -1455,7 +1459,7 @@ interface ToolBuildConfig {
|
|
|
1455
1459
|
/** Maximum time (ms) one `wait_for_task` call may wait, independently of the foreground {@link commandBudgetMs}. */
|
|
1456
1460
|
waitBudgetMs?: number
|
|
1457
1461
|
|
|
1458
|
-
/** Opt in to
|
|
1462
|
+
/** Opt in to partial diagnostics for new final failure causes at this known deployed URL. */
|
|
1459
1463
|
yieldOnFirstFailureFor?: (taskId: string) => string | null
|
|
1460
1464
|
|
|
1461
1465
|
/** How long (ms) exec_command waits for a command it backgrounded only because the command asked for more than {@link commandBudgetMs}, before handing back a task… */
|
|
@@ -2733,6 +2737,7 @@ function runPlaywrightFeedback(
|
|
|
2733
2737
|
timeoutMs?: number
|
|
2734
2738
|
emit?: (result: PlaywrightFeedbackResult) => void
|
|
2735
2739
|
pollMs?: number
|
|
2740
|
+
signal?: AbortSignal
|
|
2736
2741
|
},
|
|
2737
2742
|
): Promise<PlaywrightFeedbackResult>
|
|
2738
2743
|
```
|
|
@@ -4907,13 +4912,13 @@ With `finalOnly`, only a failure the run has FINISHED with counts; a pending ret
|
|
|
4907
4912
|
function logShowsInlineFailureBodies(
|
|
4908
4913
|
log: string,
|
|
4909
4914
|
excluded?: readonly string[],
|
|
4910
|
-
options?: { finalOnly?: boolean; noRetries?: boolean },
|
|
4915
|
+
options?: { finalOnly?: boolean; noRetries?: boolean; onCause?: (cause: string) => void },
|
|
4911
4916
|
): boolean
|
|
4912
4917
|
```
|
|
4913
4918
|
|
|
4914
4919
|
- `log` — A log, or the slice of one a wait reads.
|
|
4915
4920
|
- `excluded` — The test titles the request carves out, if the caller knows them.
|
|
4916
|
-
- `options` — `finalOnly` reads only a failure the run has finished with; `noRetries` says the command proves the run cannot retry (`--retries=0`), so its first failure is final.
|
|
4921
|
+
- `options` — `finalOnly` reads only a failure the run has finished with; `noRetries` says the command proves the run cannot retry (`--retries=0`), so its first failure is final. `onCause` receives each distinct normalized native error from the matching bodies.
|
|
4917
4922
|
|
|
4918
4923
|
**Returns:** True when a `✘` row's own test, outside the request's exclusions, has a failure body under it — and, with `finalOnly`, that failure is final in the log read so far.
|
|
4919
4924
|
|
|
@@ -6006,7 +6011,12 @@ Peer dependencies:
|
|
|
6006
6011
|
to batch source reads over either backend and `runPlaywrightFeedback` to run each
|
|
6007
6012
|
supplied spec through its native command. Its incremental reporter supplies exact
|
|
6008
6013
|
locator failures and the failure-time page snapshot. Healthy runs emit no note;
|
|
6009
|
-
no suite schedules no runner.
|
|
6014
|
+
no suite schedules no runner. Pass the runner's cancellation signal to
|
|
6015
|
+
`runPlaywrightFeedback` in its options and call `pause()` before foreground tools,
|
|
6016
|
+
then invoke its returned release function afterwards. Speculation yields to
|
|
6017
|
+
independent native CLI tests/builds and uses OS idle CPU/I/O priority. Its
|
|
6018
|
+
private temporary reports are not a user test result or something to poll.
|
|
6019
|
+
New writes cancel stale native work. `settled()`/`close()` are for tests and shutdown,
|
|
6010
6020
|
never a deployment barrier. Diagnoses are not whole-suite completion proof.
|
|
6011
6021
|
- **Opaque command plans:** prepare each logical step with `streamingBackgroundCommand`,
|
|
6012
6022
|
call `createCommandPlan`, and attach it to the executed wrapper with `commandWithPlan`.
|
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,12 @@
|
|
|
17
17
|
* to batch source reads over either backend and `runPlaywrightFeedback` to run each
|
|
18
18
|
* supplied spec through its native command. Its incremental reporter supplies exact
|
|
19
19
|
* locator failures and the failure-time page snapshot. Healthy runs emit no note;
|
|
20
|
-
* no suite schedules no runner.
|
|
20
|
+
* no suite schedules no runner. Pass the runner's cancellation signal to
|
|
21
|
+
* `runPlaywrightFeedback` in its options and call `pause()` before foreground tools,
|
|
22
|
+
* then invoke its returned release function afterwards. Speculation yields to
|
|
23
|
+
* independent native CLI tests/builds and uses OS idle CPU/I/O priority. Its
|
|
24
|
+
* private temporary reports are not a user test result or something to poll.
|
|
25
|
+
* New writes cancel stale native work. `settled()`/`close()` are for tests and shutdown,
|
|
21
26
|
* never a deployment barrier. Diagnoses are not whole-suite completion proof.
|
|
22
27
|
* - **Opaque command plans:** prepare each logical step with `streamingBackgroundCommand`,
|
|
23
28
|
* call `createCommandPlan`, and attach it to the executed wrapper with `commandWithPlan`.
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoKG;AAEH,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,oCAAoC,CAAA;AAClD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,cAAc,CAAA;AAC5B,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,sBAAsB,CAAA;AACpC,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,12 @@
|
|
|
17
17
|
* to batch source reads over either backend and `runPlaywrightFeedback` to run each
|
|
18
18
|
* supplied spec through its native command. Its incremental reporter supplies exact
|
|
19
19
|
* locator failures and the failure-time page snapshot. Healthy runs emit no note;
|
|
20
|
-
* no suite schedules no runner.
|
|
20
|
+
* no suite schedules no runner. Pass the runner's cancellation signal to
|
|
21
|
+
* `runPlaywrightFeedback` in its options and call `pause()` before foreground tools,
|
|
22
|
+
* then invoke its returned release function afterwards. Speculation yields to
|
|
23
|
+
* independent native CLI tests/builds and uses OS idle CPU/I/O priority. Its
|
|
24
|
+
* private temporary reports are not a user test result or something to poll.
|
|
25
|
+
* New writes cancel stale native work. `settled()`/`close()` are for tests and shutdown,
|
|
21
26
|
* never a deployment barrier. Diagnoses are not whole-suite completion proof.
|
|
22
27
|
* - **Opaque command plans:** prepare each logical step with `streamingBackgroundCommand`,
|
|
23
28
|
* call `createCommandPlan`, and attach it to the executed wrapper with `commandWithPlan`.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface FeedbackProcessOptions {
|
|
2
|
+
command: string;
|
|
3
|
+
cwd: string;
|
|
4
|
+
root: string;
|
|
5
|
+
directory: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Compose a private native supervisor without putting the test command on its argv.
|
|
9
|
+
* @param config - The known command, working directory and owned scratch directory.
|
|
10
|
+
* @returns A self-contained native Node program.
|
|
11
|
+
*/
|
|
12
|
+
export declare function feedbackProcessSource(config: FeedbackProcessOptions): string;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=playwright-feedback-process.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playwright-feedback-process.d.ts","sourceRoot":"","sources":["../src/playwright-feedback-process.ts"],"names":[],"mappings":"AASA,UAAU,sBAAsB;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;CAClB;AAkLD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,sBAAsB,GAAG,MAAM,CAE5E"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/** Serialized into either execution backend; only standard Node/OS operations run there. */
|
|
2
|
+
function feedbackProcess(loadModule, config) {
|
|
3
|
+
const fs = loadModule('node:fs');
|
|
4
|
+
const cp = loadModule('node:child_process');
|
|
5
|
+
const os = loadModule('node:os');
|
|
6
|
+
const path = loadModule('node:path');
|
|
7
|
+
const stopFile = path.join(config.directory, 'stop');
|
|
8
|
+
const yielded = path.join(config.directory, 'yielded');
|
|
9
|
+
try {
|
|
10
|
+
os.setPriority(0, 19);
|
|
11
|
+
}
|
|
12
|
+
catch (_error) {
|
|
13
|
+
/* best effort on platforms without POSIX priorities */
|
|
14
|
+
}
|
|
15
|
+
let child = undefined;
|
|
16
|
+
let done = false;
|
|
17
|
+
const owned = new Map();
|
|
18
|
+
const rememberChildren = () => {
|
|
19
|
+
if (!child?.pid || process.platform !== 'linux')
|
|
20
|
+
return;
|
|
21
|
+
const processes = new Map();
|
|
22
|
+
for (const pid of fs.readdirSync('/proc')) {
|
|
23
|
+
if (!/^\d+$/.test(pid))
|
|
24
|
+
continue;
|
|
25
|
+
try {
|
|
26
|
+
const stat = fs.readFileSync(`/proc/${pid}/stat`, 'utf8');
|
|
27
|
+
const fields = stat.slice(stat.lastIndexOf(')') + 2).split(' ');
|
|
28
|
+
processes.set(Number(pid), { parent: Number(fields[1]), ticks: fields[19] });
|
|
29
|
+
}
|
|
30
|
+
catch (_error) {
|
|
31
|
+
/* already exited */
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
for (const [pid, entry] of processes) {
|
|
35
|
+
const seen = new Set();
|
|
36
|
+
let ancestor = pid;
|
|
37
|
+
while (ancestor > 1 && !seen.has(ancestor)) {
|
|
38
|
+
const ticks = owned.get(ancestor);
|
|
39
|
+
if (ancestor === child.pid ||
|
|
40
|
+
(ticks !== undefined && ticks === processes.get(ancestor)?.ticks)) {
|
|
41
|
+
owned.set(pid, entry.ticks);
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
seen.add(ancestor);
|
|
45
|
+
ancestor = processes.get(ancestor)?.parent ?? 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const stop = (foreground = false) => {
|
|
50
|
+
if (done)
|
|
51
|
+
return;
|
|
52
|
+
done = true;
|
|
53
|
+
if (foreground)
|
|
54
|
+
fs.writeFileSync(yielded, 'foreground');
|
|
55
|
+
rememberChildren();
|
|
56
|
+
// Chromium creates a separate process group. Remember descendants before
|
|
57
|
+
// killing the launcher and verify start ticks so a reused PID is never hit.
|
|
58
|
+
for (const [pid, ticks] of [...owned].reverse()) {
|
|
59
|
+
try {
|
|
60
|
+
const stat = fs.readFileSync(`/proc/${pid}/stat`, 'utf8');
|
|
61
|
+
if (stat.slice(stat.lastIndexOf(')') + 2).split(' ')[19] === ticks)
|
|
62
|
+
process.kill(pid, 'SIGKILL');
|
|
63
|
+
}
|
|
64
|
+
catch (_error) {
|
|
65
|
+
/* already exited */
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
// This process created the detached group. Never signal by command/name.
|
|
69
|
+
if (child?.pid) {
|
|
70
|
+
try {
|
|
71
|
+
process.kill(-child.pid, 'SIGKILL');
|
|
72
|
+
}
|
|
73
|
+
catch (_error) {
|
|
74
|
+
/* already exited */
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const ancestors = new Set();
|
|
79
|
+
let parent = process.pid;
|
|
80
|
+
while (parent > 1 && !ancestors.has(parent)) {
|
|
81
|
+
ancestors.add(parent);
|
|
82
|
+
try {
|
|
83
|
+
const stat = fs.readFileSync(`/proc/${parent}/stat`, 'utf8');
|
|
84
|
+
parent = Number(stat.slice(stat.lastIndexOf(')') + 2).split(' ')[1]);
|
|
85
|
+
}
|
|
86
|
+
catch (_error) {
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// CLI agents can launch native tests without using our backend. /proc supplies
|
|
91
|
+
// process identity and cwd, so they need no hook, lock or instruction to yield.
|
|
92
|
+
// The host adapter cancels before its own tools; this catches independent CLI work.
|
|
93
|
+
const foreground = () => {
|
|
94
|
+
if (process.platform !== 'linux')
|
|
95
|
+
return false;
|
|
96
|
+
const project = fs.statSync(config.root);
|
|
97
|
+
for (const pid of fs.readdirSync('/proc')) {
|
|
98
|
+
if (!/^\d+$/.test(pid) || ancestors.has(Number(pid)))
|
|
99
|
+
continue;
|
|
100
|
+
try {
|
|
101
|
+
const stat = fs.readFileSync(`/proc/${pid}/stat`, 'utf8');
|
|
102
|
+
const fields = stat.slice(stat.lastIndexOf(')') + 2).split(' ');
|
|
103
|
+
if (fields[0] === 'Z' ||
|
|
104
|
+
Number(fields[2]) === child?.pid ||
|
|
105
|
+
owned.get(Number(pid)) === fields[19])
|
|
106
|
+
continue;
|
|
107
|
+
const cwd = fs.readlinkSync(`/proc/${pid}/cwd`);
|
|
108
|
+
if (cwd !== config.root && !cwd.startsWith(config.root + path.sep))
|
|
109
|
+
continue;
|
|
110
|
+
// Separate mount namespaces can both call their project /workspace.
|
|
111
|
+
const other = fs.statSync(`/proc/${pid}/root${config.root}`);
|
|
112
|
+
if (other.dev !== project.dev || other.ino !== project.ino)
|
|
113
|
+
continue;
|
|
114
|
+
const argv = fs.readFileSync(`/proc/${pid}/cmdline`, 'utf8').split('\0').filter(Boolean);
|
|
115
|
+
const executable = path.basename(argv[0] || '');
|
|
116
|
+
// npm replaces argv with its process title before it starts the script.
|
|
117
|
+
if (/^(?:npm|npx|pnpm|yarn|bun)(?: run)? (?:test(?::[\w-]+)?|build|deploy|check|typecheck)(?: |$)/.test(executable))
|
|
118
|
+
return true;
|
|
119
|
+
const native = argv
|
|
120
|
+
.slice(0, 3)
|
|
121
|
+
.some((a) => /(?:^|\/)(?:@playwright\/test|playwright(?:-core)?|hurl)(?:\/|$)/.test(a));
|
|
122
|
+
if (native || /^(?:hurl|playwright|fly|flyctl|vercel|netlify)$/.test(executable))
|
|
123
|
+
return true;
|
|
124
|
+
if (argv.slice(1, 4).some((a) => a === 'deploy' || a === 'build'))
|
|
125
|
+
return true;
|
|
126
|
+
if (/^(?:npm|npx|pnpm|yarn|bun|corepack)(?:\.c?js)?$/.test(executable) ||
|
|
127
|
+
argv.some((a) => /\/(?:npm|npx)-cli\.js$/.test(a))) {
|
|
128
|
+
if (argv.some((a) => /^(?:test(?::[\w-]+)?|e2e|build|deploy|check|typecheck)$/.test(a)))
|
|
129
|
+
return true;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
catch (_error) {
|
|
133
|
+
/* processes can exit between reads */
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return false;
|
|
137
|
+
};
|
|
138
|
+
if (fs.existsSync(stopFile) || foreground()) {
|
|
139
|
+
fs.writeFileSync(yielded, 'foreground');
|
|
140
|
+
process.exitCode = 125;
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
// OS idle CPU and I/O scheduling are inherited by the runner and Chromium.
|
|
144
|
+
// Fall back to nice(19) where chrt/ionice are unavailable.
|
|
145
|
+
const lowPriority = 'if command -v ionice >/dev/null 2>&1; then ionice -c 3 -p $$ 2>/dev/null; fi; if command -v chrt >/dev/null 2>&1; then chrt --idle --pid 0 $$ 2>/dev/null; fi; exec sh -c "$1"';
|
|
146
|
+
child = cp.spawn('sh', ['-c', lowPriority, 'feedback', config.command], {
|
|
147
|
+
cwd: config.cwd,
|
|
148
|
+
detached: true,
|
|
149
|
+
stdio: 'inherit',
|
|
150
|
+
});
|
|
151
|
+
const watch = fs.watch(config.directory, () => {
|
|
152
|
+
if (fs.existsSync(stopFile))
|
|
153
|
+
stop();
|
|
154
|
+
});
|
|
155
|
+
const poll = setInterval(() => {
|
|
156
|
+
rememberChildren();
|
|
157
|
+
if (foreground())
|
|
158
|
+
stop(true);
|
|
159
|
+
}, 100);
|
|
160
|
+
const terminate = () => stop();
|
|
161
|
+
process.on('SIGINT', terminate);
|
|
162
|
+
process.on('SIGTERM', terminate);
|
|
163
|
+
process.on('exit', terminate);
|
|
164
|
+
child.on('error', () => {
|
|
165
|
+
stop();
|
|
166
|
+
finish(1);
|
|
167
|
+
});
|
|
168
|
+
const finish = (code) => {
|
|
169
|
+
stop();
|
|
170
|
+
watch.close();
|
|
171
|
+
clearInterval(poll);
|
|
172
|
+
process.off('SIGINT', terminate);
|
|
173
|
+
process.off('SIGTERM', terminate);
|
|
174
|
+
process.off('exit', terminate);
|
|
175
|
+
process.exitCode = code;
|
|
176
|
+
};
|
|
177
|
+
child.on('close', (code) => finish(done ? 125 : (code ?? 1)));
|
|
178
|
+
// An abort can arrive between the first check and installing fs.watch.
|
|
179
|
+
if (fs.existsSync(stopFile))
|
|
180
|
+
stop();
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Compose a private native supervisor without putting the test command on its argv.
|
|
184
|
+
* @param config - The known command, working directory and owned scratch directory.
|
|
185
|
+
* @returns A self-contained native Node program.
|
|
186
|
+
*/
|
|
187
|
+
export function feedbackProcessSource(config) {
|
|
188
|
+
return `(${feedbackProcess.toString()})(require,${JSON.stringify(config)});\n`;
|
|
189
|
+
}
|
|
@@ -10,7 +10,7 @@ export declare function feedbackReporterSource(): string;
|
|
|
10
10
|
* Read native failure events; incomplete final lines wait for the next read.
|
|
11
11
|
* @param text - Reporter JSONL, not runner-log inference.
|
|
12
12
|
* @param sourceFiles - Triggering source files from the scheduler.
|
|
13
|
-
* @returns
|
|
13
|
+
* @returns Native locator/assertion failures and timed-out browser operations, redacted and bounded.
|
|
14
14
|
*/
|
|
15
15
|
export declare function nativeFeedbackFailures(text: string, sourceFiles: string[]): PlaywrightFeedbackFailure[];
|
|
16
16
|
//# sourceMappingURL=playwright-feedback-reporter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playwright-feedback-reporter.d.ts","sourceRoot":"","sources":["../src/playwright-feedback-reporter.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAG/E;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAyB/C;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EAAE,GACpB,yBAAyB,EAAE,
|
|
1
|
+
{"version":3,"file":"playwright-feedback-reporter.d.ts","sourceRoot":"","sources":["../src/playwright-feedback-reporter.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAG/E;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAyB/C;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EAAE,GACpB,yBAAyB,EAAE,CAiD7B"}
|
|
@@ -41,7 +41,7 @@ module.exports = class FeedbackReporter {
|
|
|
41
41
|
* Read native failure events; incomplete final lines wait for the next read.
|
|
42
42
|
* @param text - Reporter JSONL, not runner-log inference.
|
|
43
43
|
* @param sourceFiles - Triggering source files from the scheduler.
|
|
44
|
-
* @returns
|
|
44
|
+
* @returns Native locator/assertion failures and timed-out browser operations, redacted and bounded.
|
|
45
45
|
*/
|
|
46
46
|
export function nativeFeedbackFailures(text, sourceFiles) {
|
|
47
47
|
const out = [];
|
|
@@ -57,7 +57,16 @@ export function nativeFeedbackFailures(text, sourceFiles) {
|
|
|
57
57
|
const error = redactSecrets(stripVTControlCharacters(event.error).slice(0, 6_000));
|
|
58
58
|
const locator = /(?:Locator:\s*|waiting for )(locator\([^\n]+|getBy[^\n]+)/.exec(error)?.[1] ??
|
|
59
59
|
/strict mode violation: ([^\n]+)/.exec(error)?.[1] ??
|
|
60
|
-
/(?:^|\n)((?:Error: )?expect\([^\n]+|AssertionError:[^\n]+)/.exec(error)?.[1]
|
|
60
|
+
/(?:^|\n)((?:Error: )?expect\([^\n]+|AssertionError:[^\n]+)/.exec(error)?.[1] ??
|
|
61
|
+
// Navigation waits can expire before the overall test budget. They have no
|
|
62
|
+
// locator, but still carry the native operation, test line and page snapshot.
|
|
63
|
+
/(?:^|\n)TimeoutError: ((?:page|locator)\.[\w.]+): Timeout \d+ms exceeded\./.exec(error)?.[1] ??
|
|
64
|
+
// A UI loop can exhaust the test budget between actions. Playwright then names
|
|
65
|
+
// page.waitForTimeout/locator.count rather than a locator. That is still the
|
|
66
|
+
// supplied test's real failure, with its native location and page snapshot.
|
|
67
|
+
(/Test timeout of \d+ms exceeded\./.test(error)
|
|
68
|
+
? /(?:^|\n)Error: ((?:page|locator)\.[\w.]+):/.exec(error)?.[1]
|
|
69
|
+
: undefined);
|
|
61
70
|
if (!locator)
|
|
62
71
|
continue;
|
|
63
72
|
out.push({
|
|
@@ -26,7 +26,7 @@ export interface PlaywrightFeedbackFailure {
|
|
|
26
26
|
spec: string;
|
|
27
27
|
line: number;
|
|
28
28
|
error: string;
|
|
29
|
-
/** The native runner's locator or
|
|
29
|
+
/** The native runner's locator, assertion or timed-out browser operation, apart from redaction. */
|
|
30
30
|
locator: string;
|
|
31
31
|
/** Playwright's own failure-time accessibility snapshot, when recorded. */
|
|
32
32
|
rendered?: string;
|
|
@@ -38,7 +38,7 @@ export interface PlaywrightFeedbackResult {
|
|
|
38
38
|
spec: string;
|
|
39
39
|
revision: number;
|
|
40
40
|
durationMs: number;
|
|
41
|
-
status: 'passed' | 'failed' | 'unavailable';
|
|
41
|
+
status: 'passed' | 'failed' | 'unavailable' | 'cancelled';
|
|
42
42
|
failures: PlaywrightFeedbackFailure[];
|
|
43
43
|
/** Native counts for this one diagnostic selection, never whole-suite proof. */
|
|
44
44
|
nativeStats?: PlaywrightReportStats;
|
|
@@ -47,7 +47,9 @@ export interface PlaywrightFeedbackResult {
|
|
|
47
47
|
/** Host operations for the same scheduler in a CLI process or a remote sandbox. */
|
|
48
48
|
export interface PlaywrightFeedbackOptions {
|
|
49
49
|
load: () => Promise<FeedbackProject>;
|
|
50
|
-
run: (spec: FeedbackSpec, sources: string[], revision: number, emit: (result: PlaywrightFeedbackResult) => void
|
|
50
|
+
run: (spec: FeedbackSpec, sources: string[], revision: number, emit: (result: PlaywrightFeedbackResult) => void,
|
|
51
|
+
/** Stop the owned native process group when cancelled; never wait for the tests to finish. */
|
|
52
|
+
signal: AbortSignal) => Promise<PlaywrightFeedbackResult>;
|
|
51
53
|
/** Only current native failures are delivered. Passing apps receive no note. */
|
|
52
54
|
onFailures?: (result: PlaywrightFeedbackResult) => void;
|
|
53
55
|
/** Operational state is separate from defect feedback. */
|
|
@@ -58,6 +60,8 @@ export interface PlaywrightFeedbackOptions {
|
|
|
58
60
|
export interface PlaywrightFeedback {
|
|
59
61
|
changed: (paths: readonly string[]) => void;
|
|
60
62
|
takeFailures: () => PlaywrightFeedbackResult[];
|
|
63
|
+
/** Cancel speculation before foreground work. Release after that work; nested callers are safe. */
|
|
64
|
+
pause: () => Promise<() => void>;
|
|
61
65
|
/** Wait only in tests or shutdown; file writes and deploys must never await this. */
|
|
62
66
|
settled: () => Promise<void>;
|
|
63
67
|
close: () => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playwright-feedback-types.d.ts","sourceRoot":"","sources":["../src/playwright-feedback-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAEnE,oEAAoE;AACpE,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,yFAAyF;AACzF,MAAM,WAAW,YAAa,SAAQ,cAAc;IAClD,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,kGAAkG;AAClG,MAAM,WAAW,eAAe;IAC9B,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,KAAK,EAAE,YAAY,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IACrC,gFAAgF;IAChF,WAAW,CAAC,EAAE,qBAAqB,CAAA;IACnC,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,mFAAmF;AACnF,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAA;IACpC,GAAG,EAAE,CACH,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,MAAM,EAAE,EACjB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,CAAC,MAAM,EAAE,wBAAwB,KAAK,IAAI;IAChD,8FAA8F;IAC9F,MAAM,EAAE,WAAW,KAChB,OAAO,CAAC,wBAAwB,CAAC,CAAA;IACtC,gFAAgF;IAChF,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,wBAAwB,KAAK,IAAI,CAAA;IACvD,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,wBAAwB,KAAK,IAAI,CAAA;IACrD,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,gDAAgD;AAChD,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,CAAA;IAC3C,YAAY,EAAE,MAAM,wBAAwB,EAAE,CAAA;IAC9C,mGAAmG;IACnG,KAAK,EAAE,MAAM,OAAO,CAAC,MAAM,IAAI,CAAC,CAAA;IAChC,qFAAqF;IACrF,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC3B"}
|
|
@@ -38,5 +38,6 @@ export declare function runPlaywrightFeedback(backend: ExecutionBackend, spec: F
|
|
|
38
38
|
timeoutMs?: number;
|
|
39
39
|
emit?: (result: PlaywrightFeedbackResult) => void;
|
|
40
40
|
pollMs?: number;
|
|
41
|
+
signal?: AbortSignal;
|
|
41
42
|
}): Promise<PlaywrightFeedbackResult>;
|
|
42
43
|
//# sourceMappingURL=playwright-feedback.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playwright-feedback.d.ts","sourceRoot":"","sources":["../src/playwright-feedback.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"playwright-feedback.d.ts","sourceRoot":"","sources":["../src/playwright-feedback.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAEV,cAAc,EACd,YAAY,EACZ,kBAAkB,EAElB,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,gCAAgC,CAAA;AAEvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAGlD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhE;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,yBAAyB,GAAG,kBAAkB,CA2I/F;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,gBAAgB,EACzB,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,UAAU,EAAE,SAAS,MAAM,EAAE,GAC5B,OAAO,CAAC,cAAc,EAAE,CAAC,CAkB3B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,YAAY,EAClB,WAAW,EAAE,MAAM,EAAE,EACrB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE;IACP,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,MAAM,CAAA;IACpC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,wBAAwB,KAAK,IAAI,CAAA;IACjD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB,GACA,OAAO,CAAC,wBAAwB,CAAC,CA+KnC"}
|
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
10
|
import { randomUUID } from 'node:crypto';
|
|
11
|
+
import { tmpdir } from 'node:os';
|
|
11
12
|
import { posix } from 'node:path';
|
|
13
|
+
import { feedbackProcessSource } from './playwright-feedback-process.js';
|
|
12
14
|
import { feedbackReporterSource, nativeFeedbackFailures } from './playwright-feedback-reporter.js';
|
|
13
15
|
import { selectFeedbackSpecs } from './playwright-feedback-selection.js';
|
|
14
16
|
import { summarizePlaywrightReport } from './playwright-report.js';
|
|
@@ -28,15 +30,22 @@ export function isPlaywrightFeedbackSource(path) {
|
|
|
28
30
|
*/
|
|
29
31
|
export function createPlaywrightFeedback(options) {
|
|
30
32
|
let revision = 0, timer, active;
|
|
33
|
+
let running;
|
|
34
|
+
let cancellation;
|
|
35
|
+
let paused = 0;
|
|
31
36
|
let stopped = false;
|
|
32
37
|
const changed = new Set(), waiting = [];
|
|
33
38
|
const delivered = new Map();
|
|
34
39
|
const failing = new Set();
|
|
35
40
|
const start = () => {
|
|
36
|
-
if (active || stopped || changed.size === 0)
|
|
41
|
+
if (active || stopped || paused || changed.size === 0)
|
|
37
42
|
return;
|
|
38
43
|
const version = revision, paths = [...changed];
|
|
39
44
|
changed.clear();
|
|
45
|
+
const abort = new AbortController();
|
|
46
|
+
cancellation = abort;
|
|
47
|
+
let yielded = false;
|
|
48
|
+
const current = () => !stopped && !abort.signal.aborted && version === revision;
|
|
40
49
|
active = (async () => {
|
|
41
50
|
let project;
|
|
42
51
|
try {
|
|
@@ -45,16 +54,16 @@ export function createPlaywrightFeedback(options) {
|
|
|
45
54
|
catch (_error) {
|
|
46
55
|
return;
|
|
47
56
|
}
|
|
48
|
-
if (
|
|
57
|
+
if (!current())
|
|
49
58
|
return;
|
|
50
59
|
const sourcePaths = project.root ? paths.map((p) => posix.resolve(project.root, p)) : paths;
|
|
51
60
|
// The native failures already name the files to rerun first after an edit.
|
|
52
61
|
const selected = selectFeedbackSpecs(project, sourcePaths).sort((a, b) => Number(failing.has(b.spec.path)) - Number(failing.has(a.spec.path)));
|
|
53
62
|
for (const { spec, sourceFiles } of selected) {
|
|
54
|
-
if (
|
|
63
|
+
if (!current())
|
|
55
64
|
break;
|
|
56
65
|
const emit = (result) => {
|
|
57
|
-
if (
|
|
66
|
+
if (!current() || result.status !== 'failed')
|
|
58
67
|
return;
|
|
59
68
|
failing.add(spec.path);
|
|
60
69
|
const identities = delivered.get(spec.path) ?? new Set();
|
|
@@ -74,13 +83,23 @@ export function createPlaywrightFeedback(options) {
|
|
|
74
83
|
};
|
|
75
84
|
let result;
|
|
76
85
|
try {
|
|
77
|
-
|
|
86
|
+
running = options.run(spec, sourceFiles, version, emit, abort.signal);
|
|
87
|
+
result = await running;
|
|
78
88
|
}
|
|
79
89
|
catch (_error) {
|
|
80
90
|
continue;
|
|
91
|
+
}
|
|
92
|
+
finally {
|
|
93
|
+
running = undefined;
|
|
81
94
|
} // runner availability is not a markup defect
|
|
82
|
-
if (
|
|
95
|
+
if (!current())
|
|
96
|
+
break;
|
|
97
|
+
if (result.status === 'cancelled') {
|
|
98
|
+
yielded = true;
|
|
99
|
+
for (const path of paths)
|
|
100
|
+
changed.add(path);
|
|
83
101
|
break;
|
|
102
|
+
}
|
|
84
103
|
options.onResult?.(result);
|
|
85
104
|
if (result.status === 'passed')
|
|
86
105
|
failing.delete(spec.path);
|
|
@@ -90,21 +109,25 @@ export function createPlaywrightFeedback(options) {
|
|
|
90
109
|
}
|
|
91
110
|
})().finally(() => {
|
|
92
111
|
active = undefined;
|
|
93
|
-
|
|
94
|
-
|
|
112
|
+
cancellation = undefined;
|
|
113
|
+
if (abort.signal.aborted && !stopped)
|
|
114
|
+
for (const path of paths)
|
|
115
|
+
changed.add(path);
|
|
116
|
+
if (!stopped && !paused && changed.size && !timer)
|
|
117
|
+
schedule(yielded ? 1000 : undefined);
|
|
95
118
|
});
|
|
96
119
|
};
|
|
97
|
-
const schedule = () => {
|
|
120
|
+
const schedule = (delay = options.debounceMs ?? 250) => {
|
|
98
121
|
if (timer)
|
|
99
122
|
clearTimeout(timer);
|
|
100
123
|
timer = setTimeout(() => {
|
|
101
124
|
timer = undefined;
|
|
102
125
|
start();
|
|
103
|
-
},
|
|
126
|
+
}, delay);
|
|
104
127
|
timer.unref?.();
|
|
105
128
|
};
|
|
106
129
|
const settled = async () => {
|
|
107
|
-
while (timer || active || (!stopped && changed.size)) {
|
|
130
|
+
while (timer || active || (!stopped && !paused && changed.size)) {
|
|
108
131
|
if (timer) {
|
|
109
132
|
clearTimeout(timer);
|
|
110
133
|
timer = undefined;
|
|
@@ -112,7 +135,7 @@ export function createPlaywrightFeedback(options) {
|
|
|
112
135
|
}
|
|
113
136
|
if (active)
|
|
114
137
|
await active;
|
|
115
|
-
else if (!stopped && changed.size)
|
|
138
|
+
else if (!stopped && !paused && changed.size)
|
|
116
139
|
start();
|
|
117
140
|
}
|
|
118
141
|
};
|
|
@@ -127,14 +150,35 @@ export function createPlaywrightFeedback(options) {
|
|
|
127
150
|
// A queued diagnosis can be invalidated before its host delivers it. A
|
|
128
151
|
// new revision must be allowed to report the same still-failing locator.
|
|
129
152
|
delivered.clear();
|
|
130
|
-
|
|
153
|
+
cancellation?.abort();
|
|
154
|
+
if (!paused)
|
|
155
|
+
schedule();
|
|
131
156
|
},
|
|
132
157
|
takeFailures() {
|
|
133
158
|
return waiting.splice(0).filter((r) => r.revision === revision);
|
|
134
159
|
},
|
|
160
|
+
async pause() {
|
|
161
|
+
paused++;
|
|
162
|
+
if (timer)
|
|
163
|
+
clearTimeout(timer);
|
|
164
|
+
timer = undefined;
|
|
165
|
+
cancellation?.abort();
|
|
166
|
+
// Loading metadata is not native work and must not become a foreground barrier.
|
|
167
|
+
await running?.catch(() => undefined);
|
|
168
|
+
let released = false;
|
|
169
|
+
return () => {
|
|
170
|
+
if (released)
|
|
171
|
+
return;
|
|
172
|
+
released = true;
|
|
173
|
+
paused--;
|
|
174
|
+
if (!paused && !stopped && changed.size)
|
|
175
|
+
schedule();
|
|
176
|
+
};
|
|
177
|
+
},
|
|
135
178
|
settled,
|
|
136
179
|
async close() {
|
|
137
180
|
stopped = true;
|
|
181
|
+
cancellation?.abort();
|
|
138
182
|
if (timer)
|
|
139
183
|
clearTimeout(timer);
|
|
140
184
|
timer = undefined;
|
|
@@ -185,7 +229,8 @@ for(const f of ${JSON.stringify([...sourceRoots, ...suiteFiles])})read(f);proces
|
|
|
185
229
|
*/
|
|
186
230
|
export async function runPlaywrightFeedback(backend, spec, sourceFiles, revision, options) {
|
|
187
231
|
const started = Date.now();
|
|
188
|
-
const dir = posix.join(options.scratchRoot ??
|
|
232
|
+
const dir = posix.join(options.scratchRoot ??
|
|
233
|
+
posix.join(backend.hostFs ? tmpdir() : '/tmp', 'molecule-playwright-feedback'), randomUUID());
|
|
189
234
|
const reportPath = posix.join(dir, 'report.json');
|
|
190
235
|
const reporterPath = posix.join(dir, 'feedback-reporter.cjs');
|
|
191
236
|
const eventsPath = posix.join(dir, 'failures.jsonl');
|
|
@@ -206,7 +251,16 @@ export async function runPlaywrightFeedback(backend, spec, sourceFiles, revision
|
|
|
206
251
|
]);
|
|
207
252
|
// The standard OS priority keeps background diagnosis behind the dev server
|
|
208
253
|
// and builds when they share one CPU. Playwright owns its global deadline.
|
|
209
|
-
const command = `export PLAYWRIGHT_JSON_OUTPUT_FILE=${shellQuote(reportPath)} MOL_TEST_FEEDBACK_EVENTS=${shellQuote(eventsPath)};
|
|
254
|
+
const command = `export MOL_TEST_INTERNAL=1 PLAYWRIGHT_JSON_OUTPUT_FILE=${shellQuote(reportPath)} MOL_TEST_FEEDBACK_EVENTS=${shellQuote(eventsPath)}; node ${shellQuote(posix.join(dir, 'run.cjs'))}`;
|
|
255
|
+
let cancelling;
|
|
256
|
+
const cancel = () => {
|
|
257
|
+
cancelling ??= backend.writeFile(posix.join(dir, 'stop'), '').catch(() => undefined);
|
|
258
|
+
};
|
|
259
|
+
const cancelled = () => ({
|
|
260
|
+
...base,
|
|
261
|
+
status: 'cancelled',
|
|
262
|
+
durationMs: Date.now() - started,
|
|
263
|
+
});
|
|
210
264
|
let poll, reading, done = false;
|
|
211
265
|
const emitted = new Set();
|
|
212
266
|
const nativeFailures = new Map();
|
|
@@ -219,6 +273,8 @@ export async function runPlaywrightFeedback(backend, spec, sourceFiles, revision
|
|
|
219
273
|
if (emitted.has(identity))
|
|
220
274
|
continue;
|
|
221
275
|
emitted.add(identity);
|
|
276
|
+
if (options.signal?.aborted)
|
|
277
|
+
continue;
|
|
222
278
|
options.emit?.({
|
|
223
279
|
...base,
|
|
224
280
|
failures: [failure],
|
|
@@ -242,7 +298,23 @@ export async function runPlaywrightFeedback(backend, spec, sourceFiles, revision
|
|
|
242
298
|
});
|
|
243
299
|
};
|
|
244
300
|
try {
|
|
301
|
+
if (options.signal?.aborted)
|
|
302
|
+
return cancelled();
|
|
303
|
+
await backend.run(`node -e ${shellQuote(`require('node:fs').mkdirSync(${JSON.stringify(dir)},{recursive:true,mode:0o700})`)}`, { timeout: 5_000 });
|
|
245
304
|
await backend.writeFile(reporterPath, feedbackReporterSource());
|
|
305
|
+
await backend.writeFile(posix.join(dir, 'run.cjs'), feedbackProcessSource({
|
|
306
|
+
command: native,
|
|
307
|
+
cwd: spec.cwd,
|
|
308
|
+
root: backend.projectRoot,
|
|
309
|
+
directory: dir,
|
|
310
|
+
}));
|
|
311
|
+
options.signal?.addEventListener('abort', cancel, { once: true });
|
|
312
|
+
if (options.signal?.aborted)
|
|
313
|
+
cancel();
|
|
314
|
+
if (cancelling) {
|
|
315
|
+
await cancelling;
|
|
316
|
+
return cancelled();
|
|
317
|
+
}
|
|
246
318
|
if (options.emit)
|
|
247
319
|
tick();
|
|
248
320
|
const result = await backend.run(command, {
|
|
@@ -250,6 +322,15 @@ export async function runPlaywrightFeedback(backend, spec, sourceFiles, revision
|
|
|
250
322
|
timeout: timeout + 10_000,
|
|
251
323
|
budgetMs: timeout + 5_000,
|
|
252
324
|
});
|
|
325
|
+
if (options.signal?.aborted)
|
|
326
|
+
return cancelled();
|
|
327
|
+
try {
|
|
328
|
+
if ((await backend.readFile(posix.join(dir, 'yielded'))) === 'foreground')
|
|
329
|
+
return cancelled();
|
|
330
|
+
}
|
|
331
|
+
catch (_error1) {
|
|
332
|
+
/* the native run was not preempted */
|
|
333
|
+
}
|
|
253
334
|
done = true;
|
|
254
335
|
if (poll)
|
|
255
336
|
clearTimeout(poll);
|
|
@@ -306,6 +387,9 @@ export async function runPlaywrightFeedback(backend, spec, sourceFiles, revision
|
|
|
306
387
|
}
|
|
307
388
|
finally {
|
|
308
389
|
done = true;
|
|
390
|
+
options.signal?.removeEventListener('abort', cancel);
|
|
391
|
+
if (cancelling)
|
|
392
|
+
await cancelling;
|
|
309
393
|
if (poll)
|
|
310
394
|
clearTimeout(poll);
|
|
311
395
|
if (reading)
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AA4B9C,OAAO,EAIL,KAAK,mBAAmB,EAEzB,MAAM,wBAAwB,CAAA;AAsC/B;;;;;;;;;;GAUG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,KAAK,CAAC,EACnD,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GACjC,OAAO,CAAC,mBAAmB,CAAC,CAmB9B;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AA4B9C,OAAO,EAIL,KAAK,mBAAmB,EAEzB,MAA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SAAS,CAAC,GACxE,qBAAqB,CAkBvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAiCxB;AA2GD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,eAAe,GAAG,MAAM,EAAE,CAmvGxF"}
|
package/dist/tools.js
CHANGED
|
@@ -3686,6 +3686,7 @@ export function buildTools(backend, config) {
|
|
|
3686
3686
|
midRunLeadNoted.delete(taskId);
|
|
3687
3687
|
inlineFailuresByTask.delete(taskId);
|
|
3688
3688
|
midRunNote = null;
|
|
3689
|
+
taskRecord?.diagnosticCauses?.clear();
|
|
3689
3690
|
}
|
|
3690
3691
|
diagnosticStepByTask.set(taskId, stepIdentity);
|
|
3691
3692
|
started =
|
|
@@ -3742,12 +3743,19 @@ export function buildTools(backend, config) {
|
|
|
3742
3743
|
}),
|
|
3743
3744
|
};
|
|
3744
3745
|
}
|
|
3746
|
+
const finalCauses = [];
|
|
3747
|
+
if (yieldDiagnostic)
|
|
3748
|
+
logShowsInlineFailureBodies(causeLog, excludedTestTitles?.() ?? [], {
|
|
3749
|
+
finalOnly: true,
|
|
3750
|
+
noRetries: namesNoRetries(step.command),
|
|
3751
|
+
onCause: (cause) => finalCauses.push(cause),
|
|
3752
|
+
});
|
|
3745
3753
|
if (yieldDiagnostic &&
|
|
3746
3754
|
taskRecord &&
|
|
3747
|
-
!taskRecord
|
|
3755
|
+
finalCauses.some((cause) => !taskRecord?.diagnosticCauses?.has(cause)) &&
|
|
3748
3756
|
// A failure the request excludes by name is not a diagnostic to hand back — the same
|
|
3749
3757
|
// matcher the finished run's causes note drops it with, so the wait keeps running and
|
|
3750
|
-
//
|
|
3758
|
+
// a diagnostic stays available for a failure that counts (xr-molecule-flash-h13).
|
|
3751
3759
|
// Only a failure the run has FINISHED with is a diagnostic: a first attempt whose retry
|
|
3752
3760
|
// has not printed yet may still pass, and handing it back sent the builder to fix a test
|
|
3753
3761
|
// the retry absorbed while the deployed proof went green — the edit voided that proof
|
|
@@ -3762,10 +3770,13 @@ export function buildTools(backend, config) {
|
|
|
3762
3770
|
exitCode = await readExit();
|
|
3763
3771
|
if (exitCode !== null)
|
|
3764
3772
|
break;
|
|
3765
|
-
// Another wait can
|
|
3766
|
-
|
|
3773
|
+
// Another wait can deliver a cause while this sandbox read is pending.
|
|
3774
|
+
const seen = (taskRecord.diagnosticCauses ??= new Set());
|
|
3775
|
+
const fresh = finalCauses.filter((cause) => !seen.has(cause));
|
|
3776
|
+
if (fresh.length === 0)
|
|
3767
3777
|
continue;
|
|
3768
|
-
|
|
3778
|
+
for (const cause of fresh)
|
|
3779
|
+
seen.add(cause);
|
|
3769
3780
|
const earlyMs = Date.now() - startedAt;
|
|
3770
3781
|
waitedByTask.set(taskId, waitedBefore + earlyMs);
|
|
3771
3782
|
return {
|
|
@@ -3773,6 +3784,7 @@ export function buildTools(backend, config) {
|
|
|
3773
3784
|
status: 'running',
|
|
3774
3785
|
waitedMs: earlyMs,
|
|
3775
3786
|
outputSoFar: sanitizeOutput(truncateMiddle(causeLog, MAX_OUTPUT_SIZE)),
|
|
3787
|
+
newFailureCauses: fresh.map((cause) => sanitizeOutput(cause)),
|
|
3776
3788
|
// This yield fires only on a FINAL failure (the `finalOnly` read above), so the
|
|
3777
3789
|
// deployed run it belongs to can no longer pass and a local edit cannot void a green
|
|
3778
3790
|
// proof. The note therefore spends its words on what to do with that: start the fix
|
package/dist/types.d.ts
CHANGED
|
@@ -172,8 +172,8 @@ export interface ToolBuildConfig {
|
|
|
172
172
|
*/
|
|
173
173
|
waitBudgetMs?: number;
|
|
174
174
|
/**
|
|
175
|
-
* Opt in to
|
|
176
|
-
* Return null when the task
|
|
175
|
+
* Opt in to partial diagnostics for new final failure causes at this known deployed URL.
|
|
176
|
+
* Return null when the task has completed or its history is unknown. Repeated causes are silent.
|
|
177
177
|
* Only a real suite command with a complete inline failure report can yield; it remains
|
|
178
178
|
* running, with no exit code or completed proof. Absent leaves ordinary waits unchanged.
|
|
179
179
|
*/
|
package/dist/utilities.d.ts
CHANGED
|
@@ -1105,12 +1105,14 @@ export declare function repeatingFailure(log: string): RepeatingFailure | null;
|
|
|
1105
1105
|
* @param excluded - The test titles the request carves out, if the caller knows them.
|
|
1106
1106
|
* @param options - `finalOnly` reads only a failure the run has finished with; `noRetries` says
|
|
1107
1107
|
* the command proves the run cannot retry (`--retries=0`), so its first failure is final.
|
|
1108
|
+
* `onCause` receives each distinct normalized native error from the matching bodies.
|
|
1108
1109
|
* @returns True when a `✘` row's own test, outside the request's exclusions, has a failure body
|
|
1109
1110
|
* under it — and, with `finalOnly`, that failure is final in the log read so far.
|
|
1110
1111
|
*/
|
|
1111
1112
|
export declare function logShowsInlineFailureBodies(log: string, excluded?: readonly string[], options?: {
|
|
1112
1113
|
finalOnly?: boolean;
|
|
1113
1114
|
noRetries?: boolean;
|
|
1115
|
+
onCause?: (cause: string) => void;
|
|
1114
1116
|
}): boolean;
|
|
1115
1117
|
/** How many of a repeating cause's failures the note lists before it says "and N more". */
|
|
1116
1118
|
export declare const REPEATING_FAILURE_LISTED = 5;
|
package/dist/utilities.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../src/utilities.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAcH,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAG3E,OAAO,EACL,KAAK,mBAAmB,EAIxB,KAAK,aAAa,EAMnB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAS5C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAA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,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,GAChB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAgBvC"}
|
package/dist/utilities.js
CHANGED
|
@@ -2821,8 +2821,13 @@ function failedTests(log) {
|
|
|
2821
2821
|
* @returns The error line, or null when the block has no body.
|
|
2822
2822
|
*/
|
|
2823
2823
|
function failureErrorLine(body) {
|
|
2824
|
-
const
|
|
2825
|
-
|
|
2824
|
+
const timeout = body.find((line) => /^Test timeout of \d+ms exceeded/.test(line));
|
|
2825
|
+
const thrown = body.find((line) => /^(?:[A-Za-z_$][\w.$]*)?(?:Error|Exception)\b/.test(line) &&
|
|
2826
|
+
// Playwright closes the page when its test budget expires. That cancellation error is
|
|
2827
|
+
// a consequence of the timeout, not a different failure to diagnose.
|
|
2828
|
+
!(timeout &&
|
|
2829
|
+
/^Error: (?:page|locator)\.[^:]+: Target page, context or browser has been closed/.test(line)));
|
|
2830
|
+
return thrown ?? timeout ?? body.find((line) => !/^Retry #\d+\b/.test(line)) ?? null;
|
|
2826
2831
|
}
|
|
2827
2832
|
/**
|
|
2828
2833
|
* A failure block's own words, one per line: its body without the runner's progress lines (the
|
|
@@ -3221,16 +3226,28 @@ export function repeatingFailure(log) {
|
|
|
3221
3226
|
* @param excluded - The test titles the request carves out, if the caller knows them.
|
|
3222
3227
|
* @param options - `finalOnly` reads only a failure the run has finished with; `noRetries` says
|
|
3223
3228
|
* the command proves the run cannot retry (`--retries=0`), so its first failure is final.
|
|
3229
|
+
* `onCause` receives each distinct normalized native error from the matching bodies.
|
|
3224
3230
|
* @returns True when a `✘` row's own test, outside the request's exclusions, has a failure body
|
|
3225
3231
|
* under it — and, with `finalOnly`, that failure is final in the log read so far.
|
|
3226
3232
|
*/
|
|
3227
3233
|
export function logShowsInlineFailureBodies(log, excluded = [], options = {}) {
|
|
3234
|
+
const bodies = inlineFailureBodies(log, excluded, options);
|
|
3235
|
+
if (options.onCause) {
|
|
3236
|
+
const causes = new Set(bodies.map(failureMessage).filter((message) => message !== null));
|
|
3237
|
+
for (const cause of causes)
|
|
3238
|
+
options.onCause(cause);
|
|
3239
|
+
}
|
|
3240
|
+
return bodies.length > 0;
|
|
3241
|
+
}
|
|
3242
|
+
/** Native inline bodies whose own result rows establish the requested attempt state. */
|
|
3243
|
+
function inlineFailureBodies(log, excluded, options) {
|
|
3228
3244
|
const text = log.replace(ANSI_SGR, '');
|
|
3229
3245
|
const failed = new Set(distinctTests(failedTests(text)).map(retrylessTestKey));
|
|
3230
3246
|
if (failed.size === 0)
|
|
3231
|
-
return
|
|
3247
|
+
return [];
|
|
3232
3248
|
const blocks = failureBlocks(text);
|
|
3233
3249
|
const rows = options.finalOnly ? resultRows(text) : [];
|
|
3250
|
+
const matched = [];
|
|
3234
3251
|
for (const block of blocks) {
|
|
3235
3252
|
const m = FAILURE_BLOCK_HEADER.exec(block.split('\n')[0] ?? '');
|
|
3236
3253
|
if (m === null)
|
|
@@ -3242,12 +3259,11 @@ export function logShowsInlineFailureBodies(log, excluded = [], options = {}) {
|
|
|
3242
3259
|
const key = retrylessTestKey({ where, title, seconds: null });
|
|
3243
3260
|
if (!failed.has(key))
|
|
3244
3261
|
continue;
|
|
3245
|
-
if (!options.finalOnly
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
return true;
|
|
3262
|
+
if (!options.finalOnly ||
|
|
3263
|
+
failureIsFinal({ rows, blocks, key, noRetries: options.noRetries === true }))
|
|
3264
|
+
matched.push(block);
|
|
3249
3265
|
}
|
|
3250
|
-
return
|
|
3266
|
+
return matched;
|
|
3251
3267
|
}
|
|
3252
3268
|
/** The runner's retry marker on a `list`-reporter row (` (retry #1)`, `_retrySuffix`). */
|
|
3253
3269
|
const RETRY_ROW_SUFFIX = /\s*\(retry #\d+\)$/;
|