@molecule/api-ai-tools 1.10.7 → 1.10.9
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 +31 -26
- package/dist/command-position.d.ts +8 -0
- package/dist/command-position.d.ts.map +1 -1
- package/dist/command-position.js +10 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +104 -24
- package/dist/trace-artifacts.d.ts +10 -9
- package/dist/trace-artifacts.d.ts.map +1 -1
- package/dist/trace-artifacts.js +52 -47
- package/dist/utilities.d.ts +7 -16
- package/dist/utilities.d.ts.map +1 -1
- package/dist/utilities.js +30 -33
- 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-10-
|
|
6
|
+
Generated: 2026-10-20T13:43:44.255Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/api-ai-tools
|
|
@@ -449,14 +449,14 @@ interface TraceRequest {
|
|
|
449
449
|
/**
|
|
450
450
|
* The response status as the trace recorded it. Playwright writes `-1` when a request was never
|
|
451
451
|
* answered (its HAR entry starts at `-1` and only a response event overwrites it); `0` is the
|
|
452
|
-
* same absence when the snapshot carried no response at all. Neither
|
|
452
|
+
* same absence when the snapshot carried no response at all. Neither alone proves a server failure.
|
|
453
453
|
*/
|
|
454
454
|
status: number
|
|
455
455
|
/**
|
|
456
456
|
* Playwright's own error text for a request that failed WITHOUT a response
|
|
457
457
|
* (`net::ERR_CONNECTION_REFUSED`) — a real failure. A request that got no response and recorded
|
|
458
|
-
* no text
|
|
459
|
-
*
|
|
458
|
+
* no text may still have been in flight when recording ended. Missing text or an explicit
|
|
459
|
+
* cancellation cannot establish either a server failure or server health.
|
|
460
460
|
*/
|
|
461
461
|
failure?: string
|
|
462
462
|
/**
|
|
@@ -1562,6 +1562,19 @@ function durationSeconds(word: string): number | null
|
|
|
1562
1562
|
|
|
1563
1563
|
**Returns:** The seconds, or null when the word is not a duration.
|
|
1564
1564
|
|
|
1565
|
+
#### `endsInBackground(command)`
|
|
1566
|
+
|
|
1567
|
+
Whether the outer shell's final statement starts a background job.
|
|
1568
|
+
Inner shell strings have their own job tables and do not count.
|
|
1569
|
+
|
|
1570
|
+
```typescript
|
|
1571
|
+
function endsInBackground(command: string): boolean
|
|
1572
|
+
```
|
|
1573
|
+
|
|
1574
|
+
- `command` — The shell command.
|
|
1575
|
+
|
|
1576
|
+
**Returns:** Whether its final statement ends with the shell's `&` operator.
|
|
1577
|
+
|
|
1565
1578
|
#### `commandSegments(command)`
|
|
1566
1579
|
|
|
1567
1580
|
The segments of a command, each with its program and arguments — the answer every classifier
|
|
@@ -2568,11 +2581,12 @@ function isStaticAssetRequest(request: TraceRequest): boolean
|
|
|
2568
2581
|
|
|
2569
2582
|
#### `failedRequest(request)`
|
|
2570
2583
|
|
|
2571
|
-
Whether a trace recorded a
|
|
2584
|
+
Whether a trace recorded a failed response or a request error other than cancellation.
|
|
2572
2585
|
|
|
2573
2586
|
A 404 on a static asset is excepted: `/sw.js` and `/fonts/*` 404 on an app that never shipped
|
|
2574
2587
|
them, and naming one as a failure sent m125 into writing the caching worker it had asked about.
|
|
2575
|
-
A 5xx on an asset, or a network error, still counts
|
|
2588
|
+
A 5xx on an asset, or a network error, still counts. A request error alone does not locate
|
|
2589
|
+
the cause in the server: the browser or network may have rejected the request.
|
|
2576
2590
|
|
|
2577
2591
|
```typescript
|
|
2578
2592
|
function failedRequest(request: TraceRequest): boolean
|
|
@@ -2584,9 +2598,9 @@ function failedRequest(request: TraceRequest): boolean
|
|
|
2584
2598
|
|
|
2585
2599
|
#### `unansweredRequest(request)`
|
|
2586
2600
|
|
|
2587
|
-
Whether a trace recorded
|
|
2588
|
-
|
|
2589
|
-
the
|
|
2601
|
+
Whether a trace recorded no response and no error other than cancellation. The request may
|
|
2602
|
+
have been pending or cancelled when recording ended; the trace does not establish whether
|
|
2603
|
+
the endpoint stalled. A shell request is not evidence about the step (m125 +29:33).
|
|
2590
2604
|
|
|
2591
2605
|
```typescript
|
|
2592
2606
|
function unansweredRequest(request: TraceRequest): boolean
|
|
@@ -2594,7 +2608,7 @@ function unansweredRequest(request: TraceRequest): boolean
|
|
|
2594
2608
|
|
|
2595
2609
|
- `request` — One request a trace recorded.
|
|
2596
2610
|
|
|
2597
|
-
**Returns:** True when the request
|
|
2611
|
+
**Returns:** True when the request's missing response is inconclusive and worth naming.
|
|
2598
2612
|
|
|
2599
2613
|
#### `stalledDocumentSubresource(request)`
|
|
2600
2614
|
|
|
@@ -2954,8 +2968,7 @@ function streamingBackgroundCommand(
|
|
|
2954
2968
|
Every statement of a command that starts a whole test suite, in command order.
|
|
2955
2969
|
|
|
2956
2970
|
This is the ONE count of suite runs in a command: {@link isSuiteRunCommand} asks it,
|
|
2957
|
-
{@link
|
|
2958
|
-
starts a whole walk of the same suite, and only the last of them is rewritten — and a re-run
|
|
2971
|
+
{@link repeatedSuiteRunError} refuses only simple identical invocations, and a re-run
|
|
2959
2972
|
composed from a command ({@link ./suite-overlap.js} `scopedRerunCommand`) keeps only the first.
|
|
2960
2973
|
|
|
2961
2974
|
A statement that invokes a runner only to print is not one of these
|
|
@@ -2985,20 +2998,12 @@ function isSuiteRunCommand(command: string): boolean
|
|
|
2985
2998
|
|
|
2986
2999
|
#### `repeatedSuiteRunError(command)`
|
|
2987
3000
|
|
|
2988
|
-
|
|
2989
|
-
site asks, foreground and background alike.
|
|
2990
|
-
|
|
2991
|
-
Each statement is a whole walk of the same suite against the same app, and only the last of them
|
|
2992
|
-
is rewritten, so the earlier ones measure nothing the first did. X1 xr-molecule-flash-m157
|
|
2993
|
-
(+14:02) chained two whole walks of one 138-test suite with `;` (4.5 minutes each) and the
|
|
2994
|
-
background launcher refused it; X1 xr-molecule-flash-m170 (+06:02) chained two invocations of the
|
|
2995
|
-
suite's own runner script in the foreground, where nothing counted them, and the note reported
|
|
2996
|
-
the passing second walk as the first walk's 13 failures.
|
|
3001
|
+
Refuse only a command made entirely of identical suite invocations.
|
|
2997
3002
|
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3003
|
+
Mixed shell commands execute as written. Rebuilding their prefix or suffix can lose writes,
|
|
3004
|
+
break heredoc delimiters or turn an && guard into unconditional work (m277). Different args
|
|
3005
|
+
or environments may select different suites or targets; they are not known duplicates either.
|
|
3006
|
+
This is an optimization, so uncertainty always allows the original command.
|
|
3002
3007
|
|
|
3003
3008
|
```typescript
|
|
3004
3009
|
function repeatedSuiteRunError(command: string): string | null
|
|
@@ -3006,7 +3011,7 @@ function repeatedSuiteRunError(command: string): string | null
|
|
|
3006
3011
|
|
|
3007
3012
|
- `command` — The shell command as the executor sent it.
|
|
3008
3013
|
|
|
3009
|
-
**Returns:** The refusal
|
|
3014
|
+
**Returns:** The duplicate-only refusal, or null when the original command should run.
|
|
3010
3015
|
|
|
3011
3016
|
#### `suiteRunBudgetCommand(command, flags)`
|
|
3012
3017
|
|
|
@@ -58,6 +58,14 @@ export interface CommandSegment {
|
|
|
58
58
|
* @returns The seconds, or null when the word is not a duration.
|
|
59
59
|
*/
|
|
60
60
|
export declare function durationSeconds(word: string): number | null;
|
|
61
|
+
/**
|
|
62
|
+
* Whether the outer shell's final statement starts a background job.
|
|
63
|
+
* Inner shell strings have their own job tables and do not count.
|
|
64
|
+
*
|
|
65
|
+
* @param command - The shell command.
|
|
66
|
+
* @returns Whether its final statement ends with the shell's `&` operator.
|
|
67
|
+
*/
|
|
68
|
+
export declare function endsInBackground(command: string): boolean;
|
|
61
69
|
/**
|
|
62
70
|
* The segments of a command, each with its program and arguments — the answer every classifier
|
|
63
71
|
* that reads a command as "this runs the suite" is asking for.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-position.d.ts","sourceRoot":"","sources":["../src/command-position.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,uFAAuF;AACvF,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAA;IACf,qFAAqF;IACrF,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;IACvB,4FAA4F;IAC5F,IAAI,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAgSD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM3D;
|
|
1
|
+
{"version":3,"file":"command-position.d.ts","sourceRoot":"","sources":["../src/command-position.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,uFAAuF;AACvF,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAA;IACf,qFAAqF;IACrF,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;IACvB,4FAA4F;IAC5F,IAAI,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAgSD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM3D;AAikBD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEzD;AA8GD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,EAAE,CAIjE;AAmCD;;;;;;;;;GASG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,OAAO,EAAE,cAAc,GAAG,IAAI,CAA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
863
863
|
}
|
|
864
864
|
return out;
|
|
865
865
|
}
|
|
866
|
+
/**
|
|
867
|
+
* Whether the outer shell's final statement starts a background job.
|
|
868
|
+
* Inner shell strings have their own job tables and do not count.
|
|
869
|
+
*
|
|
870
|
+
* @param command - The shell command.
|
|
871
|
+
* @returns Whether its final statement ends with the shell's `&` operator.
|
|
872
|
+
*/
|
|
873
|
+
export function endsInBackground(command) {
|
|
874
|
+
return splitSegments(command).at(-1)?.after === '&';
|
|
875
|
+
}
|
|
866
876
|
/** A redirect's target word: a quoted one keeps its spaces (`tee 'out file.txt'`). */
|
|
867
877
|
const REDIRECT_TARGET_WORD = String.raw `(?:'[^']*'|"[^"]*"|[^\s;&|]+)`;
|
|
868
878
|
/**
|
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;
|
|
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;AA4O9C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAahG;AAudD,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AA8HnE;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAEA,CAAA;AAE9B;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,QAI6C,CAAA;AA2DlF;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUhE;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,qBAAqB;IACpC,iFAAiF;IACjF,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,8FAA8F;IAC9F,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;CAC5B;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAA;AAoBpF;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,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,CAi5FxF"}
|
package/dist/tools.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { posix } from 'path';
|
|
10
10
|
import { browserProbeOverBudgetAdvice, browserProbeRefusal } from './browser-probe.js';
|
|
11
|
+
import { endsInBackground } from './command-position.js';
|
|
11
12
|
import { commandCutRun, CUT_AT_BUDGET, cutRunSentence, suiteRunExitCode, suiteSummary, } from './cut-run.js';
|
|
12
13
|
import { addChangeSpan, changedSpan, countLines, renderEditExcerpt, renderSmallFile, } from './edit-excerpt.js';
|
|
13
14
|
import { INLINE_SCRIPT_BUDGET_MS, inlineLocalScriptCommand, inlineScriptRunawaySentence, } from './inline-script.js';
|
|
@@ -33,6 +34,16 @@ const waitedByTask = new Map();
|
|
|
33
34
|
const logBytesByTask = new Map();
|
|
34
35
|
/** The file a background command writes its own output to, when it redirects it. */
|
|
35
36
|
const outputFileByTask = new Map();
|
|
37
|
+
/**
|
|
38
|
+
* Recovered legacy task ids whose command ENDS with a backgrounded statement (`… &`).
|
|
39
|
+
*
|
|
40
|
+
* Such a launch returns the status of the backgrounding operation itself — a launch
|
|
41
|
+
* acknowledgement — and its wrapper is expected to be gone while the run it started still walks, so
|
|
42
|
+
* neither the wrapper's code nor its death says the run ended ({@link taskEndState}). The run's own
|
|
43
|
+
* output is the only ending that counts. New tasks append a shell `wait` and record the actual
|
|
44
|
+
* child's status; only scripts recovered from earlier versions need this compatibility path.
|
|
45
|
+
*/
|
|
46
|
+
const detachedByTask = new Set();
|
|
36
47
|
/**
|
|
37
48
|
* Task ids whose log has SHOWN a failure's own body under a `✘` row — the inline failure switch's
|
|
38
49
|
* effect, read from the log itself ({@link logShowsInlineFailureBodies}).
|
|
@@ -225,22 +236,59 @@ const TASK_END_LOOK_MS = 3_000;
|
|
|
225
236
|
/** How much of a task's own output the end test reads — a runner's tally is its last lines. */
|
|
226
237
|
const TASK_OUTPUT_END_BYTES = 4_000;
|
|
227
238
|
/**
|
|
228
|
-
* The
|
|
229
|
-
*
|
|
239
|
+
* The verdict an exit file holds, or null when it holds none.
|
|
240
|
+
*
|
|
241
|
+
* The launcher writes the file as `echo $? > <exitFile>`, which opens it and then writes the code
|
|
242
|
+
* — so a reader can catch it EMPTY in between, and a wrapper killed at that instant leaves it
|
|
243
|
+
* empty for good. Neither is a verdict. Reading it as 0 (what this used to do) hands back success
|
|
244
|
+
* for a command that may have failed — the same fabrication `molecule-dev/api/src/ai/
|
|
245
|
+
* background-tasks.ts` refuses when it treats such a read as "no exit file yet".
|
|
246
|
+
*
|
|
247
|
+
* @param raw - The exit file's content as read.
|
|
248
|
+
* @returns The exit code it records, or null when it records none.
|
|
249
|
+
*/
|
|
250
|
+
function exitCodeIn(raw) {
|
|
251
|
+
const trimmed = raw.trim();
|
|
252
|
+
return /^\d+$/.test(trimmed) ? Number.parseInt(trimmed, 10) : null;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* The shell probe behind {@link taskEndState}: the code the launcher wrote, the pid it wrote, and
|
|
256
|
+
* the end of the file the command redirects its own output to.
|
|
230
257
|
*
|
|
231
258
|
* The pid test is the one `molecule-dev/api/src/ai/background-tasks.ts` applies in `liveness` —
|
|
232
259
|
* a written exit code ends the task, a live pid keeps it running, and a handle the sandbox cannot
|
|
233
260
|
* account for stays unknown — so this package and that one cannot disagree about whether a task
|
|
234
261
|
* is still walking.
|
|
235
262
|
*
|
|
263
|
+
* The exit file is read in THIS shell, beside the pid test, because the two are ONE observation.
|
|
264
|
+
* Read as two round trips — a wait's tick reading the file, then this probe asking the pid — a
|
|
265
|
+
* wrapper that finished and wrote its code between them was reported "ended without writing an
|
|
266
|
+
* exit code" while its code was on disk (xr-molecule-flash-m303: 13/13 Hurl files green,
|
|
267
|
+
* `exitCode: null`, after a wait that returned on the tick the run ended).
|
|
268
|
+
*
|
|
269
|
+
* The pid test runs BEFORE the exit file is read, and that order is the point: the launcher writes
|
|
270
|
+
* the code and then exits, and `kill -0` answers "gone" only once the process is reaped — so a
|
|
271
|
+
* "gone" answer means the write has already happened, and the read that follows cannot miss it.
|
|
272
|
+
* Read first, the same shell would still have a window between the two statements.
|
|
273
|
+
*
|
|
274
|
+
* The first TWO lines are always the two headers, in this order, and the exit header is always
|
|
275
|
+
* there (`unknown` when the file holds no code yet). {@link taskEndState} reads those positions
|
|
276
|
+
* and nothing else, so a run whose own output prints `MOL_TASK_EXIT 0` cannot have that line
|
|
277
|
+
* mistaken for a written code — the bytes a command can produce start at the third line.
|
|
278
|
+
*
|
|
236
279
|
* @param taskId - The task's `mol-bg-…` handle (format already checked by the caller).
|
|
237
280
|
* @param own - The file the command redirects its own output to, when the launch could tell.
|
|
238
|
-
* @returns The command;
|
|
281
|
+
* @returns The command; line 1 is `MOL_TASK_STATE <alive|gone|unknown>`, line 2
|
|
282
|
+
* `MOL_TASK_EXIT <n|unknown>`, and the rest the tail of the run's own output.
|
|
239
283
|
*/
|
|
240
284
|
const taskStateCommand = (taskId, own) => `P=$(cat /tmp/${taskId}.pid 2>/dev/null); ` +
|
|
241
|
-
`if [ -z "$P" ] || [ ! -f /tmp/${taskId}.sh ]; then
|
|
242
|
-
`elif kill -0 "$P" 2>/dev/null; then
|
|
243
|
-
`else
|
|
285
|
+
`if [ -z "$P" ] || [ ! -f /tmp/${taskId}.sh ]; then S=unknown; ` +
|
|
286
|
+
`elif kill -0 "$P" 2>/dev/null; then S=alive; ` +
|
|
287
|
+
`else S=gone; fi; ` +
|
|
288
|
+
`c=$(cat /tmp/${taskId}.exit 2>/dev/null); ` +
|
|
289
|
+
`case "$c" in ''|*[!0-9]*) X=unknown;; *) X=$c;; esac; ` +
|
|
290
|
+
`echo MOL_TASK_STATE "$S"; ` +
|
|
291
|
+
`echo MOL_TASK_EXIT "$X"; ` +
|
|
244
292
|
(own ? `tail -c ${TASK_OUTPUT_END_BYTES} ${shellQuote(own)} 2>/dev/null` : 'true');
|
|
245
293
|
/**
|
|
246
294
|
* The ending a task's own output already records, read from the file its command redirects to.
|
|
@@ -286,10 +334,12 @@ function outputEnding(text) {
|
|
|
286
334
|
*
|
|
287
335
|
* @param backend - The execution backend the task runs on.
|
|
288
336
|
* @param taskId - The task's `mol-bg-…` handle.
|
|
289
|
-
* @returns Whether it has ended, and the code
|
|
337
|
+
* @returns Whether it has ended, and the code the exit file (or the run's own output) recorded,
|
|
338
|
+
* or null when there is no verdict to report.
|
|
290
339
|
*/
|
|
291
340
|
async function taskEndState(backend, taskId) {
|
|
292
341
|
const own = outputFileByTask.get(taskId);
|
|
342
|
+
const detached = detachedByTask.has(taskId);
|
|
293
343
|
let stdout;
|
|
294
344
|
try {
|
|
295
345
|
const r = await backend.run(taskStateCommand(taskId, own), { timeout: 5_000 });
|
|
@@ -300,18 +350,32 @@ async function taskEndState(backend, taskId) {
|
|
|
300
350
|
// the loud one (a result handed back for a run that is still walking).
|
|
301
351
|
return { ended: false, exitCode: null };
|
|
302
352
|
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
const
|
|
353
|
+
// The headers are OURS, at fixed positions — a line the run's own output prints that is shaped
|
|
354
|
+
// like one cannot be read as one, and the bytes after line 2 are the run's tail regardless.
|
|
355
|
+
const lines = stdout.split('\n').map((line) => line.replace(/\r$/, ''));
|
|
356
|
+
const state = /^MOL_TASK_STATE (alive|gone|unknown)$/.exec(lines[0] ?? '')?.[1] ?? 'unknown';
|
|
357
|
+
const headerCode = /^MOL_TASK_EXIT (\d+)$/.exec(lines[1] ?? '')?.[1];
|
|
358
|
+
const reported = headerCode === undefined ? null : Number(headerCode);
|
|
359
|
+
const ownEnding = outputEnding(lines.slice(2).join('\n'));
|
|
306
360
|
// The run's own output can end the task while its wrapper is still alive: the wrapper may be
|
|
307
361
|
// waiting on the wrong thing (m182's was blocked) while the run it started is over. An explicit
|
|
308
|
-
// `EXIT=<n>` is that verdict
|
|
309
|
-
//
|
|
362
|
+
// `EXIT=<n>` is that verdict — more specific than the wrapper's own code, which in that shape is
|
|
363
|
+
// the status of the backgrounding statement, not of the run — and a bare tally is trusted only
|
|
364
|
+
// once the pid is gone, because the instant between a walk's tally and its next walk's header
|
|
365
|
+
// reads the same.
|
|
310
366
|
if (ownEnding.ended && (ownEnding.exitCode !== null || state === 'gone'))
|
|
311
367
|
return ownEnding;
|
|
368
|
+
// The code the launcher wrote, read in the same shell as the pid test. It is an ending only once
|
|
369
|
+
// the wrapper is GONE: a wrapper still alive has not reached that write yet (or is a moment away
|
|
370
|
+
// from exiting), so the code is not an ending for it — and a launch whose LAST statement is
|
|
371
|
+
// backgrounded (`… &`) returned the status of the backgrounding operation, a launch
|
|
372
|
+
// acknowledgement, that is never the run's verdict (see {@link detachedByTask}). Read after the
|
|
373
|
+
// pid test, it is found here rather than reported as never written (xr-molecule-flash-m303).
|
|
374
|
+
if (!detached && reported !== null && state === 'gone')
|
|
375
|
+
return { ended: true, exitCode: reported };
|
|
312
376
|
// A pid this sandbox can account for and that is gone, with no exit file: the wrapper that
|
|
313
377
|
// writes the exit code was killed or exited, so the task ended and has no verdict to invent.
|
|
314
|
-
if (state === 'gone')
|
|
378
|
+
if (!detached && state === 'gone')
|
|
315
379
|
return { ended: true, exitCode: null };
|
|
316
380
|
return { ended: false, exitCode: null };
|
|
317
381
|
}
|
|
@@ -517,9 +581,7 @@ async function backgroundTaskState(backend, command, seconds, ceilingMs) {
|
|
|
517
581
|
const ids = recent.filter((id) => owned.has(id));
|
|
518
582
|
const exitCodeOf = async (id) => {
|
|
519
583
|
try {
|
|
520
|
-
|
|
521
|
-
const code = Number.parseInt(raw.trim(), 10);
|
|
522
|
-
return Number.isFinite(code) ? code : 0;
|
|
584
|
+
return exitCodeIn(await backend.readFile(`/tmp/${id}.exit`));
|
|
523
585
|
}
|
|
524
586
|
catch (_error) {
|
|
525
587
|
// No exit file yet: the task is still running. Not an error.
|
|
@@ -537,7 +599,9 @@ async function backgroundTaskState(backend, command, seconds, ceilingMs) {
|
|
|
537
599
|
// whose run is already over (m182 +30:25: `sleep 240; tail /tmp/full-run.log` was answered "is
|
|
538
600
|
// live" for a task that had ended 20 s after it started).
|
|
539
601
|
const stateOf = async (id) => {
|
|
540
|
-
|
|
602
|
+
// A launch that ended in `&` writes its exit file at once with the launch's own status; that
|
|
603
|
+
// is an acknowledgement, and the task's end is read from its own output instead.
|
|
604
|
+
const exitCode = detachedByTask.has(id) ? null : await exitCodeOf(id);
|
|
541
605
|
if (exitCode !== null)
|
|
542
606
|
return { id, ended: true, exitCode };
|
|
543
607
|
return { id, ...(await taskEndState(backend, id)) };
|
|
@@ -2752,6 +2816,13 @@ export function buildTools(backend, config) {
|
|
|
2752
2816
|
// (X1 xr-molecule-flash-m157 +14:02 — two whole walks chained with `;`).
|
|
2753
2817
|
if (streaming.error)
|
|
2754
2818
|
return { error: streaming.error };
|
|
2819
|
+
// This tool already backgrounds the script. If its last statement also uses `&`,
|
|
2820
|
+
// let the same shell wait for that child and preserve its exit code. Inferring its
|
|
2821
|
+
// completion from output cannot work for silent commands such as `true &`.
|
|
2822
|
+
// The parser reads the outer shell: an inner `sh -c '… &'` has its own job table.
|
|
2823
|
+
if (endsInBackground(streaming.command)) {
|
|
2824
|
+
streaming.command += '\nwait "$!"';
|
|
2825
|
+
}
|
|
2755
2826
|
// …and the trace flag this tool added (above), which the streaming rewrite never saw:
|
|
2756
2827
|
// its changes are what this branch reports the run's own settings in.
|
|
2757
2828
|
if (traced.change)
|
|
@@ -2796,15 +2867,14 @@ export function buildTools(backend, config) {
|
|
|
2796
2867
|
// seconds (a Hurl suite: 37 ms). Handing it back as a task cost a
|
|
2797
2868
|
// wait_for_task round trip each time (X1 flash-m20, twice in ten
|
|
2798
2869
|
// minutes), so wait a short grace first and return a finished command
|
|
2799
|
-
// exactly as a foreground run returns.
|
|
2870
|
+
// exactly as a foreground run returns. A redundant final `&` is followed by `wait`
|
|
2871
|
+
// above, so this file also carries the actual child status in that case.
|
|
2800
2872
|
if (overCeiling && input.run_in_background !== true) {
|
|
2801
2873
|
const graceUntil = Date.now() + overCeilingGraceMs;
|
|
2802
2874
|
while (Date.now() < graceUntil) {
|
|
2803
2875
|
let code = null;
|
|
2804
2876
|
try {
|
|
2805
|
-
|
|
2806
|
-
const parsed = Number.parseInt(raw.trim(), 10);
|
|
2807
|
-
code = Number.isFinite(parsed) ? parsed : 0;
|
|
2877
|
+
code = exitCodeIn(await backend.readFile(exitFile));
|
|
2808
2878
|
}
|
|
2809
2879
|
catch (_error) {
|
|
2810
2880
|
// No exit file yet: still running.
|
|
@@ -3154,6 +3224,10 @@ export function buildTools(backend, config) {
|
|
|
3154
3224
|
// already resolved and stays as written.
|
|
3155
3225
|
if (target)
|
|
3156
3226
|
outputFileByTask.set(taskId, posix.resolve(root, target));
|
|
3227
|
+
// The launch's own shape outlives this process the same way its redirect target does:
|
|
3228
|
+
// a command that ended in `&` is still a launch acknowledgement, not a finished run.
|
|
3229
|
+
if (endsInBackground(script))
|
|
3230
|
+
detachedByTask.add(taskId);
|
|
3157
3231
|
}
|
|
3158
3232
|
catch (_error) {
|
|
3159
3233
|
// No script under that id: this process did not start the task, so
|
|
@@ -3225,11 +3299,17 @@ export function buildTools(backend, config) {
|
|
|
3225
3299
|
const requested = Number(input.timeout);
|
|
3226
3300
|
const budgetMs = Number.isFinite(requested) && requested > 0 ? Math.min(requested, ceiling) : ceiling;
|
|
3227
3301
|
const startedAt = Date.now();
|
|
3302
|
+
// A task whose command ended in `&` writes its exit file the moment it launches, with the
|
|
3303
|
+
// launch's own status: that code is an acknowledgement, never the run's verdict, and its end
|
|
3304
|
+
// is read from its own output by {@link taskEndState} instead.
|
|
3305
|
+
const detachedRun = detachedByTask.has(taskId);
|
|
3228
3306
|
const readExit = async () => {
|
|
3307
|
+
if (detachedRun)
|
|
3308
|
+
return null;
|
|
3229
3309
|
try {
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
return
|
|
3310
|
+
// A file that is there but holds no number yet is the launcher's truncate-then-write
|
|
3311
|
+
// instant, not a verdict — the next tick reads the code (see {@link exitCodeIn}).
|
|
3312
|
+
return exitCodeIn(await backend.readFile(exitFile));
|
|
3233
3313
|
}
|
|
3234
3314
|
catch (_error) {
|
|
3235
3315
|
// No exit file yet — the command is still running. Not an error.
|
|
@@ -35,14 +35,14 @@ export interface TraceRequest {
|
|
|
35
35
|
/**
|
|
36
36
|
* The response status as the trace recorded it. Playwright writes `-1` when a request was never
|
|
37
37
|
* answered (its HAR entry starts at `-1` and only a response event overwrites it); `0` is the
|
|
38
|
-
* same absence when the snapshot carried no response at all. Neither
|
|
38
|
+
* same absence when the snapshot carried no response at all. Neither alone proves a server failure.
|
|
39
39
|
*/
|
|
40
40
|
status: number;
|
|
41
41
|
/**
|
|
42
42
|
* Playwright's own error text for a request that failed WITHOUT a response
|
|
43
43
|
* (`net::ERR_CONNECTION_REFUSED`) — a real failure. A request that got no response and recorded
|
|
44
|
-
* no text
|
|
45
|
-
*
|
|
44
|
+
* no text may still have been in flight when recording ended. Missing text or an explicit
|
|
45
|
+
* cancellation cannot establish either a server failure or server health.
|
|
46
46
|
*/
|
|
47
47
|
failure?: string;
|
|
48
48
|
/**
|
|
@@ -480,23 +480,24 @@ export declare function parseTraceArtifacts(stdout: string): TraceArtifact[];
|
|
|
480
480
|
*/
|
|
481
481
|
export declare function isStaticAssetRequest(request: TraceRequest): boolean;
|
|
482
482
|
/**
|
|
483
|
-
* Whether a trace recorded a
|
|
483
|
+
* Whether a trace recorded a failed response or a request error other than cancellation.
|
|
484
484
|
*
|
|
485
485
|
* A 404 on a static asset is excepted: `/sw.js` and `/fonts/*` 404 on an app that never shipped
|
|
486
486
|
* them, and naming one as a failure sent m125 into writing the caching worker it had asked about.
|
|
487
|
-
* A 5xx on an asset, or a network error, still counts
|
|
487
|
+
* A 5xx on an asset, or a network error, still counts. A request error alone does not locate
|
|
488
|
+
* the cause in the server: the browser or network may have rejected the request.
|
|
488
489
|
*
|
|
489
490
|
* @param request - One request a trace recorded.
|
|
490
491
|
* @returns True when the request failed in a way the note should name.
|
|
491
492
|
*/
|
|
492
493
|
export declare function failedRequest(request: TraceRequest): boolean;
|
|
493
494
|
/**
|
|
494
|
-
* Whether a trace recorded
|
|
495
|
-
*
|
|
496
|
-
* the
|
|
495
|
+
* Whether a trace recorded no response and no error other than cancellation. The request may
|
|
496
|
+
* have been pending or cancelled when recording ended; the trace does not establish whether
|
|
497
|
+
* the endpoint stalled. A shell request is not evidence about the step (m125 +29:33).
|
|
497
498
|
*
|
|
498
499
|
* @param request - One request a trace recorded.
|
|
499
|
-
* @returns True when the request
|
|
500
|
+
* @returns True when the request's missing response is inconclusive and worth naming.
|
|
500
501
|
*/
|
|
501
502
|
export declare function unansweredRequest(request: TraceRequest): boolean;
|
|
502
503
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
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BAAgB,CAC9B,KAAK,EAAE,SAAS,aAAa,EAAE,EAC/B,MAAM,EAAE,MAAM,EACd,eAAe,GAAE,SAAS,MAAM,EAAO,EACvC,WAAW,GAAE,SAAS,MAAM,EAAO,EACnC,MAAM,GAAE,cAAmB,GAC1B,MAAM,GAAG,IAAI,CAqgBf;AAaD;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAG9D;AAED,iFAAiF;AACjF,eAAO,MAAM,oBAAoB,8BAA8B,CAAA;AAwG/D,oGAAoG;AACpG,MAAM,WAAW,qBAAqB;IACpC,0BAA0B;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,4EAA4E;IAC5E,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,qBAAqB,CAAC,IAAI,EAAE;IAChD,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAC5C,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA0BjC"}
|
package/dist/trace-artifacts.js
CHANGED
|
@@ -1896,11 +1896,12 @@ export function isStaticAssetRequest(request) {
|
|
|
1896
1896
|
return STATIC_ASSET_PATH.test(path) || STATIC_ASSET_DIR.test(path) || SHELL_FILE_PATH.test(path);
|
|
1897
1897
|
}
|
|
1898
1898
|
/**
|
|
1899
|
-
* Whether a trace recorded a
|
|
1899
|
+
* Whether a trace recorded a failed response or a request error other than cancellation.
|
|
1900
1900
|
*
|
|
1901
1901
|
* A 404 on a static asset is excepted: `/sw.js` and `/fonts/*` 404 on an app that never shipped
|
|
1902
1902
|
* them, and naming one as a failure sent m125 into writing the caching worker it had asked about.
|
|
1903
|
-
* A 5xx on an asset, or a network error, still counts
|
|
1903
|
+
* A 5xx on an asset, or a network error, still counts. A request error alone does not locate
|
|
1904
|
+
* the cause in the server: the browser or network may have rejected the request.
|
|
1904
1905
|
*
|
|
1905
1906
|
* @param request - One request a trace recorded.
|
|
1906
1907
|
* @returns True when the request failed in a way the note should name.
|
|
@@ -1908,20 +1909,27 @@ export function isStaticAssetRequest(request) {
|
|
|
1908
1909
|
export function failedRequest(request) {
|
|
1909
1910
|
if (isStaticAssetRequest(request) && request.status === 404)
|
|
1910
1911
|
return false;
|
|
1911
|
-
return request.status >= 400 || (request.status <= 0 && request
|
|
1912
|
+
return request.status >= 400 || (request.status <= 0 && recordedRequestFailure(request));
|
|
1913
|
+
}
|
|
1914
|
+
/** A browser cancellation records no conclusion about the endpoint's availability. */
|
|
1915
|
+
const REQUEST_CANCELLED = /\b(?:net::ERR_ABORTED|NS_BINDING_ABORTED|AbortError)\b|^(?:aborted|cancelled|canceled)$/i;
|
|
1916
|
+
/** Whether the request carries a nonempty error that is not an explicit cancellation. */
|
|
1917
|
+
function recordedRequestFailure(request) {
|
|
1918
|
+
const failure = request.failure?.trim();
|
|
1919
|
+
return failure !== undefined && failure !== '' && !REQUEST_CANCELLED.test(failure);
|
|
1912
1920
|
}
|
|
1913
1921
|
/**
|
|
1914
|
-
* Whether a trace recorded
|
|
1915
|
-
*
|
|
1916
|
-
* the
|
|
1922
|
+
* Whether a trace recorded no response and no error other than cancellation. The request may
|
|
1923
|
+
* have been pending or cancelled when recording ended; the trace does not establish whether
|
|
1924
|
+
* the endpoint stalled. A shell request is not evidence about the step (m125 +29:33).
|
|
1917
1925
|
*
|
|
1918
1926
|
* @param request - One request a trace recorded.
|
|
1919
|
-
* @returns True when the request
|
|
1927
|
+
* @returns True when the request's missing response is inconclusive and worth naming.
|
|
1920
1928
|
*/
|
|
1921
1929
|
export function unansweredRequest(request) {
|
|
1922
1930
|
if (isStaticAssetRequest(request))
|
|
1923
1931
|
return false;
|
|
1924
|
-
return request.status <= 0 && request
|
|
1932
|
+
return request.status <= 0 && !recordedRequestFailure(request);
|
|
1925
1933
|
}
|
|
1926
1934
|
/**
|
|
1927
1935
|
* Whether a trace recorded a DOCUMENT SUBRESOURCE that never finished: a stylesheet, script or
|
|
@@ -2200,14 +2208,16 @@ function navigationNeverFinished(item) {
|
|
|
2200
2208
|
function transportFailure(items) {
|
|
2201
2209
|
for (const item of items) {
|
|
2202
2210
|
const document = item.requests.find((request) => request.type === 'document');
|
|
2203
|
-
const failed = item.requests.find((request) => request
|
|
2211
|
+
const failed = item.requests.find((request) => recordedRequestFailure(request) &&
|
|
2212
|
+
request.failure !== undefined &&
|
|
2213
|
+
NETWORK_ERROR.test(request.failure));
|
|
2204
2214
|
if (failed !== undefined) {
|
|
2205
2215
|
const error = NETWORK_ERROR.exec(failed.failure ?? '')?.[0] ?? failed.failure ?? '';
|
|
2206
2216
|
return { error, where: failed.path };
|
|
2207
2217
|
}
|
|
2208
2218
|
for (const line of item.console) {
|
|
2209
2219
|
const error = NETWORK_ERROR.exec(line)?.[0];
|
|
2210
|
-
if (error !== undefined)
|
|
2220
|
+
if (error !== undefined && !REQUEST_CANCELLED.test(error))
|
|
2211
2221
|
return {
|
|
2212
2222
|
error,
|
|
2213
2223
|
where: document?.path ?? item.requests[0]?.path ?? 'the page',
|
|
@@ -2249,27 +2259,22 @@ function isApiPath(path, prefixes) {
|
|
|
2249
2259
|
});
|
|
2250
2260
|
}
|
|
2251
2261
|
/**
|
|
2252
|
-
* The API requests
|
|
2253
|
-
*
|
|
2254
|
-
*
|
|
2255
|
-
* the note says so. Several API paths left unanswered in one walk is a different fact: the server
|
|
2256
|
-
* stopped answering while the tests ran, and the closing "the cause is in the page" reading is
|
|
2257
|
-
* then false (xr-molecule-flash-m215 +36:28: three API paths got no response and two `page.goto`
|
|
2258
|
-
* calls timed out across a platform restart, and the note sent the run at avatar components and
|
|
2259
|
-
* token signing).
|
|
2262
|
+
* The API requests that recorded an error without a response, one entry per method+path.
|
|
2263
|
+
* Missing failure text stays inconclusive regardless of the number of pending requests
|
|
2264
|
+
* (m303/m305). An answer from another endpoint cannot excuse a recorded failure here.
|
|
2260
2265
|
*
|
|
2261
2266
|
* @param items - The traces the note is about.
|
|
2262
2267
|
* @param apiPrefixes - The API prefixes the caller read, or empty.
|
|
2263
2268
|
* @returns One entry per distinct method+path, in the order the traces recorded them.
|
|
2264
2269
|
*/
|
|
2265
|
-
function
|
|
2270
|
+
function failedApiRequests(items, apiPrefixes) {
|
|
2266
2271
|
const groups = new Map();
|
|
2267
2272
|
for (const item of items) {
|
|
2268
2273
|
// The step's own requests are also in `item.requests` on a modern trace, but an older reader
|
|
2269
2274
|
// put them only on the action: count each method+path once per trace, not once per list.
|
|
2270
2275
|
const seen = new Set();
|
|
2271
2276
|
for (const request of [...item.requests, ...(item.lastAction?.requests ?? [])]) {
|
|
2272
|
-
if (!
|
|
2277
|
+
if (request.status > 0 || !failedRequest(request))
|
|
2273
2278
|
continue;
|
|
2274
2279
|
const path = sameOriginPath(request);
|
|
2275
2280
|
if (path === null || !isApiPath(path, apiPrefixes))
|
|
@@ -2304,11 +2309,10 @@ function navigationTimedOut(item, failures) {
|
|
|
2304
2309
|
return failure !== undefined && navigationMethod(failure.operation) !== null;
|
|
2305
2310
|
}
|
|
2306
2311
|
/**
|
|
2307
|
-
*
|
|
2308
|
-
*
|
|
2309
|
-
* the same fact.
|
|
2312
|
+
* Recorded API errors without responses and page loads that never finished. Both the lead and
|
|
2313
|
+
* closing sentence name the evidence without assigning a server, network, or browser cause.
|
|
2310
2314
|
*
|
|
2311
|
-
* @param requests - The API requests
|
|
2315
|
+
* @param requests - The API requests that recorded errors without a response.
|
|
2312
2316
|
* @param navigations - How many traced failures were a navigation that never finished.
|
|
2313
2317
|
* @param capital - True to start a sentence, false to continue one.
|
|
2314
2318
|
* @returns The sentence, without a trailing period run or a next step.
|
|
@@ -2320,15 +2324,14 @@ function serverSilentReading(requests, navigations, capital) {
|
|
|
2320
2324
|
const more = requests.length > shown.length ? ` and ${requests.length - shown.length} more` : '';
|
|
2321
2325
|
const asked = requests.length === 0
|
|
2322
2326
|
? ''
|
|
2323
|
-
: `${requests.length} API ${requests.length === 1 ? 'request' : 'requests'}
|
|
2327
|
+
: `${requests.length} API ${requests.length === 1 ? 'request' : 'requests'} failed without a response` +
|
|
2324
2328
|
(shown.length === 0 ? '' : ` (${shown.join(', ')}${more})`);
|
|
2325
2329
|
const loads = navigations === 0
|
|
2326
2330
|
? ''
|
|
2327
2331
|
: `${navigations} page ${navigations === 1 ? 'load' : 'loads'} never finished`;
|
|
2328
2332
|
const what = [asked, loads].filter((part) => part !== '').join(' and ');
|
|
2329
|
-
return (`${capital ? 'The' : 'the'}
|
|
2330
|
-
'
|
|
2331
|
-
'ran, not page state.');
|
|
2333
|
+
return (`${capital ? 'The' : 'the'} trace recorded incomplete requests or page loads: ${what}. ` +
|
|
2334
|
+
'This does not identify whether the cause is in the server, network, or browser.');
|
|
2332
2335
|
}
|
|
2333
2336
|
/**
|
|
2334
2337
|
* The path segments a request ASKS FOR a credential through — a login, a registration, a token
|
|
@@ -3397,15 +3400,13 @@ export function failureTraceNote(items, target, earlierFailures = [], apiPrefixe
|
|
|
3397
3400
|
...new Set(stalls.flatMap((stall) => (stall === null ? [] : [stall.reported]))),
|
|
3398
3401
|
];
|
|
3399
3402
|
const anyStalled = stalls.some((stall) => stall !== null);
|
|
3400
|
-
//
|
|
3401
|
-
//
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
const silentApiRequests = unansweredApiRequests(traced, apiPrefixes);
|
|
3403
|
+
// A recorded request error or navigation deadline is evidence of a failed attempt, not proof
|
|
3404
|
+
// of its cause. Pending requests remain inconclusive at every count (m303/m305).
|
|
3405
|
+
const silentApiRequests = failedApiRequests(traced, apiPrefixes);
|
|
3406
|
+
const hasPendingRequests = traced.some((item) => [...item.requests, ...(item.lastAction?.requests ?? [])].some(unansweredRequest));
|
|
3405
3407
|
const silentNavigations = traced.filter((item) => navigationTimedOut(item, failures)).length;
|
|
3406
3408
|
const serverSilent = silentApiRequests.length >= 2 || silentNavigations > 0;
|
|
3407
|
-
//
|
|
3408
|
-
// are a fact about the server, and it leads the note before any row.
|
|
3409
|
+
// Multiple recorded API failures lead the note; no response alone cannot trigger this.
|
|
3409
3410
|
const serverSilentLead = silentApiRequests.length < 2
|
|
3410
3411
|
? ''
|
|
3411
3412
|
: `${serverSilentReading(silentApiRequests, silentNavigations, true)}\n\n`;
|
|
@@ -3529,7 +3530,7 @@ export function failureTraceNote(items, target, earlierFailures = [], apiPrefixe
|
|
|
3529
3530
|
if (unanswered.length > 0 && room > 0) {
|
|
3530
3531
|
const shown = unanswered.slice(0, room);
|
|
3531
3532
|
room -= shown.length;
|
|
3532
|
-
parts.push(`no response recorded — still in flight when the test ended
|
|
3533
|
+
parts.push(`no response recorded — possibly still in flight when the test ended or cancelled; ` +
|
|
3533
3534
|
`that alone does not establish the cause: ${shown.map(requestLabel).join('; ')}`);
|
|
3534
3535
|
}
|
|
3535
3536
|
if (answered.length > 0 && room > 0) {
|
|
@@ -3755,19 +3756,23 @@ export function failureTraceNote(items, target, earlierFailures = [], apiPrefixe
|
|
|
3755
3756
|
// a fact about the element, so it replaces the "look at the page" advice (m197).
|
|
3756
3757
|
hiddenBox
|
|
3757
3758
|
: serverSilent
|
|
3758
|
-
? //
|
|
3759
|
-
// the
|
|
3759
|
+
? // A navigation deadline must not be presented as proof of page-state failure.
|
|
3760
|
+
// Name the incomplete load without claiming why it did not finish.
|
|
3760
3761
|
'No listed request failed — none got a 4xx/5xx or a network error — but ' +
|
|
3761
3762
|
`${serverSilentReading(silentApiRequests, silentNavigations, false)} ` +
|
|
3762
|
-
`Re-run only these tests against ${target} (\`--last-failed\`)
|
|
3763
|
-
'
|
|
3764
|
-
:
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
'
|
|
3769
|
-
|
|
3770
|
-
|
|
3763
|
+
`Re-run only these tests against ${target} (\`--last-failed\`) or inspect the app's ` +
|
|
3764
|
+
'runtime log for the same window to distinguish the cause.'
|
|
3765
|
+
: hasPendingRequests
|
|
3766
|
+
? 'No listed request failed with a 4xx/5xx or a network error, but some requests have no ' +
|
|
3767
|
+
'recorded response. This does not establish whether the server stalled or the browser cancelled ' +
|
|
3768
|
+
'the request. Read the pending paths alongside the failed action and its timeout.'
|
|
3769
|
+
: 'No listed request failed with a 4xx/5xx or a network error. That does not establish ' +
|
|
3770
|
+
"that its response body or the page state was correct. Read what the test's last action sent (the first line of each " +
|
|
3771
|
+
'row) and what the page did next: a request that answered (2xx included) while the page ' +
|
|
3772
|
+
'still did not show the state the assertion waited on is the fact to read — its status ' +
|
|
3773
|
+
'and response body, not the selector. If the request is not the one the test meant — an ' +
|
|
3774
|
+
'unfollow sent where the test clicked follow — the state the action read was stale ' +
|
|
3775
|
+
'before it.') +
|
|
3771
3776
|
prefixAdvice +
|
|
3772
3777
|
(wrapped
|
|
3773
3778
|
? ' The API received a body wrapped in `data`: app-http’s `post(url, data, config)` / ' +
|
package/dist/utilities.d.ts
CHANGED
|
@@ -208,8 +208,7 @@ export declare function streamingBackgroundCommand(command: string, context?: Di
|
|
|
208
208
|
* Every statement of a command that starts a whole test suite, in command order.
|
|
209
209
|
*
|
|
210
210
|
* This is the ONE count of suite runs in a command: {@link isSuiteRunCommand} asks it,
|
|
211
|
-
* {@link
|
|
212
|
-
* starts a whole walk of the same suite, and only the last of them is rewritten — and a re-run
|
|
211
|
+
* {@link repeatedSuiteRunError} refuses only simple identical invocations, and a re-run
|
|
213
212
|
* composed from a command ({@link ./suite-overlap.js} `scopedRerunCommand`) keeps only the first.
|
|
214
213
|
*
|
|
215
214
|
* A statement that invokes a runner only to print is not one of these
|
|
@@ -229,23 +228,15 @@ export declare function suiteRunStatements(command: string): string[];
|
|
|
229
228
|
*/
|
|
230
229
|
export declare function isSuiteRunCommand(command: string): boolean;
|
|
231
230
|
/**
|
|
232
|
-
*
|
|
233
|
-
* site asks, foreground and background alike.
|
|
231
|
+
* Refuse only a command made entirely of identical suite invocations.
|
|
234
232
|
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
* suite's own runner script in the foreground, where nothing counted them, and the note reported
|
|
240
|
-
* the passing second walk as the first walk's 13 failures.
|
|
241
|
-
*
|
|
242
|
-
* The one run handed back is the LAST suite statement, rewritten exactly as
|
|
243
|
-
* {@link streamingBackgroundCommand} rewrites a run (a filter or `| tail` after the runner is
|
|
244
|
-
* dropped, and a Playwright run gets the reporter that prints failures). Its own count is one —
|
|
245
|
-
* guarded, so this cannot recurse.
|
|
233
|
+
* Mixed shell commands execute as written. Rebuilding their prefix or suffix can lose writes,
|
|
234
|
+
* break heredoc delimiters or turn an && guard into unconditional work (m277). Different args
|
|
235
|
+
* or environments may select different suites or targets; they are not known duplicates either.
|
|
236
|
+
* This is an optimization, so uncertainty always allows the original command.
|
|
246
237
|
*
|
|
247
238
|
* @param command - The shell command as the executor sent it.
|
|
248
|
-
* @returns The refusal
|
|
239
|
+
* @returns The duplicate-only refusal, or null when the original command should run.
|
|
249
240
|
*/
|
|
250
241
|
export declare function repeatedSuiteRunError(command: string): string | null;
|
|
251
242
|
/**
|
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;AAWH,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAE3E,OAAO,EACL,KAAK,mBAAmB,EAExB,KAAK,aAAa,EAMnB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAS5C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,GAAG,MAAM,KAAG,MAEE,CAAA;AAuGhD;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAK/C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;;;;GAkBG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,MAAM,GAAG,IAAI,CAsCf;AAED,qEAAqE;AACrE,eAAO,MAAM,eAAe,QAA0C,CAAA;AAEtE;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAgB7D;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IACxC,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;CACjB,GAAG,MAAM,GAAG,IAAI,CAKhB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CACvB,OAAO,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
|
@@ -675,8 +675,7 @@ const SUITE_RUN_COMMANDS = [
|
|
|
675
675
|
* Every statement of a command that starts a whole test suite, in command order.
|
|
676
676
|
*
|
|
677
677
|
* This is the ONE count of suite runs in a command: {@link isSuiteRunCommand} asks it,
|
|
678
|
-
* {@link
|
|
679
|
-
* starts a whole walk of the same suite, and only the last of them is rewritten — and a re-run
|
|
678
|
+
* {@link repeatedSuiteRunError} refuses only simple identical invocations, and a re-run
|
|
680
679
|
* composed from a command ({@link ./suite-overlap.js} `scopedRerunCommand`) keeps only the first.
|
|
681
680
|
*
|
|
682
681
|
* A statement that invokes a runner only to print is not one of these
|
|
@@ -690,10 +689,7 @@ export function suiteRunStatements(command) {
|
|
|
690
689
|
if (commandRunsNoTests(command))
|
|
691
690
|
return [];
|
|
692
691
|
return commandSegments(command)
|
|
693
|
-
.filter((segment) => SUITE_RUN_COMMANDS.some((re) => re.test(segment.text)) &&
|
|
694
|
-
// A statement that only PRINTS (`playwright test --list`) is not a walk, so
|
|
695
|
-
// `npx playwright test --list && npx playwright test` is one run, not two.
|
|
696
|
-
!commandRunsNoTests(segment.text))
|
|
692
|
+
.filter((segment) => SUITE_RUN_COMMANDS.some((re) => re.test(segment.text)) && !commandRunsNoTests(segment.text))
|
|
697
693
|
.map((segment) => segment.text);
|
|
698
694
|
}
|
|
699
695
|
/**
|
|
@@ -707,41 +703,42 @@ export function isSuiteRunCommand(command) {
|
|
|
707
703
|
return suiteRunStatements(command).length > 0;
|
|
708
704
|
}
|
|
709
705
|
/**
|
|
710
|
-
*
|
|
711
|
-
* site asks, foreground and background alike.
|
|
706
|
+
* Refuse only a command made entirely of identical suite invocations.
|
|
712
707
|
*
|
|
713
|
-
*
|
|
714
|
-
*
|
|
715
|
-
*
|
|
716
|
-
*
|
|
717
|
-
* suite's own runner script in the foreground, where nothing counted them, and the note reported
|
|
718
|
-
* the passing second walk as the first walk's 13 failures.
|
|
719
|
-
*
|
|
720
|
-
* The one run handed back is the LAST suite statement, rewritten exactly as
|
|
721
|
-
* {@link streamingBackgroundCommand} rewrites a run (a filter or `| tail` after the runner is
|
|
722
|
-
* dropped, and a Playwright run gets the reporter that prints failures). Its own count is one —
|
|
723
|
-
* guarded, so this cannot recurse.
|
|
708
|
+
* Mixed shell commands execute as written. Rebuilding their prefix or suffix can lose writes,
|
|
709
|
+
* break heredoc delimiters or turn an && guard into unconditional work (m277). Different args
|
|
710
|
+
* or environments may select different suites or targets; they are not known duplicates either.
|
|
711
|
+
* This is an optimization, so uncertainty always allows the original command.
|
|
724
712
|
*
|
|
725
713
|
* @param command - The shell command as the executor sent it.
|
|
726
|
-
* @returns The refusal
|
|
714
|
+
* @returns The duplicate-only refusal, or null when the original command should run.
|
|
727
715
|
*/
|
|
728
716
|
export function repeatedSuiteRunError(command) {
|
|
729
717
|
if (commandRunsNoTests(command))
|
|
730
718
|
return null;
|
|
731
|
-
const
|
|
732
|
-
if (
|
|
719
|
+
const steps = locatedCommandSegments(command);
|
|
720
|
+
if (steps.length <= 1)
|
|
721
|
+
return null;
|
|
722
|
+
const first = steps[0];
|
|
723
|
+
const segment = first.segment;
|
|
724
|
+
if (segment === null)
|
|
725
|
+
return null;
|
|
726
|
+
if (steps.some((step) => step.segment === null ||
|
|
727
|
+
step.start === null ||
|
|
728
|
+
step.end === null ||
|
|
729
|
+
step.redirectTarget !== null ||
|
|
730
|
+
step.separator === '|' ||
|
|
731
|
+
step.terminator === '|' ||
|
|
732
|
+
step.segment.args.some((arg) => /[<>]/.test(arg)) ||
|
|
733
|
+
!SUITE_RUN_COMMANDS.some((re) => re.test(step.segment.text)) ||
|
|
734
|
+
step.segment.text !== segment.text ||
|
|
735
|
+
step.assignments.join('\0') !== first.assignments.join('\0')))
|
|
733
736
|
return null;
|
|
734
|
-
const
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
.map((
|
|
738
|
-
|
|
739
|
-
const single = lastSuitePart && suiteRunStatements(lastSuitePart).length === 1
|
|
740
|
-
? streamingBackgroundCommand(lastSuitePart).command
|
|
741
|
-
: (lastSuitePart ?? '');
|
|
742
|
-
return (`This command runs the suite ${suiteSteps.length === 2 ? 'twice' : `${suiteSteps.length} times`} ` +
|
|
743
|
-
`(${suiteSteps.map((s, i) => `step ${i + 1}: \`${s}\``).join(', ')}). One walk is the ` +
|
|
744
|
-
`measurement; run exactly one: \`${single}\``);
|
|
737
|
+
const last = steps.at(-1);
|
|
738
|
+
const single = streamingBackgroundCommand(command.slice(last.start, last.end)).command;
|
|
739
|
+
return (`This command runs the suite ${steps.length === 2 ? 'twice' : `${steps.length} times`} ` +
|
|
740
|
+
`(${steps.map((step, i) => `step ${i + 1}: \`${step.segment.text}\``).join(', ')}). ` +
|
|
741
|
+
`One walk is the measurement; run exactly one: \`${single}\``);
|
|
745
742
|
}
|
|
746
743
|
/** A flag with its value, as {@link suiteRunBudgetCommand} writes it: `--timeout=15000`. */
|
|
747
744
|
const BUDGET_FLAG = /^(--[A-Za-z][\w-]*)=(\S+)$/;
|