squally-reporter 0.17.0 → 0.18.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/README.md CHANGED
@@ -114,6 +114,15 @@ passed) - never for an attempt that passed on its first try, regardless of how
114
114
  that just passed, and uploading one anyway would only eat into your
115
115
  organization's storage for no benefit.
116
116
 
117
+ **Uploaded while the suite runs (0.18.0).** An attempt's artifacts go up as
118
+ soon as Squally has accepted the batch that carries its result - not only
119
+ after the last test, as until 0.17.0. A job that is cancelled or killed
120
+ partway keeps the artifacts of every result that already arrived. When the
121
+ suite ends, the reporter waits **up to 3 minutes** for the uploads still
122
+ running; the last 15 seconds of that only finish the confirmation, no new
123
+ upload starts in them. A file is sent as a stream, not read into memory
124
+ first.
125
+
117
126
  **You need to actually enable capture in `playwright.config.ts`** - without
118
127
  it, Playwright doesn't produce any attachments, so there's nothing for the
119
128
  reporter to find or upload (no error either way, it's a silent no-op):
@@ -140,8 +149,10 @@ release of it:
140
149
  The test result itself is reported as usual, and the run's outcome and exit
141
150
  code are untouched. In the dashboard that artifact is shown as skipped, with
142
151
  the reason, rather than silently missing.
143
- - **At most 250 artifacts per shard.** Squally keeps the first 250 and skips
144
- the rest with the reason `limit`, which the reporter explains in one line.
152
+ - **At most 250 artifacts per request.** Since 0.18.0 the reporter sends them
153
+ in rounds of at most 250, so a shard with more no longer loses the rest.
154
+ Until 0.17.0 a shard's artifacts went in one request, and Squally kept the
155
+ first 250.
145
156
  - **A total storage cap per organization, depending on your Squally plan.**
146
157
  Once it is reached, further uploads are rejected the same way until you free
147
158
  up space or upgrade. Note that a fully instrumented suite now produces up to
@@ -151,9 +162,14 @@ release of it:
151
162
  - **Your test's own `stdout`/`stderr` is cut at 16 KB** before it is sent. That
152
163
  is this reporter's own limit, not Squally's, and it applies whether or not
153
164
  you capture artifacts at all.
154
- - Two minutes per upload, and 30 seconds for the calls that surround it. An
155
- unreachable or very slow server means a skipped upload and a `console.warn`,
156
- not a CI job waiting indefinitely.
165
+ - Two minutes per upload, and 30 seconds for the calls that surround it. Since
166
+ 0.18.0 a network error, an HTTP 5xx or a 429 is retried like the results
167
+ (see *When Squally cannot be reached for a while*), and the 3 minutes at the
168
+ end bound the whole wait. What did not arrive is said once, at the end:
169
+
170
+ ```
171
+ [squally-reporter] 2 of 9 artifacts did not reach Squally - the storage answered HTTP 503, and the retries ran out. Your test run and its exit code are not affected.
172
+ ```
157
173
 
158
174
  Upload is best-effort and fully non-blocking, same principle as the rest of
159
175
  this reporter - a failed or skipped upload never fails your test run or
@@ -202,6 +218,51 @@ If Squally is unreachable partway through, results already sent stay in the
202
218
  dashboard; only what could not be delivered is lost, and your test run's exit
203
219
  code is never affected either way.
204
220
 
221
+ ## The end of a run (0.18.0)
222
+
223
+ When every result arrived and the run is marked complete, the last line says
224
+ where it is and what got there:
225
+
226
+ ```
227
+ [squally-reporter] Reported to Squally: run #128 · 412 results, 9 artifacts · https://app.squally.dev/o/…/runs/…
228
+ ```
229
+
230
+ If something did not arrive, that line is replaced by the one that says what
231
+ is missing (see below).
232
+
233
+ **`SQUALLY_OUTPUT_FILE`** writes the run's link and counts as JSON, for a
234
+ later CI step that posts the link somewhere:
235
+
236
+ ```bash
237
+ SQUALLY_OUTPUT_FILE=test-results/squally.json
238
+ ```
239
+
240
+ ```json
241
+ {
242
+ "version": 1,
243
+ "runUrl": "https://app.squally.dev/o/…/runs/…",
244
+ "runNumber": 128,
245
+ "runId": "…",
246
+ "shard": null,
247
+ "complete": true,
248
+ "tests": { "passed": 40, "failed": 1, "flaky": 1, "skipped": 0 },
249
+ "results": { "produced": 44, "delivered": 44 },
250
+ "artifacts": { "uploaded": 3, "notUploaded": 0 }
251
+ }
252
+ ```
253
+
254
+ - Written at the very end of every run the reporter took part in - also one
255
+ Squally refused or could not be reached for, then with `runUrl: null` and
256
+ `complete: false`, so the file is always there for the next step. Missing
257
+ directories are created.
258
+ - `tests` counts this process's tests the way Playwright does at the end
259
+ (`expected` as passed, `unexpected` as failed, `flaky`, `skipped`).
260
+ `results` counts attempts: produced, and accepted by Squally.
261
+ - One file per process: under `--shard`, give each shard its own path (or
262
+ read them one after another), and `shard` says which one it was.
263
+ - A path that cannot be written is one warning; the exit code stays yours.
264
+ - New fields may be added; `version` changes only if one changes meaning.
265
+
205
266
  ## When Squally cannot be reached for a while (0.17.0)
206
267
 
207
268
  Some failures pass on their own, and the reporter waits them out instead of
@@ -226,6 +287,11 @@ answers (a refused key, an exhausted quota, an unknown or finished run), an
226
287
  HTTP 403 *without* the firewall's header, and a redirect. Those keep their own
227
288
  line, as before.
228
289
 
290
+ The artifact uploads follow the same rules since 0.18.0 (until then each was
291
+ tried once): the request for the upload URL, the upload to storage (a network
292
+ error, HTTP 5xx or 429) and the confirmation. They have their own line at the
293
+ end and never delay the results.
294
+
229
295
  When your suite ends, the reporter normally waits up to 5 seconds for the last
230
296
  results. After one of the failures above it waits up to 60 seconds, for the
231
297
  last results and for marking the run complete.
@@ -612,14 +678,37 @@ written two ways still compares equal: it is lowercased, and a leading `v` or a
612
678
  `v1.2.0` is stored as `1.2.0`. The reporter says so once per run when it
613
679
  happens, so a value that looks different in the dashboard is not a mystery.
614
680
 
681
+ ## Behind a proxy (0.18.0)
682
+
683
+ Every request - to Squally, the artifact uploads to storage, and
684
+ `npx squally-reporter cancel` - goes through the proxy in `HTTPS_PROXY` (for
685
+ `https://` addresses) or `HTTP_PROXY` (for `http://`), lower-case names
686
+ first, the way curl reads them. Hosts in `NO_PROXY` are reached directly:
687
+ comma-separated, each name with all its subdomains (`internal` and
688
+ `.internal` both cover `squally.internal`), `host:port` for one port only, `*`
689
+ for everything - no IP ranges:
690
+
691
+ ```bash
692
+ HTTPS_PROXY=http://proxy.internal:3128
693
+ NO_PROXY=localhost,127.0.0.1,.internal
694
+ ```
695
+
696
+ The proxy is asked to open a tunnel (`CONNECT`), so TLS still goes end to end
697
+ to Squally. A login in the proxy URL (`http://user:pass@host:port`) is sent as
698
+ `Proxy-Authorization`. A value that is not a URL is one warning, naming the
699
+ variable but not its value, and the reporter connects directly. Without any of
700
+ these variables nothing changes. Until 0.17.0 the variables were ignored.
701
+
615
702
  ## Troubleshooting
616
703
 
617
704
  Set `SQUALLY_DEBUG=1` to print detail that is otherwise kept quiet - the
618
705
  browser-console extraction (how many messages were found, or that an attempt's
619
- trace held none) and, since 0.11.0, a CI run link that was not sent because it
620
- was not an `https://` URL. Everything that is *not* ordinary (a trace that
621
- cannot be read, an unsupported schema version, a rejected upload) is printed
622
- without it.
706
+ trace held none), since 0.11.0 a CI run link that was not sent because it was
707
+ not an `https://` URL, and since 0.18.0 which proxy variable is in use and a
708
+ quarantine rules request that failed (nothing uses the rules yet, so that is
709
+ no longer a warning). Everything that is *not* ordinary (a trace that cannot
710
+ be read, an unsupported schema version, a rejected upload) is printed without
711
+ it.
623
712
 
624
713
  ## Support
625
714
 
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAuCA,eAAO,MAAM,KAAK,QAUN,CAAC;AAEb,MAAM,MAAM,YAAY,GACpB;IAAE,SAAS,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,SAAS,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,kBAAkB,GAAG,kBAAkB,CAAA;CAAE,CAAC;AAE1E,iDAAiD;AACjD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAQlF;AAcD,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;C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CAAE,GAChB;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7C,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,UAAU,CAqB7D;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IACvB,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5B,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,2FAA2F;IAC3F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAcD,0FAA0F;AAC1F,wBAAsB,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA+H9F;AAED,yFAAyF;AACzF,wBAAsB,IAAI,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,CAoBzG"}
package/dist/cli.js CHANGED
@@ -137,7 +137,8 @@ async function runCancel(jobKeyArg, deps) {
137
137
  if (!connection.apiUrl || !connection.apiKey)
138
138
  return;
139
139
  const url = `${connection.apiUrl.replace(/\/+$/, "")}/api/ingest/v2/runs/cancel`;
140
- const dispatcher = new undici_1.Agent({ headersTimeout: timeoutMs, bodyTimeout: timeoutMs, keepAliveTimeout: 1000 });
140
+ // Through HTTP(S)_PROXY when one is set (0.18.0), like the reporter.
141
+ const dispatcher = (0, http_config_1.createDispatcher)({ headersTimeout: timeoutMs, bodyTimeout: timeoutMs, keepAliveTimeout: 1000 });
141
142
  try {
142
143
  for (let attempt = 1;; attempt++) {
143
144
  const last = attempt >= 2; // one retry
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":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,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAC9B,CAAC,IAAI,EAAE,EAAE;QACP,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAC1B,CAAC,EACD,GAAG,EAAE;QACH,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -1,5 +1,24 @@
1
+ import { Agent, type Dispatcher } from "undici";
1
2
  export declare const REPORTER_VERSION: string;
2
3
  export declare const USER_AGENT: string;
3
4
  export declare const API_REQUEST_TIMEOUT_MS = 30000;
4
5
  export declare const SERVER_ERROR_RETRY_DELAY_MS = 1000;
6
+ /** The proxy variable this process would use, by name - never its value (it can carry a login). */
7
+ export declare function proxyVariableInUse(env: NodeJS.ProcessEnv): string | null;
8
+ /**
9
+ * The dispatcher every request of this package goes through (0.18.0): to
10
+ * Squally, to the storage's presigned URLs, and the CLI's cancel.
11
+ *
12
+ * HTTP(S)_PROXY and NO_PROXY, as curl and most CI images read them - undici's
13
+ * EnvHttpProxyAgent: HTTPS_PROXY for https targets, HTTP_PROXY for http ones,
14
+ * lower case before upper case, NO_PROXY's hosts and domain suffixes go
15
+ * direct. Node's own fetch ignores these variables, which is why a self-hosted
16
+ * runner behind a company proxy reached nothing until this release.
17
+ *
18
+ * A plain Agent when no proxy is set, so a run without one is exactly what it
19
+ * was. A proxy URL undici cannot parse throws in the constructor - here that
20
+ * would be onBegin throwing into the customer's run - so it is one warning and
21
+ * a direct connection instead.
22
+ */
23
+ export declare function createDispatcher(options: Agent.Options): Dispatcher;
5
24
  //# sourceMappingURL=http-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"http-config.d.ts","sourceRoot":"","sources":["../src/http-config.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,gBAAgB,QAA8D,CAAC;AAC5F,eAAO,MAAM,UAAU,QAAyC,CAAC;AAYjE,eAAO,MAAM,sBAAsB,QAAS,CAAC;AAK7C,eAAO,MAAM,2BAA2B,OAAQ,CAAC"}
1
+ {"version":3,"file":"http-config.d.ts","sourceRoot":"","sources":["../src/http-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAqB,KAAK,UAAU,EAAE,MAAM,QAAQ,CAAC;AAgBnE,eAAO,MAAM,gBAAgB,QAA8D,CAAC;AAC5F,eAAO,MAAM,UAAU,QAAyC,CAAC;AAYjE,eAAO,MAAM,sBAAsB,QAAS,CAAC;AAK7C,eAAO,MAAM,2BAA2B,OAAQ,CAAC;AAIjD,mGAAmG;AACnG,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,GAAG,IAAI,CAExE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,GAAG,UAAU,CAWnE"}
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SERVER_ERROR_RETRY_DELAY_MS = exports.API_REQUEST_TIMEOUT_MS = exports.USER_AGENT = exports.REPORTER_VERSION = void 0;
4
+ exports.proxyVariableInUse = proxyVariableInUse;
5
+ exports.createDispatcher = createDispatcher;
6
+ const undici_1 = require("undici");
4
7
  // Sent on every request to squally-app (not on the artifact PUT to R2's
5
8
  // presigned URL - that goes straight to Cloudflare storage, not through the
6
9
  // app, and R2 has no use for it). Server-side, a customer's reporter version
@@ -32,4 +35,38 @@ exports.API_REQUEST_TIMEOUT_MS = 30000;
32
35
  // cancel. The reporter's own calls retry within a time budget since 0.17.0
33
36
  // (the retry policy in index.ts).
34
37
  exports.SERVER_ERROR_RETRY_DELAY_MS = 1000;
38
+ const PROXY_VARIABLES = ["HTTPS_PROXY", "https_proxy", "HTTP_PROXY", "http_proxy"];
39
+ /** The proxy variable this process would use, by name - never its value (it can carry a login). */
40
+ function proxyVariableInUse(env) {
41
+ return PROXY_VARIABLES.find((name) => (env[name] ?? "").trim() !== "") ?? null;
42
+ }
43
+ /**
44
+ * The dispatcher every request of this package goes through (0.18.0): to
45
+ * Squally, to the storage's presigned URLs, and the CLI's cancel.
46
+ *
47
+ * HTTP(S)_PROXY and NO_PROXY, as curl and most CI images read them - undici's
48
+ * EnvHttpProxyAgent: HTTPS_PROXY for https targets, HTTP_PROXY for http ones,
49
+ * lower case before upper case, NO_PROXY's hosts and domain suffixes go
50
+ * direct. Node's own fetch ignores these variables, which is why a self-hosted
51
+ * runner behind a company proxy reached nothing until this release.
52
+ *
53
+ * A plain Agent when no proxy is set, so a run without one is exactly what it
54
+ * was. A proxy URL undici cannot parse throws in the constructor - here that
55
+ * would be onBegin throwing into the customer's run - so it is one warning and
56
+ * a direct connection instead.
57
+ */
58
+ function createDispatcher(options) {
59
+ const variable = proxyVariableInUse(process.env);
60
+ if (variable === null)
61
+ return new undici_1.Agent(options);
62
+ try {
63
+ return new undici_1.EnvHttpProxyAgent(options);
64
+ }
65
+ catch {
66
+ // Without the error's message: undici's can quote the URL, and a proxy
67
+ // URL can carry a login.
68
+ console.warn(`[squally-reporter] ${variable} is not a proxy URL this reporter can use - connecting directly instead.`);
69
+ return new undici_1.Agent(options);
70
+ }
71
+ }
35
72
  //# sourceMappingURL=http-config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"http-config.js","sourceRoot":"","sources":["../src/http-config.ts"],"names":[],"mappings":";;;AAAA,wEAAwE;AACxE,4EAA4E;AAC5E,6EAA6E;AAC7E,0EAA0E;AAC1E,sEAAsE;AACtE,gEAAgE;AAChE,wBAAwB;AACxB,EAAE;AACF,6EAA6E;AAC7E,0EAA0E;AAC1E,uEAAuE;AACvE,0EAA0E;AAC1E,4EAA4E;AAC5E,qCAAqC;AACxB,QAAA,gBAAgB,GAAI,OAAO,CAAC,iBAAiB,CAAyB,CAAC,OAAO,CAAC;AAC/E,QAAA,UAAU,GAAG,oBAAoB,wBAAgB,EAAE,CAAC;AAEjE,4EAA4E;AAC5E,0EAA0E;AA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K,EAAE,CAAC,IAAI,IAAI,CAAC;AACjF,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAgB,gBAAgB,CAAC,OAAsB;IACrD,MAAM,QAAQ,GAAG,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACjD,IAAI,QAAQ,KAAK,IAAI;QAAE,OAAO,IAAI,cAAK,CAAC,OAAO,CAAC,CAAC;IACjD,IAAI,CAAC;QACH,OAAO,IAAI,0BAAiB,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;IAAC,MAAM,CAAC;QACP,uEAAuE;QACvE,yBAAyB;QACzB,OAAO,CAAC,IAAI,CAAC,sBAAsB,QAAQ,0EAA0E,CAAC,CAAC;QACvH,OAAO,IAAI,cAAK,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;AACH,CAAC"}
package/dist/index.d.ts CHANGED
@@ -272,6 +272,12 @@ export declare function startLine(answer: {
272
272
  index: number | null;
273
273
  total: number | null;
274
274
  }): string | null;
275
+ /**
276
+ * The run's page as the app sent it, when it is a plain http(s) URL with
277
+ * nothing a terminal would interpret - the rule of the start line (0.15.0),
278
+ * shared since 0.18.0 by the success line and SQUALLY_OUTPUT_FILE.
279
+ */
280
+ declare function printableRunUrl(url: unknown): string | null;
275
281
  export declare function testIdentity(test: Pick<TestCase, "titlePath" | "location">): {
276
282
  testName: string;
277
283
  filePath: string;
@@ -421,6 +427,13 @@ declare function outgoingResultText(raw: {
421
427
  consoleTruncatedFromBytes: number | null;
422
428
  };
423
429
  declare function attemptQualifiesForArtifacts(mappedStatus: AppendResultEntry["status"], retryCount: number): boolean;
430
+ /**
431
+ * The result an artifact waits for (0.18.0): its artifacts are uploaded once
432
+ * the batch carrying this result was accepted - only then does squally-app
433
+ * hold the row presign resolves them to. The same four fields the app keys a
434
+ * result by, in the same order as artifactKey without the type.
435
+ */
436
+ declare function resultKey(testName: string, filePath: string, retryCount: number, repeatIndex: number): string;
424
437
  declare function artifactKey(testName: string, filePath: string, retryCount: number, repeatIndex: number, type: ArtifactType): string;
425
438
  /** Why the app skipped an artifact, as a sentence (0.12.0: the limit per kind, and `limit`). */
426
439
  declare function skipReasonMessage(reason: string, type: ArtifactType): string;
@@ -429,7 +442,7 @@ declare function parseRetryAfterMs(headerValue: string | null, nowMs: number): n
429
442
  declare function computeBackoffMs(retryNumber: number): number;
430
443
  /**
431
444
  * The end-of-run line (0.17.0), or null when there is nothing to say. Pure,
432
- * for the tests; printDeliverySummary feeds it.
445
+ * for the tests; printEndLines feeds it.
433
446
  *
434
447
  * `cause` is the last transient failure, already a phrase ("Vercel's firewall
435
448
  * ... challenged this runner (HTTP 403, ...)"). Without one, the loss came
@@ -445,6 +458,69 @@ declare function deliverySummary(input: {
445
458
  /** A refusal already printed its own line (400, quota, unknown run, 409). */
446
459
  lossExplained: boolean;
447
460
  }): string | null;
461
+ /**
462
+ * The end-of-run line about artifacts that did not reach Squally (0.18.0), or
463
+ * null when none was lost. Only for losses nothing else has reported: a retry
464
+ * budget that ran out, or the end-of-run wait. A refusal by Squally (a size,
465
+ * the plan's storage, a presign error) keeps its own line, as before.
466
+ */
467
+ declare function artifactSummary(input: {
468
+ queued: number;
469
+ lost: number;
470
+ why: string | null;
471
+ }): string | null;
472
+ /**
473
+ * The last line of a run that arrived whole (0.18.0): where it is, and what
474
+ * got there. Null without a run URL - an app before 29.10.2026 sends none,
475
+ * and the start line is silent then too.
476
+ */
477
+ declare function successLine(input: {
478
+ runNumber: unknown;
479
+ runUrl: unknown;
480
+ shard: {
481
+ index: number | null;
482
+ total: number | null;
483
+ };
484
+ delivered: number;
485
+ artifacts: number;
486
+ }): string | null;
487
+ type TestCounts = {
488
+ passed: number;
489
+ failed: number;
490
+ flaky: number;
491
+ skipped: number;
492
+ };
493
+ /**
494
+ * This shard's tests as Playwright counts them at the end (TestCase.outcome()):
495
+ * expected is passed - a test.fail() test that failed included -, unexpected
496
+ * failed, flaky flaky, skipped skipped (a test the run never reached as well).
497
+ * Null when the suite cannot be read; never throws.
498
+ */
499
+ declare function testCounts(suite: {
500
+ allTests?: () => {
501
+ outcome?: () => string;
502
+ }[];
503
+ } | null): TestCounts | null;
504
+ /**
505
+ * What SQUALLY_OUTPUT_FILE holds (0.18.0) - for a later CI step that posts the
506
+ * link somewhere, with or without Squally's own integrations. One object per
507
+ * shard; the version says the shape, and a field is only ever added.
508
+ */
509
+ declare function outputFileContent(input: {
510
+ runId: string | null;
511
+ runNumber: unknown;
512
+ runUrl: unknown;
513
+ shard: {
514
+ index: number | null;
515
+ total: number | null;
516
+ };
517
+ complete: boolean;
518
+ tests: TestCounts | null;
519
+ produced: number;
520
+ delivered: number;
521
+ artifactsQueued: number;
522
+ artifactsUploaded: number;
523
+ }): Record<string, unknown>;
448
524
  export default class SquallyReporter implements Reporter {
449
525
  private apiUrl;
450
526
  private apiKey;
@@ -470,7 +546,25 @@ export default class SquallyReporter implements Reporter {
470
546
  private plannedTests;
471
547
  private runConfig;
472
548
  private buffer;
473
- private artifacts;
549
+ private pendingArtifacts;
550
+ private artifactQueue;
551
+ private artifactRound;
552
+ /** Handed on for upload (their result arrived) - the summary's "of N". */
553
+ private artifactsQueued;
554
+ /** Confirmed by squally-app - in the success line and the output file. */
555
+ private artifactsConfirmed;
556
+ /** Lost to a retry budget or the end-of-run wait - artifactSummary's count. */
557
+ private artifactsLost;
558
+ private artifactLossWhy;
559
+ private lastArtifactCause;
560
+ /** Presign refused for good (Squally's own 4xx): no further rounds this run. */
561
+ private artifactsRefused;
562
+ /** When onEnd began waiting for the artifacts - their deadlines count from here. */
563
+ private artifactEndStartedAt;
564
+ /** Fired at the end-of-run cutoff: no new presign or PUT, the running ones end. */
565
+ private artifactCutoff;
566
+ /** Fired at the end-of-run deadline: the confirmation ends too. */
567
+ private artifactAbort;
474
568
  /** Trace schema versions already warned about - ONCE per run, not per
475
569
  * attempt. A suite failing 200 tests under a Playwright this reporter does
476
570
  * not know would otherwise print 200 identical paragraphs and teach the
@@ -528,8 +622,21 @@ export default class SquallyReporter implements Reporter {
528
622
  private lossExplained;
529
623
  private sendingDisabled;
530
624
  private warnedAlreadyComplete;
531
- private rulesWarning;
532
- private beginDecided;
625
+ private runNumber;
626
+ private runUrl;
627
+ /** The root suite from onBegin - Playwright's own outcome per test, for the output file. */
628
+ private rootSuite;
629
+ /** /complete answered ok. */
630
+ private runCompleted;
631
+ /**
632
+ * What the end of the run has to say (0.18.0): "not_started" - begin never
633
+ * answered in time, the summary says so; "started" - the run exists, the
634
+ * summary or the success line; null - nothing (nothing ran, or a refusal
635
+ * that printed its own line).
636
+ */
637
+ private endState;
638
+ /** The results' retries (0.17.0's state, unchanged) - see RequestScope. */
639
+ private readonly resultsScope;
533
640
  private flushTimerHandle;
534
641
  private inFlightFlushes;
535
642
  private runStarted;
@@ -550,6 +657,12 @@ export default class SquallyReporter implements Reporter {
550
657
  onTestBegin(): void;
551
658
  private resolveRunConfig;
552
659
  onTestEnd(test: TestCase, result: TestResult): void;
660
+ /**
661
+ * The attempt's screenshots and trace, and the browser console derived from
662
+ * the trace - each with the result's identity. Split out of onTestEnd in
663
+ * 0.18.0, which parks them under the result (pendingArtifacts).
664
+ */
665
+ private collectArtifacts;
553
666
  onEnd: (result: FullResult) => Promise<void>;
554
667
  private drainAndComplete;
555
668
  /**
@@ -565,15 +678,28 @@ export default class SquallyReporter implements Reporter {
565
678
  */
566
679
  private untilEndDeadline;
567
680
  /**
568
- * ONE LINE AT THE END (0.17.0) about what did not reach Squally, instead of
569
- * a line per dropped batch: how many results, why, and - when /complete
570
- * failed too - that the run will show as incomplete once the project's run
571
- * timeout has passed (squally-app's hourly sweep, counted from the run's
572
- * last activity). Silent when everything arrived.
681
+ * THE LAST LINES OF A RUN, in this order:
682
+ *
683
+ * - what did not reach Squally (0.17.0), instead of a line per dropped
684
+ * batch: how many results, why, and - when /complete failed too - that
685
+ * the run will show as incomplete once the project's run timeout has
686
+ * passed (squally-app's hourly sweep, counted from the run's last
687
+ * activity);
688
+ * - the artifacts a retry budget or the end-of-run wait lost (0.18.0);
689
+ * - when every result arrived and the run is complete, where it is
690
+ * (0.18.0) - last, because that is where a reader looks for the link.
573
691
  *
574
692
  * Never throws: it runs inside onEnd, and a line is never worth an exit code.
575
693
  */
576
- private printDeliverySummary;
694
+ private printEndLines;
695
+ /**
696
+ * SQUALLY_OUTPUT_FILE (0.18.0): the run's link and counts as JSON, written at
697
+ * the very end of every run this reporter took part in - also one that
698
+ * could not be reported, then with `runUrl: null`, so a later CI step can
699
+ * rely on the file being there. Missing directories are created; a path
700
+ * that cannot be written is one warning. Never throws.
701
+ */
702
+ private writeOutputFile;
577
703
  private armFlushTimer;
578
704
  private stopFlushTimer;
579
705
  private giveUp;
@@ -587,23 +713,82 @@ export default class SquallyReporter implements Reporter {
587
713
  */
588
714
  private outcomeDetail;
589
715
  /**
590
- * Begin, and with its answer the fate of a held-back rules warning (0.14.1):
591
- * printed once the run has started, dropped when it never does - then the
592
- * begin's own line has already said what is wrong, and a second line about
593
- * the same answer read only as a second problem.
716
+ * Begin. Until 0.18.0 also decided the fate of a held-back rules warning;
717
+ * a rules failure is a debug line now (fetchRules).
594
718
  */
595
719
  private beginRun;
596
720
  private requestBegin;
597
721
  private completeRun;
598
722
  private fetchRules;
599
- private holdRulesWarning;
600
- /** Prints the held rules warning once begin has started the run; drops it if begin failed. */
601
- private flushRulesWarning;
602
723
  private requestJson;
724
+ /**
725
+ * THE RETRY LOOP (0.17.0), one for every request since 0.18.0 - the JSON
726
+ * calls and the artifact PUT - so the rules at the top of the file are
727
+ * stated once. Retries while `attempt` reports a transient failure and the
728
+ * next wait still ENDS within the budget and the scope's deadline - a wait
729
+ * that would cross either is not started at all - and stops at once when
730
+ * the scope's signal fires.
731
+ *
732
+ * The budget counts from the first try, except for an upload
733
+ * (`budgetFromFirstFailure`): one try of a 50 MB PUT may itself take up to
734
+ * UPLOAD_REQUEST_TIMEOUT_MS, longer than the whole budget.
735
+ */
736
+ private retryWithinBudget;
603
737
  /** One try of requestJson: the outcome, and whether its failure is transient. */
604
738
  private attemptJson;
605
- private uploadArtifacts;
606
- private presignAndUpload;
739
+ private attemptJsonWith;
740
+ /** The accepted batch's results hand on their parked artifacts. */
741
+ private releaseArtifacts;
742
+ /**
743
+ * A batch that did not arrive takes its artifacts with it: presign would
744
+ * only answer not_found for each. Not counted as lost artifacts - the
745
+ * results' own line already says those results are missing.
746
+ */
747
+ private dropArtifacts;
748
+ /**
749
+ * Starts the next round when none is running. One at a time: a round is
750
+ * presign + up to ARTIFACTS_PER_REQUEST_LIMIT PUTs + confirm, and a second
751
+ * one in parallel would only compete for the runner's uplink with the
752
+ * first - and with the tests.
753
+ */
754
+ private kickArtifacts;
755
+ /**
756
+ * AT onEnd: the rounds still to go, within ARTIFACT_END_BUDGET_MS from now
757
+ * - the last ARTIFACT_CONFIRM_RESERVE_MS of it for the confirmation alone.
758
+ * Whatever is still queued then is lost, and said so once (artifactSummary).
759
+ * Both budgets shrink with SQUALLY_INTERNAL_TIME_SCALE, never below the 5 s
760
+ * a healthy drain gets.
761
+ */
762
+ private finishArtifacts;
763
+ /** The end-of-run wait, scaled for this package's tests (never below DRAIN_BUDGET_MS). */
764
+ private artifactEndBudget;
765
+ /** No new presign or PUT after this - Infinity while the suite runs. */
766
+ private artifactCutoffAt;
767
+ /** Nothing artifact-related after this - Infinity while the suite runs. */
768
+ private artifactDeadlineAt;
769
+ /**
770
+ * The artifacts' retries (see RequestScope): their own cause and deadline,
771
+ * nothing of the results'. `phase` "upload" - presign and PUT - ends at the
772
+ * cutoff, "confirm" at the deadline.
773
+ */
774
+ private artifactScope;
775
+ /** Lost to a retry budget or the end-of-run wait - one line at the end. */
776
+ private loseArtifacts;
777
+ /** One round: presign, the PUTs, confirm - every step with the retries of the policy above. */
778
+ private uploadRound;
779
+ /**
780
+ * One artifact to its presigned URL, retried like the JSON calls: "ok",
781
+ * "failed" (the storage refused - warned here, as before), or "lost" (a
782
+ * retry budget or the cutoff - counted for the end-of-run line).
783
+ */
784
+ private putArtifact;
785
+ /**
786
+ * One PUT. The file goes as a STREAM since 0.18.0 - until then each one was
787
+ * read whole into memory first, up to 50 MB per trace and five at a time.
788
+ * Content-Length from a fresh stat: the storage refuses a chunked upload to
789
+ * a presigned URL, and the size is what the URL was signed for.
790
+ */
791
+ private attemptPut;
607
792
  }
608
793
  export declare const __internal: {
609
794
  resolveConnection: typeof resolveConnection;
@@ -648,6 +833,14 @@ export declare const __internal: {
648
833
  flushIntervalFor: typeof flushIntervalFor;
649
834
  attemptQualifiesForArtifacts: typeof attemptQualifiesForArtifacts;
650
835
  artifactKey: typeof artifactKey;
836
+ resultKey: typeof resultKey;
837
+ artifactSummary: typeof artifactSummary;
838
+ successLine: typeof successLine;
839
+ testCounts: typeof testCounts;
840
+ outputFileContent: typeof outputFileContent;
841
+ printableRunUrl: typeof printableRunUrl;
842
+ ARTIFACT_END_BUDGET_MS: number;
843
+ ARTIFACT_CONFIRM_RESERVE_MS: number;
651
844
  stepsForAttempt: typeof stepsForAttempt;
652
845
  stepFields: typeof stepFields;
653
846
  stripTypedValue: typeof stripTypedValue;