@molecule/api-ai-tools 1.14.0 → 1.14.1
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 +24 -41
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +71 -19
- package/dist/types.d.ts +7 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utilities.d.ts +13 -28
- package/dist/utilities.d.ts.map +1 -1
- package/dist/utilities.js +231 -64
- 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-23T11:49:45.764Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/api-ai-tools
|
|
@@ -1298,6 +1298,14 @@ interface ToolBuildConfig {
|
|
|
1298
1298
|
*/
|
|
1299
1299
|
commandBudgetMs?: number
|
|
1300
1300
|
|
|
1301
|
+
/**
|
|
1302
|
+
* Opt in to one partial diagnostic return for a task driving this known deployed URL.
|
|
1303
|
+
* Return null when the task already returned a wait result or its history is unknown.
|
|
1304
|
+
* Only a real suite command with a complete inline failure report can yield; it remains
|
|
1305
|
+
* running, with no exit code or completed proof. Absent leaves ordinary waits unchanged.
|
|
1306
|
+
*/
|
|
1307
|
+
yieldOnFirstFailureFor?: (taskId: string) => string | null
|
|
1308
|
+
|
|
1301
1309
|
/**
|
|
1302
1310
|
* How long (ms) exec_command waits for a command it backgrounded only because the
|
|
1303
1311
|
* command asked for more than {@link commandBudgetMs}, before handing back a task
|
|
@@ -1392,16 +1400,7 @@ interface ToolBuildConfig {
|
|
|
1392
1400
|
* @returns The duration in ms, or null.
|
|
1393
1401
|
*/
|
|
1394
1402
|
suiteRunMs?: (command: string, cwd: string) => Promise<number | null | undefined>
|
|
1395
|
-
|
|
1396
|
-
/** Post-write hook (e.g. auto-format via Prettier/ESLint). Called after every write_file/edit_file. */
|
|
1397
|
-
onAfterWrite?: (path: string) => Promise<void>
|
|
1398
|
-
|
|
1399
|
-
/** Diff tracking callback. Called before writes with old/new content. */
|
|
1400
|
-
onFileDiff?: (event: FileDiffEvent) => void
|
|
1401
|
-
|
|
1402
|
-
/** Structural change callback. Called on create_directory, delete_file, rename_file. */
|
|
1403
|
-
onFileChange?: (event: FileChangeEvent) => void
|
|
1404
|
-
}
|
|
1403
|
+
// … truncated — the full declaration is in node_modules/@molecule/api-ai-tools/dist/types.d.ts
|
|
1405
1404
|
```
|
|
1406
1405
|
|
|
1407
1406
|
#### `FileDiffEvent`
|
|
@@ -1479,7 +1478,10 @@ A command with the output filters after its suite runner removed.
|
|
|
1479
1478
|
interface SuiteFilterStrip {
|
|
1480
1479
|
/** The command to run. */
|
|
1481
1480
|
command: string
|
|
1482
|
-
/**
|
|
1481
|
+
/**
|
|
1482
|
+
* The pipeline stages dropped, as written (`| grep … | tail -20`), or '' when none were. A
|
|
1483
|
+
* command with several suite runs lists one group per run, joined by a space.
|
|
1484
|
+
*/
|
|
1483
1485
|
dropped: string
|
|
1484
1486
|
}
|
|
1485
1487
|
```
|
|
@@ -3523,17 +3525,17 @@ killed (X1 run flash-m15 lost 20 of its 60 minutes this way, 2026-10-15):
|
|
|
3523
3525
|
It is dropped: `wait_for_task` already returns the end of the log.
|
|
3524
3526
|
- any output-only filter piped after a SUITE runner (`| grep … | tail -20`), which hides the
|
|
3525
3527
|
failing test's own error and leaves the pipeline's exit status — the filter's — as the run's.
|
|
3526
|
-
Every such stage is dropped
|
|
3527
|
-
returns the end of the full log,
|
|
3528
|
-
(xr-molecule-flash-m101 +25:54).
|
|
3528
|
+
Every such stage is dropped from EVERY suite run in the command, not only the last
|
|
3529
|
+
({@link stripTrailingSuiteFilters}); `wait_for_task` already returns the end of the full log,
|
|
3530
|
+
and a run whose tally shows a failure must never report 0 (xr-molecule-flash-m101 +25:54).
|
|
3529
3531
|
- `playwright test` with no `--reporter`, which runs the config's reporter —
|
|
3530
3532
|
often `html`, which prints nothing per test. `--reporter=list` is added
|
|
3531
3533
|
when the playwright run is the command's last step, piped or not: it writes each result as
|
|
3532
|
-
it finishes, and it is the shape the platform reads a background suite back in.
|
|
3534
|
+
it finishes, and it is the shape the platform reads a background suite back in. Every EARLIER
|
|
3535
|
+
Playwright invocation gets the same reporter, so its log is readable while it walks; the
|
|
3536
|
+
machine `json` report stays on the last invocation.
|
|
3533
3537
|
|
|
3534
3538
|
The run ends up with exactly ONE reporter that prints each failure — `list`. A run that names
|
|
3535
|
-
any other printing reporter has it REPLACED, never joined: two of them write every test result
|
|
3536
|
-
into the log twice, which on X1 flash-m83 (2026-10-16) made a `--reporter=list,line` run (its
|
|
3537
3539
|
|
|
3538
3540
|
_(description truncated — read the full text in `node_modules/@molecule/api-ai-tools/dist/utilities.d.ts`.)_
|
|
3539
3541
|
|
|
@@ -3728,28 +3730,8 @@ function isPlaywrightRunCommand(command: string): boolean
|
|
|
3728
3730
|
|
|
3729
3731
|
#### `stripTrailingSuiteFilters(command)`
|
|
3730
3732
|
|
|
3731
|
-
Drop the output-only filters piped after the command's suite
|
|
3732
|
-
|
|
3733
|
-
A filter after the runner is not "the end of the log" the executor asked for: it hides the
|
|
3734
|
-
failing test's own error (it usually matches none of `✘|passed|failed`), and the pipeline's exit
|
|
3735
|
-
status becomes the FILTER's, so `… 2>&1 | grep -E "✘|passed|failed|skipped" | tail -20` came back
|
|
3736
|
-
`exitCode: 0` for a run with a failure in it (xr-molecule-flash-m101 +25:54). The tool returns
|
|
3737
|
-
the end of the full log anyway, so the filter only costs diagnosability.
|
|
3738
|
-
|
|
3739
|
-
Only a contiguous suffix of the stages after the runner is cut, and only stages the parse proves
|
|
3740
|
-
are output-only ({@link isOutputOnlyFilter}): a `| tee` or `| xargs` keeps its place, and a
|
|
3741
|
-
caller that reports the run's exit code must then treat it as unknown
|
|
3742
|
-
({@link suiteRunPipedAfterRunner}).
|
|
3743
|
-
|
|
3744
|
-
A statement after the run's own pipeline (`; echo done`, `&& echo ok`) does not protect the
|
|
3745
|
-
filters before it: the filter is thrown away and the trailing statement is kept, so the log the
|
|
3746
|
-
run writes still holds every failure (xr-molecule-flash-m121 — a `| tail -5; echo done` kept its
|
|
3747
|
-
tail, and a 95-second walk's log held only the tally while the platform's own hold had handed
|
|
3748
|
-
that command back).
|
|
3749
|
-
|
|
3750
|
-
The command around the dropped stages is left as written: a group they sit in keeps its closer
|
|
3751
|
-
(`( … | tail -25)` → `( … )`, never `( …` — xr-molecule-flash-m418 +23:31), and a stage the cut
|
|
3752
|
-
would leave a closer dangling inside is not dropped at all.
|
|
3733
|
+
Drop the output-only filters piped after the command's suite runners
|
|
3734
|
+
({@link suiteFilterDrops}).
|
|
3753
3735
|
|
|
3754
3736
|
```typescript
|
|
3755
3737
|
function stripTrailingSuiteFilters(command: string): SuiteFilterStrip
|
|
@@ -3757,7 +3739,7 @@ function stripTrailingSuiteFilters(command: string): SuiteFilterStrip
|
|
|
3757
3739
|
|
|
3758
3740
|
- `command` — The shell command.
|
|
3759
3741
|
|
|
3760
|
-
**Returns:** The rewritten command and the stages dropped.
|
|
3742
|
+
**Returns:** The rewritten command, and the stages dropped in command order (`''` when none were).
|
|
3761
3743
|
|
|
3762
3744
|
#### `suiteRunPipelinePlacement(command)`
|
|
3763
3745
|
|
|
@@ -5419,6 +5401,7 @@ Peer dependencies:
|
|
|
5419
5401
|
|
|
5420
5402
|
- `@molecule/api-ai`
|
|
5421
5403
|
|
|
5404
|
+
- **`yieldOnFirstFailureFor`** can yield one still-running deployed task's concrete diagnostic; callers opt out after a prior wait result or unknown history.
|
|
5422
5405
|
- **This package only defines the tools — it runs no model loop.** Hand them to
|
|
5423
5406
|
the bonded AI provider (`chat({ tools, … })`) or to an
|
|
5424
5407
|
`@molecule/api-ai-agents` run.
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* (identity, tool listing, project docs, discovered skills).
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
+
* - **`yieldOnFirstFailureFor`** can yield one still-running deployed task's concrete diagnostic; callers opt out after a prior wait result or unknown history.
|
|
15
16
|
* - **This package only defines the tools — it runs no model loop.** Hand them to
|
|
16
17
|
* the bonded AI provider (`chat({ tools, … })`) or to an
|
|
17
18
|
* `@molecule/api-ai-agents` run.
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwIG;AAEH,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,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,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
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* (identity, tool listing, project docs, discovered skills).
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
+
* - **`yieldOnFirstFailureFor`** can yield one still-running deployed task's concrete diagnostic; callers opt out after a prior wait result or unknown history.
|
|
15
16
|
* - **This package only defines the tools — it runs no model loop.** Hand them to
|
|
16
17
|
* the bonded AI provider (`chat({ tools, … })`) or to an
|
|
17
18
|
* `@molecule/api-ai-agents` run.
|
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;AAgS9C;;;;;;;;;;;;;;;;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;AAiInE;;;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;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA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eAAO,MAAM,wBAAwB,QAI6C,CAAA;AA2DlF;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUhE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGtE;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,CA4iGxF"}
|
package/dist/tools.js
CHANGED
|
@@ -2404,12 +2404,14 @@ export function buildTools(backend, config) {
|
|
|
2404
2404
|
r.new_string !== '' &&
|
|
2405
2405
|
!r.new_string.endsWith('\n'));
|
|
2406
2406
|
const syntax = await syntaxErrorAfterWrite(path);
|
|
2407
|
-
//
|
|
2408
|
-
//
|
|
2409
|
-
//
|
|
2410
|
-
//
|
|
2411
|
-
//
|
|
2412
|
-
//
|
|
2407
|
+
// A parse error and a dropped line break are two OBSERVATIONS, not one
|
|
2408
|
+
// accident. A join only sometimes breaks the syntax (same-line JSX siblings
|
|
2409
|
+
// parse), and the diagnostic usually comes from something else in the same
|
|
2410
|
+
// edit — flash-l20 +17:26 dropped the boundary while inserting an opening
|
|
2411
|
+
// fragment it never closed; the advisory blamed the join, and restoring only
|
|
2412
|
+
// the newline returned the same unmatched-fragment error. So show where the
|
|
2413
|
+
// lines joined and hand over the parser's own diagnostic, and ask whether the
|
|
2414
|
+
// join was intended instead of prescribing a newline-only repair.
|
|
2413
2415
|
const which = dropped.length === 1
|
|
2414
2416
|
? `replacement ${dropped[0].position}`
|
|
2415
2417
|
: `replacements ${dropped.map((r) => r.position).join(', ')}`;
|
|
@@ -2422,17 +2424,18 @@ export function buildTools(backend, config) {
|
|
|
2422
2424
|
const shownFused = fused
|
|
2423
2425
|
.map((l) => ` ${l.line}: ${l.text.length > 200 ? `${l.text.slice(0, 200)}…` : l.text}`)
|
|
2424
2426
|
.join('\n');
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2427
|
+
// Only claim a join the final file proves (`located`), never one inferred from
|
|
2428
|
+
// the replacements alone: a replacement can drop a newline that ended a line
|
|
2429
|
+
// with a BLANK line after it, in which case nothing joined (flash-m62).
|
|
2430
|
+
const fusedNote = syntax.syntaxError && located.length > 0
|
|
2431
|
+
? 'A replacement removed a line break. Check whether the join was intended; the ' +
|
|
2432
|
+
'parser diagnostic below may have another cause.\n' +
|
|
2433
|
+
`Joined by ${which}:\n` +
|
|
2434
|
+
shownFused +
|
|
2430
2435
|
(fusedOmitted > 0
|
|
2431
|
-
? `\n (${fusedOmitted} more
|
|
2436
|
+
? `\n (${fusedOmitted} more joined line(s) — read_file ${path})`
|
|
2432
2437
|
: '') +
|
|
2433
|
-
`\
|
|
2434
|
-
"else about it). Editing the FUSED LINE's text instead fuses the next line the same " +
|
|
2435
|
-
`way (flash-m55: three edits in a row).\n${syntax.syntaxError}`
|
|
2438
|
+
`\n${syntax.syntaxError}`
|
|
2436
2439
|
: null;
|
|
2437
2440
|
return {
|
|
2438
2441
|
path,
|
|
@@ -3312,6 +3315,7 @@ export function buildTools(backend, config) {
|
|
|
3312
3315
|
// server-side costs no round trip and no context.
|
|
3313
3316
|
async wait_for_task(input) {
|
|
3314
3317
|
const taskId = typeof input.taskId === 'string' ? input.taskId.trim() : '';
|
|
3318
|
+
let recoveredCommand;
|
|
3315
3319
|
// An id another project launched is not this project's to wait on — its files are in that
|
|
3316
3320
|
// project's sandbox, so a wait here would poll for an exit file that never appears, and its
|
|
3317
3321
|
// wait time would count against that project's own stuck clock (xr-molecule-flash-m208
|
|
@@ -3348,6 +3352,7 @@ export function buildTools(backend, config) {
|
|
|
3348
3352
|
outputFileProbed.add(taskId);
|
|
3349
3353
|
try {
|
|
3350
3354
|
const script = await backend.readFile(`/tmp/${taskId}.sh`);
|
|
3355
|
+
recoveredCommand = script;
|
|
3351
3356
|
const target = outputRedirectTarget(script);
|
|
3352
3357
|
// A relative target was written against the command's own cwd, which
|
|
3353
3358
|
// the handle does not carry; the project root is where a background
|
|
@@ -3478,7 +3483,31 @@ export function buildTools(backend, config) {
|
|
|
3478
3483
|
// and its overlap hold refused that exact run 23 s later) — and so a run narrowed to a
|
|
3479
3484
|
// file or two is judged against what it selected (xr-molecule-flash-m119 +42:08). Read
|
|
3480
3485
|
// BEFORE the loop: the running answers below are built after it closes and still need it.
|
|
3481
|
-
|
|
3486
|
+
let taskRecord = runByTask.get(taskId);
|
|
3487
|
+
// Recovery knows the script, not the original cwd. Keep existing rerun hints unknown.
|
|
3488
|
+
const started = taskRecord?.cwd === undefined
|
|
3489
|
+
? undefined
|
|
3490
|
+
: { command: taskRecord.command, cwd: taskRecord.cwd };
|
|
3491
|
+
let yieldDiagnostic = false;
|
|
3492
|
+
try {
|
|
3493
|
+
const target = config?.yieldOnFirstFailureFor?.(taskId);
|
|
3494
|
+
const command = taskRecord?.command ?? recoveredCommand;
|
|
3495
|
+
if (target && command && isSuiteRunCommand(command)) {
|
|
3496
|
+
const url = new URL(target);
|
|
3497
|
+
const runTarget = suiteCommandTarget(command);
|
|
3498
|
+
yieldDiagnostic =
|
|
3499
|
+
(url.protocol === 'https:' || url.protocol === 'http:') &&
|
|
3500
|
+
runTarget !== 'local' &&
|
|
3501
|
+
runTarget === url.host.toLowerCase();
|
|
3502
|
+
if (yieldDiagnostic && !taskRecord) {
|
|
3503
|
+
taskRecord = { command };
|
|
3504
|
+
runByTask.set(taskId, taskRecord);
|
|
3505
|
+
}
|
|
3506
|
+
}
|
|
3507
|
+
}
|
|
3508
|
+
catch (_error) {
|
|
3509
|
+
// Unknown consumer history/target does not change an ordinary wait.
|
|
3510
|
+
}
|
|
3482
3511
|
let midRunNote = null;
|
|
3483
3512
|
let lastCauseLookAt = startedAt - repeatingCauseLookMs();
|
|
3484
3513
|
let lastEndLookAt = startedAt - TASK_END_LOOK_MS;
|
|
@@ -3529,8 +3558,6 @@ export function buildTools(backend, config) {
|
|
|
3529
3558
|
// The page-renders-nothing cause needs no repeated signature: every spec waits for its
|
|
3530
3559
|
// own first element, so the failures differ while the cause does not (m141).
|
|
3531
3560
|
const universal = universalCause(causeLog, found, started?.command);
|
|
3532
|
-
if (!found && !universal)
|
|
3533
|
-
continue;
|
|
3534
3561
|
// The ONE predicate behind this decision and `repeatingFailureNote`'s wording, so the two
|
|
3535
3562
|
// cannot come to different verdicts.
|
|
3536
3563
|
const stopCause = earlyReturnCause(found, universal);
|
|
@@ -3561,6 +3588,30 @@ export function buildTools(backend, config) {
|
|
|
3561
3588
|
}),
|
|
3562
3589
|
};
|
|
3563
3590
|
}
|
|
3591
|
+
if (yieldDiagnostic &&
|
|
3592
|
+
taskRecord &&
|
|
3593
|
+
!taskRecord.diagnosticYielded &&
|
|
3594
|
+
logShowsInlineFailureBodies(causeLog)) {
|
|
3595
|
+
// Completion during the log read still wins over a progress return.
|
|
3596
|
+
exitCode = await readExit();
|
|
3597
|
+
if (exitCode !== null)
|
|
3598
|
+
break;
|
|
3599
|
+
// Another wait can yield while this sandbox read is pending.
|
|
3600
|
+
if (taskRecord.diagnosticYielded)
|
|
3601
|
+
continue;
|
|
3602
|
+
taskRecord.diagnosticYielded = true;
|
|
3603
|
+
const earlyMs = Date.now() - startedAt;
|
|
3604
|
+
waitedByTask.set(taskId, waitedBefore + earlyMs);
|
|
3605
|
+
return {
|
|
3606
|
+
taskId,
|
|
3607
|
+
status: 'running',
|
|
3608
|
+
waitedMs: earlyMs,
|
|
3609
|
+
outputSoFar: sanitizeOutput(truncateMiddle(causeLog, MAX_OUTPUT_SIZE)),
|
|
3610
|
+
note: 'A failure report is available, but this task is still running. This is partial ' +
|
|
3611
|
+
'log output, not a completed result. Local edits do not change this deployed ' +
|
|
3612
|
+
'build; leave the task running and collect its final result.',
|
|
3613
|
+
};
|
|
3614
|
+
}
|
|
3564
3615
|
// A lead: this wait goes on, and the finding rides its result as a note — the executor has
|
|
3565
3616
|
// to keep waiting for the run's own result, so it must not be told one in the status. The
|
|
3566
3617
|
// look keeps running for the same reason: an app that goes down mid-run turns a shared
|
|
@@ -3747,7 +3798,8 @@ export function buildTools(backend, config) {
|
|
|
3747
3798
|
// How this run was started, so the note can hand over the narrowed re-run of exactly its
|
|
3748
3799
|
// failing tests instead of leaving the executor to re-run the whole suite (xr-molecule-
|
|
3749
3800
|
// flash-m101 +12:13: 139 tests, ~4 minutes, to check two fixes).
|
|
3750
|
-
const
|
|
3801
|
+
const record = runByTask.get(taskId);
|
|
3802
|
+
const run = record?.cwd === undefined ? undefined : { command: record.command, cwd: record.cwd };
|
|
3751
3803
|
// The standard machine report this launch wired, when it did (`reportByTask`). Read once per
|
|
3752
3804
|
// finished wait: it is the runner's own record of each failing test's identity and of the
|
|
3753
3805
|
// artifacts saved for that test, so a diagnosis can stop reconstructing them from the log.
|
package/dist/types.d.ts
CHANGED
|
@@ -142,6 +142,13 @@ export interface ToolBuildConfig {
|
|
|
142
142
|
* little under that outer timeout. Unset = no budget.
|
|
143
143
|
*/
|
|
144
144
|
commandBudgetMs?: number;
|
|
145
|
+
/**
|
|
146
|
+
* Opt in to one partial diagnostic return for a task driving this known deployed URL.
|
|
147
|
+
* Return null when the task already returned a wait result or its history is unknown.
|
|
148
|
+
* Only a real suite command with a complete inline failure report can yield; it remains
|
|
149
|
+
* running, with no exit code or completed proof. Absent leaves ordinary waits unchanged.
|
|
150
|
+
*/
|
|
151
|
+
yieldOnFirstFailureFor?: (taskId: string) => string | null;
|
|
145
152
|
/**
|
|
146
153
|
* How long (ms) exec_command waits for a command it backgrounded only because the
|
|
147
154
|
* command asked for more than {@link commandBudgetMs}, before handing back a task
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yFAAyF;IACzF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAE5B;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;IAEzB,6CAA6C;IAC7C,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IAEvC,qEAAqE;IACrE,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAEvD,qBAAqB;IACrB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAEvC,mCAAmC;IACnC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM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,CAAC,EAAE,UAAU,EAAE,CAAA;IAE/B,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;CAC1B"}
|
package/dist/utilities.d.ts
CHANGED
|
@@ -185,13 +185,15 @@ export declare const PLAYWRIGHT_FAILURES_INLINE_ENV = "PLAYWRIGHT_LIST_PRINT_FAI
|
|
|
185
185
|
* It is dropped: `wait_for_task` already returns the end of the log.
|
|
186
186
|
* - any output-only filter piped after a SUITE runner (`| grep … | tail -20`), which hides the
|
|
187
187
|
* failing test's own error and leaves the pipeline's exit status — the filter's — as the run's.
|
|
188
|
-
* Every such stage is dropped
|
|
189
|
-
* returns the end of the full log,
|
|
190
|
-
* (xr-molecule-flash-m101 +25:54).
|
|
188
|
+
* Every such stage is dropped from EVERY suite run in the command, not only the last
|
|
189
|
+
* ({@link stripTrailingSuiteFilters}); `wait_for_task` already returns the end of the full log,
|
|
190
|
+
* and a run whose tally shows a failure must never report 0 (xr-molecule-flash-m101 +25:54).
|
|
191
191
|
* - `playwright test` with no `--reporter`, which runs the config's reporter —
|
|
192
192
|
* often `html`, which prints nothing per test. `--reporter=list` is added
|
|
193
193
|
* when the playwright run is the command's last step, piped or not: it writes each result as
|
|
194
|
-
* it finishes, and it is the shape the platform reads a background suite back in.
|
|
194
|
+
* it finishes, and it is the shape the platform reads a background suite back in. Every EARLIER
|
|
195
|
+
* Playwright invocation gets the same reporter, so its log is readable while it walks; the
|
|
196
|
+
* machine `json` report stays on the last invocation.
|
|
195
197
|
*
|
|
196
198
|
* The run ends up with exactly ONE reporter that prints each failure — `list`. A run that names
|
|
197
199
|
* any other printing reporter has it REPLACED, never joined: two of them write every test result
|
|
@@ -393,35 +395,18 @@ export declare function isPlaywrightRunCommand(command: string): boolean;
|
|
|
393
395
|
export interface SuiteFilterStrip {
|
|
394
396
|
/** The command to run. */
|
|
395
397
|
command: string;
|
|
396
|
-
/**
|
|
398
|
+
/**
|
|
399
|
+
* The pipeline stages dropped, as written (`| grep … | tail -20`), or '' when none were. A
|
|
400
|
+
* command with several suite runs lists one group per run, joined by a space.
|
|
401
|
+
*/
|
|
397
402
|
dropped: string;
|
|
398
403
|
}
|
|
399
404
|
/**
|
|
400
|
-
* Drop the output-only filters piped after the command's suite
|
|
401
|
-
*
|
|
402
|
-
* A filter after the runner is not "the end of the log" the executor asked for: it hides the
|
|
403
|
-
* failing test's own error (it usually matches none of `✘|passed|failed`), and the pipeline's exit
|
|
404
|
-
* status becomes the FILTER's, so `… 2>&1 | grep -E "✘|passed|failed|skipped" | tail -20` came back
|
|
405
|
-
* `exitCode: 0` for a run with a failure in it (xr-molecule-flash-m101 +25:54). The tool returns
|
|
406
|
-
* the end of the full log anyway, so the filter only costs diagnosability.
|
|
407
|
-
*
|
|
408
|
-
* Only a contiguous suffix of the stages after the runner is cut, and only stages the parse proves
|
|
409
|
-
* are output-only ({@link isOutputOnlyFilter}): a `| tee` or `| xargs` keeps its place, and a
|
|
410
|
-
* caller that reports the run's exit code must then treat it as unknown
|
|
411
|
-
* ({@link suiteRunPipedAfterRunner}).
|
|
412
|
-
*
|
|
413
|
-
* A statement after the run's own pipeline (`; echo done`, `&& echo ok`) does not protect the
|
|
414
|
-
* filters before it: the filter is thrown away and the trailing statement is kept, so the log the
|
|
415
|
-
* run writes still holds every failure (xr-molecule-flash-m121 — a `| tail -5; echo done` kept its
|
|
416
|
-
* tail, and a 95-second walk's log held only the tally while the platform's own hold had handed
|
|
417
|
-
* that command back).
|
|
418
|
-
*
|
|
419
|
-
* The command around the dropped stages is left as written: a group they sit in keeps its closer
|
|
420
|
-
* (`( … | tail -25)` → `( … )`, never `( …` — xr-molecule-flash-m418 +23:31), and a stage the cut
|
|
421
|
-
* would leave a closer dangling inside is not dropped at all.
|
|
405
|
+
* Drop the output-only filters piped after the command's suite runners
|
|
406
|
+
* ({@link suiteFilterDrops}).
|
|
422
407
|
*
|
|
423
408
|
* @param command - The shell command.
|
|
424
|
-
* @returns The rewritten command and the stages dropped.
|
|
409
|
+
* @returns The rewritten command, and the stages dropped in command order (`''` when none were).
|
|
425
410
|
*/
|
|
426
411
|
export declare function stripTrailingSuiteFilters(command: string): SuiteFilterStrip;
|
|
427
412
|
/** Whether a finished run's exit code belongs to a stage after the suite runner. */
|
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;AAaH,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAG3E,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;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAErD;AAaD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKhF;AAgFD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE7D;AAyFD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGnD;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE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AAE,OAAO,CAAA;CAC7B,GACA,MAAM,CAmIR;AAED;;;;;;;;;;;;;;;;;;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;AAWtE;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA+B7D;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
|
@@ -602,13 +602,15 @@ function isStatusOnlyStep(step) {
|
|
|
602
602
|
* It is dropped: `wait_for_task` already returns the end of the log.
|
|
603
603
|
* - any output-only filter piped after a SUITE runner (`| grep … | tail -20`), which hides the
|
|
604
604
|
* failing test's own error and leaves the pipeline's exit status — the filter's — as the run's.
|
|
605
|
-
* Every such stage is dropped
|
|
606
|
-
* returns the end of the full log,
|
|
607
|
-
* (xr-molecule-flash-m101 +25:54).
|
|
605
|
+
* Every such stage is dropped from EVERY suite run in the command, not only the last
|
|
606
|
+
* ({@link stripTrailingSuiteFilters}); `wait_for_task` already returns the end of the full log,
|
|
607
|
+
* and a run whose tally shows a failure must never report 0 (xr-molecule-flash-m101 +25:54).
|
|
608
608
|
* - `playwright test` with no `--reporter`, which runs the config's reporter —
|
|
609
609
|
* often `html`, which prints nothing per test. `--reporter=list` is added
|
|
610
610
|
* when the playwright run is the command's last step, piped or not: it writes each result as
|
|
611
|
-
* it finishes, and it is the shape the platform reads a background suite back in.
|
|
611
|
+
* it finishes, and it is the shape the platform reads a background suite back in. Every EARLIER
|
|
612
|
+
* Playwright invocation gets the same reporter, so its log is readable while it walks; the
|
|
613
|
+
* machine `json` report stays on the last invocation.
|
|
612
614
|
*
|
|
613
615
|
* The run ends up with exactly ONE reporter that prints each failure — `list`. A run that names
|
|
614
616
|
* any other printing reporter has it REPLACED, never joined: two of them write every test result
|
|
@@ -671,20 +673,22 @@ export function streamingBackgroundCommand(command, context, reportPath) {
|
|
|
671
673
|
// A filter after the suite runner is not output the platform can read: it hides the failing
|
|
672
674
|
// test's own error, and its exit status replaces the run's with the filter's — m101's
|
|
673
675
|
// `… | grep -E "✘|passed|failed|skipped" | tail -20` reported `exitCode: 0` for a run with a
|
|
674
|
-
// failure in it. Every stage the parse proves is output-only is dropped
|
|
675
|
-
// log comes back anyway.
|
|
676
|
-
const filtered =
|
|
677
|
-
if (filtered.
|
|
676
|
+
// failure in it. Every stage the parse proves is output-only is dropped from EVERY run, earlier
|
|
677
|
+
// walks included; the end of the FULL log comes back anyway.
|
|
678
|
+
const filtered = suiteFilterDrops(out);
|
|
679
|
+
if (filtered.drops.length > 0) {
|
|
678
680
|
out = filtered.command;
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
681
|
+
for (const dropped of filtered.drops) {
|
|
682
|
+
// A lone trailing `| tail -N` keeps its own sentence: the reason it goes is that it holds all
|
|
683
|
+
// output back until the command ends, not that a filter cannot be read back.
|
|
684
|
+
const tailOnly = TRAILING_TAIL.exec(dropped);
|
|
685
|
+
changes.push(tailOnly && tailOnly[0].trim() === dropped
|
|
686
|
+
? `Dropped the trailing \`${dropped}\`: it holds all output back until the command ends, ` +
|
|
687
|
+
'and wait_for_task returns the end of the log anyway.'
|
|
688
|
+
: `Dropped \`${dropped}\` from after the test runner: a filtered log cannot be ` +
|
|
689
|
+
'diagnosed — the failing test’s own error is not in it — and wait_for_task returns the ' +
|
|
690
|
+
'end of the full log anyway.');
|
|
691
|
+
}
|
|
688
692
|
}
|
|
689
693
|
const tail = TRAILING_TAIL.exec(out);
|
|
690
694
|
if (tail) {
|
|
@@ -900,8 +904,116 @@ export function streamingBackgroundCommand(command, context, reportPath) {
|
|
|
900
904
|
if (addToRun('--retries=0'))
|
|
901
905
|
changes.push(`Added \`--retries=0\`: ${why}.`);
|
|
902
906
|
}
|
|
907
|
+
// Every EARLIER Playwright invocation writes the same log, so it is put on the progressive
|
|
908
|
+
// reporter too — not only the invocation this launcher measures (see
|
|
909
|
+
// {@link earlierPlaywrightReporters}).
|
|
910
|
+
const earlier = earlierPlaywrightReporters(out);
|
|
911
|
+
if (earlier.changes.length > 0) {
|
|
912
|
+
out = earlier.command;
|
|
913
|
+
changes.push(...earlier.changes);
|
|
914
|
+
}
|
|
903
915
|
return { command: out, changes, ...(report === null ? {} : { reportPath: report }) };
|
|
904
916
|
}
|
|
917
|
+
/**
|
|
918
|
+
* Put every Playwright invocation BEFORE the command's last one on the progressive `list`
|
|
919
|
+
* reporter.
|
|
920
|
+
*
|
|
921
|
+
* A compound command's earlier walk is not a preview: it writes the same log the executor reads,
|
|
922
|
+
* and on X1 xr-molecule-flash-l21 (+21:27) the first 3.6-minute walk kept its own
|
|
923
|
+
* `--reporter=line`, which prints `[n/N] <title>` rows with no ✓/✘ mark and no per-failure error.
|
|
924
|
+
* What came back was `72 passed` and two failure NAMES; the error bodies existed only in the walk's
|
|
925
|
+
* discarded log, and diagnosing them needed another run.
|
|
926
|
+
*
|
|
927
|
+
* Only the reporter SET is touched, and only printing reporters in it ({@link PRINTING_REPORTERS})
|
|
928
|
+
* are replaced by ONE `list` — the same rule the last invocation gets. A run that names no
|
|
929
|
+
* reporter has the config reporter, which may print nothing until the end, so `--reporter=list` is
|
|
930
|
+
* added where the parse can place it. Every other flag (`--grep`, `--project`, `--config`,
|
|
931
|
+
* `--workers`, `--timeout`, selections, exclusions, retries) and every non-printing reporter
|
|
932
|
+
* (`json`, `html`, `junit`, or one this build does not know) is left exactly as written.
|
|
933
|
+
*
|
|
934
|
+
* The LAST invocation is deliberately not this function's: {@link streamingBackgroundCommand}
|
|
935
|
+
* already decides its reporters, and it alone owns the machine `json` report, which must never be
|
|
936
|
+
* claimed for an earlier walk. A statement the parse cannot place (inside a nested `sh -c` string)
|
|
937
|
+
* is left as written — there is no offset in this command to splice at.
|
|
938
|
+
*
|
|
939
|
+
* @param command - The command after every other rewrite.
|
|
940
|
+
* @returns The rewritten command, and one sentence per reporter change made.
|
|
941
|
+
*/
|
|
942
|
+
function earlierPlaywrightReporters(command) {
|
|
943
|
+
const located = locatedSegments(command);
|
|
944
|
+
const runs = [];
|
|
945
|
+
for (let i = 0; i < located.length; i += 1) {
|
|
946
|
+
const segment = located[i]?.segment;
|
|
947
|
+
if (segment && SUITE_RUN_COMMANDS.some((re) => re.test(segment.text)))
|
|
948
|
+
runs.push(i);
|
|
949
|
+
}
|
|
950
|
+
const rewrites = [];
|
|
951
|
+
let out = command;
|
|
952
|
+
// Right to left, so each site's offsets still describe the text they were measured on.
|
|
953
|
+
for (const at of runs.slice(0, -1).reverse()) {
|
|
954
|
+
const site = located[at];
|
|
955
|
+
if (!site || site.start === null || site.end === null)
|
|
956
|
+
continue;
|
|
957
|
+
const raw = out.slice(site.start, site.end);
|
|
958
|
+
// A statement that only lists or prints tests is not a run (`--list`, `--help`).
|
|
959
|
+
if (!isPlaywrightRunCommand(raw))
|
|
960
|
+
continue;
|
|
961
|
+
const reporters = lastReporterFlag(raw);
|
|
962
|
+
if (reporters === null) {
|
|
963
|
+
const insertAt = statementArgumentEnd(out, site.start, site.end);
|
|
964
|
+
if (insertAt === null)
|
|
965
|
+
continue;
|
|
966
|
+
out = `${out.slice(0, insertAt)} --reporter=list${out.slice(insertAt)}`;
|
|
967
|
+
rewrites.push({ kind: 'added', from: '' });
|
|
968
|
+
continue;
|
|
969
|
+
}
|
|
970
|
+
const printing = reporters.values.filter((value) => PRINTING_REPORTERS.has(value));
|
|
971
|
+
// A set with no printing reporter is the executor's own artifact (`json`, `html`, `junit`, or
|
|
972
|
+
// a reporter this build does not know) and is left exactly as it was.
|
|
973
|
+
if (printing.length === 0)
|
|
974
|
+
continue;
|
|
975
|
+
if (printing.length === 1 && printing[0] === 'list')
|
|
976
|
+
continue;
|
|
977
|
+
let placed = false;
|
|
978
|
+
const kept = reporters.values
|
|
979
|
+
.map((value) => {
|
|
980
|
+
if (!PRINTING_REPORTERS.has(value))
|
|
981
|
+
return value;
|
|
982
|
+
if (placed)
|
|
983
|
+
return null;
|
|
984
|
+
placed = true;
|
|
985
|
+
return 'list';
|
|
986
|
+
})
|
|
987
|
+
.filter((value) => value !== null);
|
|
988
|
+
out =
|
|
989
|
+
out.slice(0, site.start + reporters.start) +
|
|
990
|
+
`--reporter${reporters.separator}${kept.join(',')}` +
|
|
991
|
+
out.slice(site.start + reporters.end);
|
|
992
|
+
rewrites.push({
|
|
993
|
+
kind: printing.includes('list') ? 'dropped' : 'switched',
|
|
994
|
+
from: reporters.values.join(','),
|
|
995
|
+
});
|
|
996
|
+
}
|
|
997
|
+
const changes = [];
|
|
998
|
+
const count = (kind) => rewrites.filter((rewrite) => rewrite.kind === kind).length;
|
|
999
|
+
if (count('added') > 0)
|
|
1000
|
+
changes.push(`Added \`--reporter=list\` to ${count('added') === 1 ? 'the earlier test run' : 'each earlier test run'} ` +
|
|
1001
|
+
'so each test result is written to the log as it finishes (a config reporter may print ' +
|
|
1002
|
+
'nothing until the end).');
|
|
1003
|
+
const switched = rewrites.find((rewrite) => rewrite.kind === 'switched');
|
|
1004
|
+
if (switched)
|
|
1005
|
+
changes.push(`Switched ${count('switched') === 1 ? 'the earlier test run’s' : 'each earlier test run’s'} ` +
|
|
1006
|
+
`reporters to \`--reporter=list\`: \`list\` writes each test result as it finishes and is ` +
|
|
1007
|
+
'the shape the platform reads back, and it is the only printing reporter — two of them ' +
|
|
1008
|
+
'write every result into the log twice (X1 flash-m83).');
|
|
1009
|
+
const dropped = rewrites.find((rewrite) => rewrite.kind === 'dropped');
|
|
1010
|
+
if (dropped)
|
|
1011
|
+
changes.push(`Dropped a second printing reporter from ` +
|
|
1012
|
+
`${count('dropped') === 1 ? 'the earlier test run’s' : 'each earlier test run’s'} ` +
|
|
1013
|
+
`\`--reporter=${dropped.from}\`: two reporters that both print each failure write every ` +
|
|
1014
|
+
'test result into the log twice, so this run keeps `list` alone.');
|
|
1015
|
+
return { command: out, changes };
|
|
1016
|
+
}
|
|
905
1017
|
/**
|
|
906
1018
|
* Put Playwright's standard `json` report on a FOREGROUND run that already names its own reporters.
|
|
907
1019
|
*
|
|
@@ -1343,50 +1455,48 @@ function lastSuitePipeline(command) {
|
|
|
1343
1455
|
* @returns The located segments and the last suite stage's index among them, or null.
|
|
1344
1456
|
*/
|
|
1345
1457
|
function lastSuiteRun(command) {
|
|
1458
|
+
return suiteRunSites(command).at(-1) ?? null;
|
|
1459
|
+
}
|
|
1460
|
+
/**
|
|
1461
|
+
* Every suite-run statement of a command, in command order, each with the parse's segments.
|
|
1462
|
+
*
|
|
1463
|
+
* A command may start the suite more than once — a whole-directory walk followed by a single
|
|
1464
|
+
* spec, or a Hurl run followed by a browser walk — and every one of them writes the log the
|
|
1465
|
+
* executor reads. Reading only the last one left the earlier walk's failing test's own error
|
|
1466
|
+
* behind a `| tail -5` while the LAST invocation was rewritten normally
|
|
1467
|
+
* (xr-molecule-flash-l21 +21:27: a 3.6-minute walk returned `72 passed` with no error body when
|
|
1468
|
+
* the driver ran `… specs 2>&1 | tail -5; echo START; … auth.spec.ts`).
|
|
1469
|
+
*
|
|
1470
|
+
* A command that runs no test at all is not a set of runs ({@link commandRunsNoTests}); nor is a
|
|
1471
|
+
* statement that only lists tests, which the reporter pass asks about per statement
|
|
1472
|
+
* ({@link isPlaywrightRunCommand}).
|
|
1473
|
+
*
|
|
1474
|
+
* @param command - The shell command.
|
|
1475
|
+
* @returns One entry per suite-running statement, all sharing the parse's segments.
|
|
1476
|
+
*/
|
|
1477
|
+
function suiteRunSites(command) {
|
|
1346
1478
|
if (commandRunsNoTests(command))
|
|
1347
|
-
return
|
|
1479
|
+
return [];
|
|
1348
1480
|
const located = locatedSegments(command);
|
|
1349
|
-
|
|
1481
|
+
const sites = [];
|
|
1350
1482
|
for (let i = 0; i < located.length; i += 1) {
|
|
1351
1483
|
const segment = located[i]?.segment;
|
|
1352
1484
|
if (segment && SUITE_RUN_COMMANDS.some((re) => re.test(segment.text)))
|
|
1353
|
-
at
|
|
1485
|
+
sites.push({ located, at: i });
|
|
1354
1486
|
}
|
|
1355
|
-
return
|
|
1487
|
+
return sites;
|
|
1356
1488
|
}
|
|
1357
1489
|
/**
|
|
1358
|
-
*
|
|
1359
|
-
*
|
|
1360
|
-
* A filter after the runner is not "the end of the log" the executor asked for: it hides the
|
|
1361
|
-
* failing test's own error (it usually matches none of `✘|passed|failed`), and the pipeline's exit
|
|
1362
|
-
* status becomes the FILTER's, so `… 2>&1 | grep -E "✘|passed|failed|skipped" | tail -20` came back
|
|
1363
|
-
* `exitCode: 0` for a run with a failure in it (xr-molecule-flash-m101 +25:54). The tool returns
|
|
1364
|
-
* the end of the full log anyway, so the filter only costs diagnosability.
|
|
1365
|
-
*
|
|
1366
|
-
* Only a contiguous suffix of the stages after the runner is cut, and only stages the parse proves
|
|
1367
|
-
* are output-only ({@link isOutputOnlyFilter}): a `| tee` or `| xargs` keeps its place, and a
|
|
1368
|
-
* caller that reports the run's exit code must then treat it as unknown
|
|
1369
|
-
* ({@link suiteRunPipedAfterRunner}).
|
|
1370
|
-
*
|
|
1371
|
-
* A statement after the run's own pipeline (`; echo done`, `&& echo ok`) does not protect the
|
|
1372
|
-
* filters before it: the filter is thrown away and the trailing statement is kept, so the log the
|
|
1373
|
-
* run writes still holds every failure (xr-molecule-flash-m121 — a `| tail -5; echo done` kept its
|
|
1374
|
-
* tail, and a 95-second walk's log held only the tally while the platform's own hold had handed
|
|
1375
|
-
* that command back).
|
|
1376
|
-
*
|
|
1377
|
-
* The command around the dropped stages is left as written: a group they sit in keeps its closer
|
|
1378
|
-
* (`( … | tail -25)` → `( … )`, never `( …` — xr-molecule-flash-m418 +23:31), and a stage the cut
|
|
1379
|
-
* would leave a closer dangling inside is not dropped at all.
|
|
1490
|
+
* The output-only filters piped after ONE suite runner, as a slice to remove — or null when this
|
|
1491
|
+
* runner has none this reader can prove output-only.
|
|
1380
1492
|
*
|
|
1381
1493
|
* @param command - The shell command.
|
|
1382
|
-
* @
|
|
1494
|
+
* @param located - The parse's located segments ({@link locatedSegments}).
|
|
1495
|
+
* @param at - The runner's index among them.
|
|
1496
|
+
* @returns The slice to drop, or null.
|
|
1383
1497
|
*/
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
if (run === null)
|
|
1387
|
-
return { command, dropped: '' };
|
|
1388
|
-
const { located, at } = run;
|
|
1389
|
-
// Where the suite's own pipeline ends: the first stage after the runner that is not joined to
|
|
1498
|
+
function suiteFilterCut(command, located, at) {
|
|
1499
|
+
// Where this suite's own pipeline ends: the first stage after the runner that is not joined to
|
|
1390
1500
|
// its predecessor by a single `|`. Everything from there on is another statement, kept as it is.
|
|
1391
1501
|
let end = at;
|
|
1392
1502
|
for (let i = at + 1; i < located.length; i += 1) {
|
|
@@ -1402,15 +1512,15 @@ export function stripTrailingSuiteFilters(command) {
|
|
|
1402
1512
|
first = i;
|
|
1403
1513
|
}
|
|
1404
1514
|
if (first === end + 1)
|
|
1405
|
-
return
|
|
1515
|
+
return null;
|
|
1406
1516
|
const previous = located[first - 1];
|
|
1407
1517
|
const stage = located[first];
|
|
1408
1518
|
const lastDropped = located[end];
|
|
1409
1519
|
if (!previous || !stage || !lastDropped)
|
|
1410
|
-
return
|
|
1520
|
+
return null;
|
|
1411
1521
|
// A stage inside a nested `sh -c` string has no offsets in this command: nothing can be cut.
|
|
1412
1522
|
if (previous.end === null || stage.start === null || lastDropped.end === null)
|
|
1413
|
-
return
|
|
1523
|
+
return null;
|
|
1414
1524
|
// Every stage dropped must be provably whole inside the command's own structure. A group
|
|
1415
1525
|
// closer attached to one of them closes a group the pipeline below still runs in
|
|
1416
1526
|
// (`( … | tail -5) | cat`), and a stage that OPENS a group it does not close (`| { cat; }`) has
|
|
@@ -1420,17 +1530,17 @@ export function stripTrailingSuiteFilters(command) {
|
|
|
1420
1530
|
for (let i = first; i <= end; i += 1) {
|
|
1421
1531
|
const droppedStage = located[i];
|
|
1422
1532
|
if (!droppedStage || droppedStage.end === null)
|
|
1423
|
-
return
|
|
1533
|
+
return null;
|
|
1424
1534
|
const boundary = statementBoundary(command, droppedStage.start, droppedStage.end);
|
|
1425
1535
|
if (boundary === null || boundary.leavesGroupOpen)
|
|
1426
|
-
return
|
|
1536
|
+
return null;
|
|
1427
1537
|
if (i < end && boundary.textEnd !== droppedStage.end)
|
|
1428
|
-
return
|
|
1538
|
+
return null;
|
|
1429
1539
|
boundaries.push(boundary);
|
|
1430
1540
|
}
|
|
1431
1541
|
const lastBoundary = boundaries[boundaries.length - 1];
|
|
1432
1542
|
if (lastBoundary === undefined)
|
|
1433
|
-
return
|
|
1543
|
+
return null;
|
|
1434
1544
|
// Where the dropped stages' own text ends. The tokenizer attaches the closer of an enclosing
|
|
1435
1545
|
// group to the stage's last word (`tail -25)`), so cutting at {@link LocatedSegment.end} deleted
|
|
1436
1546
|
// the `)` and left `( … 2>&1` — a command no shell parses, which the background runner rejected
|
|
@@ -1438,14 +1548,71 @@ export function stripTrailingSuiteFilters(command) {
|
|
|
1438
1548
|
const dropEnd = lastBoundary.textEnd;
|
|
1439
1549
|
const pipe = stage.between.indexOf('|');
|
|
1440
1550
|
if (pipe < 0)
|
|
1441
|
-
return
|
|
1551
|
+
return null;
|
|
1442
1552
|
const cut = previous.end + pipe;
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1553
|
+
return { cut, dropEnd, dropped: command.slice(cut, dropEnd).trim() };
|
|
1554
|
+
}
|
|
1555
|
+
/**
|
|
1556
|
+
* Drop the output-only filters piped after EVERY suite runner in the command.
|
|
1557
|
+
*
|
|
1558
|
+
* A filter after a runner is not "the end of the log" the executor asked for: it hides the
|
|
1559
|
+
* failing test's own error (it usually matches none of `✘|passed|failed`), and the pipeline's exit
|
|
1560
|
+
* status becomes the FILTER's, so `… 2>&1 | grep -E "✘|passed|failed|skipped" | tail -20` came back
|
|
1561
|
+
* `exitCode: 0` for a run with a failure in it (xr-molecule-flash-m101 +25:54). The tool returns
|
|
1562
|
+
* the end of the full log anyway, so the filter only costs diagnosability.
|
|
1563
|
+
*
|
|
1564
|
+
* EVERY run is stripped, not only the command's last: a compound command's earlier walk writes
|
|
1565
|
+
* the same log, and its `| tail -5` threw away the error body of a 3.6-minute Playwright walk
|
|
1566
|
+
* whose two failure names were all the executor got back (xr-molecule-flash-l21 +21:27). Only a
|
|
1567
|
+
* run the parse places is touched, and only its own pipeline — a later statement's filters belong
|
|
1568
|
+
* to it.
|
|
1569
|
+
*
|
|
1570
|
+
* Only a contiguous suffix of the stages after the runner is cut, and only stages the parse proves
|
|
1571
|
+
* are output-only ({@link isOutputOnlyFilter}): a `| tee` or `| xargs` keeps its place, and a
|
|
1572
|
+
* caller that reports the run's exit code must then treat it as unknown
|
|
1573
|
+
* ({@link suiteRunPipedAfterRunner}).
|
|
1574
|
+
*
|
|
1575
|
+
* A statement after the run's own pipeline (`; echo done`, `&& echo ok`) does not protect the
|
|
1576
|
+
* filters before it: the filter is thrown away and the trailing statement is kept, so the log the
|
|
1577
|
+
* run writes still holds every failure (xr-molecule-flash-m121 — a `| tail -5; echo done` kept its
|
|
1578
|
+
* tail, and a 95-second walk's log held only the tally while the platform's own hold had handed
|
|
1579
|
+
* that command back).
|
|
1580
|
+
*
|
|
1581
|
+
* The command around the dropped stages is left as written: a group they sit in keeps its closer
|
|
1582
|
+
* (`( … | tail -25)` → `( … )`, never `( …` — xr-molecule-flash-m418 +23:31), and a stage the cut
|
|
1583
|
+
* would leave a closer dangling inside is not dropped at all.
|
|
1584
|
+
*
|
|
1585
|
+
* @param command - The shell command.
|
|
1586
|
+
* @returns The rewritten command and the stages dropped, one entry per suite run, in command order.
|
|
1587
|
+
*/
|
|
1588
|
+
function suiteFilterDrops(command) {
|
|
1589
|
+
const cuts = [];
|
|
1590
|
+
for (const site of suiteRunSites(command)) {
|
|
1591
|
+
const cut = suiteFilterCut(command, site.located, site.at);
|
|
1592
|
+
if (cut !== null)
|
|
1593
|
+
cuts.push(cut);
|
|
1594
|
+
}
|
|
1595
|
+
if (cuts.length === 0)
|
|
1596
|
+
return { command, drops: [] };
|
|
1597
|
+
// Right to left, so every cut's offsets still describe the text it was measured on.
|
|
1598
|
+
let out = command;
|
|
1599
|
+
for (const cut of [...cuts].sort((a, b) => b.cut - a.cut)) {
|
|
1600
|
+
// The stages dropped are a middle slice when a statement follows, so the text after them is
|
|
1601
|
+
// kept — `; echo done` still runs, and so does the punctuation closing the group they sat in.
|
|
1602
|
+
out = `${out.slice(0, cut.cut).trimEnd()}${out.slice(cut.dropEnd)}`;
|
|
1603
|
+
}
|
|
1604
|
+
return { command: out, drops: cuts.map((cut) => cut.dropped) };
|
|
1605
|
+
}
|
|
1606
|
+
/**
|
|
1607
|
+
* Drop the output-only filters piped after the command's suite runners
|
|
1608
|
+
* ({@link suiteFilterDrops}).
|
|
1609
|
+
*
|
|
1610
|
+
* @param command - The shell command.
|
|
1611
|
+
* @returns The rewritten command, and the stages dropped in command order (`''` when none were).
|
|
1612
|
+
*/
|
|
1613
|
+
export function stripTrailingSuiteFilters(command) {
|
|
1614
|
+
const { command: out, drops } = suiteFilterDrops(command);
|
|
1615
|
+
return { command: out, dropped: drops.join(' ') };
|
|
1449
1616
|
}
|
|
1450
1617
|
/**
|
|
1451
1618
|
* Where the suite runner's exit code comes from: the runner itself, or a stage piped after it.
|