@molecule/api-ai-tools 1.5.20 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/tools.js CHANGED
@@ -161,7 +161,7 @@ function waitProgressNote(o) {
161
161
  const sentence = parts.join('; ');
162
162
  return ` ${sentence[0].toUpperCase()}${sentence.slice(1)}.`;
163
163
  }
164
- import { checkBlockedCommand, declaredBudgetSeconds, DEFAULT_SEARCH_EXCLUDED_DIRS, directoryReadHint, findPatternArgs, fusedLine, htmlOutline, isEnvFilePath, isOutsideRoot, isPlaywrightRunCommand, isValidGlob, MAX_BATCH_READ_BYTES, MAX_BATCH_READ_FILES, MAX_FIND_RESULTS, MAX_HTML_INLINE_CHARS, MAX_OUTPUT_SIZE, MAX_READ_RETURN_CHARS, MAX_READ_SIZE, MAX_SEARCH_CONTEXT_LINES, MAX_SEARCH_RESULTS, MAX_WRITE_SIZE, outputIsWithheldUntilExit, outputRedirectTarget, parseCheckCommand, parseCheckProblem, pathArgError, printsOnlySource, redactSecrets, redactSecretsInCode, repeatingFailure, repeatingFailureNote, resolvePath, RUNNING_FAILURE_LINES, runningCauseCommand, runningOutputSliceCommand, shellQuote, sliceLines, SMALL_FILE_WHOLE_CHARS, streamingBackgroundCommand, stripControlChars, suiteRunPriorityLaunch, truncateMiddle, whitespaceTolerantReplace, } from './utilities.js';
164
+ import { checkBlockedCommand, declaredBudgetSeconds, DEFAULT_SEARCH_EXCLUDED_DIRS, directoryReadHint, failureCausesNote, findPatternArgs, fusedLine, htmlOutline, isEnvFilePath, isOutsideRoot, isPlaywrightRunCommand, isValidGlob, linesWithinSerialized, MAX_BATCH_READ_FILES, MAX_FIND_RESULTS, MAX_HTML_INLINE_CHARS, MAX_OUTPUT_SIZE, MAX_READ_CALL_CHARS, MAX_READ_RETURN_CHARS, MAX_READ_SIZE, MAX_SEARCH_CONTEXT_LINES, MAX_SEARCH_RESULTS, MAX_WRITE_SIZE, outputIsWithheldUntilExit, outputRedirectTarget, parseCheckCommand, parseCheckProblem, pathArgError, printsOnlySource, READ_RESULT_ENVELOPE_CHARS, redactSecrets, redactSecretsInCode, repeatingFailure, repeatingFailureNote, resolvePath, RUNNING_FAILURE_LINES, runningCauseCommand, runningOutputSliceCommand, serializedChars, shellQuote, sliceLines, SMALL_FILE_WHOLE_CHARS, streamingBackgroundCommand, stripControlChars, suiteRunPriorityLaunch, truncateMiddle, universalCause, whitespaceTolerantReplace, } from './utilities.js';
165
165
  /**
166
166
  * How long exec_command waits for a command it backgrounded only because the
167
167
  * command asked for more than the tool's ceiling, before handing back a task id.
@@ -488,36 +488,22 @@ export function buildTools(backend, config) {
488
488
  * listing, ENOENT parent listing, empty-read classification). Shared by the
489
489
  * single-path and batched forms of the tool.
490
490
  *
491
- * @param rawPath - The path as the model sent it.
492
- * @returns The same result shape read_file returns for one file.
493
- */
494
- /**
495
- * How many leading lines of a file fit in a char budget.
496
- *
497
- * @param content - The file text.
498
- * @param chars - The budget in chars.
499
- * @returns The line count, at least one.
500
- */
501
- function linesWithin(content, chars) {
502
- let used = 0;
503
- let lines = 0;
504
- for (const line of content.split('\n')) {
505
- used += line.length + 1;
506
- if (used > chars && lines > 0)
507
- break;
508
- lines++;
509
- }
510
- return Math.max(1, lines);
511
- }
512
- /**
513
- * Read one file for the model: symlink-checked, size-bounded, optionally
514
- * windowed by line, and never more than MAX_READ_RETURN_CHARS at once.
491
+ * Symlink-checked, size-bounded, optionally windowed by line, and never more
492
+ * than `ceiling` SERIALIZED chars at once (a window of raw text grows by its
493
+ * own newlines once the result is JSON — see {@link serializedChars}).
515
494
  *
516
495
  * @param rawPath - The path as the model sent it.
517
496
  * @param window - Optional `offset`/`limit` in lines.
497
+ * @param ceiling - The most this read may return, in serialized chars
498
+ * ({@link MAX_READ_RETURN_CHARS} when the call has the whole result to
499
+ * itself; a batched call passes what it has left, so the read stops short of
500
+ * the request-side cut instead of being cut by it). A read that comes back
501
+ * short carries `truncated: true`, which is how the batch tells a whole file
502
+ * from a window of one.
518
503
  * @returns The file content (or a window of it) or a model-readable error.
519
504
  */
520
- async function readOneFile(rawPath, window) {
505
+ async function readOneFile(rawPath, window, ceiling) {
506
+ const maxChars = ceiling ?? MAX_READ_RETURN_CHARS;
521
507
  const argErr = pathArgError(rawPath, 'read_file');
522
508
  if (argErr)
523
509
  return { error: argErr };
@@ -589,8 +575,8 @@ export function buildTools(backend, config) {
589
575
  // No window asked for and the file is bigger than one call should hand
590
576
  // back: return its first window, sized to the ceiling, and say so. The
591
577
  // model can read on with offset/limit; it cannot un-send 300k tokens.
592
- const effectiveWindow = !sliceLines(content, window) && content.length > MAX_READ_RETURN_CHARS
593
- ? { offset: 1, limit: linesWithin(content, MAX_READ_RETURN_CHARS) }
578
+ const effectiveWindow = !sliceLines(content, window) && serializedChars(content) > maxChars
579
+ ? { offset: 1, limit: linesWithinSerialized(content, maxChars) }
594
580
  : window;
595
581
  // A SECOND window of the same small file: hand back all of it (one window is a targeted read). X1 flash-m50 paged files that fit in one
596
582
  // call 13 times in a row, each window answered with "read it again with no offset/limit".
@@ -606,7 +592,7 @@ export function buildTools(backend, config) {
606
592
  if (small?.truncated &&
607
593
  pagedBefore &&
608
594
  !sentWhole &&
609
- content.length <= SMALL_FILE_WHOLE_CHARS) {
595
+ serializedChars(content) <= Math.min(SMALL_FILE_WHOLE_CHARS, maxChars)) {
610
596
  wholeReturned.set(path, content);
611
597
  return noted({
612
598
  path,
@@ -625,6 +611,10 @@ export function buildTools(backend, config) {
625
611
  offset: windowed.offset,
626
612
  lines: windowed.lines,
627
613
  totalLines: windowed.totalLines,
614
+ // What the model has is PART of the file. Named on the result, not only
615
+ // in the note: a batched read keeps whole files and lists the rest, and
616
+ // this is how it tells the two apart (see the `paths` branch).
617
+ ...(windowed.truncated ? { truncated: true } : {}),
628
618
  // The note decides the executor's next call. Observed (X0 run x7): a
629
619
  // 44 KB README read as seven 300-line windows, one round trip each,
630
620
  // because the note only ever said "read another window" — when the
@@ -635,7 +625,7 @@ export function buildTools(backend, config) {
635
625
  note: sentWhole
636
626
  ? `Lines ${windowed.offset}-${windowed.offset + windowed.lines - 1} of ${windowed.totalLines}; ` +
637
627
  'the whole file, unchanged, was returned earlier in this conversation.'
638
- : content.length <= MAX_READ_RETURN_CHARS
628
+ : serializedChars(content) <= MAX_READ_RETURN_CHARS
639
629
  ? `Lines ${windowed.offset}-${windowed.offset + windowed.lines - 1} of ` +
640
630
  `${windowed.totalLines}. The whole file is ${Math.round(content.length / 1024)} KB ` +
641
631
  `and fits in ONE call — read it again with no offset/limit instead of paging.`
@@ -759,28 +749,86 @@ export function buildTools(backend, config) {
759
749
  };
760
750
  }
761
751
  const files = [];
762
- let budget = MAX_BATCH_READ_BYTES;
763
- let stoppedAt = null;
752
+ // The paths this call does NOT return, in request order, each with the
753
+ // reason it is missing. Never a partial file in their place: a batch
754
+ // that broke off mid-file is what MAX_READ_CALL_CHARS exists to stop —
755
+ // the request side cuts a longer block through its middle, between two
756
+ // `"content"` values, so whole files vanish and the note says only
757
+ // "N characters cut here" (X0 flash-m81).
758
+ const notReturned = [];
759
+ const explicitWindow = input.offset !== undefined || input.limit !== undefined;
760
+ // Every entry names its file the way a returned entry does — resolved —
761
+ // so a path out of this list can go straight back into the next call.
762
+ const missing = (requestedPath, reason) => {
763
+ notReturned.push({ path: resolve(requestedPath), reason });
764
+ };
764
765
  for (const [index, requestedPath] of requested.entries()) {
765
- if (index >= MAX_BATCH_READ_FILES || budget <= 0) {
766
- stoppedAt = requestedPath;
767
- break;
766
+ if (index >= MAX_BATCH_READ_FILES) {
767
+ missing(requestedPath, 'count');
768
+ continue;
769
+ }
770
+ // What this file's read may still carry: the call's ceiling less the
771
+ // envelope, which has to hold the note and one entry per missing path.
772
+ const room = MAX_READ_CALL_CHARS - JSON.stringify(files).length - READ_RESULT_ENVELOPE_CHARS;
773
+ if (room <= 0) {
774
+ missing(requestedPath, 'budget');
775
+ continue;
776
+ }
777
+ const one = (await readOneFile(requestedPath, input, room));
778
+ // A window is not a batch entry. It is returned only when the caller
779
+ // asked for a window, or when the FIRST file alone is bigger than the
780
+ // whole call — then a window with its own offset/limit note is the only
781
+ // answer available, and everything after it is listed anyway.
782
+ if (one.truncated === true && !explicitWindow && files.length > 0) {
783
+ missing(requestedPath, 'budget');
784
+ continue;
768
785
  }
769
- const one = (await readOneFile(requestedPath, input));
770
786
  files.push(one);
771
- if (typeof one.content === 'string')
772
- budget -= one.content.length;
773
787
  }
774
- return {
775
- files,
776
- ...(stoppedAt
777
- ? {
778
- note: `Stopped after ${files.length} of ${requested.length} files (limit: ${MAX_BATCH_READ_FILES} ` +
779
- `files or ${Math.round(MAX_BATCH_READ_BYTES / 1024)}KB per call). Call read_file again ` +
780
- `starting at ${stoppedAt}.`,
781
- }
782
- : {}),
788
+ const entryError = (reason) => reason === 'count'
789
+ ? `not returned: one read_file call returns at most ${MAX_BATCH_READ_FILES} files. Read this file in its own read_file call.`
790
+ : `not returned: this call goes in order and has reached the ${Math.round(MAX_READ_CALL_CHARS / 1024)} KB one read_file result carries. Read this file in its own read_file call.`;
791
+ const build = (returned) => {
792
+ let returnedChars = 0;
793
+ let windowed = 0;
794
+ for (const f of returned) {
795
+ const entry = f;
796
+ if (typeof entry.content === 'string')
797
+ returnedChars += entry.content.length;
798
+ if (entry.truncated === true)
799
+ windowed++;
800
+ }
801
+ const size = `${Math.round(returnedChars / 1024)} KB of the ` +
802
+ `${Math.round(MAX_READ_CALL_CHARS / 1024)} KB one read_file result carries`;
803
+ return {
804
+ files: [
805
+ ...returned,
806
+ ...notReturned.map(({ path, reason }) => ({ path, error: entryError(reason) })),
807
+ ],
808
+ ...(notReturned.length
809
+ ? {
810
+ note: (windowed > 0
811
+ ? `Returned ${returned.length} of ${requested.length} files (${size}); the ` +
812
+ `${windowed} marked truncated is a first window — its own note names the next one. `
813
+ : `Returned whole: ${returned.length} of ${requested.length} files (${size}). `) +
814
+ 'Not returned — read these next, in this order, in further read_file calls: ' +
815
+ `${notReturned.map((n) => n.path).join(', ')}.`,
816
+ }
817
+ : {}),
818
+ };
783
819
  };
820
+ let result = build(files);
821
+ // The envelope is measured, not estimated: if the note and the entries for
822
+ // the missing paths take more than their share, whole files — from the end
823
+ // — move to the missing list until the result fits.
824
+ while (notReturned.length > 0 &&
825
+ files.length > 0 &&
826
+ JSON.stringify(result).length > MAX_READ_CALL_CHARS) {
827
+ const last = files.pop();
828
+ notReturned.unshift({ path: String(last?.path ?? ''), reason: 'budget' });
829
+ result = build(files);
830
+ }
831
+ return result;
784
832
  }
785
833
  return readOneFile(input.path, input);
786
834
  },
@@ -1698,7 +1746,11 @@ export function buildTools(backend, config) {
1698
1746
  // from the finished log: X1 flash-m76 waited out 4.0 minutes of 15 tests where every
1699
1747
  // failure was the same `TimeoutError: page.waitForURL` from one missing `navigate('/')`,
1700
1748
  // and then fixed it in 51 s. The task is NOT stopped — the executor is handed the cause and
1701
- // its own pid command and decides.
1749
+ // decides, and the note tells it to let the run finish because the run's other causes only
1750
+ // surface in it (X1 flash-m83 stopped eight runs at their first repeating cause and never
1751
+ // finished one). Only a cause that is failing the WHOLE run — every failure sharing it,
1752
+ // across `UNIVERSAL_CAUSE_FILES` files or more, with nothing passing since the first —
1753
+ // comes with a stop command.
1702
1754
  let lastCauseLookAt = startedAt - repeatingCauseLookMs();
1703
1755
  let exitCode = await readExit();
1704
1756
  while (exitCode === null && Date.now() - startedAt < budgetMs) {
@@ -1727,6 +1779,9 @@ export function buildTools(backend, config) {
1727
1779
  const found = repeatingFailure(causeLog);
1728
1780
  if (!found)
1729
1781
  continue;
1782
+ // Only a cause that is failing the whole run gets a stop command — and only then is the
1783
+ // pid walk paid for.
1784
+ const universal = universalCause(causeLog, found);
1730
1785
  repeatingCauseNoted.add(taskId);
1731
1786
  const earlyMs = Date.now() - startedAt;
1732
1787
  waitedByTask.set(taskId, waitedBefore + earlyMs);
@@ -1737,7 +1792,8 @@ export function buildTools(backend, config) {
1737
1792
  note: repeatingFailureNote(found, {
1738
1793
  taskId,
1739
1794
  log,
1740
- stop: await taskStopCommand(backend, taskId),
1795
+ stop: universal ? await taskStopCommand(backend, taskId) : '',
1796
+ universal,
1741
1797
  }),
1742
1798
  };
1743
1799
  }
@@ -1837,12 +1893,20 @@ export function buildTools(backend, config) {
1837
1893
  // The file is gone or unreadable: the task log is the whole result, as before.
1838
1894
  }
1839
1895
  }
1896
+ // Every cause a finished run found, one line each, so ONE round of fixes covers all of
1897
+ // them. A Playwright report prints its failures in sequence with nothing saying which of
1898
+ // them share a cause, so a run's other causes are read only by reading every failure: X1
1899
+ // flash-m83 (2026-10-16) spent three deploys (6.7 minutes) each fixing a single cause, and
1900
+ // the second and third were found by runs stopped before they walked the rest. Null for
1901
+ // anything that is not a run with failures in it.
1902
+ const causes = failureCausesNote(output);
1840
1903
  // Same shaping as a foreground exec result, so the executor reads both
1841
1904
  // the same way.
1842
1905
  return {
1843
1906
  taskId,
1844
1907
  exitCode,
1845
1908
  waitedMs,
1909
+ ...(causes ? { note: causes } : {}),
1846
1910
  stdout: sanitizeOutput(truncateMiddle(output, MAX_OUTPUT_SIZE)),
1847
1911
  ...(output.length > MAX_OUTPUT_SIZE ? { truncated: true, fullOutput: log } : {}),
1848
1912
  };
@@ -122,19 +122,18 @@ export declare function outputRedirectTarget(command: string): string | null;
122
122
  * often `html`, which prints nothing per test. `--reporter=list` is added
123
123
  * when the playwright run is the command's last step and nothing is piped or
124
124
  * redirected from it: it writes each result as it finishes, and it is the
125
- * shape the platform reads a background suite back in (`suite-fail-fast.ts`'s
126
- * fail-fast note and the Tests bar both parse `list` lines). A run that names
127
- * `--reporter=line` is switched to `list` for the same reason — `line` writes
128
- * `[n/N] <title>` with no ✓/✘ mark and no duration, so on X1 flash-m62 an
129
- * 8.3-minute walk of one suite could never trip the fail-fast note.
130
- *
131
- * A run being ITERATED on (capped, narrowed, or by file) gets `list,line` instead
132
- * of `list` alone. `list` holds every failure's error for the summary at the end,
133
- * so mid-run its log says only how long each failure took; `line` writes the body
134
- * as the failure happens, and a look at a running suite (`wait_for_task`'s
135
- * repeating-cause note, `suite-fail-fast.ts`) can then name the repeating cause by
136
- * its error message. X1 flash-m76 walked 15 tests for 4.0 minutes, every one a
137
- * `TimeoutError: page.waitForURL` from one missing `navigate('/')`.
125
+ * shape the platform reads a background suite back in.
126
+ *
127
+ * The run ends up with exactly ONE reporter that prints each failure — `list`. A run that names
128
+ * any other printing reporter has it REPLACED, never joined: two of them write every test result
129
+ * into the log twice, which on X1 flash-m83 (2026-10-16) made a `--reporter=list,line` run (its
130
+ * `line` added by this function one run earlier) report two distinct failures as "4 of this run's
131
+ * tests have already failed the same way", and the executor stopped a 139-test walk at test 21
132
+ * with a single cause in hand. `line` alone is no use either: it writes `[n/N] <title>` with no
133
+ * ✓/✘ mark and no duration, so on X1 flash-m62 an 8.3-minute walk of one suite could never trip
134
+ * the fail-fast note. A reporter set that writes a machine format to a file (`json`, `html`,
135
+ * `junit`) is the
136
+ * executor's own and is left exactly as it is — so is any reporter this build does not know.
138
137
  *
139
138
  * Only the command's last step is touched, and only its reporter, and only when that step runs
140
139
  * something: `npx playwright test --list` takes two seconds and writes nothing per test, so
@@ -160,13 +159,17 @@ export declare function streamingBackgroundCommand(command: string): {
160
159
  */
161
160
  export declare function isSuiteRunCommand(command: string): boolean;
162
161
  /**
163
- * Whether a command starts a Playwright run — `playwright test` in a form that runs something.
162
+ * Whether a command starts a Playwright run — a `playwright test` in command position, in a form
163
+ * that runs something.
164
164
  *
165
165
  * `npx playwright test --list` matched every `\bplaywright\s+test\b` test in the platform and was
166
166
  * then treated as a run: held (flash-m79's config check), backgrounded for a run that outlasts
167
167
  * the tool's ceiling, and rewritten with `--reporter`. A list takes two seconds, prints its lines
168
168
  * and exits, so it is none of those; {@link commandRunsNoTests} is what decides.
169
169
  *
170
+ * A `playwright test` named as an argument is not a run either (`head -30 run-tests.sh`,
171
+ * `grep -n "playwright test" e2e/README.md`): the command that runs is the reader.
172
+ *
170
173
  * @param command - The shell command.
171
174
  * @returns True when the command starts a Playwright run.
172
175
  */
@@ -329,29 +332,79 @@ export declare function sliceLines(content: string, window?: {
329
332
  totalLines: number;
330
333
  truncated: boolean;
331
334
  } | null;
332
- /** Max search results. */
335
+ /**
336
+ * A file's text as the request counts it: the length of its JSON string.
337
+ *
338
+ * JSON escaping (`\n` → `\\n`, `"` → `\"`) costs characters, and the request
339
+ * side counts the SERIALIZED tool result. A window of 59,000 characters of
340
+ * source — 1,200 lines — arrives as ~60,200 characters of JSON, over the
341
+ * ceiling it was sized for, so a window is measured with this rather than by
342
+ * its raw text length.
343
+ *
344
+ * @param text - The text.
345
+ * @returns Its serialized length, without the surrounding quotes.
346
+ */
347
+ export declare function serializedChars(text: string): number;
348
+ /**
349
+ * How many leading lines of a file fit inside a budget of SERIALIZED chars,
350
+ * the way `read_file` sizes a window (see {@link serializedChars}).
351
+ *
352
+ * @param content - The file's full text.
353
+ * @param chars - The budget in serialized chars.
354
+ * @returns The line count, at least one.
355
+ */
356
+ export declare function linesWithinSerialized(content: string, chars: number): number;
333
357
  /**
334
358
  * Most files one batched `read_file` call returns. The cap exists so a survey
335
- * of a large tree cannot swallow the turn's context in one result; the tool
336
- * reports where it stopped so the model continues from there.
359
+ * of a large tree cannot swallow the turn's context in one result; every path
360
+ * past it is named in the result's `note` and listed with its own `error`, so
361
+ * the model continues from there.
337
362
  */
338
363
  export declare const MAX_BATCH_READ_FILES = 25;
339
364
  /**
340
- * Total content bytes one batched `read_file` call returns, across all files.
341
- * The per-file {@link MAX_READ_SIZE} still applies to each one.
365
+ * The most one `read_file` RESULT may carry, in chars of its JSON — every file
366
+ * the call returns, the envelope and the note included. That is how the request
367
+ * side counts a tool result, so it is how this tool counts one too
368
+ * ({@link serializedChars}).
369
+ *
370
+ * One tool result is ONE block in the request, and the request side caps a
371
+ * block: molecule-dev cuts any block over `MAX_TAIL_BLOCK_CHARS` (60,000) in
372
+ * place, keeping ~30 KB of each end. A batched read that crossed it lost its
373
+ * MIDDLE — the cut lands between two `"content"` values, so whole files fell
374
+ * out and the note in their place said only "N characters cut here" — while
375
+ * this tool's own note had promised each of those files that it "fits in one
376
+ * call, so it is not paged": X0 flash-m81 (2026-10-16) read ten e2e specs in
377
+ * one call (121,467 chars), lost the middle six, and bought them again in six
378
+ * further calls (52,908 chars).
379
+ *
380
+ * So the CALL gets the ceiling the request gives it. Whole files are returned
381
+ * up to it; the paths that did not fit are named in `note` and listed in
382
+ * `files` with their own `error`, the shape every other entry has. No file is
383
+ * ever cut, and no read result reaches the request-side cut. A test in
384
+ * molecule-dev's `context-fit` asserts the two ceilings still agree.
385
+ */
386
+ export declare const MAX_READ_CALL_CHARS = 60000;
387
+ /**
388
+ * Room inside one read result for what is not file content: the `path`, the
389
+ * offset/line fields, and the note.
390
+ *
391
+ * A batch sizes each file against what the call has left
392
+ * ({@link MAX_READ_CALL_CHARS} less this), so the entry that does not fit is
393
+ * caught here rather than by the request-side cut.
342
394
  */
343
- export declare const MAX_BATCH_READ_BYTES: number;
395
+ export declare const READ_RESULT_ENVELOPE_CHARS = 1000;
344
396
  /**
345
397
  * The most one read_file call returns for ONE file when no window was asked
346
- * for, in chars. Larger files come back as their first window with a note
347
- * saying how to read the rest.
398
+ * for, in serialized chars: larger files come back as their first window, with
399
+ * a note saying how to read the rest.
348
400
  *
349
401
  * MAX_READ_SIZE (5 MB) is a bound on what the tool will open, not on what it
350
402
  * should hand a model: a single batched read that returned a 1.2 MB README
351
403
  * put the next three provider calls at 366k tokens (~330k of them fresh)
352
- * against a 120k-token context cap (X0 run x5, call 26). ~80 KB is ~20–25k
353
- * tokens — a fifth of that cap, and more than any one file read usually
354
- * needs.
404
+ * against a 120k-token context cap (X0 run x5, call 26). This is the call's
405
+ * own ceiling ({@link MAX_READ_CALL_CHARS}) less the room its envelope takes,
406
+ * so one read result — one file or twenty-five — fits inside what the request
407
+ * side carries without being cut.
355
408
  */
356
409
  export declare const MAX_READ_RETURN_CHARS: number;
357
410
  /**
@@ -486,7 +539,10 @@ export declare const REPEATING_CAUSE_TAIL_BYTES = 40000;
486
539
  * @returns The shell command, safe to hand to the execution backend as-is.
487
540
  */
488
541
  export declare function runningCauseCommand(log: string, own?: string): string;
489
- /** Failures that must share one signature before a running suite's repeating cause is named. */
542
+ /**
543
+ * DISTINCT tests that must share one signature before a running suite's repeating cause is named.
544
+ * A test the log prints twice, or a test that failed twice, is still one test.
545
+ */
490
546
  export declare const REPEATING_FAILURE_MIN = 3;
491
547
  /** One failed test, as a running suite's log names it. */
492
548
  export interface FailedTest {
@@ -499,13 +555,16 @@ export interface FailedTest {
499
555
  }
500
556
  /** A cause repeating among a running suite's failures. */
501
557
  export interface RepeatingFailure {
502
- /** How many failures share the signature. */
558
+ /**
559
+ * How many DISTINCT tests share the signature — a test printed twice (two reporters in the
560
+ * log) or failed twice (a retry) is one test.
561
+ */
503
562
  count: number;
504
563
  /** The shared error line, when the log carries the failures' bodies (`line` reporter). */
505
564
  message: string | null;
506
565
  /** The shared duration in seconds, when the failures line up by how long they ran. */
507
566
  seconds: number | null;
508
- /** The failures that share it, in log order. */
567
+ /** The distinct tests that share it, in log order. */
509
568
  tests: FailedTest[];
510
569
  }
511
570
  /**
@@ -513,39 +572,131 @@ export interface RepeatingFailure {
513
572
  *
514
573
  * Playwright's `list` reporter prints one line per test as it finishes — its mark, its title
515
574
  * path and how long it ran — and defers each failure's error to the summary at the end, so
516
- * mid-run the only signature those lines carry is the duration. A `line` reporter prints the
517
- * failure bodies as they happen, and there the repeated error message itself is the signature,
518
- * which is stronger (it needs no assumption about how long a failure should take), so the
519
- * message is looked for first.
575
+ * mid-run the only signature those lines carry is the duration. Where the log carries the
576
+ * failure bodies (a `line` reporter's output, or a finished run's summary) the repeated error
577
+ * message itself is the signature, which is stronger (it needs no assumption about how long a
578
+ * failure should take), so the message is looked for first.
520
579
  *
521
580
  * Either way the point is the same: a suite whose failures repeat one cause spends its whole
522
581
  * runtime proving that one cause, and the executor watching it can be told so at the third
523
582
  * failure instead of at the last. X1 flash-m76 walked 15 tests in 4.0 minutes where 15.6 s
524
583
  * each was the test timeout and one missing `navigate('/')` was the cause of all of them.
525
584
  *
585
+ * The quorum is of DISTINCT tests — {@link REPEATING_FAILURE_MIN} of them — because a log that
586
+ * prints each failure twice (a second reporter, a retry) had X1 flash-m83 told that four of its
587
+ * tests had failed the same way when two had, so the executor stopped a 139-test walk at test 21
588
+ * with one cause in hand (2026-10-16).
589
+ *
526
590
  * @param log - The log so far.
527
591
  * @returns The repeating cause, or null when no signature has {@link REPEATING_FAILURE_MIN}
528
- * failures behind it.
592
+ * distinct tests behind it.
529
593
  */
530
594
  export declare function repeatingFailure(log: string): RepeatingFailure | null;
531
595
  /** How many of a repeating cause's failures the note lists before it says "and N more". */
532
596
  export declare const REPEATING_FAILURE_LISTED = 5;
597
+ /** How many causes a finished run's summary lists before it says "and N more". */
598
+ export declare const FAILURE_CAUSES_LISTED = 5;
599
+ /** How many of one cause's tests that summary names before it says "and N more". */
600
+ export declare const FAILURE_CAUSE_TESTS_LISTED = 6;
601
+ /**
602
+ * Distinct spec FILES a repeating cause must span — with every failure sharing it and nothing
603
+ * passing since — before a run is called broken for the whole suite.
604
+ *
605
+ * One file's failures can be that file's own setup, so a cause confined to one file is never
606
+ * this. Across {@link UNIVERSAL_CAUSE_FILES} files, on the other hand, whatever it is is a
607
+ * property of the run rather than of a page.
608
+ */
609
+ export declare const UNIVERSAL_CAUSE_FILES = 3;
610
+ /** A repeating cause that is failing the WHOLE run — see {@link universalCause}. */
611
+ export interface UniversalCause {
612
+ /** How many distinct tests share it. */
613
+ count: number;
614
+ /** The distinct spec files they live in, in the order the log named them. */
615
+ files: string[];
616
+ }
533
617
  /**
534
- * The sentence that names a cause repeating among a running suite's failures, and the command
535
- * that stops the run so the cause can be fixed first.
618
+ * Whether a repeating cause is failing the whole run — the one case where stopping it is the
619
+ * right call.
620
+ *
621
+ * The test is: the cause accounts for every failure the log names, it has hit
622
+ * {@link UNIVERSAL_CAUSE_FILES} spec files or more, and nothing has passed since its first
623
+ * failure. An app that is not up, a 5xx on every request, or a selector that is missing on every
624
+ * page all look like that, and every remaining test will fail the same way — so the run's
625
+ * remaining minutes measure nothing. Anything less is NOT this: a cause that stops at one file,
626
+ * or that leaves other tests passing, or that shares the run with failures of another shape,
627
+ * leaves the run with something to say, and the run is the only thing that will say it. X1
628
+ * flash-m83 (2026-10-16) stopped eight local runs at their first repeating cause over 14.5
629
+ * minutes and never finished one; three of its deploys each fixed a single cause that a finished
630
+ * run would have listed alongside the others.
631
+ *
632
+ * @param log - The log so far.
633
+ * @param found - The repeating cause {@link repeatingFailure} found in it.
634
+ * @returns The cause's count and files, or null when the run is not failing whole.
635
+ */
636
+ export declare function universalCause(log: string, found: RepeatingFailure): UniversalCause | null;
637
+ /** One cause of failure in a run, and the tests it hit. */
638
+ export interface FailureCause {
639
+ /** The error line its tests all reported, or null when only the duration ties them together. */
640
+ message: string | null;
641
+ /** The duration they shared in seconds, or null when the error line is the signature. */
642
+ seconds: number | null;
643
+ /** The distinct tests it hit, in the order the log named them. */
644
+ tests: FailedTest[];
645
+ }
646
+ /**
647
+ * Every failure a run names, grouped by the cause behind it — one group per cause, with the
648
+ * tests it hit.
649
+ *
650
+ * The point is that ONE run yields EVERY cause. A Playwright report prints its failures one
651
+ * after another with no statement of which of them share a cause, so a run of 19 failures is 19
652
+ * bodies to read; X1 flash-m83 (2026-10-16) spent three deploys (6.7 minutes) each fixing a
653
+ * single cause, two of them found by runs stopped before they walked the rest.
654
+ *
655
+ * The signature is the failures' own error line where the log carries their bodies (a finished
656
+ * run, or a `line` reporter), and how long they took where it does not (a still-running `list`
657
+ * log). A test the log printed twice, or failed twice, is one test.
658
+ *
659
+ * @param log - The log of a finished or running run.
660
+ * @returns The causes, the one with the most tests first.
661
+ */
662
+ export declare function failuresByCause(log: string): FailureCause[];
663
+ /**
664
+ * The one-line-per-cause summary of a finished run's failures, or null when the run named fewer
665
+ * than two of them.
666
+ *
667
+ * This is what makes a run worth finishing: every cause the run found, in the result the
668
+ * executor reads, so one round of fixes covers all of them rather than the one cause a run
669
+ * stopped early happened to reach.
670
+ *
671
+ * @param log - The finished run's output.
672
+ * @returns The note, or null.
673
+ */
674
+ export declare function failureCausesNote(log: string): string | null;
675
+ /**
676
+ * The sentence that names a cause repeating among a running suite's failures, mid-run.
536
677
  *
537
678
  * Kept here, beside {@link repeatingFailure}, so the two stay in step: every word below is about
538
- * what that function could actually see in the log.
679
+ * what that function could actually see in the log — including the count, which is of DISTINCT
680
+ * tests, so the note never names one or two tests as a cause.
681
+ *
682
+ * The note names the cause early so the executor can START FIXING while the run keeps walking,
683
+ * and it asks for the run to be stopped only when {@link universalCause} says the cause is
684
+ * failing the whole run. X1 flash-m76 (2026-10-16) spent 4.0 minutes walking 15 tests whose one
685
+ * cause was certain at the third, 47 s in, and the note answers exactly that; X1 flash-m83 then
686
+ * stopped eight runs at their first repeating cause in 14.5 minutes and never finished one, so
687
+ * the note must not say to stop when the run still has other causes to name.
539
688
  *
540
689
  * @param found - What {@link repeatingFailure} found.
541
- * @param o - The run's facts: its `taskId`, its `log` path, and `stop` — the shell command that
542
- * stops it (the pids the platform's own pid file leads to).
690
+ * @param o - The run's facts: its `taskId`, its `log` path, `stop` — the shell command that
691
+ * stops it, printed only for a {@link UniversalCause} — and `universal`, what
692
+ * {@link universalCause} found (absent means the run is not failing whole).
543
693
  * @returns The note.
544
694
  */
545
695
  export declare function repeatingFailureNote(found: RepeatingFailure, o: {
546
696
  taskId: string;
547
697
  log: string;
548
698
  stop: string;
699
+ universal?: UniversalCause | null;
549
700
  }): string;
550
701
  /**
551
702
  * Attempt a whitespace-tolerant replacement when an exact `old_string` match
@@ -1 +1 @@
1
- {"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../src/utilities.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAS5C;AAED;;;;;;GAMG;AACH,eAAO,MA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