playwright-performance-regression 0.1.0-next.4 → 1.0.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/dist/reporter.cjs CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkIUI4AFE5_cjs = require('./chunk-IUI4AFE5.cjs');
6
- var chunkLUA4WRIQ_cjs = require('./chunk-LUA4WRIQ.cjs');
5
+ var chunkLEIBG5A4_cjs = require('./chunk-LEIBG5A4.cjs');
6
+ var chunkW7NEFS5V_cjs = require('./chunk-W7NEFS5V.cjs');
7
7
  var fs = require('fs');
8
8
  var promises = require('fs/promises');
9
9
  var os = require('os');
@@ -188,6 +188,51 @@ function stringifyStable(value) {
188
188
  `;
189
189
  }
190
190
 
191
+ // src/core/format/violation.ts
192
+ var TIME_RULES = /* @__PURE__ */ new Set([
193
+ "median",
194
+ "percentile",
195
+ "p99"
196
+ ]);
197
+ var SHARE_RULES = /* @__PURE__ */ new Set([
198
+ "apdex",
199
+ "wilson",
200
+ "errors"
201
+ ]);
202
+ function exceedance(check2) {
203
+ if (check2.rule === "apdex") return check2.actual === 0 ? Infinity : check2.limit / check2.actual;
204
+ return check2.limit === 0 ? Infinity : check2.actual / check2.limit;
205
+ }
206
+ function overText(check2) {
207
+ if (SHARE_RULES.has(check2.rule)) {
208
+ const points = Math.max(1, Math.round(Math.abs(check2.actual - check2.limit) * 100));
209
+ return `+${String(points)} pp`;
210
+ }
211
+ const r2 = exceedance(check2);
212
+ if (!Number.isFinite(r2)) return ">999%";
213
+ const over = Math.max(1, Math.round((r2 - 1) * 100));
214
+ return over > 999 ? ">999%" : `+${String(over)}%`;
215
+ }
216
+ function formatFactor(ratio2, threshold = null) {
217
+ const scaled = Math.round(ratio2 * 1e6) / 1e4;
218
+ let hundredths = Math.round(scaled);
219
+ if (threshold !== null && hundredths / 100 <= threshold && ratio2 > threshold) {
220
+ hundredths = Math.ceil(scaled);
221
+ }
222
+ return (hundredths / 100).toFixed(2);
223
+ }
224
+ function formatMs(ms2) {
225
+ return `${Math.round(ms2)} ms`;
226
+ }
227
+ function formatActual(check2) {
228
+ if (TIME_RULES.has(check2.rule)) return formatMs(check2.actual);
229
+ const observed = check2.observed === null ? "" : ` (${check2.observed.toFixed(3)})`;
230
+ return `${check2.actual.toFixed(3)}${observed}`;
231
+ }
232
+ function formatLimit(check2) {
233
+ return TIME_RULES.has(check2.rule) ? formatMs(check2.limit) : check2.limit.toFixed(3);
234
+ }
235
+
191
236
  // src/io/json.ts
192
237
  async function writeTextAtomic(path$1, text2) {
193
238
  const dir = path.dirname(path$1);
@@ -243,6 +288,21 @@ function runPass(command, env, cwd) {
243
288
  }
244
289
  });
245
290
  }
291
+ function readProcessTable() {
292
+ if (process.platform === "win32") return null;
293
+ try {
294
+ const out = child_process.spawnSync("ps", ["-A", "-o", "pid=,ppid=,args="], {
295
+ encoding: "utf8",
296
+ timeout: 2e3,
297
+ shell: false,
298
+ windowsHide: true,
299
+ maxBuffer: 16 * 1024 * 1024
300
+ });
301
+ return out.status === 0 && typeof out.stdout === "string" ? out.stdout : null;
302
+ } catch {
303
+ return null;
304
+ }
305
+ }
246
306
  function readPackageInfo(dir) {
247
307
  for (let current = dir; ; current = path.dirname(current)) {
248
308
  const file = path.join(current, "package.json");
@@ -362,33 +422,33 @@ function readHostInfo(env) {
362
422
  }
363
423
 
364
424
  // src/core/schema/formats.ts
365
- var nonEmpty = chunkLUA4WRIQ_cjs.str({ minLength: 1 });
366
- var nonEmptyOrNull = chunkLUA4WRIQ_cjs.nullable(nonEmpty);
425
+ var nonEmpty = chunkW7NEFS5V_cjs.str({ minLength: 1 });
426
+ var nonEmptyOrNull = chunkW7NEFS5V_cjs.nullable(nonEmpty);
367
427
  function present(value, pointer, sink, properties) {
368
428
  for (const [name, schema] of Object.entries(properties)) {
369
429
  if (Object.hasOwn(value, name)) schema.check(value[name], `${pointer}/${name}`, sink);
370
430
  }
371
431
  }
372
432
  var noTiming = {
373
- duration: chunkLUA4WRIQ_cjs.nul,
374
- requestStart: chunkLUA4WRIQ_cjs.nul,
375
- ttfb: chunkLUA4WRIQ_cjs.nul,
376
- timeSource: chunkLUA4WRIQ_cjs.constant("browser"),
377
- fromServiceWorker: chunkLUA4WRIQ_cjs.constant(false)
433
+ duration: chunkW7NEFS5V_cjs.nul,
434
+ requestStart: chunkW7NEFS5V_cjs.nul,
435
+ ttfb: chunkW7NEFS5V_cjs.nul,
436
+ timeSource: chunkW7NEFS5V_cjs.constant("browser"),
437
+ fromServiceWorker: chunkW7NEFS5V_cjs.constant(false)
378
438
  };
379
- var requestSample = chunkLUA4WRIQ_cjs.obj(
439
+ var requestSample = chunkW7NEFS5V_cjs.obj(
380
440
  {
381
- method: chunkLUA4WRIQ_cjs.str({ pattern: /^[A-Z]+$/u }),
441
+ method: chunkW7NEFS5V_cjs.str({ pattern: /^[A-Z]+$/u }),
382
442
  url: nonEmpty,
383
443
  resourceType: nonEmpty,
384
- status: chunkLUA4WRIQ_cjs.oneOf(chunkLUA4WRIQ_cjs.int({ minimum: 100, maximum: 599 }), chunkLUA4WRIQ_cjs.constant("FAILED"), chunkLUA4WRIQ_cjs.constant("PENDING")),
444
+ status: chunkW7NEFS5V_cjs.oneOf(chunkW7NEFS5V_cjs.int({ minimum: 100, maximum: 599 }), chunkW7NEFS5V_cjs.constant("FAILED"), chunkW7NEFS5V_cjs.constant("PENDING")),
385
445
  failureText: nonEmpty,
386
- startTime: chunkLUA4WRIQ_cjs.epochMs,
387
- duration: chunkLUA4WRIQ_cjs.msOrNull,
388
- requestStart: chunkLUA4WRIQ_cjs.msOrNull,
389
- ttfb: chunkLUA4WRIQ_cjs.msOrNull,
390
- timeSource: chunkLUA4WRIQ_cjs.enumOf(["browser", "node"]),
391
- fromServiceWorker: chunkLUA4WRIQ_cjs.bool
446
+ startTime: chunkW7NEFS5V_cjs.epochMs,
447
+ duration: chunkW7NEFS5V_cjs.msOrNull,
448
+ requestStart: chunkW7NEFS5V_cjs.msOrNull,
449
+ ttfb: chunkW7NEFS5V_cjs.msOrNull,
450
+ timeSource: chunkW7NEFS5V_cjs.enumOf(["browser", "node"]),
451
+ fromServiceWorker: chunkW7NEFS5V_cjs.bool
392
452
  },
393
453
  {
394
454
  required: [
@@ -417,15 +477,15 @@ var requestSample = chunkLUA4WRIQ_cjs.obj(
417
477
  }
418
478
  }
419
479
  );
420
- var apiRequestSample = chunkLUA4WRIQ_cjs.obj(
480
+ var apiRequestSample = chunkW7NEFS5V_cjs.obj(
421
481
  {
422
- method: chunkLUA4WRIQ_cjs.str({ pattern: /^[A-Z]+$/u }),
482
+ method: chunkW7NEFS5V_cjs.str({ pattern: /^[A-Z]+$/u }),
423
483
  url: nonEmpty,
424
- status: chunkLUA4WRIQ_cjs.oneOf(chunkLUA4WRIQ_cjs.int({ minimum: 100, maximum: 599 }), chunkLUA4WRIQ_cjs.constant("FAILED"), chunkLUA4WRIQ_cjs.constant("PENDING")),
484
+ status: chunkW7NEFS5V_cjs.oneOf(chunkW7NEFS5V_cjs.int({ minimum: 100, maximum: 599 }), chunkW7NEFS5V_cjs.constant("FAILED"), chunkW7NEFS5V_cjs.constant("PENDING")),
425
485
  failureText: nonEmpty,
426
- startTime: chunkLUA4WRIQ_cjs.epochMs,
427
- duration: chunkLUA4WRIQ_cjs.msOrNull,
428
- source: chunkLUA4WRIQ_cjs.enumOf(["request", "context", "tracked"])
486
+ startTime: chunkW7NEFS5V_cjs.epochMs,
487
+ duration: chunkW7NEFS5V_cjs.msOrNull,
488
+ source: chunkW7NEFS5V_cjs.enumOf(["request", "context", "tracked"])
429
489
  },
430
490
  {
431
491
  required: ["method", "url", "status", "startTime", "duration", "source"],
@@ -438,42 +498,42 @@ var apiRequestSample = chunkLUA4WRIQ_cjs.obj(
438
498
  sink.add(`${pointer}/failureText`, "must NOT be present unless status is FAILED");
439
499
  }
440
500
  if (status === "FAILED" || status === "PENDING" || !Object.hasOwn(value, "status")) {
441
- present(value, pointer, sink, { duration: chunkLUA4WRIQ_cjs.nul });
501
+ present(value, pointer, sink, { duration: chunkW7NEFS5V_cjs.nul });
442
502
  }
443
503
  }
444
504
  }
445
505
  );
446
- var sampleBatch = chunkLUA4WRIQ_cjs.obj(
506
+ var sampleBatch = chunkW7NEFS5V_cjs.obj(
447
507
  {
448
- schemaVersion: chunkLUA4WRIQ_cjs.constant(3),
449
- collector: chunkLUA4WRIQ_cjs.obj(
508
+ schemaVersion: chunkW7NEFS5V_cjs.constant(3),
509
+ collector: chunkW7NEFS5V_cjs.obj(
450
510
  {
451
- name: chunkLUA4WRIQ_cjs.str({ pattern: /^[a-z0-9-]+$/u }),
511
+ name: chunkW7NEFS5V_cjs.str({ pattern: /^[a-z0-9-]+$/u }),
452
512
  version: nonEmpty,
453
513
  browserName: nonEmptyOrNull
454
514
  },
455
515
  { required: ["name", "version", "browserName"] }
456
516
  ),
457
- requests: chunkLUA4WRIQ_cjs.arr(requestSample),
458
- apiRequests: chunkLUA4WRIQ_cjs.arr(apiRequestSample),
459
- diagnostics: chunkLUA4WRIQ_cjs.arr(chunkLUA4WRIQ_cjs.issue)
517
+ requests: chunkW7NEFS5V_cjs.arr(requestSample),
518
+ apiRequests: chunkW7NEFS5V_cjs.arr(apiRequestSample),
519
+ diagnostics: chunkW7NEFS5V_cjs.arr(chunkW7NEFS5V_cjs.issue)
460
520
  },
461
521
  { required: ["schemaVersion", "collector", "requests", "apiRequests", "diagnostics"] }
462
522
  );
463
523
  var LIMIT_FIELDS = ["t", "median", "percentile", "p99", "minApdex", "maxWilson", "maxErrorRate"];
464
- var thresholdsEntry = chunkLUA4WRIQ_cjs.obj(
524
+ var thresholdsEntry = chunkW7NEFS5V_cjs.obj(
465
525
  {
466
- t: chunkLUA4WRIQ_cjs.nullable(chunkLUA4WRIQ_cjs.msLimit),
467
- median: chunkLUA4WRIQ_cjs.msLimit,
468
- percentile: chunkLUA4WRIQ_cjs.msLimit,
469
- p99: chunkLUA4WRIQ_cjs.msLimit,
470
- minApdex: chunkLUA4WRIQ_cjs.nullable(chunkLUA4WRIQ_cjs.ratio),
471
- maxWilson: chunkLUA4WRIQ_cjs.nullable(chunkLUA4WRIQ_cjs.ratio),
472
- maxErrorRate: chunkLUA4WRIQ_cjs.ratio,
473
- locked: chunkLUA4WRIQ_cjs.constant(true),
474
- note: chunkLUA4WRIQ_cjs.str({ minLength: 1, maxLength: 500 }),
475
- gate: chunkLUA4WRIQ_cjs.constant("warn"),
476
- until: chunkLUA4WRIQ_cjs.isoDate
526
+ t: chunkW7NEFS5V_cjs.nullable(chunkW7NEFS5V_cjs.msLimit),
527
+ median: chunkW7NEFS5V_cjs.msLimit,
528
+ percentile: chunkW7NEFS5V_cjs.msLimit,
529
+ p99: chunkW7NEFS5V_cjs.msLimit,
530
+ minApdex: chunkW7NEFS5V_cjs.nullable(chunkW7NEFS5V_cjs.ratio),
531
+ maxWilson: chunkW7NEFS5V_cjs.nullable(chunkW7NEFS5V_cjs.ratio),
532
+ maxErrorRate: chunkW7NEFS5V_cjs.ratio,
533
+ locked: chunkW7NEFS5V_cjs.constant(true),
534
+ note: chunkW7NEFS5V_cjs.str({ minLength: 1, maxLength: 500 }),
535
+ gate: chunkW7NEFS5V_cjs.constant("warn"),
536
+ until: chunkW7NEFS5V_cjs.isoDate
477
537
  },
478
538
  {
479
539
  refine(value, pointer, sink) {
@@ -493,19 +553,19 @@ var thresholdsEntry = chunkLUA4WRIQ_cjs.obj(
493
553
  }
494
554
  }
495
555
  );
496
- var thresholdsGenerated = chunkLUA4WRIQ_cjs.obj(
556
+ var thresholdsGenerated = chunkW7NEFS5V_cjs.obj(
497
557
  {
498
- tool: chunkLUA4WRIQ_cjs.tool,
499
- env: chunkLUA4WRIQ_cjs.envLabelOrNull,
500
- sourceRunId: chunkLUA4WRIQ_cjs.runId,
501
- sourceRunStartedAt: chunkLUA4WRIQ_cjs.timestamp,
502
- sourceSampleCount: chunkLUA4WRIQ_cjs.count,
503
- evaluatedPercentile: chunkLUA4WRIQ_cjs.percentileName,
504
- derivation: chunkLUA4WRIQ_cjs.derivationSettings,
505
- browsers: chunkLUA4WRIQ_cjs.arr(nonEmpty, { uniqueItems: true }),
558
+ tool: chunkW7NEFS5V_cjs.tool,
559
+ env: chunkW7NEFS5V_cjs.envLabelOrNull,
560
+ sourceRunId: chunkW7NEFS5V_cjs.runId,
561
+ sourceRunStartedAt: chunkW7NEFS5V_cjs.timestamp,
562
+ sourceSampleCount: chunkW7NEFS5V_cjs.count,
563
+ evaluatedPercentile: chunkW7NEFS5V_cjs.percentileName,
564
+ derivation: chunkW7NEFS5V_cjs.derivationSettings,
565
+ browsers: chunkW7NEFS5V_cjs.arr(nonEmpty, { uniqueItems: true }),
506
566
  playwrightVersion: nonEmpty,
507
- host: chunkLUA4WRIQ_cjs.hostFingerprint,
508
- normalization: chunkLUA4WRIQ_cjs.fingerprint
567
+ host: chunkW7NEFS5V_cjs.hostFingerprint,
568
+ normalization: chunkW7NEFS5V_cjs.fingerprint
509
569
  },
510
570
  {
511
571
  required: [
@@ -523,16 +583,16 @@ var thresholdsGenerated = chunkLUA4WRIQ_cjs.obj(
523
583
  ]
524
584
  }
525
585
  );
526
- var thresholdsFile = chunkLUA4WRIQ_cjs.obj(
586
+ var thresholdsFile = chunkW7NEFS5V_cjs.obj(
527
587
  {
528
- schemaVersion: chunkLUA4WRIQ_cjs.constant(2),
529
- kind: chunkLUA4WRIQ_cjs.kind,
530
- generated: chunkLUA4WRIQ_cjs.oneOf(thresholdsGenerated, chunkLUA4WRIQ_cjs.nul),
531
- entries: chunkLUA4WRIQ_cjs.record(chunkLUA4WRIQ_cjs.key, thresholdsEntry)
588
+ schemaVersion: chunkW7NEFS5V_cjs.constant(2),
589
+ kind: chunkW7NEFS5V_cjs.kind,
590
+ generated: chunkW7NEFS5V_cjs.oneOf(thresholdsGenerated, chunkW7NEFS5V_cjs.nul),
591
+ entries: chunkW7NEFS5V_cjs.record(chunkW7NEFS5V_cjs.key, thresholdsEntry)
532
592
  },
533
593
  { required: ["schemaVersion", "kind", "generated", "entries"] }
534
594
  );
535
- var evaluationCounts = chunkLUA4WRIQ_cjs.obj(
595
+ var evaluationCounts = chunkW7NEFS5V_cjs.obj(
536
596
  Object.fromEntries(
537
597
  [
538
598
  "keys",
@@ -546,7 +606,7 @@ var evaluationCounts = chunkLUA4WRIQ_cjs.obj(
546
606
  "violations",
547
607
  "blockingViolations",
548
608
  "muted"
549
- ].map((name) => [name, chunkLUA4WRIQ_cjs.count])
609
+ ].map((name) => [name, chunkW7NEFS5V_cjs.count])
550
610
  ),
551
611
  {
552
612
  required: [
@@ -564,50 +624,50 @@ var evaluationCounts = chunkLUA4WRIQ_cjs.obj(
564
624
  ]
565
625
  }
566
626
  );
567
- var thresholdFileInfo = chunkLUA4WRIQ_cjs.obj(
627
+ var thresholdFileInfo = chunkW7NEFS5V_cjs.obj(
568
628
  {
569
- kind: chunkLUA4WRIQ_cjs.kind,
629
+ kind: chunkW7NEFS5V_cjs.kind,
570
630
  path: nonEmpty,
571
- status: chunkLUA4WRIQ_cjs.enumOf(["loaded", "missing", "invalid"]),
572
- generated: chunkLUA4WRIQ_cjs.oneOf(chunkLUA4WRIQ_cjs.anyObject, chunkLUA4WRIQ_cjs.nul),
573
- unseenKeys: chunkLUA4WRIQ_cjs.arr(chunkLUA4WRIQ_cjs.key)
631
+ status: chunkW7NEFS5V_cjs.enumOf(["loaded", "missing", "invalid"]),
632
+ generated: chunkW7NEFS5V_cjs.oneOf(chunkW7NEFS5V_cjs.anyObject, chunkW7NEFS5V_cjs.nul),
633
+ unseenKeys: chunkW7NEFS5V_cjs.arr(chunkW7NEFS5V_cjs.key)
574
634
  },
575
635
  { required: ["kind", "path", "status", "generated", "unseenKeys"] }
576
636
  );
577
- var testRef = chunkLUA4WRIQ_cjs.obj(
637
+ var testRef = chunkW7NEFS5V_cjs.obj(
578
638
  {
579
- title: chunkLUA4WRIQ_cjs.str(),
580
- project: chunkLUA4WRIQ_cjs.str(),
581
- file: chunkLUA4WRIQ_cjs.str(),
582
- line: chunkLUA4WRIQ_cjs.int({ minimum: 1 }),
583
- repeatEachIndex: chunkLUA4WRIQ_cjs.int({ minimum: 0 })
639
+ title: chunkW7NEFS5V_cjs.str(),
640
+ project: chunkW7NEFS5V_cjs.str(),
641
+ file: chunkW7NEFS5V_cjs.str(),
642
+ line: chunkW7NEFS5V_cjs.int({ minimum: 1 }),
643
+ repeatEachIndex: chunkW7NEFS5V_cjs.int({ minimum: 0 })
584
644
  },
585
645
  { required: ["title", "project", "file", "line", "repeatEachIndex"] }
586
646
  );
587
- var slowSample = chunkLUA4WRIQ_cjs.obj(
588
- { duration: chunkLUA4WRIQ_cjs.ms, startedAt: chunkLUA4WRIQ_cjs.timestamp, test: testRef, url: nonEmpty },
647
+ var slowSample = chunkW7NEFS5V_cjs.obj(
648
+ { duration: chunkW7NEFS5V_cjs.ms, startedAt: chunkW7NEFS5V_cjs.timestamp, test: testRef, url: nonEmpty },
589
649
  { required: ["duration", "startedAt", "test"] }
590
650
  );
591
- var stats = chunkLUA4WRIQ_cjs.obj(
651
+ var stats = chunkW7NEFS5V_cjs.obj(
592
652
  {
593
- min: chunkLUA4WRIQ_cjs.ms,
594
- avg: chunkLUA4WRIQ_cjs.ms,
595
- max: chunkLUA4WRIQ_cjs.ms,
596
- percentiles: chunkLUA4WRIQ_cjs.record(chunkLUA4WRIQ_cjs.percentileName, chunkLUA4WRIQ_cjs.ms, { required: ["p50", "p90", "p95", "p99"] })
653
+ min: chunkW7NEFS5V_cjs.ms,
654
+ avg: chunkW7NEFS5V_cjs.ms,
655
+ max: chunkW7NEFS5V_cjs.ms,
656
+ percentiles: chunkW7NEFS5V_cjs.record(chunkW7NEFS5V_cjs.percentileName, chunkW7NEFS5V_cjs.ms, { required: ["p50", "p90", "p95", "p99"] })
597
657
  },
598
658
  { required: ["min", "avg", "max", "percentiles"] }
599
659
  );
600
- var check = chunkLUA4WRIQ_cjs.obj(
660
+ var check = chunkW7NEFS5V_cjs.obj(
601
661
  {
602
- rule: chunkLUA4WRIQ_cjs.enumOf(["median", "percentile", "p99", "apdex", "wilson", "errors"]),
603
- n: chunkLUA4WRIQ_cjs.int({ minimum: 1 }),
604
- actual: chunkLUA4WRIQ_cjs.num({ minimum: 0 }),
605
- observed: chunkLUA4WRIQ_cjs.oneOf(chunkLUA4WRIQ_cjs.num({ minimum: 0, maximum: 1 }), chunkLUA4WRIQ_cjs.nul),
606
- limit: chunkLUA4WRIQ_cjs.num({ minimum: 0 }),
607
- passed: chunkLUA4WRIQ_cjs.bool,
608
- hardLimitExceeded: chunkLUA4WRIQ_cjs.bool,
609
- blocking: chunkLUA4WRIQ_cjs.bool,
610
- usage: chunkLUA4WRIQ_cjs.nullable(chunkLUA4WRIQ_cjs.num({ minimum: 0 }))
662
+ rule: chunkW7NEFS5V_cjs.enumOf(["median", "percentile", "p99", "apdex", "wilson", "errors"]),
663
+ n: chunkW7NEFS5V_cjs.int({ minimum: 1 }),
664
+ actual: chunkW7NEFS5V_cjs.num({ minimum: 0 }),
665
+ observed: chunkW7NEFS5V_cjs.oneOf(chunkW7NEFS5V_cjs.num({ minimum: 0, maximum: 1 }), chunkW7NEFS5V_cjs.nul),
666
+ limit: chunkW7NEFS5V_cjs.num({ minimum: 0 }),
667
+ passed: chunkW7NEFS5V_cjs.bool,
668
+ hardLimitExceeded: chunkW7NEFS5V_cjs.bool,
669
+ blocking: chunkW7NEFS5V_cjs.bool,
670
+ usage: chunkW7NEFS5V_cjs.nullable(chunkW7NEFS5V_cjs.num({ minimum: 0 }))
611
671
  },
612
672
  {
613
673
  required: [
@@ -623,30 +683,30 @@ var check = chunkLUA4WRIQ_cjs.obj(
623
683
  ]
624
684
  }
625
685
  );
626
- var keyEvaluation = chunkLUA4WRIQ_cjs.obj(
686
+ var keyEvaluation = chunkW7NEFS5V_cjs.obj(
627
687
  {
628
- result: chunkLUA4WRIQ_cjs.enumOf(["pass", "fail", "not-evaluated"]),
629
- reason: chunkLUA4WRIQ_cjs.oneOf(chunkLUA4WRIQ_cjs.enumOf(["too-few-samples", "no-rules", "thresholds-error"]), chunkLUA4WRIQ_cjs.nul),
630
- thresholdSource: chunkLUA4WRIQ_cjs.enumOf(["file", "default"]),
631
- limits: chunkLUA4WRIQ_cjs.obj(
688
+ result: chunkW7NEFS5V_cjs.enumOf(["pass", "fail", "not-evaluated"]),
689
+ reason: chunkW7NEFS5V_cjs.oneOf(chunkW7NEFS5V_cjs.enumOf(["too-few-samples", "no-rules", "thresholds-error"]), chunkW7NEFS5V_cjs.nul),
690
+ thresholdSource: chunkW7NEFS5V_cjs.enumOf(["file", "default"]),
691
+ limits: chunkW7NEFS5V_cjs.obj(
632
692
  {
633
- t: chunkLUA4WRIQ_cjs.nullable(chunkLUA4WRIQ_cjs.msLimit),
634
- median: chunkLUA4WRIQ_cjs.msLimit,
635
- percentile: chunkLUA4WRIQ_cjs.msLimit,
636
- p99: chunkLUA4WRIQ_cjs.msLimit,
637
- minApdex: chunkLUA4WRIQ_cjs.nullable(chunkLUA4WRIQ_cjs.ratio),
638
- maxWilson: chunkLUA4WRIQ_cjs.nullable(chunkLUA4WRIQ_cjs.ratio),
639
- maxErrorRate: chunkLUA4WRIQ_cjs.ratio
693
+ t: chunkW7NEFS5V_cjs.nullable(chunkW7NEFS5V_cjs.msLimit),
694
+ median: chunkW7NEFS5V_cjs.msLimit,
695
+ percentile: chunkW7NEFS5V_cjs.msLimit,
696
+ p99: chunkW7NEFS5V_cjs.msLimit,
697
+ minApdex: chunkW7NEFS5V_cjs.nullable(chunkW7NEFS5V_cjs.ratio),
698
+ maxWilson: chunkW7NEFS5V_cjs.nullable(chunkW7NEFS5V_cjs.ratio),
699
+ maxErrorRate: chunkW7NEFS5V_cjs.ratio
640
700
  },
641
701
  { required: LIMIT_FIELDS }
642
702
  ),
643
- checks: chunkLUA4WRIQ_cjs.arr(check),
644
- muted: chunkLUA4WRIQ_cjs.oneOf(
645
- chunkLUA4WRIQ_cjs.obj(
646
- { until: chunkLUA4WRIQ_cjs.isoDate, note: nonEmpty, expired: chunkLUA4WRIQ_cjs.bool },
703
+ checks: chunkW7NEFS5V_cjs.arr(check),
704
+ muted: chunkW7NEFS5V_cjs.oneOf(
705
+ chunkW7NEFS5V_cjs.obj(
706
+ { until: chunkW7NEFS5V_cjs.isoDate, note: nonEmpty, expired: chunkW7NEFS5V_cjs.bool },
647
707
  { required: ["until", "note", "expired"] }
648
708
  ),
649
- chunkLUA4WRIQ_cjs.nul
709
+ chunkW7NEFS5V_cjs.nul
650
710
  )
651
711
  },
652
712
  { required: ["result", "reason", "thresholdSource", "limits", "checks", "muted"] }
@@ -688,41 +748,41 @@ var HINT_PARAMS = [
688
748
  "t",
689
749
  "n"
690
750
  ];
691
- var hint = chunkLUA4WRIQ_cjs.obj(
692
- { code: chunkLUA4WRIQ_cjs.enumOf(HINT_CODES), params: chunkLUA4WRIQ_cjs.record(chunkLUA4WRIQ_cjs.enumOf(HINT_PARAMS), chunkLUA4WRIQ_cjs.oneOf(chunkLUA4WRIQ_cjs.str(), chunkLUA4WRIQ_cjs.num())) },
751
+ var hint = chunkW7NEFS5V_cjs.obj(
752
+ { code: chunkW7NEFS5V_cjs.enumOf(HINT_CODES), params: chunkW7NEFS5V_cjs.record(chunkW7NEFS5V_cjs.enumOf(HINT_PARAMS), chunkW7NEFS5V_cjs.oneOf(chunkW7NEFS5V_cjs.str(), chunkW7NEFS5V_cjs.num())) },
693
753
  { required: ["code", "params"] }
694
754
  );
695
- var histogram = chunkLUA4WRIQ_cjs.oneOf(
696
- chunkLUA4WRIQ_cjs.obj(
755
+ var histogram = chunkW7NEFS5V_cjs.oneOf(
756
+ chunkW7NEFS5V_cjs.obj(
697
757
  {
698
- edges: chunkLUA4WRIQ_cjs.arr(chunkLUA4WRIQ_cjs.num({ minimum: 0 }), { minItems: 2, maxItems: 31 }),
699
- counts: chunkLUA4WRIQ_cjs.arr(chunkLUA4WRIQ_cjs.count, { minItems: 1, maxItems: 30 })
758
+ edges: chunkW7NEFS5V_cjs.arr(chunkW7NEFS5V_cjs.num({ minimum: 0 }), { minItems: 2, maxItems: 31 }),
759
+ counts: chunkW7NEFS5V_cjs.arr(chunkW7NEFS5V_cjs.count, { minItems: 1, maxItems: 30 })
700
760
  },
701
761
  { required: ["edges", "counts"] }
702
762
  ),
703
- chunkLUA4WRIQ_cjs.nul
763
+ chunkW7NEFS5V_cjs.nul
704
764
  );
705
- var testCost = chunkLUA4WRIQ_cjs.obj(
765
+ var testCost = chunkW7NEFS5V_cjs.obj(
706
766
  {
707
- title: chunkLUA4WRIQ_cjs.str(),
708
- project: chunkLUA4WRIQ_cjs.str(),
709
- file: chunkLUA4WRIQ_cjs.str(),
710
- line: chunkLUA4WRIQ_cjs.int({ minimum: 1 }),
711
- executions: chunkLUA4WRIQ_cjs.int({ minimum: 1 }),
712
- requestCount: chunkLUA4WRIQ_cjs.int({ minimum: 1 }),
713
- errorCount: chunkLUA4WRIQ_cjs.count,
714
- totalMs: chunkLUA4WRIQ_cjs.ms,
715
- maxRequestMs: chunkLUA4WRIQ_cjs.msOrNull,
716
- keyCount: chunkLUA4WRIQ_cjs.int({ minimum: 1 }),
717
- topKeys: chunkLUA4WRIQ_cjs.arr(
718
- chunkLUA4WRIQ_cjs.obj(
719
- { key: chunkLUA4WRIQ_cjs.key, count: chunkLUA4WRIQ_cjs.int({ minimum: 1 }), totalMs: chunkLUA4WRIQ_cjs.ms },
767
+ title: chunkW7NEFS5V_cjs.str(),
768
+ project: chunkW7NEFS5V_cjs.str(),
769
+ file: chunkW7NEFS5V_cjs.str(),
770
+ line: chunkW7NEFS5V_cjs.int({ minimum: 1 }),
771
+ executions: chunkW7NEFS5V_cjs.int({ minimum: 1 }),
772
+ requestCount: chunkW7NEFS5V_cjs.int({ minimum: 1 }),
773
+ errorCount: chunkW7NEFS5V_cjs.count,
774
+ totalMs: chunkW7NEFS5V_cjs.ms,
775
+ maxRequestMs: chunkW7NEFS5V_cjs.msOrNull,
776
+ keyCount: chunkW7NEFS5V_cjs.int({ minimum: 1 }),
777
+ topKeys: chunkW7NEFS5V_cjs.arr(
778
+ chunkW7NEFS5V_cjs.obj(
779
+ { key: chunkW7NEFS5V_cjs.key, count: chunkW7NEFS5V_cjs.int({ minimum: 1 }), totalMs: chunkW7NEFS5V_cjs.ms },
720
780
  { required: ["key", "count", "totalMs"] }
721
781
  ),
722
782
  { maxItems: 3 }
723
783
  ),
724
- violatedKeys: chunkLUA4WRIQ_cjs.arr(chunkLUA4WRIQ_cjs.key, { maxItems: 10 }),
725
- violatedKeyCount: chunkLUA4WRIQ_cjs.count
784
+ violatedKeys: chunkW7NEFS5V_cjs.arr(chunkW7NEFS5V_cjs.key, { maxItems: 10 }),
785
+ violatedKeyCount: chunkW7NEFS5V_cjs.count
726
786
  },
727
787
  {
728
788
  required: [
@@ -742,71 +802,71 @@ var testCost = chunkLUA4WRIQ_cjs.obj(
742
802
  ]
743
803
  }
744
804
  );
745
- var waterfallRequest = chunkLUA4WRIQ_cjs.obj(
805
+ var waterfallRequest = chunkW7NEFS5V_cjs.obj(
746
806
  {
747
- offset: chunkLUA4WRIQ_cjs.int({ minimum: 0 }),
748
- duration: chunkLUA4WRIQ_cjs.msOrNull,
749
- key: chunkLUA4WRIQ_cjs.key,
750
- status: chunkLUA4WRIQ_cjs.str({ pattern: /^(?:[1-5][0-9]{2}|FAILED|ABORTED|PENDING)$/u })
807
+ offset: chunkW7NEFS5V_cjs.int({ minimum: 0 }),
808
+ duration: chunkW7NEFS5V_cjs.msOrNull,
809
+ key: chunkW7NEFS5V_cjs.key,
810
+ status: chunkW7NEFS5V_cjs.str({ pattern: /^(?:[1-5][0-9]{2}|FAILED|ABORTED|PENDING)$/u })
751
811
  },
752
812
  { required: ["offset", "duration", "key", "status"] }
753
813
  );
754
- var waterfall = chunkLUA4WRIQ_cjs.obj(
814
+ var waterfall = chunkW7NEFS5V_cjs.obj(
755
815
  {
756
816
  test: testRef,
757
- totalMs: chunkLUA4WRIQ_cjs.ms,
758
- requestCount: chunkLUA4WRIQ_cjs.int({ minimum: 1 }),
759
- spanMs: chunkLUA4WRIQ_cjs.ms,
760
- requests: chunkLUA4WRIQ_cjs.arr(waterfallRequest, { maxItems: 200 }),
761
- omitted: chunkLUA4WRIQ_cjs.count
817
+ totalMs: chunkW7NEFS5V_cjs.ms,
818
+ requestCount: chunkW7NEFS5V_cjs.int({ minimum: 1 }),
819
+ spanMs: chunkW7NEFS5V_cjs.ms,
820
+ requests: chunkW7NEFS5V_cjs.arr(waterfallRequest, { maxItems: 200 }),
821
+ omitted: chunkW7NEFS5V_cjs.count
762
822
  },
763
823
  { required: ["test", "totalMs", "requestCount", "spanMs", "requests", "omitted"] }
764
824
  );
765
- var testBreakdown = chunkLUA4WRIQ_cjs.oneOf(
766
- chunkLUA4WRIQ_cjs.obj(
825
+ var testBreakdown = chunkW7NEFS5V_cjs.oneOf(
826
+ chunkW7NEFS5V_cjs.obj(
767
827
  {
768
- tests: chunkLUA4WRIQ_cjs.arr(testCost, { maxItems: 500 }),
769
- omitted: chunkLUA4WRIQ_cjs.count,
770
- waterfalls: chunkLUA4WRIQ_cjs.arr(waterfall, { maxItems: 5 })
828
+ tests: chunkW7NEFS5V_cjs.arr(testCost, { maxItems: 500 }),
829
+ omitted: chunkW7NEFS5V_cjs.count,
830
+ waterfalls: chunkW7NEFS5V_cjs.arr(waterfall, { maxItems: 5 })
771
831
  },
772
832
  { required: ["tests", "omitted", "waterfalls"] }
773
833
  ),
774
- chunkLUA4WRIQ_cjs.nul
834
+ chunkW7NEFS5V_cjs.nul
775
835
  );
776
836
  var aggregateProps = {
777
- count: chunkLUA4WRIQ_cjs.count,
778
- successCount: chunkLUA4WRIQ_cjs.count,
779
- errorCount: chunkLUA4WRIQ_cjs.count,
780
- fromFailedTests: chunkLUA4WRIQ_cjs.count,
781
- testCount: chunkLUA4WRIQ_cjs.count,
782
- statuses: chunkLUA4WRIQ_cjs.record(
783
- chunkLUA4WRIQ_cjs.str({ pattern: /^(?:[1-5][0-9]{2}|FAILED|ABORTED|PENDING|ok|error|unfinished)$/u }),
784
- chunkLUA4WRIQ_cjs.int({ minimum: 1 })
837
+ count: chunkW7NEFS5V_cjs.count,
838
+ successCount: chunkW7NEFS5V_cjs.count,
839
+ errorCount: chunkW7NEFS5V_cjs.count,
840
+ fromFailedTests: chunkW7NEFS5V_cjs.count,
841
+ testCount: chunkW7NEFS5V_cjs.count,
842
+ statuses: chunkW7NEFS5V_cjs.record(
843
+ chunkW7NEFS5V_cjs.str({ pattern: /^(?:[1-5][0-9]{2}|FAILED|ABORTED|PENDING|ok|error|unfinished)$/u }),
844
+ chunkW7NEFS5V_cjs.int({ minimum: 1 })
785
845
  ),
786
- timeSources: chunkLUA4WRIQ_cjs.obj({ browser: chunkLUA4WRIQ_cjs.count, node: chunkLUA4WRIQ_cjs.count }, { required: ["browser", "node"] }),
787
- stats: chunkLUA4WRIQ_cjs.oneOf(stats, chunkLUA4WRIQ_cjs.nul),
788
- ttfb: chunkLUA4WRIQ_cjs.oneOf(
789
- chunkLUA4WRIQ_cjs.obj({ p50: chunkLUA4WRIQ_cjs.ms, p95: chunkLUA4WRIQ_cjs.ms, otherP50: chunkLUA4WRIQ_cjs.msOrNull }, { required: ["p50", "p95", "otherP50"] }),
790
- chunkLUA4WRIQ_cjs.nul
846
+ timeSources: chunkW7NEFS5V_cjs.obj({ browser: chunkW7NEFS5V_cjs.count, node: chunkW7NEFS5V_cjs.count }, { required: ["browser", "node"] }),
847
+ stats: chunkW7NEFS5V_cjs.oneOf(stats, chunkW7NEFS5V_cjs.nul),
848
+ ttfb: chunkW7NEFS5V_cjs.oneOf(
849
+ chunkW7NEFS5V_cjs.obj({ p50: chunkW7NEFS5V_cjs.ms, p95: chunkW7NEFS5V_cjs.ms, otherP50: chunkW7NEFS5V_cjs.msOrNull }, { required: ["p50", "p95", "otherP50"] }),
850
+ chunkW7NEFS5V_cjs.nul
791
851
  ),
792
- slowest: chunkLUA4WRIQ_cjs.arr(slowSample, { maxItems: 3 }),
793
- topTests: chunkLUA4WRIQ_cjs.arr(
794
- chunkLUA4WRIQ_cjs.obj(
852
+ slowest: chunkW7NEFS5V_cjs.arr(slowSample, { maxItems: 3 }),
853
+ topTests: chunkW7NEFS5V_cjs.arr(
854
+ chunkW7NEFS5V_cjs.obj(
795
855
  {
796
- title: chunkLUA4WRIQ_cjs.str(),
797
- project: chunkLUA4WRIQ_cjs.str(),
798
- file: chunkLUA4WRIQ_cjs.str(),
799
- line: chunkLUA4WRIQ_cjs.int({ minimum: 1 }),
800
- sampleCount: chunkLUA4WRIQ_cjs.int({ minimum: 1 })
856
+ title: chunkW7NEFS5V_cjs.str(),
857
+ project: chunkW7NEFS5V_cjs.str(),
858
+ file: chunkW7NEFS5V_cjs.str(),
859
+ line: chunkW7NEFS5V_cjs.int({ minimum: 1 }),
860
+ sampleCount: chunkW7NEFS5V_cjs.int({ minimum: 1 })
801
861
  },
802
862
  { required: ["title", "project", "file", "line", "sampleCount"] }
803
863
  ),
804
864
  { maxItems: 5 }
805
865
  ),
806
- samples: chunkLUA4WRIQ_cjs.obj({ durations: chunkLUA4WRIQ_cjs.arr(chunkLUA4WRIQ_cjs.ms), sampled: chunkLUA4WRIQ_cjs.bool }, { required: ["durations", "sampled"] }),
866
+ samples: chunkW7NEFS5V_cjs.obj({ durations: chunkW7NEFS5V_cjs.arr(chunkW7NEFS5V_cjs.ms), sampled: chunkW7NEFS5V_cjs.bool }, { required: ["durations", "sampled"] }),
807
867
  evaluation: keyEvaluation,
808
868
  histogram,
809
- hints: chunkLUA4WRIQ_cjs.arr(hint, { maxItems: 3 })
869
+ hints: chunkW7NEFS5V_cjs.arr(hint, { maxItems: 3 })
810
870
  };
811
871
  var aggregateRequired = [
812
872
  "count",
@@ -825,120 +885,120 @@ var aggregateRequired = [
825
885
  "histogram",
826
886
  "hints"
827
887
  ];
828
- var aggregate = chunkLUA4WRIQ_cjs.obj(aggregateProps, { required: aggregateRequired });
829
- var stepAggregate = chunkLUA4WRIQ_cjs.obj(
888
+ var aggregate = chunkW7NEFS5V_cjs.obj(aggregateProps, { required: aggregateRequired });
889
+ var stepAggregate = chunkW7NEFS5V_cjs.obj(
830
890
  {
831
891
  ...aggregateProps,
832
- location: chunkLUA4WRIQ_cjs.oneOf(
833
- chunkLUA4WRIQ_cjs.obj({ file: nonEmpty, line: chunkLUA4WRIQ_cjs.int({ minimum: 1 }) }, { required: ["file", "line"] }),
834
- chunkLUA4WRIQ_cjs.nul
892
+ location: chunkW7NEFS5V_cjs.oneOf(
893
+ chunkW7NEFS5V_cjs.obj({ file: nonEmpty, line: chunkW7NEFS5V_cjs.int({ minimum: 1 }) }, { required: ["file", "line"] }),
894
+ chunkW7NEFS5V_cjs.nul
835
895
  ),
836
- stepErrorsFromFailedTests: chunkLUA4WRIQ_cjs.count
896
+ stepErrorsFromFailedTests: chunkW7NEFS5V_cjs.count
837
897
  },
838
898
  { required: [...aggregateRequired, "location", "stepErrorsFromFailedTests"] }
839
899
  );
840
- var runReport = chunkLUA4WRIQ_cjs.obj(
900
+ var runReport = chunkW7NEFS5V_cjs.obj(
841
901
  {
842
- schemaVersion: chunkLUA4WRIQ_cjs.constant(4),
843
- tool: chunkLUA4WRIQ_cjs.tool,
844
- runId: chunkLUA4WRIQ_cjs.runId,
845
- mode: chunkLUA4WRIQ_cjs.mode,
846
- startedAt: chunkLUA4WRIQ_cjs.timestamp,
847
- finishedAt: chunkLUA4WRIQ_cjs.timestamp,
848
- env: chunkLUA4WRIQ_cjs.envLabelOrNull,
902
+ schemaVersion: chunkW7NEFS5V_cjs.constant(4),
903
+ tool: chunkW7NEFS5V_cjs.tool,
904
+ runId: chunkW7NEFS5V_cjs.runId,
905
+ mode: chunkW7NEFS5V_cjs.mode,
906
+ startedAt: chunkW7NEFS5V_cjs.timestamp,
907
+ finishedAt: chunkW7NEFS5V_cjs.timestamp,
908
+ env: chunkW7NEFS5V_cjs.envLabelOrNull,
849
909
  configDir: nonEmpty,
850
910
  // Optional (02-REQ-42): left out when neither a package name nor a repository root is known.
851
- suite: chunkLUA4WRIQ_cjs.obj(
852
- { name: nonEmpty, source: chunkLUA4WRIQ_cjs.enumOf(["package", "config"]) },
911
+ suite: chunkW7NEFS5V_cjs.obj(
912
+ { name: nonEmpty, source: chunkW7NEFS5V_cjs.enumOf(["package", "config"]) },
853
913
  { required: ["name", "source"] }
854
914
  ),
855
- config: chunkLUA4WRIQ_cjs.packageConfig,
856
- normalization: chunkLUA4WRIQ_cjs.fingerprint,
857
- stepNormalization: chunkLUA4WRIQ_cjs.oneOf(chunkLUA4WRIQ_cjs.fingerprint, chunkLUA4WRIQ_cjs.nul),
858
- ci: chunkLUA4WRIQ_cjs.oneOf(
859
- chunkLUA4WRIQ_cjs.obj(
915
+ config: chunkW7NEFS5V_cjs.packageConfig,
916
+ normalization: chunkW7NEFS5V_cjs.fingerprint,
917
+ stepNormalization: chunkW7NEFS5V_cjs.oneOf(chunkW7NEFS5V_cjs.fingerprint, chunkW7NEFS5V_cjs.nul),
918
+ ci: chunkW7NEFS5V_cjs.oneOf(
919
+ chunkW7NEFS5V_cjs.obj(
860
920
  {
861
- provider: chunkLUA4WRIQ_cjs.enumOf(["github", "gitlab", "jenkins", "azure", "other"]),
921
+ provider: chunkW7NEFS5V_cjs.enumOf(["github", "gitlab", "jenkins", "azure", "other"]),
862
922
  commit: nonEmptyOrNull,
863
923
  branch: nonEmptyOrNull,
864
924
  buildUrl: nonEmptyOrNull
865
925
  },
866
926
  { required: ["provider", "commit", "branch", "buildUrl"] }
867
927
  ),
868
- chunkLUA4WRIQ_cjs.nul
928
+ chunkW7NEFS5V_cjs.nul
869
929
  ),
870
- host: chunkLUA4WRIQ_cjs.obj(
930
+ host: chunkW7NEFS5V_cjs.obj(
871
931
  {
872
- platform: chunkLUA4WRIQ_cjs.str(),
873
- arch: chunkLUA4WRIQ_cjs.str(),
874
- nodeVersion: chunkLUA4WRIQ_cjs.str(),
875
- ci: chunkLUA4WRIQ_cjs.bool,
876
- cpuCount: chunkLUA4WRIQ_cjs.int({ minimum: 1 }),
877
- cpuModel: chunkLUA4WRIQ_cjs.str()
932
+ platform: chunkW7NEFS5V_cjs.str(),
933
+ arch: chunkW7NEFS5V_cjs.str(),
934
+ nodeVersion: chunkW7NEFS5V_cjs.str(),
935
+ ci: chunkW7NEFS5V_cjs.bool,
936
+ cpuCount: chunkW7NEFS5V_cjs.int({ minimum: 1 }),
937
+ cpuModel: chunkW7NEFS5V_cjs.str()
878
938
  },
879
939
  { required: ["platform", "arch", "nodeVersion", "ci", "cpuCount", "cpuModel"] }
880
940
  ),
881
- playwright: chunkLUA4WRIQ_cjs.obj({ version: chunkLUA4WRIQ_cjs.str() }, { required: ["version"] }),
882
- passes: chunkLUA4WRIQ_cjs.obj(
941
+ playwright: chunkW7NEFS5V_cjs.obj({ version: chunkW7NEFS5V_cjs.str() }, { required: ["version"] }),
942
+ passes: chunkW7NEFS5V_cjs.obj(
883
943
  {
884
- planned: chunkLUA4WRIQ_cjs.int({ minimum: 1 }),
885
- completed: chunkLUA4WRIQ_cjs.int({ minimum: 1 }),
886
- failed: chunkLUA4WRIQ_cjs.arr(chunkLUA4WRIQ_cjs.int({ minimum: 2 }))
944
+ planned: chunkW7NEFS5V_cjs.int({ minimum: 1 }),
945
+ completed: chunkW7NEFS5V_cjs.int({ minimum: 1 }),
946
+ failed: chunkW7NEFS5V_cjs.arr(chunkW7NEFS5V_cjs.int({ minimum: 2 }))
887
947
  },
888
948
  { required: ["planned", "completed", "failed"] }
889
949
  ),
890
- runConditions: chunkLUA4WRIQ_cjs.obj(
950
+ runConditions: chunkW7NEFS5V_cjs.obj(
891
951
  {
892
- workers: chunkLUA4WRIQ_cjs.int({ minimum: 1 }),
893
- projects: chunkLUA4WRIQ_cjs.arr(
894
- chunkLUA4WRIQ_cjs.obj(
952
+ workers: chunkW7NEFS5V_cjs.int({ minimum: 1 }),
953
+ projects: chunkW7NEFS5V_cjs.arr(
954
+ chunkW7NEFS5V_cjs.obj(
895
955
  {
896
- name: chunkLUA4WRIQ_cjs.str(),
897
- role: chunkLUA4WRIQ_cjs.enumOf(["measured", "dependency", "teardown"]),
898
- browserName: chunkLUA4WRIQ_cjs.oneOf(chunkLUA4WRIQ_cjs.str(), chunkLUA4WRIQ_cjs.nul),
899
- repeatEach: chunkLUA4WRIQ_cjs.int({ minimum: 1 }),
900
- retries: chunkLUA4WRIQ_cjs.int({ minimum: 0 }),
901
- requestOnly: chunkLUA4WRIQ_cjs.constant(true)
956
+ name: chunkW7NEFS5V_cjs.str(),
957
+ role: chunkW7NEFS5V_cjs.enumOf(["measured", "dependency", "teardown"]),
958
+ browserName: chunkW7NEFS5V_cjs.oneOf(chunkW7NEFS5V_cjs.str(), chunkW7NEFS5V_cjs.nul),
959
+ repeatEach: chunkW7NEFS5V_cjs.int({ minimum: 1 }),
960
+ retries: chunkW7NEFS5V_cjs.int({ minimum: 0 }),
961
+ requestOnly: chunkW7NEFS5V_cjs.constant(true)
902
962
  },
903
963
  { required: ["name", "role", "browserName", "repeatEach", "retries"] }
904
964
  )
905
965
  ),
906
- overriddenSettings: chunkLUA4WRIQ_cjs.arr(chunkLUA4WRIQ_cjs.str())
966
+ overriddenSettings: chunkW7NEFS5V_cjs.arr(chunkW7NEFS5V_cjs.str())
907
967
  },
908
968
  { required: ["workers", "projects", "overriddenSettings"] }
909
969
  ),
910
- tests: chunkLUA4WRIQ_cjs.obj(
970
+ tests: chunkW7NEFS5V_cjs.obj(
911
971
  {
912
- status: chunkLUA4WRIQ_cjs.testsStatus,
913
- expected: chunkLUA4WRIQ_cjs.count,
914
- unexpected: chunkLUA4WRIQ_cjs.count,
915
- flaky: chunkLUA4WRIQ_cjs.count,
916
- skipped: chunkLUA4WRIQ_cjs.count
972
+ status: chunkW7NEFS5V_cjs.testsStatus,
973
+ expected: chunkW7NEFS5V_cjs.count,
974
+ unexpected: chunkW7NEFS5V_cjs.count,
975
+ flaky: chunkW7NEFS5V_cjs.count,
976
+ skipped: chunkW7NEFS5V_cjs.count
917
977
  },
918
978
  { required: ["status", "expected", "unexpected", "flaky", "skipped"] }
919
979
  ),
920
- evaluation: chunkLUA4WRIQ_cjs.obj(
980
+ evaluation: chunkW7NEFS5V_cjs.obj(
921
981
  {
922
- status: chunkLUA4WRIQ_cjs.evaluationStatus,
923
- gateEnabled: chunkLUA4WRIQ_cjs.bool,
924
- counts: chunkLUA4WRIQ_cjs.obj(
982
+ status: chunkW7NEFS5V_cjs.evaluationStatus,
983
+ gateEnabled: chunkW7NEFS5V_cjs.bool,
984
+ counts: chunkW7NEFS5V_cjs.obj(
925
985
  { api: evaluationCounts, step: evaluationCounts },
926
986
  { required: ["api", "step"] }
927
987
  )
928
988
  },
929
989
  { required: ["status", "gateEnabled", "counts"] }
930
990
  ),
931
- thresholdFiles: chunkLUA4WRIQ_cjs.arr(thresholdFileInfo),
932
- warnings: chunkLUA4WRIQ_cjs.arr(chunkLUA4WRIQ_cjs.issue),
933
- toolErrors: chunkLUA4WRIQ_cjs.arr(chunkLUA4WRIQ_cjs.issue),
934
- origins: chunkLUA4WRIQ_cjs.arr(
935
- chunkLUA4WRIQ_cjs.obj(
936
- { origin: nonEmpty, label: chunkLUA4WRIQ_cjs.str(), requestCount: chunkLUA4WRIQ_cjs.count },
991
+ thresholdFiles: chunkW7NEFS5V_cjs.arr(thresholdFileInfo),
992
+ warnings: chunkW7NEFS5V_cjs.arr(chunkW7NEFS5V_cjs.issue),
993
+ toolErrors: chunkW7NEFS5V_cjs.arr(chunkW7NEFS5V_cjs.issue),
994
+ origins: chunkW7NEFS5V_cjs.arr(
995
+ chunkW7NEFS5V_cjs.obj(
996
+ { origin: nonEmpty, label: chunkW7NEFS5V_cjs.str(), requestCount: chunkW7NEFS5V_cjs.count },
937
997
  { required: ["origin", "label", "requestCount"] }
938
998
  )
939
999
  ),
940
- endpoints: chunkLUA4WRIQ_cjs.record(chunkLUA4WRIQ_cjs.key, aggregate),
941
- steps: chunkLUA4WRIQ_cjs.record(chunkLUA4WRIQ_cjs.key, stepAggregate),
1000
+ endpoints: chunkW7NEFS5V_cjs.record(chunkW7NEFS5V_cjs.key, aggregate),
1001
+ steps: chunkW7NEFS5V_cjs.record(chunkW7NEFS5V_cjs.key, stepAggregate),
942
1002
  testBreakdown
943
1003
  },
944
1004
  {
@@ -971,24 +1031,24 @@ var runReport = chunkLUA4WRIQ_cjs.obj(
971
1031
  ]
972
1032
  }
973
1033
  );
974
- chunkLUA4WRIQ_cjs.obj(
1034
+ chunkW7NEFS5V_cjs.obj(
975
1035
  {
976
- schemaVersion: chunkLUA4WRIQ_cjs.constant(1),
977
- runId: chunkLUA4WRIQ_cjs.runId,
1036
+ schemaVersion: chunkW7NEFS5V_cjs.constant(1),
1037
+ runId: chunkW7NEFS5V_cjs.runId,
978
1038
  // The outcome has its own modes: a check writes neither a report nor thresholds (02-REQ-34).
979
- mode: chunkLUA4WRIQ_cjs.enumOf(["test", "thresholds", "check"]),
980
- exitCode: chunkLUA4WRIQ_cjs.enumOf([0, 2, 3]),
981
- tests: chunkLUA4WRIQ_cjs.obj({ status: chunkLUA4WRIQ_cjs.testsStatus }, { required: ["status"] }),
982
- evaluation: chunkLUA4WRIQ_cjs.obj(
983
- { status: chunkLUA4WRIQ_cjs.evaluationStatus, gateEnabled: chunkLUA4WRIQ_cjs.bool },
1039
+ mode: chunkW7NEFS5V_cjs.enumOf(["test", "thresholds", "check"]),
1040
+ exitCode: chunkW7NEFS5V_cjs.enumOf([0, 2, 3]),
1041
+ tests: chunkW7NEFS5V_cjs.obj({ status: chunkW7NEFS5V_cjs.testsStatus }, { required: ["status"] }),
1042
+ evaluation: chunkW7NEFS5V_cjs.obj(
1043
+ { status: chunkW7NEFS5V_cjs.evaluationStatus, gateEnabled: chunkW7NEFS5V_cjs.bool },
984
1044
  { required: ["status", "gateEnabled"] }
985
1045
  ),
986
- toolErrors: chunkLUA4WRIQ_cjs.arr(chunkLUA4WRIQ_cjs.issue),
987
- paths: chunkLUA4WRIQ_cjs.obj(
1046
+ toolErrors: chunkW7NEFS5V_cjs.arr(chunkW7NEFS5V_cjs.issue),
1047
+ paths: chunkW7NEFS5V_cjs.obj(
988
1048
  {
989
1049
  reportJson: nonEmptyOrNull,
990
1050
  reportHtml: nonEmptyOrNull,
991
- thresholds: chunkLUA4WRIQ_cjs.arr(nonEmpty),
1051
+ thresholds: chunkW7NEFS5V_cjs.arr(nonEmpty),
992
1052
  thresholdsDiff: nonEmptyOrNull
993
1053
  },
994
1054
  { required: ["reportJson", "reportHtml", "thresholds", "thresholdsDiff"] }
@@ -1056,7 +1116,7 @@ function migrate(document, from, to, migrations) {
1056
1116
  return current;
1057
1117
  }
1058
1118
  function validate(document, source, format) {
1059
- const sink = new chunkLUA4WRIQ_cjs.Sink(MAX_PROBLEMS + 1);
1119
+ const sink = new chunkW7NEFS5V_cjs.Sink(MAX_PROBLEMS + 1);
1060
1120
  format.schema.check(document, "", sink);
1061
1121
  if (sink.problems.length === 0) format.extraChecks?.(document, sink);
1062
1122
  if (sink.problems.length === 0) return null;
@@ -1071,7 +1131,7 @@ function parseVersioned(text2, source, format, options = {}) {
1071
1131
  const parsed = parseJson(text2, source, format);
1072
1132
  if (!parsed.ok) return parsed;
1073
1133
  const document = parsed.value;
1074
- if (!chunkLUA4WRIQ_cjs.isRecord(document)) {
1134
+ if (!chunkW7NEFS5V_cjs.isRecord(document)) {
1075
1135
  return failure(
1076
1136
  issueOf("SCHEMA_VALIDATION_FAILED", source, `${format.name} does not match the format`, [
1077
1137
  { pointer: "", message: "must be object" }
@@ -1134,21 +1194,21 @@ var SAMPLES_FORMAT = {
1134
1194
  };
1135
1195
  function migrateRunReportV1(document) {
1136
1196
  const aggregates = (value) => {
1137
- if (!chunkLUA4WRIQ_cjs.isRecord(value)) return value;
1197
+ if (!chunkW7NEFS5V_cjs.isRecord(value)) return value;
1138
1198
  return Object.fromEntries(
1139
1199
  Object.entries(value).map(([name, aggregate2]) => {
1140
- if (!chunkLUA4WRIQ_cjs.isRecord(aggregate2)) return [name, aggregate2];
1200
+ if (!chunkW7NEFS5V_cjs.isRecord(aggregate2)) return [name, aggregate2];
1141
1201
  const evaluation = aggregate2.evaluation;
1142
1202
  const ttfb = aggregate2.ttfb;
1143
1203
  return [
1144
1204
  name,
1145
1205
  {
1146
1206
  ...aggregate2,
1147
- ttfb: chunkLUA4WRIQ_cjs.isRecord(ttfb) ? { ...ttfb, otherP50: null } : ttfb,
1148
- evaluation: chunkLUA4WRIQ_cjs.isRecord(evaluation) && Array.isArray(evaluation.checks) ? {
1207
+ ttfb: chunkW7NEFS5V_cjs.isRecord(ttfb) ? { ...ttfb, otherP50: null } : ttfb,
1208
+ evaluation: chunkW7NEFS5V_cjs.isRecord(evaluation) && Array.isArray(evaluation.checks) ? {
1149
1209
  ...evaluation,
1150
1210
  checks: evaluation.checks.map(
1151
- (check2) => chunkLUA4WRIQ_cjs.isRecord(check2) ? { ...check2, usage: null } : check2
1211
+ (check2) => chunkW7NEFS5V_cjs.isRecord(check2) ? { ...check2, usage: null } : check2
1152
1212
  )
1153
1213
  } : evaluation,
1154
1214
  histogram: null,
@@ -1166,22 +1226,22 @@ function migrateRunReportV1(document) {
1166
1226
  };
1167
1227
  }
1168
1228
  function withoutCustomOptions(config) {
1169
- if (!chunkLUA4WRIQ_cjs.isRecord(config) || !chunkLUA4WRIQ_cjs.isRecord(config.checks)) return config;
1229
+ if (!chunkW7NEFS5V_cjs.isRecord(config) || !chunkW7NEFS5V_cjs.isRecord(config.checks)) return config;
1170
1230
  const drop = (value) => {
1171
- if (!chunkLUA4WRIQ_cjs.isRecord(value)) return value;
1231
+ if (!chunkW7NEFS5V_cjs.isRecord(value)) return value;
1172
1232
  const { custom: _removed, ...rest } = value;
1173
1233
  return rest;
1174
1234
  };
1175
1235
  const checks = Object.fromEntries(
1176
1236
  Object.entries(config.checks).map(([group, rules]) => {
1177
- if (!chunkLUA4WRIQ_cjs.isRecord(rules)) return [group, rules];
1237
+ if (!chunkW7NEFS5V_cjs.isRecord(rules)) return [group, rules];
1178
1238
  if (group === "errors") return [group, { ...rules, limit: drop(rules.limit) }];
1179
1239
  return [
1180
1240
  group,
1181
1241
  Object.fromEntries(
1182
1242
  Object.entries(rules).map(([name, rule]) => {
1183
1243
  if (group === "slowShare" && name === "t") return [name, drop(rule)];
1184
- if (!chunkLUA4WRIQ_cjs.isRecord(rule) || !Object.hasOwn(rule, "limit")) return [name, rule];
1244
+ if (!chunkW7NEFS5V_cjs.isRecord(rule) || !Object.hasOwn(rule, "limit")) return [name, rule];
1185
1245
  return [name, { ...rule, limit: drop(rule.limit) }];
1186
1246
  })
1187
1247
  )
@@ -1191,18 +1251,18 @@ function withoutCustomOptions(config) {
1191
1251
  return { ...config, checks };
1192
1252
  }
1193
1253
  function withStepOptions(config) {
1194
- if (!chunkLUA4WRIQ_cjs.isRecord(config)) return config;
1254
+ if (!chunkW7NEFS5V_cjs.isRecord(config)) return config;
1195
1255
  const out = { ...config };
1196
- if (chunkLUA4WRIQ_cjs.isRecord(config.measure) && !Object.hasOwn(config.measure, "steps")) {
1197
- out.measure = { ...config.measure, steps: chunkLUA4WRIQ_cjs.expandSteps(false) };
1256
+ if (chunkW7NEFS5V_cjs.isRecord(config.measure) && !Object.hasOwn(config.measure, "steps")) {
1257
+ out.measure = { ...config.measure, steps: chunkW7NEFS5V_cjs.expandSteps(false) };
1198
1258
  }
1199
- if (chunkLUA4WRIQ_cjs.isRecord(config.checks)) {
1200
- const defaults = chunkLUA4WRIQ_cjs.DEFAULT_CONFIG.checks;
1201
- const withStep = (value, fallback) => chunkLUA4WRIQ_cjs.isRecord(value) && !Object.hasOwn(value, "step") && chunkLUA4WRIQ_cjs.isRecord(fallback) ? { ...value, step: structuredClone(fallback.step) } : value;
1259
+ if (chunkW7NEFS5V_cjs.isRecord(config.checks)) {
1260
+ const defaults = chunkW7NEFS5V_cjs.DEFAULT_CONFIG.checks;
1261
+ const withStep = (value, fallback) => chunkW7NEFS5V_cjs.isRecord(value) && !Object.hasOwn(value, "step") && chunkW7NEFS5V_cjs.isRecord(fallback) ? { ...value, step: structuredClone(fallback.step) } : value;
1202
1262
  out.checks = Object.fromEntries(
1203
1263
  Object.entries(config.checks).map(([group, rules]) => {
1204
1264
  const groupDefaults = defaults[group];
1205
- if (!chunkLUA4WRIQ_cjs.isRecord(rules) || !chunkLUA4WRIQ_cjs.isRecord(groupDefaults)) return [group, rules];
1265
+ if (!chunkW7NEFS5V_cjs.isRecord(rules) || !chunkW7NEFS5V_cjs.isRecord(groupDefaults)) return [group, rules];
1206
1266
  if (group === "errors") {
1207
1267
  return [group, { ...rules, limit: withStep(rules.limit, groupDefaults.limit) }];
1208
1268
  }
@@ -1213,7 +1273,7 @@ function withStepOptions(config) {
1213
1273
  const ruleDefaults = groupDefaults[name];
1214
1274
  if (group === "slowShare" && name === "t")
1215
1275
  return [name, withStep(rule, ruleDefaults)];
1216
- if (!chunkLUA4WRIQ_cjs.isRecord(rule) || !chunkLUA4WRIQ_cjs.isRecord(ruleDefaults)) return [name, rule];
1276
+ if (!chunkW7NEFS5V_cjs.isRecord(rule) || !chunkW7NEFS5V_cjs.isRecord(ruleDefaults)) return [name, rule];
1217
1277
  if (!Object.hasOwn(rule, "limit")) return [name, rule];
1218
1278
  return [name, { ...rule, limit: withStep(rule.limit, ruleDefaults.limit) }];
1219
1279
  })
@@ -1225,21 +1285,21 @@ function withStepOptions(config) {
1225
1285
  return out;
1226
1286
  }
1227
1287
  function withPassesOption(config) {
1228
- if (!chunkLUA4WRIQ_cjs.isRecord(config) || !chunkLUA4WRIQ_cjs.isRecord(config.run)) return config;
1288
+ if (!chunkW7NEFS5V_cjs.isRecord(config) || !chunkW7NEFS5V_cjs.isRecord(config.run)) return config;
1229
1289
  const { repeat, ...run } = config.run;
1230
1290
  return repeat === void 0 ? config : { ...config, run: { ...run, passes: repeat } };
1231
1291
  }
1232
1292
  function withGateAndPresetOptions(config) {
1233
- if (!chunkLUA4WRIQ_cjs.isRecord(config)) return config;
1293
+ if (!chunkW7NEFS5V_cjs.isRecord(config)) return config;
1234
1294
  const out = { ...config };
1235
- if (chunkLUA4WRIQ_cjs.isRecord(config.gate)) {
1295
+ if (chunkW7NEFS5V_cjs.isRecord(config.gate)) {
1236
1296
  const { warnOnly: _warnOnly, ...gate } = config.gate;
1237
1297
  out.gate = gate;
1238
1298
  }
1239
- if (chunkLUA4WRIQ_cjs.isRecord(config.thresholds) && !Object.hasOwn(config.thresholds, "preset")) {
1299
+ if (chunkW7NEFS5V_cjs.isRecord(config.thresholds) && !Object.hasOwn(config.thresholds, "preset")) {
1240
1300
  out.thresholds = { preset: "normal", ...config.thresholds };
1241
1301
  }
1242
- if (chunkLUA4WRIQ_cjs.isRecord(config.run) && !Object.hasOwn(config.run, "grep")) {
1302
+ if (chunkW7NEFS5V_cjs.isRecord(config.run) && !Object.hasOwn(config.run, "grep")) {
1243
1303
  out.run = { ...config.run, grep: null };
1244
1304
  }
1245
1305
  return out;
@@ -1247,7 +1307,7 @@ function withGateAndPresetOptions(config) {
1247
1307
  function migrateRunReportV2(document) {
1248
1308
  const { custom: _custom, ...rest } = document;
1249
1309
  const evaluation = document.evaluation;
1250
- const counts = chunkLUA4WRIQ_cjs.isRecord(evaluation) ? evaluation.counts : void 0;
1310
+ const counts = chunkW7NEFS5V_cjs.isRecord(evaluation) ? evaluation.counts : void 0;
1251
1311
  const files = document.thresholdFiles;
1252
1312
  return {
1253
1313
  ...rest,
@@ -1258,14 +1318,14 @@ function migrateRunReportV2(document) {
1258
1318
  config: withGateAndPresetOptions(
1259
1319
  withPassesOption(withStepOptions(withoutCustomOptions(document.config)))
1260
1320
  ),
1261
- evaluation: chunkLUA4WRIQ_cjs.isRecord(evaluation) && chunkLUA4WRIQ_cjs.isRecord(counts) ? {
1321
+ evaluation: chunkW7NEFS5V_cjs.isRecord(evaluation) && chunkW7NEFS5V_cjs.isRecord(counts) ? {
1262
1322
  ...evaluation,
1263
1323
  counts: {
1264
1324
  ...Object.fromEntries(Object.entries(counts).filter(([k]) => k !== "custom")),
1265
1325
  step: Object.fromEntries(Object.keys(counts.api ?? {}).map((name) => [name, 0]))
1266
1326
  }
1267
1327
  } : evaluation,
1268
- thresholdFiles: Array.isArray(files) ? files.filter((file) => !(chunkLUA4WRIQ_cjs.isRecord(file) && file.kind === "custom")) : files
1328
+ thresholdFiles: Array.isArray(files) ? files.filter((file) => !(chunkW7NEFS5V_cjs.isRecord(file) && file.kind === "custom")) : files
1269
1329
  };
1270
1330
  }
1271
1331
  function sum(values) {
@@ -1277,17 +1337,17 @@ function checkRunReport(document, sink) {
1277
1337
  for (const [name, aggregate2] of Object.entries(map)) {
1278
1338
  const histogram3 = aggregate2.histogram;
1279
1339
  if (histogram3 === null) continue;
1280
- const pointer = chunkLUA4WRIQ_cjs.child(chunkLUA4WRIQ_cjs.child(`/${kind2}`, name), "histogram");
1340
+ const pointer = chunkW7NEFS5V_cjs.child(chunkW7NEFS5V_cjs.child(`/${kind2}`, name), "histogram");
1281
1341
  const { edges, counts } = histogram3;
1282
1342
  if (edges.some((edge, i) => i > 0 && edge <= (edges[i - 1] ?? 0))) {
1283
- sink.add(chunkLUA4WRIQ_cjs.child(pointer, "edges"), "must be strictly ascending");
1343
+ sink.add(chunkW7NEFS5V_cjs.child(pointer, "edges"), "must be strictly ascending");
1284
1344
  }
1285
1345
  if (counts.length !== edges.length - 1) {
1286
- sink.add(chunkLUA4WRIQ_cjs.child(pointer, "counts"), "must have one item fewer than edges");
1346
+ sink.add(chunkW7NEFS5V_cjs.child(pointer, "counts"), "must have one item fewer than edges");
1287
1347
  }
1288
1348
  const retained = aggregate2.samples.durations.length;
1289
1349
  if (sum(counts) !== retained) {
1290
- sink.add(chunkLUA4WRIQ_cjs.child(pointer, "counts"), "must sum to the number of samples.durations");
1350
+ sink.add(chunkW7NEFS5V_cjs.child(pointer, "counts"), "must sum to the number of samples.durations");
1291
1351
  }
1292
1352
  }
1293
1353
  }
@@ -1309,12 +1369,13 @@ function checkRunReport(document, sink) {
1309
1369
  }
1310
1370
  function migrateRunReportV3(document) {
1311
1371
  const config = document.config;
1312
- if (!chunkLUA4WRIQ_cjs.isRecord(config) || !chunkLUA4WRIQ_cjs.isRecord(config.run)) return document;
1372
+ if (!chunkW7NEFS5V_cjs.isRecord(config) || !chunkW7NEFS5V_cjs.isRecord(config.run)) return document;
1313
1373
  const { projects: _projects, ...run } = config.run;
1314
- const measure = chunkLUA4WRIQ_cjs.isRecord(config.measure) ? { api: true, ...config.measure } : config.measure;
1374
+ const measure = chunkW7NEFS5V_cjs.isRecord(config.measure) ? { api: true, ...config.measure } : config.measure;
1375
+ const report = chunkW7NEFS5V_cjs.isRecord(config.report) ? { ...config.report, junit: false } : config.report;
1315
1376
  return {
1316
1377
  ...document,
1317
- config: { ...config, run: { ...run, overrideSlowMo: false }, measure }
1378
+ config: { ...config, run: { ...run, overrideSlowMo: false }, measure, report }
1318
1379
  };
1319
1380
  }
1320
1381
  var RUN_REPORT_FORMAT = {
@@ -1336,7 +1397,7 @@ var THRESHOLDS_FORMAT = {
1336
1397
  const entries2 = document.entries;
1337
1398
  for (const [name, entry] of Object.entries(entries2)) {
1338
1399
  if (typeof entry.until === "string" && !isCalendarDate(entry.until)) {
1339
- sink.add(chunkLUA4WRIQ_cjs.child(chunkLUA4WRIQ_cjs.child("/entries", name), "until"), "must be an existing calendar date");
1400
+ sink.add(chunkW7NEFS5V_cjs.child(chunkW7NEFS5V_cjs.child("/entries", name), "until"), "must be an existing calendar date");
1340
1401
  }
1341
1402
  }
1342
1403
  }
@@ -1378,7 +1439,7 @@ function thresholdsFileName(prefix, kind2, env) {
1378
1439
  function thresholdsFilePaths(location) {
1379
1440
  const dir = resolvePath(location.configDir, location.dir);
1380
1441
  const path = (kind2) => resolvePath(dir, thresholdsFileName(location.filePrefix, kind2, location.env));
1381
- return Object.fromEntries(chunkIUI4AFE5_cjs.KINDS.map((kind2) => [kind2, path(kind2)]));
1442
+ return Object.fromEntries(chunkLEIBG5A4_cjs.KINDS.map((kind2) => [kind2, path(kind2)]));
1382
1443
  }
1383
1444
  async function loadFile(location, kind2) {
1384
1445
  const absolute = thresholdsFilePaths(location)[kind2];
@@ -1426,8 +1487,8 @@ async function loadFile(location, kind2) {
1426
1487
  };
1427
1488
  }
1428
1489
  async function loadThresholds(location) {
1429
- const files = await Promise.all(chunkIUI4AFE5_cjs.KINDS.map((kind2) => loadFile(location, kind2)));
1430
- return Object.fromEntries(chunkIUI4AFE5_cjs.KINDS.map((kind2, i) => [kind2, files[i]]));
1490
+ const files = await Promise.all(chunkLEIBG5A4_cjs.KINDS.map((kind2) => loadFile(location, kind2)));
1491
+ return Object.fromEntries(chunkLEIBG5A4_cjs.KINDS.map((kind2, i) => [kind2, files[i]]));
1431
1492
  }
1432
1493
 
1433
1494
  // src/core/evaluate/files.ts
@@ -1443,7 +1504,7 @@ function envlessPath(path, env) {
1443
1504
  return path.endsWith(suffix) ? `${path.slice(0, -suffix.length)}.json` : path;
1444
1505
  }
1445
1506
  function missingFileWarning(file, env) {
1446
- const derive = `Derive thresholds with \`${chunkIUI4AFE5_cjs.THRESHOLDS_COMMAND}\`${env === null ? "" : ` (environment "${env}")`}.`;
1507
+ const derive = `Derive thresholds with \`${chunkLEIBG5A4_cjs.THRESHOLDS_COMMAND}\`${env === null ? "" : ` (environment "${env}")`}.`;
1447
1508
  const envless = env !== null && file.envlessFileExists ? ` ${envlessPath(file.path, env)} exists but is not used for environment "${env}": thresholds of another environment would give false alarms or hide regressions.` : "";
1448
1509
  return {
1449
1510
  code: "THRESHOLDS_FILE_MISSING",
@@ -1451,6 +1512,25 @@ function missingFileWarning(file, env) {
1451
1512
  hint: `${derive}${envless}`
1452
1513
  };
1453
1514
  }
1515
+ function emptyFileWarning(path, kind2, env) {
1516
+ return {
1517
+ code: "THRESHOLDS_FILE_EMPTY",
1518
+ message: `Thresholds file ${path} has no entries; ${KIND_NOUN[kind2]} keys are evaluated with default thresholds.`,
1519
+ hint: `Derive thresholds with \`${chunkLEIBG5A4_cjs.THRESHOLDS_COMMAND}\`${env === null ? "" : ` (environment "${env}")`}.`
1520
+ };
1521
+ }
1522
+ var MAX_KEYS_IN_MESSAGE = 3;
1523
+ function keysOnDefaultsWarning(path, kind2, keys, env) {
1524
+ const one = keys.length === 1;
1525
+ const named = keys.slice(0, MAX_KEYS_IN_MESSAGE).join(", ");
1526
+ const rest = keys.length - MAX_KEYS_IN_MESSAGE;
1527
+ const list2 = rest > 0 ? `${named} and ${plural(rest, "other key")}` : named;
1528
+ return {
1529
+ code: "THRESHOLDS_KEYS_ON_DEFAULTS",
1530
+ message: `${plural(keys.length, `${KIND_NOUN[kind2]} key`)} ${one ? "has" : "have"} no entry in ${path} and ${one ? "is" : "are"} evaluated with default thresholds: ${list2}.`,
1531
+ hint: `New endpoints or steps, or keys renamed by a code or normalization change, get the default thresholds. Add entries with \`${chunkLEIBG5A4_cjs.THRESHOLDS_COMMAND}\`${env === null ? "" : ` (environment "${env}")`}; locked entries are kept.`
1532
+ };
1533
+ }
1454
1534
  function majorMinor(version2) {
1455
1535
  return version2.split(".").slice(0, 2).join(".");
1456
1536
  }
@@ -1497,7 +1577,7 @@ function generatedWarnings(path, generated, cfg, env, source) {
1497
1577
  issues.push({
1498
1578
  code: "EVAL_PERCENTILE_MISMATCH",
1499
1579
  message: `Thresholds in ${path} were derived for ${generated.evaluatedPercentile}, but this run evaluates ${level}; the percentile limits are compared with ${level}.`,
1500
- hint: `Derive thresholds again with \`${chunkIUI4AFE5_cjs.THRESHOLDS_COMMAND}\` after changing checks.time.percentile.level.`
1580
+ hint: `Derive thresholds again with \`${chunkLEIBG5A4_cjs.THRESHOLDS_COMMAND}\` after changing checks.time.percentile.level.`
1501
1581
  });
1502
1582
  }
1503
1583
  if (generated.env !== env) {
@@ -1518,7 +1598,7 @@ function generatedWarnings(path, generated, cfg, env, source) {
1518
1598
  }
1519
1599
  if (keys) {
1520
1600
  hints.push(
1521
- `Another normalization changes the keys: derive thresholds again with \`${chunkIUI4AFE5_cjs.THRESHOLDS_COMMAND}\`.`
1601
+ `Another normalization changes the keys: derive thresholds again with \`${chunkLEIBG5A4_cjs.THRESHOLDS_COMMAND}\`.`
1522
1602
  );
1523
1603
  }
1524
1604
  issues.push({
@@ -1533,14 +1613,14 @@ function unseenWarning(path, unseen) {
1533
1613
  return {
1534
1614
  code: "THRESHOLDS_UNSEEN_ENTRIES",
1535
1615
  message: `${plural(unseen.length, "entry", "entries")} in ${path} ${unseen.length === 1 ? "was" : "were"} not seen in this run.`,
1536
- hint: `Run the full suite, or remove stale entries with \`${chunkIUI4AFE5_cjs.PRUNE_COMMAND}\`.`
1616
+ hint: `Run the full suite, or remove stale entries with \`${chunkLEIBG5A4_cjs.PRUNE_COMMAND}\`.`
1537
1617
  };
1538
1618
  }
1539
1619
  function outdatedWarning(path, from, current) {
1540
1620
  return {
1541
1621
  code: "THRESHOLDS_FILE_OUTDATED",
1542
1622
  message: `Thresholds file ${path} has format version ${from}; it was read after migration to version ${current}.`,
1543
- hint: `The next thresholds run (\`${chunkIUI4AFE5_cjs.THRESHOLDS_COMMAND}\`) writes it in the current version and keeps locked entries.`
1623
+ hint: `The next thresholds run (\`${chunkLEIBG5A4_cjs.THRESHOLDS_COMMAND}\`) writes it in the current version and keeps locked entries.`
1544
1624
  };
1545
1625
  }
1546
1626
  function fileInfo(file, unseenKeys) {
@@ -1656,7 +1736,7 @@ function hashHex(input) {
1656
1736
  }
1657
1737
 
1658
1738
  // src/core/stats/classification.ts
1659
- var ABORT_TEXTS = new Set(chunkIUI4AFE5_cjs.ABORT_FAILURE_TEXTS);
1739
+ var ABORT_TEXTS = new Set(chunkLEIBG5A4_cjs.ABORT_FAILURE_TEXTS);
1660
1740
  function requestStatusLabel(sample) {
1661
1741
  const { status } = sample;
1662
1742
  if (typeof status === "number") return String(status);
@@ -2042,7 +2122,7 @@ function costOf(test) {
2042
2122
  const topKeys = keys.map((key2) => {
2043
2123
  const index = test.keys.get(key2) ?? -1;
2044
2124
  return { key: key2, count: test.counts[index] ?? 0, tenths: test.sums[index] ?? 0 };
2045
- }).sort((a, b) => b.tenths - a.tenths || b.count - a.count || compareText3(a.key, b.key)).slice(0, TOP_KEYS).map(({ key: key2, count: count2, tenths }) => ({ key: key2, count: count2, totalMs: tenths / 10 }));
2125
+ }).sort((a, b) => b.tenths - a.tenths || b.count - a.count || compareText3(a.key, b.key)).slice(0, TOP_KEYS).map(({ key: key2, count: count3, tenths }) => ({ key: key2, count: count3, totalMs: tenths / 10 }));
2046
2126
  return {
2047
2127
  title: test.title,
2048
2128
  project: test.project,
@@ -2433,7 +2513,7 @@ function addKeyedRequest(aggregator, keyOf, sample, browserName) {
2433
2513
  function addKeyedApiRequest(aggregator, keyOf, sample) {
2434
2514
  const result2 = keyOf({ method: sample.method, url: sample.url, resourceType: "request" });
2435
2515
  if (!result2.ok) return result2;
2436
- const key2 = `${chunkIUI4AFE5_cjs.REQUEST_KEY_PREFIX}${result2.key}`;
2516
+ const key2 = `${chunkLEIBG5A4_cjs.REQUEST_KEY_PREFIX}${result2.key}`;
2437
2517
  const request = {
2438
2518
  method: sample.method,
2439
2519
  url: sample.url,
@@ -2481,9 +2561,9 @@ function exceedingShare(sorted, t) {
2481
2561
  function wilsonBounds(k, n) {
2482
2562
  if (n === 0) return null;
2483
2563
  const z2 = WILSON_Z * WILSON_Z;
2484
- const share = k / n;
2485
- const center = share + z2 / (2 * n);
2486
- const margin = WILSON_Z * Math.sqrt(share * (1 - share) / n + z2 / (4 * n * n));
2564
+ const share2 = k / n;
2565
+ const center = share2 + z2 / (2 * n);
2566
+ const margin = WILSON_Z * Math.sqrt(share2 * (1 - share2) / n + z2 / (4 * n * n));
2487
2567
  const denominator = 1 + z2 / n;
2488
2568
  const clamp2 = (x) => Math.min(1, Math.max(0, roundRatio(x)));
2489
2569
  return {
@@ -2493,7 +2573,7 @@ function wilsonBounds(k, n) {
2493
2573
  }
2494
2574
 
2495
2575
  // src/core/evaluate/rules.ts
2496
- var TIME_RULES = /* @__PURE__ */ new Set(["median", "percentile", "p99"]);
2576
+ var TIME_RULES2 = /* @__PURE__ */ new Set(["median", "percentile", "p99"]);
2497
2577
  function timeCheck(rule, actual, limit, m) {
2498
2578
  return { rule, n: m, actual, observed: null, limit, passed: !(actual > limit) };
2499
2579
  }
@@ -2593,7 +2673,7 @@ function runRules(stats2, limits, cfg) {
2593
2673
  applicable = true;
2594
2674
  if (input.count < Math.max(1, input.minSamples)) continue;
2595
2675
  const check2 = input.run();
2596
- const hardLimitExceeded = !check2.passed && TIME_RULES.has(check2.rule) && hardLimitFactor !== null && check2.actual > check2.limit * hardLimitFactor;
2676
+ const hardLimitExceeded = !check2.passed && TIME_RULES2.has(check2.rule) && hardLimitFactor !== null && check2.actual > check2.limit * hardLimitFactor;
2597
2677
  checks.push({ ...check2, hardLimitExceeded, blocking: false });
2598
2678
  }
2599
2679
  return { checks, applicable };
@@ -2644,7 +2724,7 @@ function qualifies(evaluation, gate) {
2644
2724
  return !isMuteActive(evaluation.muted);
2645
2725
  }
2646
2726
  function applyGate(perKey, gate) {
2647
- const all = chunkIUI4AFE5_cjs.KINDS.flatMap((kind2) => Object.values(perKey[kind2]));
2727
+ const all = chunkLEIBG5A4_cjs.KINDS.flatMap((kind2) => Object.values(perKey[kind2]));
2648
2728
  const qualified = all.filter(
2649
2729
  (e) => qualifies(e, gate) && e.checks.some((check2) => !check2.passed)
2650
2730
  );
@@ -2683,7 +2763,7 @@ function countKind(perKey, unseenThresholdEntries) {
2683
2763
  }
2684
2764
  if (e.thresholdSource === "file") counts.fromFile += 1;
2685
2765
  else counts.fromDefaults += 1;
2686
- const timeRules = e.checks.filter((c) => TIME_RULES.has(c.rule)).map((c) => c.rule);
2766
+ const timeRules = e.checks.filter((c) => TIME_RULES2.has(c.rule)).map((c) => c.rule);
2687
2767
  if (timeRules.length === 1 && timeRules[0] === "median") counts.medianOnly += 1;
2688
2768
  if (e.result === "fail") counts.violations += 1;
2689
2769
  if (e.checks.some((c) => c.blocking)) counts.blockingViolations += 1;
@@ -2694,7 +2774,7 @@ function evaluationStatus2(perKey, thresholds, fatalToolError, kinds) {
2694
2774
  if (fatalToolError || kinds.some((kind2) => thresholds[kind2].status === "invalid")) {
2695
2775
  return "error";
2696
2776
  }
2697
- const checks = chunkIUI4AFE5_cjs.KINDS.flatMap((kind2) => Object.values(perKey[kind2])).flatMap((e) => e.checks);
2777
+ const checks = chunkLEIBG5A4_cjs.KINDS.flatMap((kind2) => Object.values(perKey[kind2])).flatMap((e) => e.checks);
2698
2778
  if (checks.some((c) => c.blocking)) return "failed";
2699
2779
  if (checks.some((c) => !c.passed)) return "warned";
2700
2780
  return "passed";
@@ -2706,7 +2786,7 @@ function evaluate(aggregates, thresholds, cfg, opts) {
2706
2786
  step: aggregates.steps ?? {}
2707
2787
  };
2708
2788
  const perKey = { api: {}, step: {} };
2709
- for (const kind2 of chunkIUI4AFE5_cjs.KINDS) {
2789
+ for (const kind2 of chunkLEIBG5A4_cjs.KINDS) {
2710
2790
  for (const key2 of Object.keys(byKind[kind2]).sort(compareText)) {
2711
2791
  const stats2 = byKind[kind2][key2];
2712
2792
  if (stats2 !== void 0) {
@@ -2719,7 +2799,7 @@ function evaluate(aggregates, thresholds, cfg, opts) {
2719
2799
  const toolErrors = [];
2720
2800
  const thresholdFiles = [];
2721
2801
  const unseenCount = { api: 0, step: 0 };
2722
- const activeKinds = chunkIUI4AFE5_cjs.KINDS.filter(
2802
+ const activeKinds = chunkLEIBG5A4_cjs.KINDS.filter(
2723
2803
  (kind2) => kind2 === "step" ? cfg.measure.steps.enabled : cfg.measure.api
2724
2804
  );
2725
2805
  for (const kind2 of activeKinds) {
@@ -2735,6 +2815,9 @@ function evaluate(aggregates, thresholds, cfg, opts) {
2735
2815
  } else if (file.status === "invalid") {
2736
2816
  toolErrors.push(...file.issues.map(schemaIssueToIssue));
2737
2817
  } else {
2818
+ if (opts.mode === "test" && Object.keys(file.file.entries).length === 0 && Object.keys(byKind[kind2]).length > 0) {
2819
+ warnings.push(emptyFileWarning(file.path, kind2, opts.env));
2820
+ }
2738
2821
  if (file.migratedFrom !== void 0) {
2739
2822
  warnings.push(outdatedWarning(file.path, file.migratedFrom, SCHEMA_VERSIONS.thresholds));
2740
2823
  }
@@ -2751,6 +2834,12 @@ function evaluate(aggregates, thresholds, cfg, opts) {
2751
2834
  }
2752
2835
  unseen = Object.keys(file.file.entries).filter((key2) => !Object.hasOwn(byKind[kind2], key2)).sort(compareText);
2753
2836
  if (unseen.length > 0) warnings.push(unseenWarning(file.path, unseen));
2837
+ if (opts.mode === "test" && Object.keys(file.file.entries).length > 0) {
2838
+ const onDefaults = Object.entries(perKey[kind2]).filter(([, e]) => e.thresholdSource === "default" && e.result !== "not-evaluated").map(([key2]) => key2).sort(compareText);
2839
+ if (onDefaults.length > 0) {
2840
+ warnings.push(keysOnDefaultsWarning(file.path, kind2, onDefaults, opts.env));
2841
+ }
2842
+ }
2754
2843
  }
2755
2844
  unseenCount[kind2] = unseen.length;
2756
2845
  thresholdFiles.push(fileInfo(file, unseen));
@@ -2759,14 +2848,14 @@ function evaluate(aggregates, thresholds, cfg, opts) {
2759
2848
  api: countKind(perKey.api, unseenCount.api),
2760
2849
  step: countKind(perKey.step, unseenCount.step)
2761
2850
  };
2762
- if (chunkIUI4AFE5_cjs.KINDS.every((kind2) => Object.keys(byKind[kind2]).length === 0)) {
2851
+ if (chunkLEIBG5A4_cjs.KINDS.every((kind2) => Object.keys(byKind[kind2]).length === 0)) {
2763
2852
  warnings.push({
2764
2853
  code: "EVAL_NO_SAMPLES",
2765
2854
  message: "The run recorded no samples, so nothing was evaluated.",
2766
2855
  hint: "Check the integration: tests must use the fixtures from withPerfFixtures, and the measure options (include, exclude, resourceTypes) must not filter out every request."
2767
2856
  });
2768
2857
  }
2769
- const notEvaluated = chunkIUI4AFE5_cjs.KINDS.reduce((sum3, kind2) => sum3 + counts[kind2].fileEntriesNotEvaluated, 0);
2858
+ const notEvaluated = chunkLEIBG5A4_cjs.KINDS.reduce((sum3, kind2) => sum3 + counts[kind2].fileEntriesNotEvaluated, 0);
2770
2859
  if (notEvaluated > 0) {
2771
2860
  warnings.push({
2772
2861
  code: "THRESHOLDS_ENTRIES_NOT_EVALUATED",
@@ -2774,7 +2863,7 @@ function evaluate(aggregates, thresholds, cfg, opts) {
2774
2863
  hint: `Run more passes (run.passes or PW_PERF_PASSES), or accept that the endpoint is called rarely.`
2775
2864
  });
2776
2865
  }
2777
- const mutedKeys = chunkIUI4AFE5_cjs.KINDS.flatMap(
2866
+ const mutedKeys = chunkLEIBG5A4_cjs.KINDS.flatMap(
2778
2867
  (kind2) => Object.entries(perKey[kind2]).flatMap(
2779
2868
  ([key2, e]) => e.muted === null ? [] : [{ kind: kind2, key: key2, muted: e.muted }]
2780
2869
  )
@@ -2792,20 +2881,20 @@ function evaluate(aggregates, thresholds, cfg, opts) {
2792
2881
  }
2793
2882
 
2794
2883
  // src/core/evaluate/outcome.ts
2795
- function percent(share) {
2796
- return `${Math.round(share * 1e3) / 10}%`;
2884
+ function percent(share2) {
2885
+ return `${Math.round(share2 * 1e3) / 10}%`;
2797
2886
  }
2798
2887
  function assessRun(input, gate) {
2799
2888
  const { tests, maxFailures, sharded } = input;
2800
2889
  const warnings = [];
2801
2890
  const toolErrors = [];
2802
2891
  const executions = tests.expected + tests.unexpected + tests.flaky;
2803
- const share = executions === 0 ? 0 : tests.unexpected / executions;
2892
+ const share2 = executions === 0 ? 0 : tests.unexpected / executions;
2804
2893
  const failedText = `${tests.unexpected} of ${plural(executions, "test execution")} failed`;
2805
- if (share > gate.maxFailedTestShare) {
2894
+ if (share2 > gate.maxFailedTestShare) {
2806
2895
  toolErrors.push({
2807
2896
  code: "TESTS_FAILED_TOO_MANY",
2808
- message: `${failedText} (${percent(share)}, more than gate.maxFailedTestShare ${percent(gate.maxFailedTestShare)}); samples of a large part of the tests are missing, so the performance result is not trustworthy.`,
2897
+ message: `${failedText} (${percent(share2)}, more than gate.maxFailedTestShare ${percent(gate.maxFailedTestShare)}); samples of a large part of the tests are missing, so the performance result is not trustworthy.`,
2809
2898
  hint: "Fix the failing tests (run them without perf mode), or raise gate.maxFailedTestShare if the failures are expected."
2810
2899
  });
2811
2900
  } else if (tests.unexpected > 0) {
@@ -3010,17 +3099,17 @@ function truncateKey(key2) {
3010
3099
  function originLabels(origins, baseOrigins) {
3011
3100
  const exact = /* @__PURE__ */ new Map();
3012
3101
  for (const [origin, label] of Object.entries(origins)) {
3013
- if (chunkLUA4WRIQ_cjs.isHostPattern(origin)) continue;
3102
+ if (chunkW7NEFS5V_cjs.isHostPattern(origin)) continue;
3014
3103
  const canonical = canonicalOrigin(origin);
3015
3104
  if (canonical !== null) exact.set(canonical, label);
3016
3105
  }
3017
- const patterns = chunkLUA4WRIQ_cjs.compileHostPatterns(origins);
3106
+ const patterns = chunkW7NEFS5V_cjs.compileHostPatterns(origins);
3018
3107
  const base = new Set(canonicalOrigins(baseOrigins));
3019
3108
  const memo = /* @__PURE__ */ new Map();
3020
3109
  return (url) => {
3021
3110
  const known = memo.get(url.origin);
3022
3111
  if (known !== void 0) return known;
3023
- const label = exact.get(url.origin) ?? chunkLUA4WRIQ_cjs.matchingPattern(patterns, url)?.label ?? (base.has(url.origin) ? "" : null);
3112
+ const label = exact.get(url.origin) ?? chunkW7NEFS5V_cjs.matchingPattern(patterns, url)?.label ?? (base.has(url.origin) ? "" : null);
3024
3113
  memo.set(url.origin, label);
3025
3114
  return label;
3026
3115
  };
@@ -3143,7 +3232,7 @@ function keyHeadroom(checks) {
3143
3232
  for (const check2 of checks) max = Math.max(max, check2.usage ?? Infinity);
3144
3233
  return max;
3145
3234
  }
3146
- var TIME_RULES2 = ["median", "percentile", "p99"];
3235
+ var TIME_RULES3 = ["median", "percentile", "p99"];
3147
3236
  var RULE_ORDER = [
3148
3237
  "median",
3149
3238
  "percentile",
@@ -3159,7 +3248,7 @@ function finding(checks, rule) {
3159
3248
  return checks.find((c) => c.rule === rule);
3160
3249
  }
3161
3250
  function timeChecksPass(checks) {
3162
- return checks.every((c) => !TIME_RULES2.includes(c.rule) || c.passed);
3251
+ return checks.every((c) => !TIME_RULES3.includes(c.rule) || c.passed);
3163
3252
  }
3164
3253
  function errorLabels(facts2, options) {
3165
3254
  const isError = compileStatusMatcher(options.errorStatuses);
@@ -3179,7 +3268,7 @@ function percentileHint(code2) {
3179
3268
  var RULES = [
3180
3269
  ({ evaluation: { checks } }, { hardLimitFactor }) => {
3181
3270
  if (hardLimitFactor === null) return null;
3182
- for (const rule of TIME_RULES2) {
3271
+ for (const rule of TIME_RULES3) {
3183
3272
  const check2 = finding(checks, rule);
3184
3273
  if (check2?.hardLimitExceeded === true && check2.blocking && check2.usage !== null) {
3185
3274
  return {
@@ -3271,7 +3360,7 @@ var RULES = [
3271
3360
  return { code: "HINT_MEDIAN_ONLY", params: { n: median.n } };
3272
3361
  },
3273
3362
  ({ evaluation: { result: result2, muted } }) => result2 === "fail" && muted !== null && !muted.expired ? { code: "HINT_MUTED", params: {} } : null,
3274
- ({ count: count2, fromFailedTests }) => count2 > 0 && fromFailedTests * 2 >= count2 ? { code: "HINT_FAILED_TESTS", params: { share: roundRatio(fromFailedTests / count2) } } : null,
3363
+ ({ count: count3, fromFailedTests }) => count3 > 0 && fromFailedTests * 2 >= count3 ? { code: "HINT_FAILED_TESTS", params: { share: roundRatio(fromFailedTests / count3) } } : null,
3275
3364
  ({ evaluation: { result: result2, checks } }) => {
3276
3365
  if (result2 !== "pass") return null;
3277
3366
  const headroom = keyHeadroom(checks);
@@ -3420,8 +3509,8 @@ function buildRunReport(input) {
3420
3509
  const rawUrls = input.config.report?.rawUrls === true;
3421
3510
  const kindOrder = { api: 0, step: 1 };
3422
3511
  const hintOptions = {
3423
- errorStatuses: input.config.checks?.errors?.statuses ?? chunkLUA4WRIQ_cjs.perfDefaults.checks.errors.statuses,
3424
- hardLimitFactor: input.config.gate?.hardLimitFactor === void 0 ? chunkLUA4WRIQ_cjs.perfDefaults.gate.hardLimitFactor : input.config.gate.hardLimitFactor
3512
+ errorStatuses: input.config.checks?.errors?.statuses ?? chunkW7NEFS5V_cjs.perfDefaults.checks.errors.statuses,
3513
+ hardLimitFactor: input.config.gate?.hardLimitFactor === void 0 ? chunkW7NEFS5V_cjs.perfDefaults.gate.hardLimitFactor : input.config.gate.hardLimitFactor
3425
3514
  };
3426
3515
  const endpoints = buildAggregates(
3427
3516
  "api",
@@ -3468,6 +3557,368 @@ function buildRunReport(input) {
3468
3557
  };
3469
3558
  }
3470
3559
 
3560
+ // src/core/report/junit.ts
3561
+ var JUNIT_FILE = "junit.xml";
3562
+ var JUNIT_MESSAGE_MAX = 500;
3563
+ var JUNIT_TEXT_MAX = 4e3;
3564
+ var JUNIT_MAX_WARNINGS = 50;
3565
+ var RULE_ORDER2 = [
3566
+ "median",
3567
+ "percentile",
3568
+ "p99",
3569
+ "apdex",
3570
+ "wilson",
3571
+ "errors"
3572
+ ];
3573
+ var SUITES = [
3574
+ { kind: "api", name: "pw-perf endpoints", classname: "pw-perf.endpoints" },
3575
+ { kind: "step", name: "pw-perf steps", classname: "pw-perf.steps" }
3576
+ ];
3577
+ var INVALID_CHARS = (
3578
+ // eslint-disable-next-line no-control-regex -- the control characters are what is replaced
3579
+ /[\u0000-\u0008\u000B\u000C\u000E-\u001F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g
3580
+ );
3581
+ function xmlChars(text2) {
3582
+ return text2.replace(INVALID_CHARS, "\uFFFD");
3583
+ }
3584
+ function escapeText(text2) {
3585
+ return xmlChars(text2).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
3586
+ }
3587
+ function escapeAttr(text2) {
3588
+ return escapeText(text2).replace(/\t/g, "&#9;").replace(/\n/g, "&#10;").replace(/\r/g, "&#13;");
3589
+ }
3590
+ function truncateEnd(text2, max) {
3591
+ const chars = Array.from(text2);
3592
+ return chars.length <= max ? text2 : `${chars.slice(0, max - 1).join("")}\u2026`;
3593
+ }
3594
+ function seconds(ms2) {
3595
+ const whole = Math.max(0, Math.round(ms2));
3596
+ return `${String(Math.floor(whole / 1e3))}.${String(whole % 1e3).padStart(3, "0")}`;
3597
+ }
3598
+ function attrs(values) {
3599
+ return Object.entries(values).map(([name, value]) => ` ${name}="${escapeAttr(String(value))}"`).join("");
3600
+ }
3601
+ function childXml(child2, indent) {
3602
+ const a = child2.attrs === void 0 ? "" : attrs(
3603
+ Object.fromEntries(
3604
+ Object.entries(child2.attrs).map(([k, v]) => [
3605
+ k,
3606
+ k === "message" ? truncateEnd(String(v), JUNIT_MESSAGE_MAX) : v
3607
+ ])
3608
+ )
3609
+ );
3610
+ if (child2.text === void 0 || child2.text === "") return `${indent}<${child2.tag}${a}/>`;
3611
+ return `${indent}<${child2.tag}${a}>${escapeText(truncateEnd(child2.text, JUNIT_TEXT_MAX))}</${child2.tag}>`;
3612
+ }
3613
+ function count2(cases, tag) {
3614
+ return cases.filter((c) => c.children.some((child2) => child2.tag === tag)).length;
3615
+ }
3616
+ function totals(cases) {
3617
+ return {
3618
+ tests: cases.length,
3619
+ failures: count2(cases, "failure"),
3620
+ errors: count2(cases, "error")
3621
+ };
3622
+ }
3623
+ function isMuteActive2(evaluation) {
3624
+ return evaluation.muted !== null && !evaluation.muted.expired;
3625
+ }
3626
+ function failedChecks(evaluation) {
3627
+ const r2 = exceedance;
3628
+ return evaluation.checks.filter((c) => !c.passed).sort(
3629
+ (a, b) => Number(b.blocking) - Number(a.blocking) || (r2(a) === r2(b) ? 0 : r2(b) > r2(a) ? 1 : -1) || RULE_ORDER2.indexOf(a.rule) - RULE_ORDER2.indexOf(b.rule)
3630
+ );
3631
+ }
3632
+ function checkLine(check2, evaluation, ctx) {
3633
+ const rule = check2.rule === "percentile" ? ctx.level : check2.rule;
3634
+ const sign = check2.rule === "apdex" ? "<" : ">";
3635
+ const source = evaluation.thresholdSource === "file" ? "thresholds file" : "default thresholds";
3636
+ let line = `${rule} ${formatActual(check2)} ${sign} limit ${formatLimit(check2)} (${overText(check2)}), ${String(check2.n)} samples, ${source}`;
3637
+ if (check2.hardLimitExceeded) line += ", HARD limit";
3638
+ if (evaluation.muted?.expired === true) line += `, muting expired on ${evaluation.muted.until}`;
3639
+ return line;
3640
+ }
3641
+ function share(value) {
3642
+ return value.toFixed(3);
3643
+ }
3644
+ function violationBody(key2, aggregate2, checks, ctx) {
3645
+ const evaluation = aggregate2.evaluation;
3646
+ const lines = checks.map(
3647
+ (c) => `${checkLine(c, evaluation, ctx)} (${c.blocking ? "blocking" : "not blocking"})`
3648
+ );
3649
+ const l = evaluation.limits;
3650
+ let limits = `Limits: median ${formatMs(l.median)}, ${ctx.level} ${formatMs(l.percentile)}, p99 ${formatMs(l.p99)}, errors <= ${share(l.maxErrorRate)}`;
3651
+ if (l.t !== null) {
3652
+ limits += `, T ${formatMs(l.t)}`;
3653
+ if (l.minApdex !== null) limits += `, apdex >= ${share(l.minApdex)}`;
3654
+ if (l.maxWilson !== null) limits += `, wilson <= ${share(l.maxWilson)}`;
3655
+ }
3656
+ lines.push(limits);
3657
+ lines.push(`Samples: ${String(aggregate2.count)}, errors ${String(aggregate2.errorCount)}`);
3658
+ const slowest = aggregate2.slowest[0];
3659
+ if (slowest !== void 0) {
3660
+ const t = slowest.test;
3661
+ lines.push(
3662
+ `Slowest: ${formatMs(slowest.duration)} in "${t.title}" (${t.file}:${String(t.line)})`
3663
+ );
3664
+ }
3665
+ lines.push(`Details: ${ctx.details} (key "${key2}")`);
3666
+ return lines;
3667
+ }
3668
+ function notBlockingReason(evaluation, report) {
3669
+ const gate = report.config.gate;
3670
+ const defaultThresholds = gate?.defaultThresholds ?? chunkW7NEFS5V_cjs.DEFAULT_CONFIG.gate.defaultThresholds;
3671
+ if (evaluation.thresholdSource === "default" && defaultThresholds === "warn") {
3672
+ return "default thresholds only warn (gate.defaultThresholds: warn)";
3673
+ }
3674
+ if (!report.evaluation.gateEnabled) return "the gate is off";
3675
+ return `within gate.tolerance (${String(gate?.tolerance ?? chunkW7NEFS5V_cjs.DEFAULT_CONFIG.gate.tolerance)})`;
3676
+ }
3677
+ function mildestRule(report) {
3678
+ const checks = report.config.checks;
3679
+ const d = chunkW7NEFS5V_cjs.DEFAULT_CONFIG.checks;
3680
+ const rules = [
3681
+ {
3682
+ rule: "median",
3683
+ enabled: checks?.time?.median?.enabled ?? d.time.median.enabled,
3684
+ minSamples: checks?.time?.median?.minSamples ?? d.time.median.minSamples
3685
+ },
3686
+ {
3687
+ rule: "percentile",
3688
+ enabled: checks?.time?.percentile?.enabled ?? d.time.percentile.enabled,
3689
+ minSamples: checks?.time?.percentile?.minSamples ?? d.time.percentile.minSamples
3690
+ },
3691
+ {
3692
+ rule: "p99",
3693
+ enabled: checks?.time?.p99?.enabled ?? d.time.p99.enabled,
3694
+ minSamples: checks?.time?.p99?.minSamples ?? d.time.p99.minSamples
3695
+ },
3696
+ {
3697
+ rule: "apdex",
3698
+ enabled: checks?.slowShare?.apdex?.enabled ?? d.slowShare.apdex.enabled,
3699
+ minSamples: checks?.slowShare?.apdex?.minSamples ?? d.slowShare.apdex.minSamples
3700
+ },
3701
+ {
3702
+ rule: "wilson",
3703
+ enabled: checks?.slowShare?.wilson?.enabled ?? d.slowShare.wilson.enabled,
3704
+ minSamples: checks?.slowShare?.wilson?.minSamples ?? d.slowShare.wilson.minSamples
3705
+ },
3706
+ {
3707
+ rule: "errors",
3708
+ enabled: checks?.errors?.enabled ?? d.errors.enabled,
3709
+ minSamples: checks?.errors?.minSamples ?? d.errors.minSamples
3710
+ }
3711
+ ];
3712
+ let best = null;
3713
+ for (const r2 of rules) {
3714
+ if (r2.enabled && (best === null || r2.minSamples < best.minSamples)) {
3715
+ best = { rule: r2.rule, minSamples: r2.minSamples };
3716
+ }
3717
+ }
3718
+ return best;
3719
+ }
3720
+ function notEvaluatedMessage(kind2, aggregate2, report) {
3721
+ switch (aggregate2.evaluation.reason) {
3722
+ case "too-few-samples": {
3723
+ const mildest = mildestRule(report);
3724
+ if (mildest === null) return `too few samples (${String(aggregate2.successCount)})`;
3725
+ const n = mildest.rule === "errors" ? aggregate2.count : aggregate2.successCount;
3726
+ const rule = mildest.rule === "percentile" ? levelOf(report) : mildest.rule;
3727
+ return `too few samples (${String(n)}, the ${rule} rule needs ${String(mildest.minSamples)})`;
3728
+ }
3729
+ case "thresholds-error": {
3730
+ const file = report.thresholdFiles.find((f) => f.kind === kind2 && f.status === "invalid");
3731
+ return file === void 0 ? "the thresholds file is invalid" : `thresholds file ${file.path} is invalid`;
3732
+ }
3733
+ default:
3734
+ return "no enabled rule applies";
3735
+ }
3736
+ }
3737
+ function levelOf(report) {
3738
+ return report.config.checks?.time?.percentile?.level ?? chunkW7NEFS5V_cjs.DEFAULT_CONFIG.checks.time.percentile.level;
3739
+ }
3740
+ function keyCase(kind2, classname, key2, aggregate2, ctx) {
3741
+ const evaluation = aggregate2.evaluation;
3742
+ const median = aggregate2.stats?.percentiles["p50"];
3743
+ const children = [];
3744
+ const muted = evaluation.muted;
3745
+ if (evaluation.result === "not-evaluated") {
3746
+ children.push({
3747
+ tag: "skipped",
3748
+ attrs: { message: `not evaluated: ${notEvaluatedMessage(kind2, aggregate2, ctx.report)}` }
3749
+ });
3750
+ } else if (evaluation.result === "fail") {
3751
+ const checks = failedChecks(evaluation);
3752
+ const body = violationBody(key2, aggregate2, checks, ctx);
3753
+ const first2 = checks[0];
3754
+ const blocking = checks.find((c) => c.blocking);
3755
+ if (blocking !== void 0) {
3756
+ children.push({
3757
+ tag: "failure",
3758
+ attrs: { type: blocking.rule, message: checkLine(blocking, evaluation, ctx) },
3759
+ text: body.join("\n")
3760
+ });
3761
+ } else if (muted !== null && isMuteActive2(evaluation)) {
3762
+ const exceeded = first2 === void 0 ? "" : `; ${checkLine(first2, evaluation, ctx)}`;
3763
+ children.push({
3764
+ tag: "skipped",
3765
+ attrs: { message: `muted until ${muted.until}: ${muted.note}${exceeded}` },
3766
+ text: body.join("\n")
3767
+ });
3768
+ } else {
3769
+ body.push(`not blocking: ${notBlockingReason(evaluation, ctx.report)}`);
3770
+ children.push({ tag: "system-out", text: body.join("\n") });
3771
+ }
3772
+ } else if (muted !== null && isMuteActive2(evaluation)) {
3773
+ children.push({ tag: "system-out", text: `muted until ${muted.until}: ${muted.note}` });
3774
+ }
3775
+ return {
3776
+ classname,
3777
+ name: key2,
3778
+ ms: median === void 0 ? 0 : median,
3779
+ noTime: median === void 0,
3780
+ children
3781
+ };
3782
+ }
3783
+ function issueLines(issue2) {
3784
+ return issue2.hint === void 0 ? `${issue2.code}: ${issue2.message}` : `${issue2.code}: ${issue2.message}
3785
+ hint: ${issue2.hint}`;
3786
+ }
3787
+ function runCase(report, exitCode) {
3788
+ const children = [];
3789
+ const first2 = report.toolErrors[0];
3790
+ if (first2 !== void 0) {
3791
+ children.push({
3792
+ tag: "error",
3793
+ attrs: { type: first2.code, message: first2.message },
3794
+ text: report.toolErrors.map(issueLines).join("\n")
3795
+ });
3796
+ }
3797
+ const t = report.tests;
3798
+ const lines = [
3799
+ `Mode: ${report.mode}${report.env === null ? "" : ` (env ${report.env})`}`,
3800
+ `Tests: ${String(t.expected)} passed, ${String(t.unexpected)} failed, ${String(t.flaky)} flaky, ${String(t.skipped)} skipped; passes ${String(report.passes.completed)}/${String(report.passes.planned)}`,
3801
+ `Evaluation: ${report.evaluation.status} (exit code ${String(exitCode)})`
3802
+ ];
3803
+ const warnings = report.warnings;
3804
+ if (warnings.length === 0) {
3805
+ lines.push("Warnings: none");
3806
+ } else {
3807
+ lines.push(`Warnings: ${String(warnings.length)}`);
3808
+ for (const w of warnings.slice(0, JUNIT_MAX_WARNINGS)) lines.push(`${w.code}: ${w.message}`);
3809
+ if (warnings.length > JUNIT_MAX_WARNINGS) {
3810
+ const more = warnings.length - JUNIT_MAX_WARNINGS;
3811
+ lines.push(`\u2026 and ${String(more)} more warning${more === 1 ? "" : "s"} (see report.json)`);
3812
+ }
3813
+ }
3814
+ children.push({ tag: "system-out", text: lines.join("\n") });
3815
+ return { classname: "pw-perf.run", name: "measurement run", ms: 0, noTime: true, children };
3816
+ }
3817
+ function caseTime(c) {
3818
+ return c.noTime ? "0" : seconds(c.ms);
3819
+ }
3820
+ function suiteXml(suite, timestamp2) {
3821
+ const t = totals(suite.cases);
3822
+ const ms2 = suite.cases.reduce(
3823
+ (sum3, c) => sum3 + (c.noTime ? 0 : Math.max(0, Math.round(c.ms))),
3824
+ 0
3825
+ );
3826
+ const lines = [
3827
+ ` <testsuite${attrs({
3828
+ name: suite.name,
3829
+ tests: t.tests,
3830
+ failures: t.failures,
3831
+ errors: t.errors,
3832
+ skipped: count2(suite.cases, "skipped"),
3833
+ time: suite.time ?? seconds(ms2),
3834
+ timestamp: timestamp2
3835
+ })}>`
3836
+ ];
3837
+ if (suite.properties !== void 0) {
3838
+ lines.push(" <properties>");
3839
+ for (const [name, value] of suite.properties) {
3840
+ lines.push(` <property${attrs({ name, value })}/>`);
3841
+ }
3842
+ lines.push(" </properties>");
3843
+ }
3844
+ for (const c of suite.cases) {
3845
+ const head = ` <testcase${attrs({ classname: c.classname, name: c.name, time: caseTime(c) })}`;
3846
+ if (c.children.length === 0) {
3847
+ lines.push(`${head}/>`);
3848
+ continue;
3849
+ }
3850
+ lines.push(`${head}>`);
3851
+ for (const child2 of c.children) lines.push(childXml(child2, " "));
3852
+ lines.push(" </testcase>");
3853
+ }
3854
+ lines.push(" </testsuite>");
3855
+ return lines;
3856
+ }
3857
+ function buildJunitXml(report) {
3858
+ const exitCode = buildOutcome(report, {
3859
+ reportJson: null,
3860
+ reportHtml: null,
3861
+ thresholds: [],
3862
+ thresholdsDiff: null
3863
+ }).exitCode;
3864
+ const ctx = {
3865
+ report,
3866
+ level: levelOf(report),
3867
+ details: report.config.report?.html === false ? "report.json" : "report.html"
3868
+ };
3869
+ const ci = report.ci;
3870
+ const suites = [
3871
+ {
3872
+ name: "pw-perf run",
3873
+ time: "0",
3874
+ cases: [runCase(report, exitCode)],
3875
+ properties: [
3876
+ ["pw-perf.runId", report.runId],
3877
+ ["pw-perf.mode", report.mode],
3878
+ ["pw-perf.env", report.env ?? ""],
3879
+ ["pw-perf.toolVersion", report.tool.version],
3880
+ ["pw-perf.evaluation", report.evaluation.status],
3881
+ ["pw-perf.exitCode", String(exitCode)],
3882
+ ["pw-perf.passes", `${String(report.passes.completed)}/${String(report.passes.planned)}`],
3883
+ // Number of merged shards (17-REQ-17); 0 until a merge writes the report.
3884
+ ["pw-perf.shards", "0"],
3885
+ ["pw-perf.commit", ci?.commit ?? ""],
3886
+ ["pw-perf.branch", ci?.branch ?? ""],
3887
+ ["pw-perf.buildUrl", ci?.buildUrl ?? ""]
3888
+ ]
3889
+ }
3890
+ ];
3891
+ const byKind = {
3892
+ api: report.endpoints,
3893
+ step: report.steps
3894
+ };
3895
+ for (const { kind: kind2, name, classname } of SUITES) {
3896
+ const keys = Object.keys(byKind[kind2]).sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
3897
+ if (keys.length === 0) continue;
3898
+ suites.push({
3899
+ name,
3900
+ cases: keys.map((key2) => keyCase(kind2, classname, key2, byKind[kind2][key2], ctx))
3901
+ });
3902
+ }
3903
+ const all = suites.flatMap((s) => s.cases);
3904
+ const t = totals(all);
3905
+ const duration = Date.parse(report.finishedAt) - Date.parse(report.startedAt);
3906
+ const lines = [
3907
+ '<?xml version="1.0" encoding="UTF-8"?>',
3908
+ `<testsuites${attrs({
3909
+ name: "pw-perf",
3910
+ tests: t.tests,
3911
+ failures: t.failures,
3912
+ errors: t.errors,
3913
+ time: seconds(Number.isFinite(duration) ? duration : 0)
3914
+ })}>`,
3915
+ ...suites.flatMap((s) => suiteXml(s, report.startedAt)),
3916
+ "</testsuites>"
3917
+ ];
3918
+ return `${lines.join("\n")}
3919
+ `;
3920
+ }
3921
+
3471
3922
  // src/core/report/next-hint.ts
3472
3923
  function perfCommand(mode2, env, command, platform) {
3473
3924
  const vars = `PW_PERF_MODE=${mode2}${env === null ? "" : ` PW_PERF_ENV=${env}`}`;
@@ -3546,7 +3997,9 @@ function nextHint(input) {
3546
3997
  const local = report.ci === null ? "; for CI, derive them on the CI machines (docs/thresholds.md)" : "";
3547
3998
  return `commit ${files}${local}`;
3548
3999
  }
3549
- if (report.warnings.some((w) => w.code === "THRESHOLDS_FILE_MISSING")) {
4000
+ if (report.warnings.some(
4001
+ (w) => w.code === "THRESHOLDS_FILE_MISSING" || w.code === "THRESHOLDS_FILE_EMPTY"
4002
+ )) {
3550
4003
  return `derive thresholds: ${commands.thresholds}`;
3551
4004
  }
3552
4005
  if (report.evaluation.status === "failed") {
@@ -3566,8 +4019,8 @@ function estimateText(input) {
3566
4019
  const mean = input.meanMs;
3567
4020
  if (mean === null) return "not available (no measured test ran)";
3568
4021
  const run = (passes) => passes * (input.setupMs + input.tests * mean);
3569
- const seconds = (Math.round(mean / 100) / 10).toFixed(1);
3570
- return `measurement run \u2248 ${formatDuration(run(input.passesTest))} (${String(input.tests)} tests \xD7 ${String(input.passesTest)} passes \xD7 ${seconds} s), thresholds run \u2248 ${formatDuration(run(input.passesThresholds))} (\xD7 ${String(input.passesThresholds)} passes), 1 worker`;
4022
+ const seconds2 = (Math.round(mean / 100) / 10).toFixed(1);
4023
+ return `measurement run \u2248 ${formatDuration(run(input.passesTest))} (${String(input.tests)} tests \xD7 ${String(input.passesTest)} passes \xD7 ${seconds2} s), thresholds run \u2248 ${formatDuration(run(input.passesThresholds))} (\xD7 ${String(input.passesThresholds)} passes), 1 worker`;
3571
4024
  }
3572
4025
  function msPerTest(report) {
3573
4026
  const executions = report.tests.expected + report.tests.unexpected + report.tests.flaky;
@@ -4182,6 +4635,36 @@ var StepRecorder = class {
4182
4635
  }
4183
4636
  };
4184
4637
 
4638
+ // src/reporter/junit.ts
4639
+ async function writeJunitFile(io, report, dir, build = buildJunitXml) {
4640
+ const path = io.resolvePath(dir, JUNIT_FILE);
4641
+ const hint2 = "Check that report.dir is writable, then run again; set report.junit to false to skip the file.";
4642
+ let xml;
4643
+ try {
4644
+ xml = build(report);
4645
+ } catch (error) {
4646
+ return {
4647
+ issue: {
4648
+ code: "REPORT_JUNIT_WRITE_FAILED",
4649
+ message: `junit.xml could not be built: ${error instanceof Error ? error.stack ?? error.message : String(error)}`,
4650
+ hint: "This is a bug in the package; please report it with the message above. report.json is complete."
4651
+ }
4652
+ };
4653
+ }
4654
+ try {
4655
+ await io.writeTextAtomic(path, xml);
4656
+ return { path };
4657
+ } catch (error) {
4658
+ return {
4659
+ issue: {
4660
+ code: "REPORT_JUNIT_WRITE_FAILED",
4661
+ message: `junit.xml could not be written to ${path}: ${error instanceof Error ? error.message : String(error)}`,
4662
+ hint: hint2
4663
+ }
4664
+ };
4665
+ }
4666
+ }
4667
+
4185
4668
  // src/core/thresholds/constants.ts
4186
4669
  var WILSON_SELF_GAP = 0.01;
4187
4670
  var ERR_SELF_GAP = 0.01;
@@ -4333,7 +4816,7 @@ function entrySelfConsistent(entry, aggregate2, kind2, cfg) {
4333
4816
  var MS_LIMITS = /* @__PURE__ */ new Set(["t", "median", "percentile", "p99"]);
4334
4817
  var TIME_LIMITS = ["median", "percentile", "p99"];
4335
4818
  function isComplete(entry) {
4336
- return chunkIUI4AFE5_cjs.LIMIT_NAMES.every((name) => entry[name] !== void 0);
4819
+ return chunkLEIBG5A4_cjs.LIMIT_NAMES.every((name) => entry[name] !== void 0);
4337
4820
  }
4338
4821
  function limitsOf(entry) {
4339
4822
  return {
@@ -4350,7 +4833,7 @@ function atMost(a, b) {
4350
4833
  return Math.round(a * 1e6) <= Math.round(b * 1e6);
4351
4834
  }
4352
4835
  function withinHysteresis(before, after, hysteresis) {
4353
- return chunkIUI4AFE5_cjs.LIMIT_NAMES.every((name) => {
4836
+ return chunkLEIBG5A4_cjs.LIMIT_NAMES.every((name) => {
4354
4837
  const a = before[name];
4355
4838
  const b = after[name];
4356
4839
  if (a === null || b === null) return a === b;
@@ -4409,11 +4892,11 @@ function refusal(report, cfg, existing) {
4409
4892
  {
4410
4893
  code: "THRESHOLDS_SOURCE_INCOMPLETE",
4411
4894
  message: `The source report is incomplete or untrustworthy (${incomplete.join("; ")}); no thresholds file was written.`,
4412
- hint: `Fix the cause and derive again with \`${chunkIUI4AFE5_cjs.THRESHOLDS_COMMAND}\`: thresholds are derived from complete runs only.`
4895
+ hint: `Fix the cause and derive again with \`${chunkLEIBG5A4_cjs.THRESHOLDS_COMMAND}\`: thresholds are derived from complete runs only.`
4413
4896
  }
4414
4897
  ];
4415
4898
  }
4416
- if (chunkIUI4AFE5_cjs.KINDS.every((kind2) => Object.keys(aggregatesOf(report, kind2)).length === 0)) {
4899
+ if (chunkLEIBG5A4_cjs.KINDS.every((kind2) => Object.keys(aggregatesOf(report, kind2)).length === 0)) {
4417
4900
  return [
4418
4901
  {
4419
4902
  code: "THRESHOLDS_EMPTY_REPORT",
@@ -4422,7 +4905,7 @@ function refusal(report, cfg, existing) {
4422
4905
  }
4423
4906
  ];
4424
4907
  }
4425
- const derivable = chunkIUI4AFE5_cjs.KINDS.some(
4908
+ const derivable = chunkLEIBG5A4_cjs.KINDS.some(
4426
4909
  (kind2) => Object.values(aggregatesOf(report, kind2)).some((stats2) => isDerivable(stats2, cfg.checks))
4427
4910
  );
4428
4911
  if (!derivable) {
@@ -4434,7 +4917,7 @@ function refusal(report, cfg, existing) {
4434
4917
  }
4435
4918
  ];
4436
4919
  }
4437
- const invalid = chunkIUI4AFE5_cjs.KINDS.flatMap((kind2) => {
4920
+ const invalid = chunkLEIBG5A4_cjs.KINDS.flatMap((kind2) => {
4438
4921
  const file = existing[kind2];
4439
4922
  return file.status === "invalid" ? file.issues.map(schemaIssueToIssue) : [];
4440
4923
  });
@@ -4447,7 +4930,7 @@ function generatedBlock(report, cfg, kind2, opts) {
4447
4930
  0
4448
4931
  );
4449
4932
  return {
4450
- tool: { name: chunkIUI4AFE5_cjs.PACKAGE_NAME, version: opts.toolVersion },
4933
+ tool: { name: chunkLEIBG5A4_cjs.PACKAGE_NAME, version: opts.toolVersion },
4451
4934
  env: opts.env,
4452
4935
  sourceRunId: report.runId,
4453
4936
  sourceRunStartedAt: report.startedAt,
@@ -4493,7 +4976,7 @@ function deriveKind(report, cfg, file, opts) {
4493
4976
  return { file: { kind: kind2, content: null, changed: false }, warnings, loosenedMuch: 0 };
4494
4977
  }
4495
4978
  const loaded = file.status === "loaded" ? file : null;
4496
- if (loaded !== null && loaded.file.generated === null) {
4979
+ if (loaded !== null && loaded.file.generated === null && Object.keys(loaded.file.entries).length > 0) {
4497
4980
  warnings.push({
4498
4981
  code: "THRESHOLDS_MANUAL_FILE",
4499
4982
  message: `${loaded.path} was written by hand (generated: null); its complete entries that are not locked are recomputed.`,
@@ -4515,7 +4998,7 @@ function deriveKind(report, cfg, file, opts) {
4515
4998
  }
4516
4999
  if (keysDiffer) {
4517
5000
  hints.push(
4518
- `Another normalization changes the keys: entries of old keys are kept as unseen until removed with \`${chunkIUI4AFE5_cjs.PRUNE_COMMAND}\`.`
5001
+ `Another normalization changes the keys: entries of old keys are kept as unseen until removed with \`${chunkLEIBG5A4_cjs.PRUNE_COMMAND}\`.`
4519
5002
  );
4520
5003
  }
4521
5004
  warnings.push({
@@ -4574,7 +5057,7 @@ function deriveKind(report, cfg, file, opts) {
4574
5057
  };
4575
5058
  }
4576
5059
  function deriveThresholds(report, cfg, existing, opts) {
4577
- for (const kind2 of chunkIUI4AFE5_cjs.KINDS) {
5060
+ for (const kind2 of chunkLEIBG5A4_cjs.KINDS) {
4578
5061
  const found = existing[kind2].kind;
4579
5062
  if (found !== kind2) {
4580
5063
  throw new Error(`deriveThresholds: existing.${kind2} has kind "${found}"`);
@@ -4602,12 +5085,12 @@ function deriveThresholds(report, cfg, existing, opts) {
4602
5085
  warnings.push({
4603
5086
  code: "THRESHOLDS_SOURCE_TEST_MODE",
4604
5087
  message: "The source report comes from test mode, which runs fewer repetitions than a thresholds run.",
4605
- hint: `Prefer a report of a thresholds run (\`${chunkIUI4AFE5_cjs.THRESHOLDS_COMMAND}\`) as the source.`
5088
+ hint: `Prefer a report of a thresholds run (\`${chunkLEIBG5A4_cjs.THRESHOLDS_COMMAND}\`) as the source.`
4606
5089
  });
4607
5090
  }
4608
5091
  const files = [];
4609
5092
  let much = 0;
4610
- for (const kind2 of chunkIUI4AFE5_cjs.KINDS) {
5093
+ for (const kind2 of chunkLEIBG5A4_cjs.KINDS) {
4611
5094
  const file = existing[kind2];
4612
5095
  if (file.status === "invalid") throw new Error("deriveThresholds: unreachable invalid file");
4613
5096
  if ((kind2 !== "api" || !cfg.measure.api) && file.status === "missing") {
@@ -4634,7 +5117,7 @@ function limitChanges(before, after, loosenWarnRelative) {
4634
5117
  const a = limitsOf(before);
4635
5118
  const b = limitsOf(after);
4636
5119
  const changes = [];
4637
- for (const limit of chunkIUI4AFE5_cjs.LIMIT_NAMES) {
5120
+ for (const limit of chunkLEIBG5A4_cjs.LIMIT_NAMES) {
4638
5121
  const direction = changeDirection(limit, a[limit], b[limit]);
4639
5122
  if (direction === null) continue;
4640
5123
  const change = { limit, before: a[limit], after: b[limit], direction };
@@ -4677,7 +5160,7 @@ function keptKey(key2, before, after, stats2, kind2, cfg) {
4677
5160
  }
4678
5161
  const fresh = cfg.thresholds.update === "all" ? deriveEntry(stats2, kind2, cfg) : null;
4679
5162
  const old = limitsOf(before);
4680
- const kept = fresh !== null && chunkIUI4AFE5_cjs.LIMIT_NAMES.some((name) => fresh[name] !== old[name]);
5163
+ const kept = fresh !== null && chunkLEIBG5A4_cjs.LIMIT_NAMES.some((name) => fresh[name] !== old[name]);
4681
5164
  return { key: key2, category: "unchanged", changes: [], ...kept ? { withinHysteresis: true } : {} };
4682
5165
  }
4683
5166
  function diffThresholds(before, after, report, cfg) {
@@ -4710,7 +5193,7 @@ function diffThresholds(before, after, report, cfg) {
4710
5193
  if (muting !== null) diff.muted = { until: muting.until, expired: muting.expired };
4711
5194
  diffs.push(diff);
4712
5195
  }
4713
- const counts = Object.fromEntries(chunkIUI4AFE5_cjs.DIFF_CATEGORIES.map((c) => [c, 0]));
5196
+ const counts = Object.fromEntries(chunkLEIBG5A4_cjs.DIFF_CATEGORIES.map((c) => [c, 0]));
4714
5197
  for (const diff of diffs) counts[diff.category] += 1;
4715
5198
  return {
4716
5199
  kind: kind2,
@@ -4736,15 +5219,15 @@ function formatThresholdsDiffMarkdown(diffs, paths) {
4736
5219
  "",
4737
5220
  `## ${cell(path)} (${diff.fileStatus === "not-written" ? "not written" : diff.fileStatus})`,
4738
5221
  "",
4739
- chunkIUI4AFE5_cjs.diffCountsText(diff)
5222
+ chunkLEIBG5A4_cjs.diffCountsText(diff)
4740
5223
  );
4741
- const listed = diff.keys.filter((k) => chunkIUI4AFE5_cjs.LISTED_CATEGORIES.has(k.category));
5224
+ const listed = diff.keys.filter((k) => chunkLEIBG5A4_cjs.LISTED_CATEGORIES.has(k.category));
4742
5225
  if (listed.length > 0) {
4743
5226
  lines.push("", "| | Key | Before | After |", "|---|---|---|---|");
4744
5227
  for (const k of listed) {
4745
- const before = chunkIUI4AFE5_cjs.diffValuesText(k, "before", diff.level, " \xB7 ");
4746
- const after = chunkIUI4AFE5_cjs.diffValuesText(k, "after", diff.level, " \xB7 ");
4747
- lines.push(`| ${chunkIUI4AFE5_cjs.diffMarker(k)} | ${code(k.key)} | ${cell(before)} | ${cell(after)} |`);
5228
+ const before = chunkLEIBG5A4_cjs.diffValuesText(k, "before", diff.level, " \xB7 ");
5229
+ const after = chunkLEIBG5A4_cjs.diffValuesText(k, "after", diff.level, " \xB7 ");
5230
+ lines.push(`| ${chunkLEIBG5A4_cjs.diffMarker(k)} | ${code(k.key)} | ${cell(before)} | ${cell(after)} |`);
4748
5231
  }
4749
5232
  }
4750
5233
  const skipped2 = diff.keys.filter((k) => k.category === "skipped" && k.samples !== void 0);
@@ -4752,7 +5235,7 @@ function formatThresholdsDiffMarkdown(diffs, paths) {
4752
5235
  lines.push("", "Skipped (no entry derived):", "");
4753
5236
  for (const k of skipped2) {
4754
5237
  if (k.samples !== void 0)
4755
- lines.push(`- ${code(k.key)}: ${chunkIUI4AFE5_cjs.skippedReasonText(k.samples)}`);
5238
+ lines.push(`- ${code(k.key)}: ${chunkLEIBG5A4_cjs.skippedReasonText(k.samples)}`);
4756
5239
  }
4757
5240
  }
4758
5241
  const expired = diff.keys.filter((k) => k.muted?.expired === true);
@@ -4837,37 +5320,101 @@ function plural2(n, word, many = `${word}s`) {
4837
5320
  return `${n} ${n === 1 ? word : many}`;
4838
5321
  }
4839
5322
  function truncateMiddle(text2, width) {
4840
- const chars = Array.from(text2);
4841
- if (chars.length <= width) return text2;
5323
+ if (textWidth(text2) <= width) return text2;
4842
5324
  if (width <= 1) return "\u2026".slice(0, width);
4843
- const head = Math.ceil((width - 1) / 2);
4844
- const tail2 = width - 1 - head;
4845
- return `${chars.slice(0, head).join("")}\u2026${tail2 === 0 ? "" : chars.slice(-tail2).join("")}`;
5325
+ const chars = clusters(text2);
5326
+ const headRoom = Math.ceil((width - 1) / 2);
5327
+ const tailRoom = width - 1 - headRoom;
5328
+ let head = "";
5329
+ let used = 0;
5330
+ for (const c of chars) {
5331
+ if (used + c.width > headRoom) break;
5332
+ head += c.text;
5333
+ used += c.width;
5334
+ }
5335
+ let tail2 = "";
5336
+ used = 0;
5337
+ for (let i = chars.length - 1; i >= 0; i -= 1) {
5338
+ const c = chars[i];
5339
+ if (c === void 0 || used + c.width > tailRoom) break;
5340
+ tail2 = c.text + tail2;
5341
+ used += c.width;
5342
+ }
5343
+ return `${head}\u2026${tail2}`;
4846
5344
  }
4847
5345
  var WIDE = [
4848
5346
  [8986, 8987],
4849
5347
  [9193, 9196],
4850
5348
  [9200, 9200],
4851
5349
  [9203, 9203],
5350
+ [9725, 9726],
5351
+ [9748, 9749],
5352
+ [9800, 9811],
5353
+ [9855, 9855],
5354
+ [9875, 9875],
4852
5355
  [9889, 9889],
5356
+ [9898, 9899],
5357
+ [9917, 9918],
5358
+ [9924, 9925],
5359
+ [9934, 9934],
4853
5360
  [9940, 9940],
5361
+ [9962, 9962],
5362
+ [9970, 9971],
5363
+ [9973, 9973],
5364
+ [9978, 9978],
5365
+ [9981, 9981],
4854
5366
  [9989, 9989],
5367
+ [9994, 9995],
5368
+ [10024, 10024],
4855
5369
  [10060, 10060],
4856
5370
  [10062, 10062],
4857
5371
  [10067, 10069],
4858
5372
  [10071, 10071],
5373
+ [10133, 10135],
5374
+ [10160, 10160],
5375
+ [10175, 10175],
5376
+ [11035, 11036],
4859
5377
  [11088, 11088],
4860
5378
  [11093, 11093],
4861
5379
  [127744, 129791]
4862
5380
  ];
5381
+ var ZERO = [
5382
+ [768, 879],
5383
+ [8203, 8205],
5384
+ [8400, 8447],
5385
+ [65024, 65039],
5386
+ [127995, 127999],
5387
+ [917760, 917999]
5388
+ ];
5389
+ var VS16 = 65039;
5390
+ var ZWJ = 8205;
5391
+ function inRanges(cp, ranges) {
5392
+ return ranges.some(([from, to]) => cp >= from && cp <= to);
5393
+ }
4863
5394
  function charWidth(char) {
4864
5395
  const cp = char.codePointAt(0) ?? 0;
4865
- return WIDE.some(([from, to]) => cp >= from && cp <= to) ? 2 : 1;
5396
+ if (inRanges(cp, ZERO)) return 0;
5397
+ return inRanges(cp, WIDE) ? 2 : 1;
5398
+ }
5399
+ function clusters(text2) {
5400
+ const out = [];
5401
+ let joined = false;
5402
+ for (const char of text2) {
5403
+ const cp = char.codePointAt(0) ?? 0;
5404
+ const last = out[out.length - 1];
5405
+ if (last !== void 0 && (joined || charWidth(char) === 0)) {
5406
+ last.text += char;
5407
+ if (cp === VS16) last.width = 2;
5408
+ joined = cp === ZWJ;
5409
+ continue;
5410
+ }
5411
+ out.push({ text: char, width: charWidth(char) });
5412
+ joined = false;
5413
+ }
5414
+ return out;
4866
5415
  }
4867
5416
  function textWidth(text2) {
4868
- let width = 0;
4869
- for (const char of text2) width += charWidth(char);
4870
- return width;
5417
+ return clusters(text2).reduce((sum3, c) => sum3 + c.width, 0);
4871
5418
  }
4872
5419
  function padEnd(text2, width) {
4873
5420
  return text2 + " ".repeat(Math.max(0, width - textWidth(text2)));
@@ -4887,9 +5434,8 @@ function cellsOf(line) {
4887
5434
  const spans = line.spans ?? [{ text: line.text ?? "", style: line.style }];
4888
5435
  const cells = [];
4889
5436
  for (const span of spans) {
4890
- for (const char of span.text) {
4891
- cells.push({ char, style: span.style, width: charWidth(char) });
4892
- }
5437
+ for (const c of clusters(span.text))
5438
+ cells.push({ char: c.text, style: span.style, width: c.width });
4893
5439
  }
4894
5440
  return cells;
4895
5441
  }
@@ -4978,14 +5524,22 @@ function boxLines(lines, opts) {
4978
5524
  out.push(border(`${g.bl}${g.h.repeat(inner + 2)}${g.br}`));
4979
5525
  return out;
4980
5526
  }
4981
- function box(lines, opts) {
4982
- return `${boxLines(lines, opts).join("\n")}
4983
- `;
5527
+ function cutText(text2, width) {
5528
+ if (textWidth(text2) <= width) return text2;
5529
+ let out = "";
5530
+ let used = 0;
5531
+ for (const c of clusters(text2)) {
5532
+ if (used + c.width > width - 1) break;
5533
+ out += c.text;
5534
+ used += c.width;
5535
+ }
5536
+ return `${out}\u2026`;
4984
5537
  }
4985
5538
  function table(columns, rows, opts) {
4986
5539
  const g = opts.ascii ? { v: "|", h: "-", top: ["+", "+", "+"], mid: ["+", "+", "+"], bottom: ["+", "+", "+"] } : { v: "\u2502", h: "\u2500", top: ["\u250C", "\u252C", "\u2510"], mid: ["\u251C", "\u253C", "\u2524"], bottom: ["\u2514", "\u2534", "\u2518"] };
5540
+ const header3 = opts.header !== false;
4987
5541
  const natural = columns.map(
4988
- (c, i) => Math.max(textWidth(c.header), ...rows.map((r2) => textWidth(r2.cells[i] ?? "")))
5542
+ (c, i) => Math.max(header3 ? textWidth(c.header) : 0, ...rows.map((r2) => textWidth(r2.cells[i] ?? "")))
4989
5543
  );
4990
5544
  const overhead = 3 * columns.length + 1;
4991
5545
  const widths = columns.map((c, i) => {
@@ -4993,26 +5547,45 @@ function table(columns, rows, opts) {
4993
5547
  const others = natural.reduce((sum3, w, j) => j === i ? sum3 : sum3 + w, 0);
4994
5548
  return Math.max(c.minWidth ?? 1, Math.min(natural[i] ?? 0, opts.width - overhead - others));
4995
5549
  });
4996
- const dim = (text2) => paint(text2, "dim", opts.color);
4997
- const rule = ([left, cross, right]) => dim(`${left}${widths.map((w) => g.h.repeat(w + 2)).join(cross)}${right}`);
4998
- const line = (cells, style) => {
5550
+ let title2 = opts.title ?? "";
5551
+ if (title2 !== "") {
5552
+ const inner = () => widths.reduce((sum3, w) => sum3 + w + 3, -1);
5553
+ const room = Math.max(1, opts.width - 2 - 4);
5554
+ title2 = cutText(title2, room);
5555
+ const need = textWidth(title2) + 4 - inner();
5556
+ const last = widths.length - 1;
5557
+ if (need > 0 && last >= 0) widths[last] = (widths[last] ?? 0) + need;
5558
+ }
5559
+ const border = opts.border ?? "dim";
5560
+ const edge = (text2) => paint(text2, border, opts.color);
5561
+ const ruleText = ([left, cross, right]) => `${left}${widths.map((w) => g.h.repeat(w + 2)).join(cross)}${right}`;
5562
+ const rule = (marks2) => edge(ruleText(marks2));
5563
+ const top = () => {
5564
+ if (title2 === "") return rule(g.top);
5565
+ const rest = ruleText(g.top).slice(textWidth(title2) + 4);
5566
+ return `${edge(`${g.top[0] ?? ""}${g.h} `)}${paint(title2, "bold", opts.color)}${edge(` ${rest}`)}`;
5567
+ };
5568
+ const line = (cells, style, cellStyles = []) => {
4999
5569
  const texts = columns.map((c, i) => {
5000
5570
  const w = widths[i] ?? 0;
5001
5571
  const raw = cells[i] ?? "";
5002
5572
  const text2 = c.flex === true ? truncateMiddle(raw, w) : raw;
5003
5573
  const padded = c.align === "right" ? padStart(text2, w) : padEnd(text2, w);
5004
- return style === void 0 ? padded : paint(padded, style, opts.color);
5574
+ const cellStyle = cellStyles[i] ?? style ?? c.style;
5575
+ return cellStyle === void 0 ? padded : paint(padded, cellStyle, opts.color);
5005
5576
  });
5006
- return `${dim(g.v)} ${texts.join(` ${dim(g.v)} `)} ${dim(g.v)}`;
5577
+ return `${edge(g.v)} ${texts.join(` ${edge(g.v)} `)} ${edge(g.v)}`;
5007
5578
  };
5008
5579
  return [
5009
- rule(g.top),
5010
- line(
5011
- columns.map((c) => c.header),
5012
- "bold"
5013
- ),
5014
- rule(g.mid),
5015
- ...rows.map((r2) => line(r2.cells, r2.style)),
5580
+ top(),
5581
+ ...header3 ? [
5582
+ line(
5583
+ columns.map((c) => c.header),
5584
+ "bold"
5585
+ ),
5586
+ rule(g.mid)
5587
+ ] : [],
5588
+ ...rows.map((r2) => line(r2.cells, r2.style, r2.cellStyles)),
5016
5589
  rule(g.bottom)
5017
5590
  ];
5018
5591
  }
@@ -5021,6 +5594,7 @@ function table(columns, rows, opts) {
5021
5594
  var MAX_WARNINGS = 10;
5022
5595
  var MAX_VIOLATION_ROWS = 20;
5023
5596
  var MAX_SLOWEST_LINES = 5;
5597
+ var MAX_DEFAULT_ROWS = 10;
5024
5598
  var MIN_KEY_WIDTH = 30;
5025
5599
  var KIND_LABEL = { api: "Endpoints", step: "Steps" };
5026
5600
  var ALWAYS_SHOWN = /* @__PURE__ */ new Set(["api"]);
@@ -5031,7 +5605,7 @@ function aggregatesOf2(report, kind2) {
5031
5605
  };
5032
5606
  return byKind[kind2];
5033
5607
  }
5034
- var RULE_ORDER2 = [
5608
+ var RULE_ORDER3 = [
5035
5609
  "median",
5036
5610
  "percentile",
5037
5611
  "p99",
@@ -5039,33 +5613,9 @@ var RULE_ORDER2 = [
5039
5613
  "wilson",
5040
5614
  "errors"
5041
5615
  ];
5042
- var TIME_RULES3 = /* @__PURE__ */ new Set([
5043
- "median",
5044
- "percentile",
5045
- "p99"
5046
- ]);
5047
- function exceedance(check2) {
5048
- if (check2.rule === "apdex") return check2.actual === 0 ? Infinity : check2.limit / check2.actual;
5049
- return check2.limit === 0 ? Infinity : check2.actual / check2.limit;
5050
- }
5051
- var SHARE_RULES = /* @__PURE__ */ new Set([
5052
- "apdex",
5053
- "wilson",
5054
- "errors"
5055
- ]);
5056
- function overText(check2) {
5057
- if (SHARE_RULES.has(check2.rule)) {
5058
- const points = Math.max(1, Math.round(Math.abs(check2.actual - check2.limit) * 100));
5059
- return `+${String(points)} pp`;
5060
- }
5061
- const r2 = exceedance(check2);
5062
- if (!Number.isFinite(r2)) return ">999%";
5063
- const over = Math.round((r2 - 1) * 100);
5064
- return over > 999 ? ">999%" : `+${over}%`;
5065
- }
5066
5616
  function violations(report) {
5067
5617
  const list2 = [];
5068
- for (const kind2 of chunkIUI4AFE5_cjs.KINDS) {
5618
+ for (const kind2 of chunkLEIBG5A4_cjs.KINDS) {
5069
5619
  const aggregates = aggregatesOf2(report, kind2);
5070
5620
  for (const [key2, aggregate2] of Object.entries(aggregates)) {
5071
5621
  for (const check2 of aggregate2.evaluation.checks) {
@@ -5076,7 +5626,7 @@ function violations(report) {
5076
5626
  }
5077
5627
  }
5078
5628
  return list2.sort(
5079
- (a, b) => Number(b.check.blocking) - Number(a.check.blocking) || (a.r === b.r ? 0 : b.r > a.r ? 1 : -1) || chunkIUI4AFE5_cjs.KINDS.indexOf(a.kind) - chunkIUI4AFE5_cjs.KINDS.indexOf(b.kind) || compareText7(a.key, b.key) || RULE_ORDER2.indexOf(a.check.rule) - RULE_ORDER2.indexOf(b.check.rule)
5629
+ (a, b) => Number(b.check.blocking) - Number(a.check.blocking) || (a.r === b.r ? 0 : b.r > a.r ? 1 : -1) || chunkLEIBG5A4_cjs.KINDS.indexOf(a.kind) - chunkLEIBG5A4_cjs.KINDS.indexOf(b.kind) || compareText7(a.key, b.key) || RULE_ORDER3.indexOf(a.check.rule) - RULE_ORDER3.indexOf(b.check.rule)
5080
5630
  );
5081
5631
  }
5082
5632
  function isMuted(evaluation) {
@@ -5105,9 +5655,9 @@ function issueBox(level, issues, limit, opts) {
5105
5655
  const indent = textWidth(mark) + 1;
5106
5656
  const lines = [];
5107
5657
  for (const issue2 of issues.slice(0, limit)) {
5108
- const times2 = issue2.count !== void 0 && issue2.count > 1 ? ` (\xD7${issue2.count})` : "";
5658
+ const times = issue2.count !== void 0 && issue2.count > 1 ? ` (\xD7${issue2.count})` : "";
5109
5659
  lines.push({
5110
- spans: [{ text: `${mark} ${issue2.code}`, style }, { text: `: ${issue2.message}${times2}` }],
5660
+ spans: [{ text: `${mark} ${issue2.code}`, style }, { text: `: ${issue2.message}${times}` }],
5111
5661
  indent
5112
5662
  });
5113
5663
  if (issue2.hint !== void 0) {
@@ -5136,7 +5686,7 @@ function issueBox(level, issues, limit, opts) {
5136
5686
  }
5137
5687
  function counterLines(report, opts) {
5138
5688
  const counts = report.evaluation.counts;
5139
- const shown = chunkIUI4AFE5_cjs.KINDS.filter(
5689
+ const shown = chunkLEIBG5A4_cjs.KINDS.filter(
5140
5690
  (kind2) => ALWAYS_SHOWN.has(kind2) || counts[kind2].keys > 0 || counts[kind2].unseenThresholdEntries > 0
5141
5691
  );
5142
5692
  const percentileOff = report.config.checks?.time?.percentile?.enabled === false;
@@ -5160,7 +5710,7 @@ function counterLines(report, opts) {
5160
5710
  function mutedLines(report, paint2) {
5161
5711
  const lines = [];
5162
5712
  const indent = " ".repeat("Muted: ".length);
5163
- for (const kind2 of chunkIUI4AFE5_cjs.KINDS) {
5713
+ for (const kind2 of chunkLEIBG5A4_cjs.KINDS) {
5164
5714
  const aggregates = aggregatesOf2(report, kind2);
5165
5715
  for (const key2 of Object.keys(aggregates).sort(compareText7)) {
5166
5716
  const muted = aggregates[key2]?.evaluation.muted;
@@ -5171,16 +5721,73 @@ function mutedLines(report, paint2) {
5171
5721
  }
5172
5722
  return lines;
5173
5723
  }
5174
- function formatTime(ms2) {
5175
- return `${Math.round(ms2)} ms`;
5176
- }
5177
- function formatActual(check2) {
5178
- if (TIME_RULES3.has(check2.rule)) return formatTime(check2.actual);
5179
- const observed = check2.observed === null ? "" : ` (${check2.observed.toFixed(3)})`;
5180
- return `${check2.actual.toFixed(3)}${observed}`;
5724
+ function keysOnDefaults(report) {
5725
+ if (report.mode !== "test") return [];
5726
+ const list2 = [];
5727
+ for (const kind2 of chunkLEIBG5A4_cjs.KINDS) {
5728
+ const file = report.thresholdFiles.find((f) => f.kind === kind2);
5729
+ if (file?.status !== "loaded") continue;
5730
+ const aggregates = Object.entries(aggregatesOf2(report, kind2));
5731
+ const hasEntries = file.unseenKeys.length > 0 || aggregates.some(([, a]) => a.evaluation.thresholdSource === "file");
5732
+ if (!hasEntries) continue;
5733
+ for (const [key2, aggregate2] of aggregates) {
5734
+ const e = aggregate2.evaluation;
5735
+ if (e.thresholdSource !== "default" || e.result === "not-evaluated") continue;
5736
+ const failed = e.checks.filter((c) => !c.passed);
5737
+ const rank = failed.some((c) => c.blocking) ? 2 : failed.length > 0 ? 1 : 0;
5738
+ list2.push({ kind: kind2, key: key2, aggregate: aggregate2, rank });
5739
+ }
5740
+ }
5741
+ return list2.sort(
5742
+ (a, b) => b.rank - a.rank || chunkLEIBG5A4_cjs.KINDS.indexOf(a.kind) - chunkLEIBG5A4_cjs.KINDS.indexOf(b.kind) || compareText7(a.key, b.key)
5743
+ );
5181
5744
  }
5182
- function formatLimit(check2) {
5183
- return TIME_RULES3.has(check2.rule) ? formatTime(check2.limit) : check2.limit.toFixed(3);
5745
+ function defaultKeyLines(report, opts, m, paint2) {
5746
+ const list2 = keysOnDefaults(report);
5747
+ if (list2.length === 0) return [];
5748
+ const level = report.config.checks?.time?.percentile?.level ?? "percentile";
5749
+ const ms2 = (value) => value === void 0 ? "\u2014" : formatMs(value);
5750
+ const columns = [
5751
+ { header: "" },
5752
+ { header: "kind" },
5753
+ { header: "key", flex: true, minWidth: MIN_KEY_WIDTH },
5754
+ { header: "n", align: "right" },
5755
+ { header: "median", align: "right" },
5756
+ { header: level, align: "right" },
5757
+ { header: "limit", align: "right" },
5758
+ { header: "result" }
5759
+ ];
5760
+ const shown = list2.slice(0, MAX_DEFAULT_ROWS);
5761
+ const rows = shown.map(({ kind: kind2, key: key2, aggregate: aggregate2, rank }) => {
5762
+ const limits = aggregate2.evaluation.limits;
5763
+ const percentiles = aggregate2.stats?.percentiles;
5764
+ return {
5765
+ cells: [
5766
+ rank === 2 ? m.error : rank === 1 ? m.warn : m.ok,
5767
+ kind2,
5768
+ key2,
5769
+ String(aggregate2.successCount),
5770
+ ms2(percentiles?.["p50"]),
5771
+ ms2(percentiles?.[level]),
5772
+ `${Math.round(limits.median)} / ${formatMs(limits.percentile)}`,
5773
+ rank === 0 ? "pass" : "fail"
5774
+ ],
5775
+ ...rank === 2 ? { style: "red" } : rank === 1 ? { style: "yellow" } : {}
5776
+ };
5777
+ });
5778
+ const lines = [
5779
+ paint2("On default thresholds (no entry in the thresholds file):", "bold"),
5780
+ ...table(columns, rows, opts)
5781
+ ];
5782
+ if (list2.length > shown.length) {
5783
+ const more = plural2(
5784
+ list2.length - shown.length,
5785
+ "more key on default thresholds",
5786
+ "more keys on default thresholds"
5787
+ );
5788
+ lines.push(paint2(` \u2026 and ${more} (see report)`, "dim"));
5789
+ }
5790
+ return [...lines, ""];
5184
5791
  }
5185
5792
  function tableLines(report, list2, opts, m, paint2) {
5186
5793
  const level = report.config.checks?.time?.percentile?.level ?? "percentile";
@@ -5232,7 +5839,7 @@ function slowestLines(report, list2) {
5232
5839
  if (slowest === void 0) continue;
5233
5840
  const t = slowest.test;
5234
5841
  lines.push(
5235
- ` slowest: ${v.key} \u2014 ${formatTime(slowest.duration)} in "${t.title}" (${t.file}:${t.line})`
5842
+ ` slowest: ${v.key} \u2014 ${formatMs(slowest.duration)} in "${t.title}" (${t.file}:${t.line})`
5236
5843
  );
5237
5844
  }
5238
5845
  return lines;
@@ -5256,8 +5863,8 @@ function errorCauses(report) {
5256
5863
  }
5257
5864
  function resultLines(report, opts, m) {
5258
5865
  const counts = report.evaluation.counts;
5259
- const sum3 = (field3) => chunkIUI4AFE5_cjs.KINDS.reduce((total, kind2) => total + counts[kind2][field3], 0);
5260
- const failed = (blocking) => chunkIUI4AFE5_cjs.KINDS.reduce(
5866
+ const sum3 = (field3) => chunkLEIBG5A4_cjs.KINDS.reduce((total, kind2) => total + counts[kind2][field3], 0);
5867
+ const failed = (blocking) => chunkLEIBG5A4_cjs.KINDS.reduce(
5261
5868
  (total, kind2) => total + Object.values(aggregatesOf2(report, kind2)).reduce(
5262
5869
  (n, a) => n + a.evaluation.checks.filter((c) => !c.passed && (!blocking || c.blocking)).length,
5263
5870
  0
@@ -5342,6 +5949,7 @@ function formatSummary(report, opts) {
5342
5949
  lines.push(...issueBox("error", report.toolErrors, Infinity, frame));
5343
5950
  lines.push(...issueBox("warning", report.warnings, MAX_WARNINGS, frame));
5344
5951
  lines.push(...counterLines(report, frame), ...mutedLines(report, paint2), "");
5952
+ lines.push(...defaultKeyLines(report, frame, m, paint2));
5345
5953
  if (list2.length > 0) {
5346
5954
  lines.push(...tableLines(report, list2, frame, m, paint2));
5347
5955
  const slowest = slowestLines(report, list2);
@@ -5429,36 +6037,40 @@ var TITLES = {
5429
6037
  function names(list2) {
5430
6038
  return list2.map((n) => n === "" ? "(default)" : n).join(", ");
5431
6039
  }
5432
- var LABEL = 10;
5433
6040
  function formatStartBanner(input, opts) {
5434
- const row = (label, value) => ({
5435
- text: `${label.padEnd(LABEL)}${value}`
5436
- });
5437
- const icon2 = opts.ascii ? "" : "\u23F1\uFE0F ";
5438
- const lines = [
5439
- { text: `${icon2}${input.packageName} \xB7 ${TITLES[input.mode]}`, style: "bold" }
5440
- ];
6041
+ const rows = [];
5441
6042
  const deps = input.dependencies.length > 0 ? ` (setup: ${names(input.dependencies)})` : "";
5442
- lines.push(row("Projects", `${names(input.measured)}${deps}`));
6043
+ rows.push(["Projects", `${names(input.measured)}${deps}`]);
5443
6044
  if (input.mode === "check") {
5444
- lines.push(
5445
- row(
5446
- "Tests",
5447
- `${plural2(input.tests, "test")}; the first test of each file runs once, at most ${String(input.maxTests ?? input.tests)}`
5448
- )
5449
- );
6045
+ rows.push([
6046
+ "Tests",
6047
+ `${plural2(input.tests, "test")}; the first test of each file runs once, at most ${String(input.maxTests ?? input.tests)}`
6048
+ ]);
5450
6049
  } else {
5451
- lines.push(
5452
- row(
5453
- "Tests",
5454
- `${plural2(input.tests, "test")} \xD7 ${plural2(input.passes, "pass", "passes")} = ${plural2(input.tests * input.passes, "test run")}`
5455
- )
5456
- );
6050
+ rows.push([
6051
+ "Tests",
6052
+ `${plural2(input.tests, "test")} \xD7 ${plural2(input.passes, "pass", "passes")} = ${plural2(input.tests * input.passes, "test run")}`
6053
+ ]);
5457
6054
  }
5458
- if (input.estimate !== null) lines.push(row("Estimate", input.estimate));
5459
- lines.push(row("Report", input.report ?? "no files are written"));
5460
- if (input.tip) lines.push(row("Tip", "measure a subset, e.g. --grep @perf"));
5461
- return box(lines, { ...opts, border: "cyan" });
6055
+ if (input.estimate !== null) rows.push(["Estimate", input.estimate]);
6056
+ rows.push(["Report", input.report ?? "no files are written"]);
6057
+ if (input.tip) rows.push(["Tip", "measure a subset, e.g. --grep @perf"]);
6058
+ const icon2 = opts.ascii ? "" : "\u23F3 ";
6059
+ const lines = table(
6060
+ [
6061
+ { header: "", style: "bold" },
6062
+ { header: "", flex: true, minWidth: 10 }
6063
+ ],
6064
+ rows.map((cells) => ({ cells })),
6065
+ {
6066
+ ...opts,
6067
+ border: "cyan",
6068
+ header: false,
6069
+ title: `${icon2}${input.packageName} \xB7 ${TITLES[input.mode]}`
6070
+ }
6071
+ );
6072
+ return `${lines.join("\n")}
6073
+ `;
5462
6074
  }
5463
6075
 
5464
6076
  // src/console/thresholds-diff.ts
@@ -5472,57 +6084,56 @@ var MARKER_STYLE = {
5472
6084
  "\u2193": "green",
5473
6085
  "\xB1": "yellow"
5474
6086
  };
6087
+ function markerStyle(marker) {
6088
+ if (marker.length > 1) return "red";
6089
+ return MARKER_STYLE[marker] ?? "yellow";
6090
+ }
5475
6091
  function fileLines(diff, path, opts, paint2) {
5476
6092
  const lines = [`Thresholds: ${path} (${fileStatusText(diff)})`];
5477
- const listed = diff.keys.filter((k) => chunkIUI4AFE5_cjs.LISTED_CATEGORIES.has(k.category));
6093
+ const listed = diff.keys.filter((k) => chunkLEIBG5A4_cjs.LISTED_CATEGORIES.has(k.category));
5478
6094
  const expired = diff.keys.filter((k) => k.muted?.expired === true);
5479
- if (diff.fileStatus !== "unchanged") lines.push(` ${chunkIUI4AFE5_cjs.diffCountsText(diff)}`);
6095
+ if (diff.fileStatus !== "unchanged") lines.push(` ${chunkLEIBG5A4_cjs.diffCountsText(diff)}`);
6096
+ const tableOpts = { width: opts.width, color: opts.color, ascii: opts.ascii === true };
5480
6097
  const shown = listed.slice(0, MAX_DIFF_ROWS);
5481
- const rows = shown.map((k) => ({
5482
- marker: chunkIUI4AFE5_cjs.diffMarker(k),
5483
- key: k.key,
5484
- change: chunkIUI4AFE5_cjs.diffChangeText(k, diff.level, " ") + mutedSuffix(k)
5485
- }));
5486
- const skipped2 = diff.keys.filter((k) => k.category === "skipped" && k.samples !== void 0);
5487
- const skippedRows = skipped2.slice(0, MAX_SKIPPED_ROWS).map((k) => ({
5488
- marker: ".",
5489
- key: k.key,
5490
- change: k.samples === void 0 ? "" : chunkIUI4AFE5_cjs.skippedReasonText(k.samples)
5491
- }));
5492
- const all = [...rows, ...skippedRows];
5493
- if (all.length > 0) {
5494
- const markerWidth = Math.max(...all.map((r2) => textWidth(r2.marker)));
5495
- const changeWidth = Math.max(...all.map((r2) => textWidth(r2.change)));
5496
- const longest = Math.max(...all.map((r2) => textWidth(r2.key)));
5497
- const rest = opts.width - 2 - markerWidth - 1 - 2 - changeWidth;
5498
- const keyWidth = Math.max(MIN_KEY_WIDTH2, Math.min(longest, rest));
5499
- const line = (r2, marker) => {
5500
- const pad2 = " ".repeat(markerWidth - textWidth(r2.marker));
5501
- return ` ${marker}${pad2} ${padEnd(truncateMiddle(r2.key, keyWidth), keyWidth)} ${r2.change}`.trimEnd();
5502
- };
5503
- if (rows.length > 0) {
5504
- lines.push("");
5505
- for (const r2 of rows) {
5506
- const head = r2.marker.slice(0, 1);
5507
- const style = MARKER_STYLE[head] ?? "yellow";
5508
- lines.push(
5509
- line(
5510
- r2,
5511
- paint2(head, style) + (r2.marker.length > 1 ? paint2(r2.marker.slice(1), "red") : "")
5512
- )
5513
- );
5514
- }
5515
- if (listed.length > shown.length) {
5516
- lines.push(` \u2026 and ${listed.length - shown.length} more`);
5517
- }
6098
+ if (shown.length > 0) {
6099
+ lines.push("");
6100
+ lines.push(
6101
+ ...table(
6102
+ [
6103
+ { header: "" },
6104
+ { header: "key", flex: true, minWidth: MIN_KEY_WIDTH2 },
6105
+ { header: "change" }
6106
+ ],
6107
+ shown.map((k) => {
6108
+ const marker = chunkLEIBG5A4_cjs.diffMarker(k);
6109
+ return {
6110
+ cells: [marker, k.key, chunkLEIBG5A4_cjs.diffChangeText(k, diff.level, " ") + mutedSuffix(k)],
6111
+ cellStyles: [markerStyle(marker)]
6112
+ };
6113
+ }),
6114
+ tableOpts
6115
+ )
6116
+ );
6117
+ if (listed.length > shown.length) {
6118
+ lines.push(paint2(` \u2026 and ${String(listed.length - shown.length)} more`, "dim"));
5518
6119
  }
5519
- if (skippedRows.length > 0) {
5520
- lines.push("");
5521
- for (const r2 of skippedRows) lines.push(line(r2, r2.marker));
5522
- if (skipped2.length > skippedRows.length) {
5523
- const more = ` \u2026 and ${String(skipped2.length - skippedRows.length)} more skipped`;
5524
- lines.push(opts.diffPath === null ? more : `${more} (see thresholds-diff.md)`);
5525
- }
6120
+ }
6121
+ const skipped2 = diff.keys.filter((k) => k.category === "skipped" && k.samples !== void 0);
6122
+ const skippedShown = skipped2.slice(0, MAX_SKIPPED_ROWS);
6123
+ if (skippedShown.length > 0) {
6124
+ lines.push("");
6125
+ lines.push(
6126
+ ...table(
6127
+ [{ header: "skipped", flex: true, minWidth: MIN_KEY_WIDTH2 }, { header: "reason" }],
6128
+ skippedShown.map((k) => ({
6129
+ cells: [k.key, k.samples === void 0 ? "" : chunkLEIBG5A4_cjs.skippedReasonText(k.samples)]
6130
+ })),
6131
+ tableOpts
6132
+ )
6133
+ );
6134
+ if (skipped2.length > skippedShown.length) {
6135
+ const more = ` \u2026 and ${String(skipped2.length - skippedShown.length)} more skipped`;
6136
+ lines.push(paint2(opts.diffPath === null ? more : `${more} (see thresholds-diff.md)`, "dim"));
5526
6137
  }
5527
6138
  }
5528
6139
  if (expired.length > 0) {
@@ -5649,7 +6260,7 @@ function html(strings, ...values) {
5649
6260
  }
5650
6261
 
5651
6262
  // src/html/format.ts
5652
- function formatMs(value) {
6263
+ function formatMs2(value) {
5653
6264
  if (value >= 1e4) return `${(Math.round(value / 100) / 10).toFixed(1)} s`;
5654
6265
  if (value < 10) return `${(Math.round(value * 10) / 10).toFixed(1)} ms`;
5655
6266
  return `${Math.round(value)} ms`;
@@ -5657,8 +6268,8 @@ function formatMs(value) {
5657
6268
  function formatRatio(value) {
5658
6269
  return value.toFixed(3);
5659
6270
  }
5660
- function formatPercent(share) {
5661
- return `${(Math.round(share * 1e3) / 10).toFixed(1)}%`;
6271
+ function formatPercent(share2) {
6272
+ return `${(Math.round(share2 * 1e3) / 10).toFixed(1)}%`;
5662
6273
  }
5663
6274
  function pad(n) {
5664
6275
  return String(n).padStart(2, "0");
@@ -5693,14 +6304,18 @@ function truncateMiddle2(text2, max) {
5693
6304
  function basisPoints(usage) {
5694
6305
  return Math.round(usage * 1e4);
5695
6306
  }
6307
+ var NEAR_LIMIT_BP = 9e3;
5696
6308
  function usagePercent(usage) {
5697
- return Math.floor(basisPoints(usage) / 100);
6309
+ const bp = basisPoints(usage);
6310
+ const pct = Math.round(bp / 100);
6311
+ if (bp < NEAR_LIMIT_BP) return Math.min(89, pct);
6312
+ return bp <= 1e4 ? Math.min(100, pct) : pct;
5698
6313
  }
5699
6314
  function overPercent(usage) {
5700
- return Math.max(1, Math.ceil((basisPoints(usage) - 1e4) / 100));
6315
+ return Math.max(1, Math.round((basisPoints(usage) - 1e4) / 100));
5701
6316
  }
5702
- function usageText(usage, failed, long = false, points) {
5703
- if (failed && points !== void 0) return `+${String(points)} pp over`;
6317
+ function usageText(usage, failed, long = false, over) {
6318
+ if (failed && over !== void 0) return `${over} over`;
5704
6319
  if (usage === null) return "over (limit 0)";
5705
6320
  const suffix = long ? " of limit" : "";
5706
6321
  if (basisPoints(usage) >= 1e5) return `>999%${suffix}`;
@@ -5712,11 +6327,11 @@ function usageText(usage, failed, long = false, points) {
5712
6327
  var METHODS = /* @__PURE__ */ new Set(["GET", "POST", "PUT", "PATCH", "DELETE"]);
5713
6328
  var STEP_SEPARATOR2 = " \u203A ";
5714
6329
  function endpointSource(key2) {
5715
- return chunkIUI4AFE5_cjs.isRequestKey(key2) ? "request" : "browser";
6330
+ return chunkLEIBG5A4_cjs.isRequestKey(key2) ? "request" : "browser";
5716
6331
  }
5717
6332
  function splitEndpoint(key2) {
5718
- const request = chunkIUI4AFE5_cjs.isRequestKey(key2);
5719
- const text2 = request ? key2.slice(chunkIUI4AFE5_cjs.REQUEST_KEY_PREFIX.length) : key2;
6333
+ const request = chunkLEIBG5A4_cjs.isRequestKey(key2);
6334
+ const text2 = request ? key2.slice(chunkLEIBG5A4_cjs.REQUEST_KEY_PREFIX.length) : key2;
5720
6335
  const space = text2.indexOf(" ");
5721
6336
  if (space <= 0) return { method: "", origin: "", path: text2, request };
5722
6337
  const method = text2.slice(0, space);
@@ -5732,11 +6347,15 @@ function pathView(path) {
5732
6347
  function methodBadge(method) {
5733
6348
  return METHODS.has(method) ? html`<b class="m ${method}">${method}</b>` : html`<b class="m">${method}</b>`;
5734
6349
  }
5735
- function endpointView(key2, max, full) {
6350
+ function originToken(label, origins) {
6351
+ const address = origins?.find((o) => o.label === label)?.origin;
6352
+ return html`<span class="o" title="${address === void 0 ? "origin label" : `origin label: ${address}`}">${label}</span>`;
6353
+ }
6354
+ function endpointView(key2, max, full, origins) {
5736
6355
  const { method, origin, path, request } = splitEndpoint(key2);
5737
6356
  const room = Math.max(8, max - method.length - 1 - origin.length - (request ? 8 : 0));
5738
6357
  const short = truncateMiddle2(path, room);
5739
- return html`${request ? html`<span class="rq">request</span> ` : null}${method === "" ? null : html`${methodBadge(method)} `}<span class="key"${short === path && !full ? null : html` title="${key2}"`}>${origin === "" ? null : html`<span class="o">${origin}</span>`}${pathView(short)}</span>`;
6358
+ return html`${request ? html`<span class="rq">request</span> ` : null}${method === "" ? null : html`${methodBadge(method)} `}<span class="key"${short === path && !full ? null : html` title="${key2}"`}>${origin === "" ? null : originToken(origin, origins)}${pathView(short)}</span>`;
5740
6359
  }
5741
6360
  function stepView(key2, max, full) {
5742
6361
  const short = truncateMiddle2(key2, max);
@@ -5744,8 +6363,8 @@ function stepView(key2, max, full) {
5744
6363
  const last = titles.pop() ?? "";
5745
6364
  return html`<span class="key st"${short === key2 && !full ? null : html` title="${key2}"`}>${titles.map((t) => html`<s>${t}${STEP_SEPARATOR2}</s>`)}<b>${last}</b></span>`;
5746
6365
  }
5747
- function keyView(kind2, key2, max, full = false) {
5748
- return kind2 === "step" ? stepView(key2, max, full) : endpointView(key2, max, full);
6366
+ function keyView(kind2, key2, max, full = false, origins) {
6367
+ return kind2 === "step" ? stepView(key2, max, full) : endpointView(key2, max, full, origins);
5749
6368
  }
5750
6369
  function stepDepth(key2) {
5751
6370
  const depth = Math.min(3, key2.split(STEP_SEPARATOR2).length);
@@ -5800,6 +6419,21 @@ function topCheck(checks) {
5800
6419
  }
5801
6420
  return top;
5802
6421
  }
6422
+ var RULE_ORDER4 = [
6423
+ "median",
6424
+ "percentile",
6425
+ "p99",
6426
+ "apdex",
6427
+ "wilson",
6428
+ "errors"
6429
+ ];
6430
+ function decidingCheck(checks) {
6431
+ const failed = [...checks].filter((c) => !c.passed).sort((a, b) => RULE_ORDER4.indexOf(a.rule) - RULE_ORDER4.indexOf(b.rule));
6432
+ return failed.find((c) => c.blocking && c.hardLimitExceeded) ?? topCheck(failed.filter((c) => c.blocking)) ?? topCheck(failed);
6433
+ }
6434
+ function keyCheck(checks) {
6435
+ return decidingCheck(checks) ?? topCheck(checks);
6436
+ }
5803
6437
  function aggregatesOf3(data, kind2) {
5804
6438
  const byKind = {
5805
6439
  api: data.endpoints,
@@ -5831,13 +6465,13 @@ function keyAnchor(ctx, kind2, key2) {
5831
6465
  var KEY_COLUMN_MAX = 80;
5832
6466
  function keyLink(ctx, kind2, key2, max = KEY_COLUMN_MAX, full = false) {
5833
6467
  const anchor = keyAnchor(ctx, kind2, key2);
5834
- const view = keyView(kind2, key2, max, full);
6468
+ const view = keyView(kind2, key2, max, full, ctx.report.origins);
5835
6469
  return anchor === null ? html`<span class="kl">${view}</span>` : html`<a class="kl" href="#${anchor}">${view}</a>`;
5836
6470
  }
5837
6471
 
5838
6472
  // src/html/generated/assets.ts
5839
- var STYLES = ':root{--sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;--bg: #f6f7f9;--surface: #ffffff;--sunken: #f1f3f6;--hover: #f7f8fb;--line: #e4e7ec;--line-2: #d0d5dd;--fg: #101828;--fg-2: #475467;--fg-3: #5d6979;--accent: #4f46e5;--accent-2: #4338ca;--accent-soft: #eef0ff;--ok: #067647;--ok-soft: #e6f6ee;--ok-mark: #079455;--warn: #a14c05;--warn-soft: #fef4e4;--warn-mark: #d06306;--bad: #b42318;--bad-soft: #fef3f2;--bad-mark: #d92d20;--bad-solid: #b42318;--mute: #5d6979;--mute-soft: #eef0f3;--mute-mark: #7a8494;--get: #175cd3;--get-bg: #e9f1fe;--post: #067647;--post-bg: #e6f6ee;--put: #a14c05;--put-bg: #fef4e4;--patch: #6938ef;--patch-bg: #f1edfe;--del: #b42318;--del-bg: #fef3f2;--bar: #848ea0;--bar-hi: #5162e8;--on-hi: #ffffff;--track: #eceef2;--r-sm: 6px;--r: 8px;--r-lg: 12px;--sh-1: 0 1px 2px rgb(16 24 40 / 5%);--sh-2: 0 1px 2px rgb(16 24 40 / 4%), 0 4px 12px -2px rgb(16 24 40 / 6%);--sh-3: 0 24px 64px -12px rgb(16 24 40 / 30%), 0 0 0 1px var(--line);--focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);color-scheme:light}@media screen and (prefers-color-scheme:dark){:root{--bg: #0b0d12;--surface: #12151c;--sunken: #0e1117;--hover: #171b24;--line: #232836;--line-2: #323949;--fg: #e7e9ef;--fg-2: #a9b0bf;--fg-3: #8e97a8;--accent: #8b93ff;--accent-2: #a4abff;--accent-soft: #1d2040;--ok: #47cd89;--ok-soft: #0f2a1f;--ok-mark: #2fbf71;--warn: #fdb022;--warn-soft: #2e2210;--warn-mark: #f79009;--bad: #f97066;--bad-soft: #2d1214;--bad-mark: #f04438;--bad-solid: #d92d20;--mute: #98a2b3;--mute-soft: #1c212b;--mute-mark: #667085;--get: #84adff;--get-bg: #14223f;--post: #47cd89;--post-bg: #0f2a1f;--put: #fdb022;--put-bg: #2e2210;--patch: #bdb4fe;--patch-bg: #231b45;--del: #f97066;--del-bg: #2d1214;--bar: #6b7589;--bar-hi: #8b93ff;--on-hi: #0b0d12;--track: #1f2430;--sh-1: 0 1px 2px rgb(0 0 0 / 40%);--sh-2: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px -8px rgb(0 0 0 / 50%);--sh-3: 0 24px 64px -12px rgb(0 0 0 / 70%), 0 0 0 1px var(--line);color-scheme:dark}}*,*:before,*:after{box-sizing:border-box}[hidden]{display:none!important}html{-webkit-text-size-adjust:100%;background:var(--bg)}html.modal-open{overflow:hidden}body{margin:0;background:var(--bg);color:var(--fg);font:14px/1.5 var(--sans);-webkit-font-smoothing:antialiased}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}:focus-visible{outline:none;box-shadow:var(--focus);border-radius:var(--r-sm)}h1,h2,h3,h4,p,figure{margin:0}code,.mono{font-family:var(--mono);font-size:.92em}.num{text-align:right;font-variant-numeric:tabular-nums}.sub{color:var(--fg-3)}.sr,.js .js-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.i{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;vertical-align:-3px}.sprite{position:absolute;width:0;height:0;overflow:hidden}.skip{position:absolute;left:-999px}.skip:focus{left:16px;top:8px;z-index:50;background:var(--surface);padding:8px 12px}.wrap{max-width:1280px;margin:0 auto;padding:0 24px}.appbar{background:var(--surface);border-bottom:1px solid var(--line)}.appbar .wrap{display:flex;align-items:center;gap:16px;min-height:56px;flex-wrap:wrap;padding-top:8px;padding-bottom:8px}.brand{display:flex;align-items:center;gap:8px;font-weight:600;white-space:nowrap}.brand b{font-weight:600}.brand .ver{font:500 12px var(--mono);color:var(--fg-3)}.logo{width:24px;height:24px}.logo circle{fill:var(--accent)}.logo path{fill:none;stroke-width:2;stroke-linecap:round}.logo .crown{stroke:var(--accent)}.logo .bars{stroke:var(--on-hi)}.meta{position:relative;display:flex;gap:8px;flex-wrap:wrap;flex:1;min-width:0}.chip{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 8px;border:1px solid var(--line);border-radius:var(--r-sm);font-size:12px;color:var(--fg-2);background:var(--surface);white-space:nowrap}.chip b{font-weight:500;color:var(--fg)}.chip .i{width:14px;height:14px;vertical-align:0;color:var(--fg-3)}.btn{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border:1px solid var(--line-2);border-radius:var(--r);background:var(--surface);color:var(--fg);font:500 13px var(--sans);cursor:pointer;box-shadow:var(--sh-1);white-space:nowrap}.btn:hover{background:var(--hover);text-decoration:none}.btn:disabled{cursor:default;opacity:.45}.btn.icon{width:32px;padding:0;justify-content:center}.btn.sm{height:28px;font-size:12px;padding:0 10px}.btn.icon.sm{width:28px;padding:0}main.wrap{padding-top:24px;padding-bottom:48px}.hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;padding:24px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--sh-2);position:relative;overflow:hidden}.hero:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:var(--tone)}.hero:after{content:"";position:absolute;left:0;top:0;width:480px;height:100%;background:radial-gradient(400px 160px at 0 0,var(--tone-soft),transparent);pointer-events:none}.hero>*{position:relative;z-index:1}.t-bad{--tone: var(--bad-mark);--tone-soft: var(--bad-soft);--tone-fg: var(--bad)}.t-ok{--tone: var(--ok-mark);--tone-soft: var(--ok-soft);--tone-fg: var(--ok)}.t-warn{--tone: var(--warn-mark);--tone-soft: var(--warn-soft);--tone-fg: var(--warn)}.t-err{--tone: var(--fg-2);--tone-soft: var(--mute-soft);--tone-fg: var(--fg)}.verdict{display:flex;gap:16px;align-items:flex-start}.v-ic{width:48px;height:48px;border-radius:var(--r-lg);display:grid;place-items:center;background:var(--tone-soft);color:var(--tone-fg);flex:none}.v-ic .i{width:26px;height:26px;stroke-width:2}.eyebrow{font-size:12px;font-weight:500;color:var(--fg-3)}.status{font-size:28px;line-height:36px;font-weight:700;color:var(--tone-fg)}.status .pill{vertical-align:6px;margin-left:8px}.summary{font-size:15px;margin-top:4px;max-width:70ch;overflow-wrap:anywhere}.summary .sub{font-size:13px;display:block;margin-top:4px}.hero .note,.hero>div>div>.sub{margin-top:8px}.subst{display:grid;gap:8px;align-content:center;min-width:280px;margin:0;padding-left:24px;border-left:1px solid var(--line)}.ss{display:grid;grid-template-columns:96px minmax(0,1fr);align-items:baseline;gap:8px;font-size:13px}.ss dt{color:var(--fg-3)}.ss dd{margin:0;font-weight:600}.ss dd .sub{font-weight:400}.dot{width:8px;height:8px;border-radius:50%;background:var(--mute-mark);display:inline-block;margin-right:8px}.d-ok{background:var(--ok-mark)}.d-bad{background:var(--bad-mark)}.d-warn{background:var(--warn-mark)}.kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));margin:16px 0 0;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--sh-1)}.kpi{padding:16px 20px;border-left:1px solid var(--line);display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;align-items:end}.kpi:first-child{border-left:0}.kpi dt{font-size:12px;color:var(--fg-3);font-weight:500;grid-column:1 / -1}.kpi dd{margin:0}.kv{font-size:24px;line-height:32px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}.kv small{font-size:13px;font-weight:500;color:var(--fg-3);margin-left:2px}.kpi .viz{grid-row:2;grid-column:2;align-self:center}.kpi .ks{grid-column:1 / -1;font-size:12px;color:var(--fg-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kpi.bad .kv{color:var(--bad)}.ring{width:32px;height:32px;transform:rotate(-90deg)}.ring circle{fill:none;stroke-width:4}.ring .tr{stroke:var(--track)}.ring .vl{stroke:var(--warn-mark);stroke-linecap:round}.vsplit{display:flex;width:56px;height:6px;border-radius:3px;overflow:hidden;background:var(--track);gap:2px}.vsplit>span{height:100%}.s-bad{background:var(--bad-mark)}.s-mute{background:var(--mute-mark)}.s-warn{background:var(--warn-mark)}.s-acc{background:var(--bar-hi)}.s-neu{background:var(--bar)}.s-trk{background:var(--track);box-shadow:inset 0 0 0 1px var(--line-2)}.pips{display:flex;gap:3px}.pips span{width:6px;height:14px;border-radius:2px;background:var(--bar-hi)}.pips .off{background:var(--mute-mark)}.tabs{position:sticky;top:0;z-index:20;margin:24px -24px 0;padding:4px 24px 0;background:color-mix(in srgb,var(--bg) 85%,transparent);backdrop-filter:blur(8px)}.seg{position:relative;display:flex;gap:4px;box-shadow:inset 0 -1px 0 var(--line-2);overflow-x:auto;scrollbar-width:none}.seg a{display:inline-flex;flex:none;align-items:center;gap:8px;min-height:44px;padding:3px 16px 0;border-bottom:3px solid transparent;border-radius:var(--r-sm) var(--r-sm) 0 0;color:var(--fg-2);font-size:14px;font-weight:600;white-space:nowrap}.seg a:hover{color:var(--fg);background:var(--hover);border-bottom-color:var(--line-2);text-decoration:none}.seg a:focus-visible{border-radius:var(--r-sm) var(--r-sm) 0 0;box-shadow:inset 0 0 0 2px var(--accent)}.seg a[aria-selected=true]{color:var(--accent);background:var(--accent-soft);border-bottom-color:var(--accent)}.n{font:600 11px/18px var(--sans);min-width:20px;padding:0 6px;border-radius:9px;background:var(--line);color:var(--fg-2);text-align:center;font-variant-numeric:tabular-nums;display:inline-block}.n.bad{background:var(--bad-soft);color:var(--bad)}.n.warn{background:var(--warn-soft);color:var(--warn)}.panel{margin-top:8px}.js .panel[hidden]{display:none}.ph{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;margin:24px 0 12px;flex-wrap:wrap}.panel>.ph:first-child{margin-top:8px}.ph h2{font-size:18px;font-weight:600}.ph h3{font-size:16px;font-weight:600;display:flex;align-items:center;gap:8px}.ph p{color:var(--fg-3);font-size:13px}.ph .more{font-size:13px;font-weight:500}.status-msg:empty{display:none}.status-msg{margin-top:12px;padding:8px 12px;border-radius:var(--r);background:var(--accent-soft)}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--sh-1)}.card-h{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:14px 16px 0}.card-h h4{font-size:13px;font-weight:600}.card-h .sub{font-size:12px}.card-p{padding:14px 16px 0;font-size:13px}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}.grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.pill{display:inline-flex;align-items:center;gap:4px;height:20px;padding:0 8px;border-radius:10px;font-size:11.5px;font-weight:600;white-space:nowrap;background:var(--mute-soft);color:var(--mute);line-height:1}.pill.fb{background:var(--bad-solid);color:#fff}.pill.f{background:var(--bad-soft);color:var(--bad);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--bad) 30%,transparent)}.pill.p{background:var(--ok-soft);color:var(--ok)}.pill.ne{background:none;box-shadow:inset 0 0 0 1px var(--line-2);color:var(--fg-2)}.pill.w{background:var(--warn-soft);color:var(--warn)}.pill.e{background:var(--fg);color:var(--bg)}.pill .i{width:12px;height:12px;vertical-align:0;stroke-width:2}.src{display:inline-block;font:500 11px/18px var(--mono);padding:0 6px;border-radius:4px;color:var(--fg-3);background:var(--sunken);box-shadow:inset 0 0 0 1px var(--line)}.es{font:500 11px var(--mono);color:var(--fg-3)}.kind{display:inline-block;font:500 11px/18px var(--sans);padding:0 6px;border-radius:4px;color:var(--fg-2);background:var(--sunken)}.m{display:inline-block;width:52px;text-align:center;font:700 10.5px/20px var(--mono);border-radius:4px;flex:none;color:var(--fg-2);background:var(--sunken)}.GET{color:var(--get);background:var(--get-bg)}.POST{color:var(--post);background:var(--post-bg)}.PUT{color:var(--put);background:var(--put-bg)}.PATCH{color:var(--patch);background:var(--patch-bg)}.DELETE{color:var(--del);background:var(--del-bg)}.key{font-family:var(--mono);font-size:12.5px;color:var(--fg);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.key i{font-style:normal;color:var(--accent)}.key .o{font:500 10.5px/16px var(--sans);padding:0 5px;margin-right:6px;border-radius:4px;background:var(--sunken);color:var(--fg-3);box-shadow:inset 0 0 0 1px var(--line)}.rq{font:500 10.5px/16px var(--sans);padding:0 5px;border-radius:4px;color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);white-space:nowrap}.key s{text-decoration:none;color:var(--fg-3)}.key b{font-weight:600}.kl{display:flex;align-items:center;gap:8px;min-width:0;color:inherit}a.kl:hover{text-decoration:none}a.kl:hover .key{color:var(--accent);text-decoration:underline;text-underline-offset:3px}.key.st{font-family:var(--sans);font-size:13px}meter{appearance:none;width:64px;height:6px;border-radius:3px;vertical-align:middle;background:var(--track);border:0}meter::-webkit-meter-bar{background:linear-gradient(90deg,transparent calc(80% - 1px),var(--fg-3) calc(80% - 1px),var(--fg-3) 80%,transparent 80%),var(--track);border:0;border-radius:3px;height:6px}meter::-webkit-meter-optimum-value{background:var(--ok-mark);border-radius:3px}meter::-webkit-meter-suboptimum-value{background:var(--warn-mark);border-radius:3px}meter::-webkit-meter-even-less-good-value{background:var(--bad-mark);border-radius:3px}meter::-moz-meter-bar{background:var(--ok-mark);border-radius:3px}meter:-moz-meter-sub-optimum::-moz-meter-bar{background:var(--warn-mark)}meter:-moz-meter-sub-sub-optimum::-moz-meter-bar{background:var(--bad-mark)}.hr{display:inline-flex;align-items:center;gap:8px;font-variant-numeric:tabular-nums;font-size:12.5px;white-space:nowrap}.hr b{font-weight:500;min-width:40px;text-align:right}.hr .ov{color:var(--bad);font-weight:600}.hr .nr{color:var(--warn)}.vlist{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:12px}.vio{position:relative;padding:14px 16px 14px 20px;display:grid;gap:8px;overflow:hidden;align-content:start}.vio:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--bad-mark)}.vio.mu:before{background:var(--mute-mark)}.vio .top{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.vio .top .src{margin-left:auto}.rule{display:flex;align-items:center;gap:12px;font-size:13px;color:var(--fg-2);font-variant-numeric:tabular-nums;flex-wrap:wrap}.rule b{color:var(--fg);font-weight:600}.rule meter{width:96px}.hint{display:flex;gap:8px;font-size:13px;color:var(--fg-2);line-height:1.45}.hint .i{color:var(--warn);margin-top:1px}.toggle{display:inline-flex;padding:2px;border:1px solid var(--line);border-radius:var(--r);background:var(--sunken)}.toggle button{border:0;background:none;font:500 12px var(--sans);color:var(--fg-2);height:24px;padding:0 10px;border-radius:6px;cursor:pointer}.toggle button[aria-pressed=true]{background:var(--surface);color:var(--fg);box-shadow:var(--sh-1),0 0 0 1px var(--line)}.rank{list-style:none;margin:0;padding:8px 8px 12px;counter-reset:r}.rank li{counter-increment:r;display:grid;grid-template-columns:16px minmax(0,1fr) auto;column-gap:8px;row-gap:6px;align-items:center;padding:8px;border-radius:var(--r-sm)}.rank li:hover{background:var(--hover)}.rank li:before{content:counter(r);font-size:11px;color:var(--fg-3);font-variant-numeric:tabular-nums;grid-row:1}.rank .kl{grid-column:2 / -1;gap:6px}.rank .m{width:auto;padding:0 4px;font-size:9.5px;line-height:16px}.rank .key{font-size:12px}.rank .tb{grid-column:2;grid-row:2}.rank .v{grid-column:3;grid-row:2;min-width:64px;text-align:right;font-size:12px;font-variant-numeric:tabular-nums;color:var(--fg-2);white-space:nowrap}.rank .v b{color:var(--fg);font-weight:600}.tb{display:block;height:4px;border-radius:2px;background:var(--track);overflow:hidden}.tb>span{display:block;height:100%;border-radius:2px;background:var(--bar-hi)}.tb.bad>span{background:var(--bad-mark)}.tb.warn>span{background:var(--warn-mark)}.tb.neu>span{background:var(--bar)}.tw{width:72px}.w-0{width:0}.w-5{width:5%}.w-10{width:10%}.w-15{width:15%}.w-20{width:20%}.w-25{width:25%}.w-30{width:30%}.w-35{width:35%}.w-40{width:40%}.w-45{width:45%}.w-50{width:50%}.w-55{width:55%}.w-60{width:60%}.w-65{width:65%}.w-70{width:70%}.w-75{width:75%}.w-80{width:80%}.w-85{width:85%}.w-90{width:90%}.w-95{width:95%}.w-100{width:100%}.tl{list-style:none;margin:0;padding:8px}.tl li{display:grid;grid-template-columns:minmax(0,1fr) 88px 72px;gap:12px;align-items:center;padding:8px;border-radius:var(--r-sm);font-size:13px}.tl.two li{grid-template-columns:minmax(0,1fr) auto}.tl li:hover{background:var(--hover)}.tt{min-width:0}.tt>span,.tt>.kl{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tt>.kl{display:flex}.tt .sub{font:12px var(--mono);margin-top:2px}.tl .num{font-weight:600;display:flex;flex-direction:column;align-items:flex-end;gap:2px}.tl .num .sub{font-weight:400;font-size:12px}.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:12px;border-bottom:1px solid var(--line)}.search{display:flex;align-items:center;gap:8px;height:32px;padding:0 10px;border:1px solid var(--line-2);border-radius:var(--r);background:var(--surface);color:var(--fg-3);width:260px;max-width:100%}.search input{border:0;outline:0;background:none;font:13px var(--sans);color:var(--fg);width:100%}.search:focus-within{box-shadow:var(--focus)}.fg{display:inline-flex;gap:4px;align-items:center;flex-wrap:wrap;padding-left:8px;border-left:1px solid var(--line)}.fg>span{font-size:12px;color:var(--fg-3);margin-right:4px}.flt{height:28px;padding:0 10px;border:1px dashed var(--line-2);border-radius:14px;background:none;color:var(--fg-2);font:500 12px var(--sans);cursor:pointer;display:inline-flex;align-items:center;gap:6px}.flt[aria-pressed=true]{border-style:solid;border-color:var(--accent);background:var(--accent-soft);color:var(--accent-2)}.count{margin-left:auto;font-size:12px;color:var(--fg-3);font-variant-numeric:tabular-nums}.scroll{overflow-x:auto}table{border-collapse:separate;border-spacing:0;width:100%;font-size:13px}caption{text-align:left;padding:0;height:0;overflow:hidden}th{font-size:12px;font-weight:500;color:var(--fg-3);text-align:left;padding:8px 12px;border-bottom:1px solid var(--line);white-space:nowrap;background:var(--sunken)}th.num{text-align:right}th button{all:unset;cursor:pointer;display:inline-flex;gap:4px;align-items:center}th button:hover{color:var(--fg)}th button:focus-visible{box-shadow:var(--focus);border-radius:4px}th[aria-sort=descending] button:after{content:"\u2193";font-size:11px;color:var(--accent)}th[aria-sort=ascending] button:after{content:"\u2191";font-size:11px;color:var(--accent)}td,tbody th{padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap;vertical-align:middle;background:var(--surface);color:var(--fg);font-size:13px;font-weight:400}tbody:last-child tr:last-child>*,tbody:last-child tr.drow:last-child>*{border-bottom:0}.keys>tbody>tr:first-child,.tests tbody tr{transition:background .12s}.js .keys>tbody>tr:first-child:hover>*,.tests tbody tr:hover>*{background:var(--hover)}.js .keys>tbody>tr:first-child{cursor:pointer}.keys>tbody>tr.sel>*{background:var(--accent-soft)}th.k{max-width:440px;padding-left:16px;display:table-cell}th.k:before{content:"";display:inline-block;vertical-align:middle;width:6px;height:6px;border-radius:50%;margin-right:10px;background:var(--ok-mark)}th.k .kl{display:inline-flex;vertical-align:middle;width:max-content;max-width:360px}th.k .key{white-space:normal;overflow-wrap:anywhere}tr.blocking th.k:before,tr.violation th.k:before{background:var(--bad-mark)}tr.muted th.k:before{background:var(--mute-mark)}tr.not-evaluated th.k:before{background:none;box-shadow:inset 0 0 0 1.5px var(--mute-mark)}tr.blocking th.k{box-shadow:inset 3px 0 0 var(--bad-mark)}td.r>*+*{margin-left:6px}td.r .why,td.num .why{display:block;margin:4px 0 0;color:var(--fg-3);font-size:12px}td .lim{color:var(--fg-3);font-size:12px;font-weight:400}td.ov{color:var(--bad);font-weight:600}td.e{color:var(--bad);font-weight:500}td.z{color:var(--fg-3)}td.loc{font:12px var(--mono);color:var(--fg-3)}.tfoot{padding:10px 16px;font-size:12px;color:var(--fg-3);border-top:1px solid var(--line)}.dep{display:inline-block;position:relative;width:16px;height:4px;margin-right:8px;vertical-align:2px;background:radial-gradient(circle,var(--line-2) 2px,transparent 2px) 0 0 / 6px 4px repeat-x}.dep:before{content:"";position:absolute;inset:0 auto 0 0;background:radial-gradient(circle,var(--fg-3) 2px,transparent 2px) 0 0 / 6px 4px repeat-x}.d1:before{width:4px}.d2:before{width:10px}.d3:before{width:16px}.tests th.tc{max-width:360px}.tc>span{display:block;overflow:hidden;text-overflow:ellipsis}.tc .tn{font-weight:500;color:var(--accent)}.tc .sub{font-size:12px;margin-top:2px}td.tk>*{display:flex;gap:6px;align-items:center}td.tk>*+*{margin-top:4px}td.tk2>*{flex-direction:column;align-items:flex-start;gap:0}.tk .kl{display:inline-flex}.tk .m{width:auto;padding:0 4px;font-size:9.5px;line-height:16px}.drow>td{white-space:normal;background:var(--bg)}.js .drow{display:none}.drow summary{cursor:pointer;color:var(--accent);font-weight:500}.kd{padding:0 4px 12px;max-width:920px}.kh{padding-top:12px}.fk{display:block;word-break:break-all;font-size:14px;font-weight:600}.pills{display:flex;gap:6px;margin-top:10px;flex-wrap:wrap;align-items:center}.ds{padding-top:20px}.ds>h4{font-size:12px;font-weight:600;color:var(--fg-2);margin-bottom:10px;display:flex;justify-content:space-between;gap:8px;align-items:baseline}.ds>h4 .sub{font-weight:400}.hints{list-style:none;display:grid;gap:8px;margin:20px 0 0;padding:12px 14px;border-radius:var(--r);background:var(--warn-soft);border:1px solid color-mix(in srgb,var(--warn-mark) 30%,transparent)}.hints li{display:flex;gap:8px;font-size:13px}.hints .i{color:var(--warn);margin-top:1px}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--line);border-radius:var(--r);margin:0;background:var(--surface)}.stats div{padding:10px 12px;border-left:1px solid var(--line)}.stats div:first-child{border-left:0}.stats dt{font-size:11px;color:var(--fg-3)}.stats dd{margin:0;font-size:16px;font-weight:600;font-variant-numeric:tabular-nums}.stats dd small{font-size:11px;color:var(--fg-3);font-weight:400}.stats .ov dd{color:var(--bad)}.ct{border:1px solid var(--line);border-radius:var(--r);overflow:hidden;overflow-x:auto}.ct td,.ct th{padding:8px 10px}.ct thead th{background:none}.ck td{text-align:right;font-variant-numeric:tabular-nums}.ck td:nth-last-child(-n+2){text-align:left}.ck tr.ov td:nth-child(2){color:var(--bad);font-weight:600}.legend{display:flex;gap:8px 16px;font-size:12px;color:var(--fg-3);margin-top:8px;flex-wrap:wrap}.legend span{display:inline-flex;align-items:center;gap:6px}.legend i{width:10px;height:10px;border-radius:2px;display:inline-block}.legend .lg-lim{border-top:2px dashed var(--bad-mark);height:0;border-radius:0}.stc{display:flex;gap:6px;flex-wrap:wrap}.stc span{font:12px var(--mono);padding:2px 8px;border-radius:var(--r-sm);background:var(--sunken);box-shadow:inset 0 0 0 1px var(--line)}.stc b{font-weight:600}.stc .e{color:var(--bad)}.facts{display:flex;flex-wrap:wrap;gap:4px 16px;margin-top:10px;font-size:12.5px;color:var(--fg-2)}.samples{list-style:none;margin:0;padding:0;border:1px solid var(--line);border-radius:var(--r);background:var(--surface)}.samples li{display:grid;grid-template-columns:72px minmax(0,1fr);gap:12px;padding:10px 12px;border-top:1px solid var(--line);font-size:13px}.samples li:first-child{border-top:0}.samples b{font-variant-numeric:tabular-nums}.samples .sub{font-family:var(--sans)}.samples .url{font:12px var(--mono);color:var(--fg-2);white-space:normal;overflow-wrap:anywhere}.ds .tl{padding:0;border:1px solid var(--line);border-radius:var(--r);background:var(--surface)}.kdlg{width:min(960px,calc(100vw - 32px));max-width:none;max-height:calc(100vh - 48px);padding:0;border:0;border-radius:var(--r-lg);background:var(--surface);color:var(--fg);box-shadow:var(--sh-3);overflow-y:auto;overscroll-behavior:contain}.kdlg::backdrop{background:#1018287f}@media(prefers-reduced-motion:no-preference){.kdlg[open]{animation:pop .12s ease-out}}@keyframes pop{0%{opacity:0;transform:translateY(8px)}}.dh{position:sticky;top:0;z-index:2;background:var(--surface);border-bottom:1px solid var(--line);padding:16px 20px 14px}.dh .nav{display:flex;gap:4px;align-items:center;margin-bottom:10px}.dh .nav .sub{font-size:12px;margin-right:auto}#dlg-title{font:600 14px/20px var(--mono);word-break:break-all}#dlg-title:focus-visible{box-shadow:none}.dh .kh{padding-top:0}.dh .fkl{display:none}.db{padding:0 20px 8px}.db .kd{padding:0;max-width:none}.dfoot{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:12px 20px 20px}.copy-out input{font:12px var(--mono);width:min(520px,70vw);margin-left:8px}svg.ch,svg.split,svg.bar{display:block;width:100%;height:auto}svg.hist,svg.bar{max-width:720px}.ch text,svg.bar text{font:10.5px var(--sans);fill:var(--fg-3);font-variant-numeric:tabular-nums}.as{text-anchor:start}.am{text-anchor:middle}.ae{text-anchor:end}.hist .gr,.wf .wg{stroke:var(--line);stroke-width:1;stroke-dasharray:2 3;fill:none}.hist .ha{stroke:var(--line-2)}.hist .bars{fill:var(--bar)}.hist .bars-hi{fill:var(--bad-mark)}.hist .hm{stroke:var(--fg-2);stroke-width:1.25}.hist .hl{stroke:var(--bad-mark);stroke-width:1.5;stroke-dasharray:4 3}.hist text{fill:var(--fg-2);font-weight:600}.hist .ht text{fill:var(--fg-3);font-weight:400}.split .st{fill:var(--bar-hi)}.split .so{fill:var(--track);stroke:var(--line-2)}.bar-axis{stroke:var(--line-2)}.bar-range{fill:var(--bar)}.bar-mark{stroke:var(--fg-2);stroke-width:1.5}.bar-limit{stroke:var(--bad-mark);stroke-dasharray:4 3}svg.bar .bar-limit-text{fill:var(--bad)}.wl{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.wf-h{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;padding:16px;border-bottom:1px solid var(--line);flex-wrap:wrap}.wf-h h4{font-size:14px;font-weight:600;overflow-wrap:anywhere}.wf-h .sub{font-size:12px;margin-top:2px}.wf-h dl{display:flex;gap:24px;margin:0}.wf-h dt{font-size:11px;color:var(--fg-3)}.wf-h dd{margin:0;font-weight:600;font-variant-numeric:tabular-nums}.wfs{padding:8px 16px 16px}.wfs svg{min-width:720px}.wf .sep{stroke:var(--line)}.wf use{font:10.5px var(--mono);fill:var(--fg-2)}.wkm{font-weight:700}.wkm.mGET{fill:var(--get)}.wkm.mPOST{fill:var(--post)}.wkm.mPUT{fill:var(--put)}.wkm.mPATCH{fill:var(--patch)}.wkm.mDELETE{fill:var(--del)}.wkp{fill:var(--accent)}.wf g rect{fill:var(--bar-hi)}.wf .we rect,.wf .we path{fill:var(--bad-mark)}.wf .ww rect{fill:var(--warn-mark)}.wf .wm rect{fill:var(--mute-mark)}.wf g path{fill:var(--bad-mark);stroke:var(--surface);stroke-width:1.5}.wf .d{font-size:10px}.wf g:hover use,.wf g:hover text{fill:var(--fg)}.wf g:hover rect{opacity:.85}.sh{font-size:13px;font-weight:600;color:var(--fg-2);margin:8px 0 0}.wn{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:4px 12px;padding:16px}.wn .wi{width:32px;height:32px;border-radius:var(--r);display:grid;place-items:center;background:var(--warn-soft);color:var(--warn);grid-row:1 / 4}.wn.err .wi{background:var(--bad-soft);color:var(--bad)}.wn code{font:600 12.5px var(--mono);align-self:center;overflow-wrap:anywhere}.wn p{grid-column:2 / -1;font-size:13.5px;overflow-wrap:anywhere}.wn .hint .i{color:var(--accent)}.wn .n{align-self:start}.hl-err .wn{border-color:var(--bad-mark)}.kvl{display:grid;grid-template-columns:140px minmax(0,1fr);gap:8px 16px;margin:0;padding:16px;font-size:13px}.kvl dt{color:var(--fg-3)}.kvl dd{margin:0;min-width:0;overflow-wrap:anywhere}.plain{margin:4px 0 0;padding-left:16px}details.cfg summary{padding:14px 16px;cursor:pointer;font-weight:600;font-size:13px;list-style:none;display:flex;gap:8px;align-items:center}details.cfg summary::-webkit-details-marker{display:none}details.cfg summary:before{content:"";width:6px;height:6px;flex:none;border-right:1.5px solid var(--fg-3);border-bottom:1.5px solid var(--fg-3);transform:rotate(-45deg);transition:transform .15s}details.cfg[open] summary:before{transform:rotate(45deg)}details.cfg pre{margin:0;padding:16px;border-top:1px solid var(--line);font:12px/1.6 var(--mono);color:var(--fg-2);overflow-x:auto;background:var(--sunken);border-radius:0 0 var(--r-lg) var(--r-lg)}details.cfg .scroll{border-top:1px solid var(--line)}.empty{display:grid;justify-items:center;text-align:center;gap:8px;padding:40px 24px;color:var(--fg-2)}.empty .ei{width:44px;height:44px;border-radius:var(--r-lg);display:grid;place-items:center;background:var(--sunken);box-shadow:inset 0 0 0 1px var(--line);color:var(--fg-3)}.empty h3{font-size:15px;color:var(--fg)}.empty p{font-size:13px;max-width:56ch}.empty.sm{padding:20px 16px;gap:6px}.empty.sm .i{color:var(--ok-mark)}.note{display:flex;gap:10px;padding:12px 14px;border-radius:var(--r);background:var(--accent-soft);color:var(--fg);font-size:13px;align-items:flex-start}.note .i{color:var(--accent);margin-top:1px}.note code{background:var(--surface);padding:1px 5px;border-radius:4px}footer{padding:24px 0 40px;font-size:12px;color:var(--fg-3);border-top:1px solid var(--line)}@media(max-width:1100px){.grid4{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:1023px){.kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.kpi:nth-child(4){border-left:0}.kpi:nth-child(n+4){border-top:1px solid var(--line)}.hero{grid-template-columns:minmax(0,1fr)}.subst{border-left:0;padding-left:0;border-top:1px solid var(--line);padding-top:16px;min-width:0}}@media(max-width:720px){.grid2,.vlist{grid-template-columns:minmax(0,1fr)}}@media(max-width:599px){.wrap{padding:0 16px}.tabs{margin:16px -16px 0;padding:4px 16px 0}.seg a{padding:3px 12px 0}.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.kpi{padding:12px 14px}.kpi:nth-child(n){border-left:1px solid var(--line);border-top:1px solid var(--line)}.kpi:nth-child(odd){border-left:0}.kpi:nth-child(-n+2){border-top:0}.kv{font-size:20px;line-height:28px}.grid4{grid-template-columns:minmax(0,1fr)}.hero{padding:20px 16px}.status{font-size:24px;line-height:32px}.v-ic{width:40px;height:40px}.summary{font-size:14px}.ss{grid-template-columns:88px minmax(0,1fr)}.brand{flex:1;min-width:0;overflow:hidden}.brand b{overflow:hidden;text-overflow:ellipsis}.brand .ver{display:none}.meta{order:3;flex:0 0 100%;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}.appbar .btn span{display:none}.appbar .btn{width:32px;padding:0;justify-content:center}.vio .rule meter{display:none}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.stats div:nth-child(3){border-left:0}.stats div:nth-child(n+3){border-top:1px solid var(--line)}.tl li{grid-template-columns:minmax(0,1fr) 72px}.tl li>.num:last-child{display:none}.tl.two li>.num:last-child{display:flex}.fg{border-left:0;padding-left:0}.kvl{grid-template-columns:minmax(0,1fr);gap:2px}.kvl dd{margin-bottom:8px}.kdlg{width:100vw;max-width:100vw;height:100vh;max-height:100vh;margin:0;border-radius:0}.dh,.dfoot{padding-left:16px;padding-right:16px}.db{padding:0 16px 8px}}@media print{:root{--bg: #ffffff;--sh-1: none;--sh-2: none}.tabs,.toolbar,.btn,.toggle,.js-only,.kdlg,.skip,.status-msg,[data-none],th button:after{display:none!important}.js .panel[hidden]{display:block!important}.js .drow{display:table-row}.scroll,.ct{overflow:visible}tr,.card,.kpi,.wfb,svg{break-inside:avoid}details[data-v]::details-content{content-visibility:visible;display:block}}';
5840
- var STYLES_SHA256 = "shLzLv0QA/UumVUIqubLpwCwqmv+SeH1rfHBn3IF8z4=";
6473
+ var STYLES = ':root{--sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;--bg: #f6f7f9;--surface: #ffffff;--sunken: #f1f3f6;--hover: #f7f8fb;--line: #e4e7ec;--line-2: #d0d5dd;--fg: #101828;--fg-2: #475467;--fg-3: #5d6979;--accent: #4f46e5;--accent-2: #4338ca;--accent-soft: #eef0ff;--ok: #067647;--ok-soft: #e6f6ee;--ok-mark: #079455;--warn: #a14c05;--warn-soft: #fef4e4;--warn-mark: #d06306;--bad: #b42318;--bad-soft: #fef3f2;--bad-mark: #d92d20;--bad-solid: #b42318;--mute: #5d6979;--mute-soft: #eef0f3;--mute-mark: #7a8494;--get: #175cd3;--get-bg: #e9f1fe;--post: #067647;--post-bg: #e6f6ee;--put: #a14c05;--put-bg: #fef4e4;--patch: #6938ef;--patch-bg: #f1edfe;--del: #b42318;--del-bg: #fef3f2;--bar: #848ea0;--bar-hi: #5162e8;--on-hi: #ffffff;--track: #eceef2;--r-sm: 6px;--r: 8px;--r-lg: 12px;--sh-1: 0 1px 2px rgb(16 24 40 / 5%);--sh-2: 0 1px 2px rgb(16 24 40 / 4%), 0 4px 12px -2px rgb(16 24 40 / 6%);--sh-3: 0 24px 64px -12px rgb(16 24 40 / 30%), 0 0 0 1px var(--line);--focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);color-scheme:light}@media screen and (prefers-color-scheme:dark){:root{--bg: #0b0d12;--surface: #12151c;--sunken: #0e1117;--hover: #171b24;--line: #232836;--line-2: #323949;--fg: #e7e9ef;--fg-2: #a9b0bf;--fg-3: #8e97a8;--accent: #8b93ff;--accent-2: #a4abff;--accent-soft: #1d2040;--ok: #47cd89;--ok-soft: #0f2a1f;--ok-mark: #2fbf71;--warn: #fdb022;--warn-soft: #2e2210;--warn-mark: #f79009;--bad: #f97066;--bad-soft: #2d1214;--bad-mark: #f04438;--bad-solid: #d92d20;--mute: #98a2b3;--mute-soft: #1c212b;--mute-mark: #667085;--get: #84adff;--get-bg: #14223f;--post: #47cd89;--post-bg: #0f2a1f;--put: #fdb022;--put-bg: #2e2210;--patch: #bdb4fe;--patch-bg: #231b45;--del: #f97066;--del-bg: #2d1214;--bar: #6b7589;--bar-hi: #8b93ff;--on-hi: #0b0d12;--track: #1f2430;--sh-1: 0 1px 2px rgb(0 0 0 / 40%);--sh-2: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px -8px rgb(0 0 0 / 50%);--sh-3: 0 24px 64px -12px rgb(0 0 0 / 70%), 0 0 0 1px var(--line);color-scheme:dark}}*,*:before,*:after{box-sizing:border-box}[hidden]{display:none!important}html{-webkit-text-size-adjust:100%;background:var(--bg)}html.modal-open{overflow:hidden}body{margin:0;background:var(--bg);color:var(--fg);font:14px/1.5 var(--sans);-webkit-font-smoothing:antialiased}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}:focus-visible{outline:none;box-shadow:var(--focus);border-radius:var(--r-sm)}h1,h2,h3,h4,p,figure{margin:0}code,.mono{font-family:var(--mono);font-size:.92em}.num{text-align:right;font-variant-numeric:tabular-nums}.sub{color:var(--fg-3)}.sr,.js .js-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.i{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;vertical-align:-3px}.sprite{position:absolute;width:0;height:0;overflow:hidden}.skip{position:absolute;left:-999px}.skip:focus{left:16px;top:8px;z-index:50;background:var(--surface);padding:8px 12px}.wrap{max-width:1280px;margin:0 auto;padding:0 24px}.appbar{background:var(--surface);border-bottom:1px solid var(--line)}.appbar .wrap{display:flex;align-items:center;gap:16px;min-height:56px;flex-wrap:wrap;padding-top:8px;padding-bottom:8px}.brand{display:flex;align-items:center;gap:8px;font-weight:600;white-space:nowrap}.brand b{font-weight:600}.brand .ver{font:500 12px var(--mono);color:var(--fg-3)}.logo{width:24px;height:24px}.logo circle{fill:var(--accent)}.logo path{fill:none;stroke-width:2;stroke-linecap:round}.logo .crown{stroke:var(--accent)}.logo .bars{stroke:var(--on-hi)}.meta{position:relative;display:flex;gap:8px;flex-wrap:wrap;flex:1;min-width:0}.chip{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 8px;border:1px solid var(--line);border-radius:var(--r-sm);font-size:12px;color:var(--fg-2);background:var(--surface);white-space:nowrap}.chip b{font-weight:500;color:var(--fg)}.chip .i{width:14px;height:14px;vertical-align:0;color:var(--fg-3)}.btn{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border:1px solid var(--line-2);border-radius:var(--r);background:var(--surface);color:var(--fg);font:500 13px var(--sans);cursor:pointer;box-shadow:var(--sh-1);white-space:nowrap}.btn:hover{background:var(--hover);text-decoration:none}.btn:disabled{cursor:default;opacity:.45}.btn.icon{width:32px;padding:0;justify-content:center}.btn.sm{height:28px;font-size:12px;padding:0 10px}.btn.icon.sm{width:28px;padding:0}main.wrap{padding-top:24px;padding-bottom:48px}.hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;padding:24px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--sh-2);position:relative;overflow:hidden}.hero:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:var(--tone)}.hero:after{content:"";position:absolute;left:0;top:0;width:480px;height:100%;background:radial-gradient(400px 160px at 0 0,var(--tone-soft),transparent);pointer-events:none}.hero>*{position:relative;z-index:1}.t-bad{--tone: var(--bad-mark);--tone-soft: var(--bad-soft);--tone-fg: var(--bad)}.t-ok{--tone: var(--ok-mark);--tone-soft: var(--ok-soft);--tone-fg: var(--ok)}.t-warn{--tone: var(--warn-mark);--tone-soft: var(--warn-soft);--tone-fg: var(--warn)}.t-err{--tone: var(--fg-2);--tone-soft: var(--mute-soft);--tone-fg: var(--fg)}.verdict{display:flex;gap:16px;align-items:flex-start}.v-ic{width:48px;height:48px;border-radius:var(--r-lg);display:grid;place-items:center;background:var(--tone-soft);color:var(--tone-fg);flex:none}.v-ic .i{width:26px;height:26px;stroke-width:2}.eyebrow{font-size:12px;font-weight:500;color:var(--fg-3)}.status{font-size:28px;line-height:36px;font-weight:700;color:var(--tone-fg)}.status .pill{vertical-align:6px;margin-left:8px}.summary{font-size:15px;margin-top:4px;max-width:70ch;overflow-wrap:anywhere}.summary .sub{font-size:13px;display:block;margin-top:4px}.hero .note,.hero>div>div>.sub{margin-top:8px}.subst{display:grid;gap:8px;align-content:center;min-width:280px;margin:0;padding-left:24px;border-left:1px solid var(--line)}.ss{display:grid;grid-template-columns:96px minmax(0,1fr);align-items:baseline;gap:8px;font-size:13px}.ss dt{color:var(--fg-3)}.ss dd{margin:0;font-weight:600}.ss dd .sub{font-weight:400}.dot{width:8px;height:8px;border-radius:50%;background:var(--mute-mark);display:inline-block;margin-right:8px}.d-ok{background:var(--ok-mark)}.d-bad{background:var(--bad-mark)}.d-warn{background:var(--warn-mark)}.kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));margin:16px 0 0;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--sh-1)}.kpi{padding:16px 20px;border-left:1px solid var(--line);display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;align-items:end}.kpi:first-child{border-left:0}.kpi dt{font-size:12px;color:var(--fg-3);font-weight:500;grid-column:1 / -1}.kpi dd{margin:0}.kv{font-size:24px;line-height:32px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}.kv small{font-size:13px;font-weight:500;color:var(--fg-3);margin-left:2px}.kpi .viz{grid-row:2;grid-column:2;align-self:center}.kpi .ks{grid-column:1 / -1;font-size:12px;color:var(--fg-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kpi.bad .kv{color:var(--bad)}.ring{width:32px;height:32px;transform:rotate(-90deg)}.ring circle{fill:none;stroke-width:4}.ring .tr{stroke:var(--track)}.ring .vl{stroke:var(--warn-mark);stroke-linecap:round}.vsplit{display:flex;width:56px;height:6px;border-radius:3px;overflow:hidden;background:var(--track);gap:2px}.vsplit>span{height:100%}.s-bad{background:var(--bad-mark)}.s-mute{background:var(--mute-mark)}.s-warn{background:var(--warn-mark)}.s-acc{background:var(--bar-hi)}.s-neu{background:var(--bar)}.s-trk{background:var(--track);box-shadow:inset 0 0 0 1px var(--line-2)}.pips{display:flex;gap:3px}.pips span{width:6px;height:14px;border-radius:2px;background:var(--bar-hi)}.pips .off{background:var(--mute-mark)}.tabs{position:sticky;top:0;z-index:20;margin:24px -24px 0;padding:4px 24px 0;background:color-mix(in srgb,var(--bg) 85%,transparent);backdrop-filter:blur(8px)}.seg{position:relative;display:flex;gap:4px;box-shadow:inset 0 -1px 0 var(--line-2);overflow-x:auto;scrollbar-width:none}.seg a{display:inline-flex;flex:none;align-items:center;gap:8px;min-height:44px;padding:3px 16px 0;border-bottom:3px solid transparent;border-radius:var(--r-sm) var(--r-sm) 0 0;color:var(--fg-2);font-size:14px;font-weight:600;white-space:nowrap}.seg a:hover{color:var(--fg);background:var(--hover);border-bottom-color:var(--line-2);text-decoration:none}.seg a:focus-visible{border-radius:var(--r-sm) var(--r-sm) 0 0;box-shadow:inset 0 0 0 2px var(--accent)}.seg a[aria-selected=true]{color:var(--accent);background:var(--accent-soft);border-bottom-color:var(--accent)}.n{font:600 11px/18px var(--sans);min-width:20px;padding:0 6px;border-radius:9px;background:var(--line);color:var(--fg-2);text-align:center;font-variant-numeric:tabular-nums;display:inline-block}.n.bad{background:var(--bad-soft);color:var(--bad)}.n.warn{background:var(--warn-soft);color:var(--warn)}.panel{margin-top:8px}.js .panel[hidden]{display:none}.ph{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;margin:24px 0 12px;flex-wrap:wrap}.panel>.ph:first-child{margin-top:8px}.ph h2{font-size:18px;font-weight:600}.ph h3{font-size:16px;font-weight:600;display:flex;align-items:center;gap:8px}.ph p{color:var(--fg-3);font-size:13px}.ph .more{font-size:13px;font-weight:500}.status-msg:empty{display:none}.status-msg{margin-top:12px;padding:8px 12px;border-radius:var(--r);background:var(--accent-soft)}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--sh-1)}.card-h{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:14px 16px 0}.card-h h4{font-size:13px;font-weight:600}.card-h .sub{font-size:12px}.card-p{padding:14px 16px 0;font-size:13px}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}.grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.pill{display:inline-flex;align-items:center;gap:4px;height:20px;padding:0 8px;border-radius:10px;font-size:11.5px;font-weight:600;white-space:nowrap;background:var(--mute-soft);color:var(--mute);line-height:1}.pill.fb{background:var(--bad-solid);color:#fff}.pill.f{background:var(--bad-soft);color:var(--bad);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--bad) 30%,transparent)}.pill.p{background:var(--ok-soft);color:var(--ok)}.pill.ne{background:none;box-shadow:inset 0 0 0 1px var(--line-2);color:var(--fg-2)}.pill.w{background:var(--warn-soft);color:var(--warn)}.pill.e{background:var(--fg);color:var(--bg)}.pill .i{width:12px;height:12px;vertical-align:0;stroke-width:2}.src{display:inline-block;font:500 11px/18px var(--mono);padding:0 6px;border-radius:4px;color:var(--fg-3);background:var(--sunken);box-shadow:inset 0 0 0 1px var(--line)}.es{font:500 11px var(--mono);color:var(--fg-3)}.kind{display:inline-block;font:500 11px/18px var(--sans);padding:0 6px;border-radius:4px;color:var(--fg-2);background:var(--sunken)}.m{display:inline-block;width:52px;text-align:center;font:700 10.5px/20px var(--mono);border-radius:4px;flex:none;color:var(--fg-2);background:var(--sunken)}.GET{color:var(--get);background:var(--get-bg)}.POST{color:var(--post);background:var(--post-bg)}.PUT{color:var(--put);background:var(--put-bg)}.PATCH{color:var(--patch);background:var(--patch-bg)}.DELETE{color:var(--del);background:var(--del-bg)}.key{font-family:var(--mono);font-size:12.5px;color:var(--fg);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.key i{font-style:normal;color:var(--accent)}.key .o{font:500 10.5px/16px var(--sans);padding:0 5px;margin-right:6px;border-radius:4px;background:var(--sunken);color:var(--fg-3);box-shadow:inset 0 0 0 1px var(--line)}.rq{font:500 10.5px/16px var(--sans);padding:0 5px;border-radius:4px;color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);white-space:nowrap}.key s{text-decoration:none;color:var(--fg-3)}.key b{font-weight:600}.kl{display:flex;align-items:center;gap:8px;min-width:0;color:inherit}a.kl:hover{text-decoration:none}a.kl:hover .key{color:var(--accent);text-decoration:underline;text-underline-offset:3px}.key.st{font-family:var(--sans);font-size:13px}meter{appearance:none;width:64px;height:6px;border-radius:3px;vertical-align:middle;background:var(--track);border:0}meter::-webkit-meter-bar{background:linear-gradient(90deg,transparent calc(80% - 1px),var(--fg-3) calc(80% - 1px),var(--fg-3) 80%,transparent 80%),var(--track);border:0;border-radius:3px;height:6px}meter::-webkit-meter-optimum-value{background:var(--ok-mark);border-radius:3px}meter::-webkit-meter-suboptimum-value{background:var(--warn-mark);border-radius:3px}meter::-webkit-meter-even-less-good-value{background:var(--bad-mark);border-radius:3px}meter::-moz-meter-bar{background:var(--ok-mark);border-radius:3px}meter:-moz-meter-sub-optimum::-moz-meter-bar{background:var(--warn-mark)}meter:-moz-meter-sub-sub-optimum::-moz-meter-bar{background:var(--bad-mark)}.hr{display:inline-flex;align-items:center;gap:8px;font-variant-numeric:tabular-nums;font-size:12.5px;white-space:nowrap}.hr b{font-weight:500;min-width:40px;text-align:right}.hr .ov{color:var(--bad);font-weight:600}.hr .nr{color:var(--warn)}.vlist{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:12px}.vio{position:relative;padding:14px 16px 14px 20px;display:grid;gap:8px;overflow:hidden;align-content:start}.vio:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--bad-mark)}.vio.mu:before{background:var(--mute-mark)}.vio .top{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.vio .top .src{margin-left:auto}.rule{display:flex;align-items:center;gap:12px;font-size:13px;color:var(--fg-2);font-variant-numeric:tabular-nums;flex-wrap:wrap}.rule b{color:var(--fg);font-weight:600}.rule meter{width:96px}.hint{display:flex;gap:8px;font-size:13px;color:var(--fg-2);line-height:1.45}.hint .i{color:var(--warn);margin-top:1px}.toggle{display:inline-flex;padding:2px;border:1px solid var(--line);border-radius:var(--r);background:var(--sunken)}.toggle button{border:0;background:none;font:500 12px var(--sans);color:var(--fg-2);height:24px;padding:0 10px;border-radius:6px;cursor:pointer}.toggle button[aria-pressed=true]{background:var(--surface);color:var(--fg);box-shadow:var(--sh-1),0 0 0 1px var(--line)}.rank{list-style:none;margin:0;padding:8px 8px 12px;counter-reset:r}.rank li{counter-increment:r;display:grid;grid-template-columns:16px minmax(0,1fr) auto;column-gap:8px;row-gap:6px;align-items:center;padding:8px;border-radius:var(--r-sm)}.rank li:hover{background:var(--hover)}.rank li:before{content:counter(r);font-size:11px;color:var(--fg-3);font-variant-numeric:tabular-nums;grid-row:1}.rank .kl{grid-column:2 / -1;gap:6px}.rank .m{width:auto;padding:0 4px;font-size:9.5px;line-height:16px}.rank .key{font-size:12px}.rank .tb{grid-column:2;grid-row:2}.rank .v{grid-column:3;grid-row:2;min-width:64px;text-align:right;font-size:12px;font-variant-numeric:tabular-nums;color:var(--fg-2);white-space:nowrap}.rank .v b{color:var(--fg);font-weight:600}.tb{display:block;height:4px;border-radius:2px;background:var(--track);overflow:hidden}.tb>span{display:block;height:100%;border-radius:2px;background:var(--bar-hi)}.tb.bad>span{background:var(--bad-mark)}.tb.warn>span{background:var(--warn-mark)}.tb.neu>span{background:var(--bar)}.tw{width:72px}.w-0{width:0}.w-5{width:5%}.w-10{width:10%}.w-15{width:15%}.w-20{width:20%}.w-25{width:25%}.w-30{width:30%}.w-35{width:35%}.w-40{width:40%}.w-45{width:45%}.w-50{width:50%}.w-55{width:55%}.w-60{width:60%}.w-65{width:65%}.w-70{width:70%}.w-75{width:75%}.w-80{width:80%}.w-85{width:85%}.w-90{width:90%}.w-95{width:95%}.w-100{width:100%}.tl{list-style:none;margin:0;padding:8px}.tl li{display:grid;grid-template-columns:minmax(0,1fr) 88px 72px;gap:12px;align-items:center;padding:8px;border-radius:var(--r-sm);font-size:13px}.tl.two li{grid-template-columns:minmax(0,1fr) auto}.tl li:hover{background:var(--hover)}.tt{min-width:0}.tt>span,.tt>.kl{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tt>.kl{display:flex}.tt .sub{font:12px var(--mono);margin-top:2px}.tl .num{font-weight:600;display:flex;flex-direction:column;align-items:flex-end;gap:2px}.tl .num .sub{font-weight:400;font-size:12px}.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:12px;border-bottom:1px solid var(--line)}.search{display:flex;align-items:center;gap:8px;height:32px;padding:0 10px;border:1px solid var(--line-2);border-radius:var(--r);background:var(--surface);color:var(--fg-3);width:260px;max-width:100%}.search input{border:0;outline:0;background:none;font:13px var(--sans);color:var(--fg);width:100%}.search:focus-within{box-shadow:var(--focus)}.fg{display:inline-flex;gap:4px;align-items:center;flex-wrap:wrap;padding-left:8px;border-left:1px solid var(--line)}.fg>span{font-size:12px;color:var(--fg-3);margin-right:4px}.flt{height:28px;padding:0 10px;border:1px dashed var(--line-2);border-radius:14px;background:none;color:var(--fg-2);font:500 12px var(--sans);cursor:pointer;display:inline-flex;align-items:center;gap:6px}.flt[aria-pressed=true]{border-style:solid;border-color:var(--accent);background:var(--accent-soft);color:var(--accent-2)}.count{margin-left:auto;font-size:12px;color:var(--fg-3);font-variant-numeric:tabular-nums}.scroll{overflow-x:auto}table{border-collapse:separate;border-spacing:0;width:100%;font-size:13px}caption{text-align:left;padding:0;height:0;overflow:hidden}th{font-size:12px;font-weight:500;color:var(--fg-3);text-align:left;padding:8px 12px;border-bottom:1px solid var(--line);white-space:nowrap;background:var(--sunken)}th.num{text-align:right}th button{all:unset;cursor:pointer;display:inline-flex;gap:4px;align-items:center}th button:hover{color:var(--fg)}th button:focus-visible{box-shadow:var(--focus);border-radius:4px}th[aria-sort=descending] button:after{content:"\u2193";font-size:11px;color:var(--accent)}th[aria-sort=ascending] button:after{content:"\u2191";font-size:11px;color:var(--accent)}td,tbody th{padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap;vertical-align:middle;background:var(--surface);color:var(--fg);font-size:13px;font-weight:400}tbody:last-child tr:last-child>*,tbody:last-child tr.drow:last-child>*{border-bottom:0}.keys>tbody>tr:first-child,.tests tbody tr{transition:background .12s}.js .keys>tbody>tr:first-child:hover>*,.tests tbody tr:hover>*{background:var(--hover)}.js .keys>tbody>tr:first-child{cursor:pointer}.keys>tbody>tr.sel>*{background:var(--accent-soft)}th.k{max-width:440px;padding-left:16px;display:table-cell}th.k:before{content:"";display:inline-block;vertical-align:middle;width:6px;height:6px;border-radius:50%;margin-right:10px;background:var(--ok-mark)}th.k .kl{display:inline-flex;vertical-align:middle;width:max-content;max-width:360px}th.k .key{white-space:normal;overflow-wrap:anywhere}tr.blocking th.k:before,tr.violation th.k:before{background:var(--bad-mark)}tr.muted th.k:before{background:var(--mute-mark)}tr.not-evaluated th.k:before{background:none;box-shadow:inset 0 0 0 1.5px var(--mute-mark)}tr.blocking th.k{box-shadow:inset 3px 0 0 var(--bad-mark)}td.r>*+*{margin-left:6px}td.r .why,td.num .why{display:block;margin:4px 0 0;color:var(--fg-3);font-size:12px}td .lim{color:var(--fg-3);font-size:12px;font-weight:400}td.ov{color:var(--bad);font-weight:600}td.e{color:var(--bad);font-weight:500}td.z{color:var(--fg-3)}td.loc{font:12px var(--mono);color:var(--fg-3)}.tfoot{padding:10px 16px;font-size:12px;color:var(--fg-3);border-top:1px solid var(--line)}.dep{display:inline-block;position:relative;width:16px;height:4px;margin-right:8px;vertical-align:2px;background:radial-gradient(circle,var(--line-2) 2px,transparent 2px) 0 0 / 6px 4px repeat-x}.dep:before{content:"";position:absolute;inset:0 auto 0 0;background:radial-gradient(circle,var(--fg-3) 2px,transparent 2px) 0 0 / 6px 4px repeat-x}.d1:before{width:4px}.d2:before{width:10px}.d3:before{width:16px}.tests th.tc{max-width:360px}.tc>span{display:block;overflow:hidden;text-overflow:ellipsis}.tc .tn{font-weight:500;color:var(--accent)}.tc .sub{font-size:12px;margin-top:2px}td.tk>*{display:flex;gap:6px;align-items:center}td.tk>*+*{margin-top:4px}td.tk2>*{flex-direction:column;align-items:flex-start;gap:0}.tk .kl{display:inline-flex}.tk .m{width:auto;padding:0 4px;font-size:9.5px;line-height:16px}.drow>td{white-space:normal;background:var(--bg)}.js .drow{display:none}.drow summary{cursor:pointer;color:var(--accent);font-weight:500}.kd{padding:0 4px 12px;max-width:920px}.kh{padding-top:12px}.fk{display:block;word-break:break-all;font-size:14px;font-weight:600}.fk .key{white-space:normal;overflow:visible;font-size:inherit}.pills{display:flex;gap:6px;margin-top:10px;flex-wrap:wrap;align-items:center}.ds{padding-top:20px}.ds>h4{font-size:12px;font-weight:600;color:var(--fg-2);margin-bottom:10px;display:flex;justify-content:space-between;gap:8px;align-items:baseline}.ds>h4 .sub{font-weight:400}.hints{list-style:none;display:grid;gap:8px;margin:20px 0 0;padding:12px 14px;border-radius:var(--r);background:var(--warn-soft);border:1px solid color-mix(in srgb,var(--warn-mark) 30%,transparent)}.hints li{display:flex;gap:8px;font-size:13px}.hints .i{color:var(--warn);margin-top:1px}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--line);border-radius:var(--r);margin:0;background:var(--surface)}.stats div{padding:10px 12px;border-left:1px solid var(--line)}.stats div:first-child{border-left:0}.stats dt{font-size:11px;color:var(--fg-3)}.stats dd{margin:0;font-size:16px;font-weight:600;font-variant-numeric:tabular-nums}.stats dd small{font-size:11px;color:var(--fg-3);font-weight:400}.stats .ov dd{color:var(--bad)}.ct{border:1px solid var(--line);border-radius:var(--r);overflow:hidden;overflow-x:auto}.ct td,.ct th{padding:8px 10px}.ct thead th{background:none}.ck td{text-align:right;font-variant-numeric:tabular-nums}.ck td:nth-last-child(-n+2){text-align:left}.ck td.ov{color:var(--bad);font-weight:600}.legend{display:flex;gap:8px 16px;font-size:12px;color:var(--fg-3);margin-top:8px;flex-wrap:wrap}.legend span{display:inline-flex;align-items:center;gap:6px}.legend i{width:10px;height:10px;border-radius:2px;display:inline-block}.legend .lg-lim{border-top:2px dashed var(--bad-mark);height:0;border-radius:0}.stc{display:flex;gap:6px;flex-wrap:wrap}.stc span{font:12px var(--mono);padding:2px 8px;border-radius:var(--r-sm);background:var(--sunken);box-shadow:inset 0 0 0 1px var(--line)}.stc b{font-weight:600}.stc .e{color:var(--bad)}.facts{display:flex;flex-wrap:wrap;gap:4px 16px;margin-top:10px;font-size:12.5px;color:var(--fg-2)}.samples{list-style:none;margin:0;padding:0;border:1px solid var(--line);border-radius:var(--r);background:var(--surface)}.samples li{display:grid;grid-template-columns:72px minmax(0,1fr);gap:12px;padding:10px 12px;border-top:1px solid var(--line);font-size:13px}.samples li:first-child{border-top:0}.samples b{font-variant-numeric:tabular-nums}.samples .sub{font-family:var(--sans)}.samples .url{font:12px var(--mono);color:var(--fg-2);white-space:normal;overflow-wrap:anywhere}.ds .tl{padding:0;border:1px solid var(--line);border-radius:var(--r);background:var(--surface)}.kdlg{width:min(960px,calc(100vw - 32px));max-width:none;max-height:calc(100vh - 48px);padding:0;border:0;border-radius:var(--r-lg);background:var(--surface);color:var(--fg);box-shadow:var(--sh-3);overflow-y:auto;overscroll-behavior:contain}.kdlg::backdrop{background:#1018287f}@media(prefers-reduced-motion:no-preference){.kdlg[open]{animation:pop .12s ease-out}}@keyframes pop{0%{opacity:0;transform:translateY(8px)}}.dh{position:sticky;top:0;z-index:2;background:var(--surface);border-bottom:1px solid var(--line);padding:16px 20px 14px}.dh .nav{display:flex;gap:4px;align-items:center;margin-bottom:10px}.dh .nav .sub{font-size:12px;margin-right:auto}#dlg-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}#dlg-title:focus-visible{box-shadow:none}.dh .kh{padding-top:0}.db{padding:0 20px 8px}.db .kd{padding:0;max-width:none}.dfoot{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:12px 20px 20px}.copy-out input{font:12px var(--mono);width:min(520px,70vw);margin-left:8px}svg.ch,svg.split,svg.bar{display:block;width:100%;height:auto}svg.hist,svg.bar{max-width:720px}.ch text,svg.bar text{font:10.5px var(--sans);fill:var(--fg-3);font-variant-numeric:tabular-nums}.as{text-anchor:start}.am{text-anchor:middle}.ae{text-anchor:end}.hist .gr,.wf .wg{stroke:var(--line);stroke-width:1;stroke-dasharray:2 3;fill:none}.hist .ha{stroke:var(--line-2)}.hist .bars{fill:var(--bar)}.hist .bars-hi{fill:var(--bad-mark)}.hist .hm{stroke:var(--fg-2);stroke-width:1.25}.hist .hl{stroke:var(--bad-mark);stroke-width:1.5;stroke-dasharray:4 3}.hist text{fill:var(--fg-2);font-weight:600}.hist .ht text{fill:var(--fg-3);font-weight:400}.split .st{fill:var(--bar-hi)}.split .so{fill:var(--track);stroke:var(--line-2)}.bar-axis{stroke:var(--line-2)}.bar-range{fill:var(--bar)}.bar-mark{stroke:var(--fg-2);stroke-width:1.5}.bar-limit{stroke:var(--bad-mark);stroke-dasharray:4 3}svg.bar .bar-limit-text{fill:var(--bad)}.wl{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.wf-h{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;padding:16px;border-bottom:1px solid var(--line);flex-wrap:wrap}.wf-h h4{font-size:14px;font-weight:600;overflow-wrap:anywhere}.wf-h .sub{font-size:12px;margin-top:2px}.wf-h dl{display:flex;gap:24px;margin:0}.wf-h dt{font-size:11px;color:var(--fg-3)}.wf-h dd{margin:0;font-weight:600;font-variant-numeric:tabular-nums}.wfs{padding:8px 16px 16px}.wfs svg{min-width:720px}.wf .sep{stroke:var(--line)}.wf use{font:10.5px var(--mono);fill:var(--fg-2)}.wkm{font-weight:700}.wkm.mGET{fill:var(--get)}.wkm.mPOST{fill:var(--post)}.wkm.mPUT{fill:var(--put)}.wkm.mPATCH{fill:var(--patch)}.wkm.mDELETE{fill:var(--del)}.wkp{fill:var(--accent)}.wf g rect{fill:var(--bar-hi)}.wf .we rect,.wf .we path{fill:var(--bad-mark)}.wf .ww rect{fill:var(--warn-mark)}.wf .wm rect{fill:var(--mute-mark)}.wf g path{fill:var(--bad-mark);stroke:var(--surface);stroke-width:1.5}.wf .d{font-size:10px}.wf g:hover use,.wf g:hover text{fill:var(--fg)}.wf g:hover rect{opacity:.85}.sh{font-size:13px;font-weight:600;color:var(--fg-2);margin:8px 0 0}.wn{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:4px 12px;padding:16px}.wn .wi{width:32px;height:32px;border-radius:var(--r);display:grid;place-items:center;background:var(--warn-soft);color:var(--warn);grid-row:1 / 4}.wn.err .wi{background:var(--bad-soft);color:var(--bad)}.wn code{font:600 12.5px var(--mono);align-self:center;overflow-wrap:anywhere}.wn p{grid-column:2 / -1;font-size:13.5px;overflow-wrap:anywhere}.wn .hint .i{color:var(--accent)}.wn .n{align-self:start}.hl-err .wn{border-color:var(--bad-mark)}.kvl{display:grid;grid-template-columns:140px minmax(0,1fr);gap:8px 16px;margin:0;padding:16px;font-size:13px}.kvl dt{color:var(--fg-3)}.kvl dd{margin:0;min-width:0;overflow-wrap:anywhere}.plain{margin:4px 0 0;padding-left:16px}details.cfg summary{padding:14px 16px;cursor:pointer;font-weight:600;font-size:13px;list-style:none;display:flex;gap:8px;align-items:center}details.cfg summary::-webkit-details-marker{display:none}details.cfg summary:before{content:"";width:6px;height:6px;flex:none;border-right:1.5px solid var(--fg-3);border-bottom:1.5px solid var(--fg-3);transform:rotate(-45deg);transition:transform .15s}details.cfg[open] summary:before{transform:rotate(45deg)}details.cfg pre{margin:0;padding:16px;border-top:1px solid var(--line);font:12px/1.6 var(--mono);color:var(--fg-2);overflow-x:auto;background:var(--sunken);border-radius:0 0 var(--r-lg) var(--r-lg)}details.cfg .scroll{border-top:1px solid var(--line)}.empty{display:grid;justify-items:center;text-align:center;gap:8px;padding:40px 24px;color:var(--fg-2)}.empty .ei{width:44px;height:44px;border-radius:var(--r-lg);display:grid;place-items:center;background:var(--sunken);box-shadow:inset 0 0 0 1px var(--line);color:var(--fg-3)}.empty h3{font-size:15px;color:var(--fg)}.empty p{font-size:13px;max-width:56ch}.empty.sm{padding:20px 16px;gap:6px}.empty.sm .i{color:var(--ok-mark)}.note{display:flex;gap:10px;padding:12px 14px;border-radius:var(--r);background:var(--accent-soft);color:var(--fg);font-size:13px;align-items:flex-start}.note .i{color:var(--accent);margin-top:1px}.note code{background:var(--surface);padding:1px 5px;border-radius:4px}footer{padding:24px 0 40px;font-size:12px;color:var(--fg-3);border-top:1px solid var(--line)}@media(max-width:1100px){.grid4{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:1023px){.kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.kpi:nth-child(4){border-left:0}.kpi:nth-child(n+4){border-top:1px solid var(--line)}.hero{grid-template-columns:minmax(0,1fr)}.subst{border-left:0;padding-left:0;border-top:1px solid var(--line);padding-top:16px;min-width:0}}@media(max-width:720px){.grid2,.vlist{grid-template-columns:minmax(0,1fr)}}@media(max-width:599px){.wrap{padding:0 16px}.tabs{margin:16px -16px 0;padding:4px 16px 0}.seg a{padding:3px 12px 0}.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.kpi{padding:12px 14px}.kpi:nth-child(n){border-left:1px solid var(--line);border-top:1px solid var(--line)}.kpi:nth-child(odd){border-left:0}.kpi:nth-child(-n+2){border-top:0}.kv{font-size:20px;line-height:28px}.grid4{grid-template-columns:minmax(0,1fr)}.hero{padding:20px 16px}.status{font-size:24px;line-height:32px}.v-ic{width:40px;height:40px}.summary{font-size:14px}.ss{grid-template-columns:88px minmax(0,1fr)}.brand{flex:1;min-width:0;overflow:hidden}.brand b{overflow:hidden;text-overflow:ellipsis}.brand .ver{display:none}.meta{order:3;flex:0 0 100%;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}.appbar .btn span{display:none}.appbar .btn{width:32px;padding:0;justify-content:center}.vio .rule meter{display:none}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.stats div:nth-child(3){border-left:0}.stats div:nth-child(n+3){border-top:1px solid var(--line)}.tl li{grid-template-columns:minmax(0,1fr) 72px}.tl li>.num:last-child{display:none}.tl.two li>.num:last-child{display:flex}.fg{border-left:0;padding-left:0}.kvl{grid-template-columns:minmax(0,1fr);gap:2px}.kvl dd{margin-bottom:8px}.kdlg{width:100vw;max-width:100vw;height:100vh;max-height:100vh;margin:0;border-radius:0}.dh,.dfoot{padding-left:16px;padding-right:16px}.db{padding:0 16px 8px}}@media print{:root{--bg: #ffffff;--sh-1: none;--sh-2: none}.tabs,.toolbar,.btn,.toggle,.js-only,.kdlg,.skip,.status-msg,[data-none],th button:after{display:none!important}.js .panel[hidden]{display:block!important}.js .drow{display:table-row}.scroll,.ct{overflow:visible}tr,.card,.kpi,.wfb,svg{break-inside:avoid}details[data-v]::details-content{content-visibility:visible;display:block}}';
6474
+ var STYLES_SHA256 = "P8DYPJROVk22uiAg4SQ4HzTpzX2h3D1hiPSUAQXSQwo=";
5841
6475
  var SCRIPT = '(()=>{const u=document,ee=u.getElementById("report-data")?.textContent??"{}",q=JSON.parse(ee),B={api:q.endpoints??{},step:q.steps??{}},re=q.testBreakdown?.tests??[],te={api:"endpoints",step:"steps"};u.documentElement.classList.add("js");function f(e,n=u){return Array.from(n.querySelectorAll(e))}function A(e,n){return Object.prototype.hasOwnProperty.call(e,n)}const V=u.getElementById("status");function $(e){V!==null&&(V.textContent=e)}function w(e){history.replaceState(null,"",e)}const E=u.querySelector("[data-tabs]"),T=E===null?[]:f("a[data-tab]",E),H=new Map;for(const e of f("[data-panel]"))H.set(e.dataset.panel??"",e);let U="overview";function ae(e,n){const t=n.offsetLeft,l=t+n.offsetWidth;t<e.scrollLeft?e.scrollLeft=t:l>e.scrollLeft+e.clientWidth&&(e.scrollLeft=l-e.clientWidth)}function h(e,n=!1){if(H.has(e)){U=e;for(const t of T){const l=t.dataset.tab===e;t.setAttribute("aria-selected",String(l)),t.tabIndex=l?0:-1,l&&n&&t.focus(),l&&E!==null&&ae(E,t)}for(const[t,l]of H)l.hidden=t!==e}}if(E!==null){E.setAttribute("role","tablist");for(const e of T){const n=e.dataset.tab??"";e.setAttribute("role","tab"),e.setAttribute("aria-controls",`tab-${n}`);const t=H.get(n);t?.setAttribute("role","tabpanel"),t?.setAttribute("aria-labelledby",e.id)}E.addEventListener("keydown",e=>{const n=T.findIndex(s=>s.dataset.tab===U);let t=-1;if(e.key==="ArrowRight"?t=(n+1)%T.length:e.key==="ArrowLeft"?t=(n-1+T.length)%T.length:e.key==="Home"?t=0:e.key==="End"&&(t=T.length-1),t<0)return;e.preventDefault();const l=T[t]?.dataset.tab??"overview";h(l,!0),w(`#tab=${l}`)})}const I={api:new Map,step:new Map};function j(e){const n=e?.dataset.kind??"api";return A(te,n)?n:"api"}const x=new Map;for(const e of f("table.keys")){const n=j(e);for(const t of Array.from(e.tBodies)){const l=t.querySelector(".fk")?.textContent??"";x.set(t,l),A(B[n],l)&&I[n].set(l,t)}}function ie(e){return j(e.closest("table"))}const _={api:"Endpoint",step:"Step"},d=u.getElementById("key-dialog"),C=u.getElementById("dlg-title"),z=u.getElementById("dlg-pos"),ue=d?.querySelector(".dh-slot")??null,J=d?.querySelector(".db")??null,k=d?.querySelector(".copy-out")??null,G=d?.querySelector(\'[data-act="prev"]\')??null,Q=d?.querySelector(\'[data-act="next"]\')??null;let p=null,K=null;function P(){p!==null&&(p.head!==null&&p.block.prepend(p.head),p.home.appendChild(p.block),p.body.rows[0]?.classList.remove("sel"),p=null)}function ne(e){const n=e.closest("table");return n===null?[e]:Array.from(n.tBodies).filter(t=>!t.hidden)}function W(e,n,t=!1){const l=e.querySelector("details"),s=l?.querySelector(".kd");if(d===null||J===null||l===null||s==null)return;P(),n!==null&&(K=n);const o=s.querySelector(".kh");o!==null&&ue?.appendChild(o),J.appendChild(s),p={body:e,block:s,head:o,home:l},e.rows[0]?.classList.add("sel");const r=ie(e),m=x.get(e)??"",c=ne(e),a=c.indexOf(e);C!==null&&(C.textContent=m),z!==null&&(z.textContent=a<0?_[r]:`${_[r]} ${String(a+1)} of ${String(c.length)}`),G!==null&&(G.disabled=a<=0),Q!==null&&(Q.disabled=a<0||a>=c.length-1),k!==null&&(k.hidden=!0),t&&h(te[r]),d.open||(d.showModal(),u.documentElement.classList.add("modal-open")),d.scrollTop=0,w(`#key=${r}:${encodeURIComponent(m)}`),C?.focus()}let O=!0;function v(e=!0){d===null||!d.open||(O=e,P(),d.close())}d?.addEventListener("close",()=>{P(),u.documentElement.classList.remove("modal-open"),O&&(w(`#tab=${U}`),K?.focus()),O=!0,K=null});function X(e){if(p===null)return;const n=ne(p.body),t=n[n.indexOf(p.body)+e];t!==void 0&&W(t,null)}d?.addEventListener("click",e=>{if(e.target===d){v();return}const n=e.target.closest("[data-act]")?.dataset.act;n==="close"?v():n==="prev"?X(-1):n==="next"&&X(1)});function F(e,n=null){let t=/^#tab[=-]([a-z-]+)$/u.exec(e);if(t!==null){v(!1);const s=t[1]??"";H.has(s)?(h(s),w(`#tab=${s}`)):(h("overview"),$("Tab not found in this report"));return}let l;if(t=/^#key=(api|request|step):(.*)$/su.exec(e),t!==null){let s;try{s=decodeURIComponent(t[2]??"")}catch{s=null}const o=t[1];s!==null&&A(I,o)&&(l=I[o].get(s))}else{if(t=/^#key-(?:api|step)-(\\d+)$/u.exec(e),t===null)return;l=u.getElementById(e.slice(1))?.closest("tbody")??void 0}if(l===void 0){v(!1),h("overview"),$("Key not found in this report");return}W(l,n,n===null)}u.addEventListener("click",e=>{const n=e.target,t=n.closest(\'a[href^="#"]\');if(t===null){const s=n.closest("table.keys > tbody > tr:first-child"),o=s?.parentElement;if(s==null||!(o instanceof HTMLTableSectionElement)||n.closest("button, input, label, summary")!==null)return;W(o,s.querySelector(\'a[href^="#key-"]\'));return}const l=t.getAttribute("href")??"";if(t.hasAttribute("data-show-violations")){e.preventDefault(),v(!1),h("endpoints"),w("#tab=endpoints"),me();return}/^#(?:tab-|key-)/u.test(l)&&(e.preventDefault(),F(l,t))});window.addEventListener("hashchange",()=>F(location.hash));function ce(e){const n=e.evaluation.checks;if(n.length===0)return null;let t=-1/0;for(const l of n)t=Math.max(t,l.usage??1/0);return t}function de(e,n,t){if(e===void 0)return null;switch(n){case"headroom":return ce(e);case"samples":return e.successCount;case"errors":return e.errorCount;case"p50":return e.stats?.percentiles.p50??null;case"percentile":return e.stats?.percentiles[t]??null;case"p99":return e.stats?.percentiles.p99??null;case"max":return e.stats?.max??null;case"ttfb":return e.ttfb?.p50??null;case"tests":return e.testCount;default:return null}}function fe(e,n){if(e===void 0)return null;switch(n){case"runs":return e.executions;case"requests":return e.requestCount;case"errors":return e.errorCount;case"total":return e.totalMs;case"avg":return Math.round(e.totalMs/e.executions*10)/10;case"longest":return e.maxRequestMs;case"keys":return e.keyCount;case"violations":return e.violatedKeyCount;default:return null}}function le(e,n,t){const l=f("th[data-sort]",e);let s=null;for(const o of l){const r=o.dataset.sort??"";o.querySelector("button")?.addEventListener("click",()=>{const c=r==="key"||r==="title"||r==="result"||r==="source"?"ascending":"descending",a=s?.column===r?s.direction==="ascending"?"descending":"ascending":c;s={column:r,direction:a};const L=a==="ascending"?1:-1,g=[...n].sort((i,b)=>{if(r==="key"||r==="title")return(i.text<b.text?-1:i.text>b.text?1:0)*L||i.order-b.order;const y=i.value(r),M=b.value(r);return y===null||M===null?y===M?i.order-b.order:y===null?1:-1:(y-M)*L||i.order-b.order});for(const i of g)t.appendChild(i.element);for(const i of l)i===o?i.setAttribute("aria-sort",a):i.removeAttribute("aria-sort")})}}const se=new Map;function oe(e,n){const t=u.querySelector(`[data-for="${e}"]`);if(t===null)return;const l=t.querySelector(\'input[type="search"]\'),s=f("button[data-f]",t),o=t.querySelector("[data-count]"),r=t.querySelector("[data-none]");function m(){const c=(l?.value??"").toLowerCase(),a=new Map;for(const g of s){if(g.getAttribute("aria-pressed")!=="true")continue;const i=g.dataset.f??"",b=a.get(i)??new Set;b.add(g.dataset.v??""),a.set(i,b)}let L=0;for(const g of n){let i=g.text.includes(c);for(const[b,y]of a){const M=g.attributes[b]??null;(M===null||!y.has(M))&&(i=!1)}g.element.hidden=!i,i&&L++}o!==null&&(o.textContent=`showing ${L} of ${n.length}`),r!==null&&(r.hidden=L>0)}for(const c of s)c.addEventListener("click",()=>{c.setAttribute("aria-pressed",String(c.getAttribute("aria-pressed")!=="true")),m()});l?.addEventListener("input",m);for(const c of f("[data-reset]",t))c.addEventListener("click",()=>{l!==null&&(l.value="");for(const a of s)a.setAttribute("aria-pressed","false");m()});se.set(e,c=>{l!==null&&(l.value="");for(const a of s){const L=c[a.dataset.f??""]?.includes(a.dataset.v??"")===!0;a.setAttribute("aria-pressed",String(L))}m()})}function me(){se.get("table-api")?.({g:["0","1"]})}for(const e of f("table.keys")){const n=j(e),t=e.dataset.level??"p95",l=Array.from(e.tBodies),s=l.map(o=>{const r=x.get(o)??"";return{element:o,order:Number(/\\d+$/u.exec(o.querySelector("details")?.id??"")?.[0]??"0"),text:r,value:m=>m==="result"?Number(o.dataset.g??"3"):m==="source"?Number(r.startsWith("request ")):de(A(B[n],r)?B[n][r]:void 0,m,t)}});le(e,s,e),oe(e.id,l.map(o=>({element:o,text:(x.get(o)??"").toLowerCase(),attributes:{g:o.dataset.g??null,s:o.dataset.s??null,m:o.hasAttribute("data-m")?"":null}})))}const N=u.querySelector("#table-tests"),D=N?.tBodies[0];if(N!==null&&D!==void 0){const e=Array.from(D.rows),n=t=>re[Number(t.dataset.i??"-1")];le(N,e.map(t=>({element:t,order:Number(t.dataset.i??"0"),text:n(t)?.title??"",value:l=>fe(n(t),l)})),D),oe("table-tests",e.map(t=>{const l=n(t);return{element:t,text:`${l?.title??""}\\0${l?.file??""}`.toLowerCase(),attributes:{v:t.hasAttribute("data-v")?"":null}}}))}const Y=u.querySelector("[data-kinds]");if(Y!==null){const e=f("button[data-k]",Y),n=t=>{for(const l of e)l.setAttribute("aria-pressed",String(l.dataset.k===t));for(const l of f("ol[data-rank]")){let s=0;for(const o of f("li",l)){const r=o.dataset.k===t&&s<10;o.hidden=!r,r&&s++}l.hidden=s===0;for(const o of f("[data-k-empty]",l.parentElement??u))o.hidden=o.dataset.kEmpty!==t}};for(const t of e)t.addEventListener("click",()=>n(t.dataset.k??"api"));n(e[0]?.dataset.k??"api")}u.addEventListener("click",e=>{if(e.target.closest("[data-copy]")===null)return;const n=location.href,t=()=>{const l=k?.querySelector("input");k===null||l==null||(k.hidden=!1,l.value=n,l.focus(),l.select())};if(navigator.clipboard===void 0){t();return}navigator.clipboard.writeText(n).then(()=>$("Link copied"),t)});const Z=u.getElementById("download"),R=u.getElementById("download-link");Z instanceof HTMLButtonElement&&R instanceof HTMLAnchorElement&&Z.addEventListener("click",()=>{const e=URL.createObjectURL(new Blob([ee],{type:"application/json"}));R.href=e,R.click(),setTimeout(()=>URL.revokeObjectURL(e),1e3)});for(const e of f(".js-only"))e.hidden=!1;let S=[];window.addEventListener("beforeprint",()=>{v(!1),S=f("details[data-v]:not([open])");for(const e of S)e.open=!0});window.addEventListener("afterprint",()=>{for(const e of S)e.open=!1;S=[]});h("overview");F(location.hash);})();';
5842
6476
  var SCRIPT_SHA256 = "Jda/ayo/X8RNPoTXXep2nOa041MPnyTQ/N6biJU+P6k=";
5843
6477
 
@@ -5907,7 +6541,7 @@ function place(marks2, axisMax) {
5907
6541
  const rowsEnd = [];
5908
6542
  return [...marks2].sort((a, b) => a.value - b.value).map((mark) => {
5909
6543
  const x = coordinate(mark.value, axisMax);
5910
- const text2 = `${mark.label} ${formatMs(mark.value)}`;
6544
+ const text2 = `${mark.label} ${formatMs2(mark.value)}`;
5911
6545
  const width = text2.length * CHAR;
5912
6546
  const anchor = x - width / 2 < 0 ? "start" : x + width / 2 > WIDTH ? "end" : "middle";
5913
6547
  const from = anchor === "start" ? x : anchor === "end" ? x - width : x - width / 2;
@@ -5954,9 +6588,9 @@ function percentileBar(stats2, limits, level) {
5954
6588
  const width = Math.max(0, Math.round((coordinate(p99, axisMax) - x1) * 10) / 10);
5955
6589
  range = html`<rect class="bar-range" x="${x1}" y="${axisY - 4}" width="${width}" height="8"/>`;
5956
6590
  }
5957
- const describe = [...markers, ...lines].map((m) => `${m.label} ${formatMs(m.value)}`).join(", ");
6591
+ const describe = [...markers, ...lines].map((m) => `${m.label} ${formatMs2(m.value)}`).join(", ");
5958
6592
  const label = `Percentiles and limits: ${describe}`;
5959
- return html`<svg class="bar" viewBox="0 0 ${WIDTH} ${height}" role="img" aria-label="${label}"><line class="bar-axis" x1="${LEFT}" y1="${axisY}" x2="${RIGHT}" y2="${axisY}"/>${range}${lineSvg}${markerSvg}<text class="bar-scale" x="${LEFT}" y="${height - 2}">0</text><text class="bar-scale" x="${RIGHT}" y="${height - 2}" text-anchor="end">${formatMs(axisMax)}</text></svg>`;
6593
+ return html`<svg class="bar" viewBox="0 0 ${WIDTH} ${height}" role="img" aria-label="${label}"><line class="bar-axis" x1="${LEFT}" y1="${axisY}" x2="${RIGHT}" y2="${axisY}"/>${range}${lineSvg}${markerSvg}<text class="bar-scale" x="${LEFT}" y="${height - 2}">0</text><text class="bar-scale" x="${RIGHT}" y="${height - 2}" text-anchor="end">${formatMs2(axisMax)}</text></svg>`;
5960
6594
  }
5961
6595
 
5962
6596
  // src/html/charts.ts
@@ -5983,7 +6617,7 @@ function place2(marks2, width) {
5983
6617
  return [...marks2].sort((a, b) => a.x - b.x).map((mark) => {
5984
6618
  const arrowLeft = mark.side === "left" ? "\u2190 " : "";
5985
6619
  const arrowRight = mark.side === "right" ? " \u2192" : "";
5986
- const text2 = `${arrowLeft}${mark.label} ${formatMs(mark.value)}${arrowRight}`;
6620
+ const text2 = `${arrowLeft}${mark.label} ${formatMs2(mark.value)}${arrowRight}`;
5987
6621
  const w = text2.length * CHAR2;
5988
6622
  const anchor = mark.x - w / 2 < 0 ? "start" : mark.x + w / 2 > width ? "end" : "middle";
5989
6623
  const from = anchor === "start" ? mark.x : anchor === "end" ? mark.x - w : mark.x - w / 2;
@@ -6012,7 +6646,7 @@ function histogramX(edges, value) {
6012
6646
  return { x: r(H_LEFT + (i + (value - lo) / (hi - lo)) * width) };
6013
6647
  }
6014
6648
  function edgeText(value) {
6015
- return formatMs(value);
6649
+ return formatMs2(value);
6016
6650
  }
6017
6651
  function histogramSvg(input) {
6018
6652
  const { edges, counts } = input;
@@ -6036,8 +6670,8 @@ function histogramSvg(input) {
6036
6670
  }
6037
6671
  const outline = (from, to) => {
6038
6672
  let previous = base;
6039
- const steps = counts.slice(from, to).map((count2) => {
6040
- const y = r(base - H_BARS * count2 / most);
6673
+ const steps = counts.slice(from, to).map((count3) => {
6674
+ const y = r(base - H_BARS * count3 / most);
6041
6675
  const step = y === previous ? "" : `V${y}`;
6042
6676
  previous = y;
6043
6677
  return `${step}h${r(width)}`;
@@ -6069,9 +6703,9 @@ function histogramSvg(input) {
6069
6703
  )}</g>`;
6070
6704
  const peak = counts.indexOf(Math.max(...counts));
6071
6705
  const summary = [
6072
- `Histogram of ${plural3(input.retained, "duration")} from ${formatMs(first2)} to ${formatMs(last)}`,
6073
- `most (${String(counts[peak] ?? 0)}) in ${formatMs(edges[peak] ?? 0)}\u2013${formatMs(edges[peak + 1] ?? 0)}`,
6074
- marks2.map((m) => `${m.label} ${formatMs(m.value)}`).join(", ")
6706
+ `Histogram of ${plural3(input.retained, "duration")} from ${formatMs2(first2)} to ${formatMs2(last)}`,
6707
+ `most (${String(counts[peak] ?? 0)}) in ${formatMs2(edges[peak] ?? 0)}\u2013${formatMs2(edges[peak + 1] ?? 0)}`,
6708
+ marks2.map((m) => `${m.label} ${formatMs2(m.value)}`).join(", ")
6075
6709
  ].join("; ");
6076
6710
  const label = input.sampled ? `${summary}; uniform sample of ${String(input.retained)}` : summary;
6077
6711
  return html`<svg class="hist ch" viewBox="0 0 ${H_WIDTH} ${height}" role="img" aria-label="${label}">${grid}${bars}<path class="ha" d="M${H_LEFT} ${base}H${H_RIGHT}"/>${markSvg}${tickSvg}</svg>`;
@@ -6080,7 +6714,7 @@ function ttfbSplitSvg(ttfb, other) {
6080
6714
  const total = ttfb + other;
6081
6715
  if (total <= 0) return null;
6082
6716
  const width = r(H_WIDTH * ttfb / total);
6083
- const label = `TTFB p50 ${formatMs(ttfb)}, rest ${formatMs(other)}`;
6717
+ const label = `TTFB p50 ${formatMs2(ttfb)}, rest ${formatMs2(other)}`;
6084
6718
  return html`<svg class="split" viewBox="0 0 ${H_WIDTH} 16" role="img" aria-label="${label}"><rect class="st" width="${width}" height="16"/><rect class="so" x="${width}" width="${r(H_WIDTH - width)}" height="16"/></svg>`;
6085
6719
  }
6086
6720
  var W_WIDTH = 960;
@@ -6105,7 +6739,7 @@ function waterfallSvg(waterfall2, id) {
6105
6739
  const ticks = [0, 1, 2, 3, 4].map((q) => {
6106
6740
  const value = waterfall2.spanMs * q / 4;
6107
6741
  const anchor = q === 0 ? "start" : q === 4 ? "end" : "middle";
6108
- return html`<text class="wt ${ANCHOR[anchor]}" x="${x(value)}" y="12">+${formatMs(value)}</text><path class="wg" d="M${x(value)} 16V${height}"/>`;
6742
+ return html`<text class="wt ${ANCHOR[anchor]}" x="${x(value)}" y="12">+${formatMs2(value)}</text><path class="wg" d="M${x(value)} 16V${height}"/>`;
6109
6743
  });
6110
6744
  let longest = null;
6111
6745
  const labels = /* @__PURE__ */ new Map();
@@ -6127,7 +6761,7 @@ function waterfallSvg(waterfall2, id) {
6127
6761
  const rowSvg = rows.map((req, i) => {
6128
6762
  const y = W_TOP + i * W_ROW;
6129
6763
  const ref = labels.get(req.key)?.ref ?? "";
6130
- const title2 = `${req.key} \xB7 ${req.status} \xB7 start +${formatMs(req.offset)} \xB7 ${req.duration === null ? "no duration" : formatMs(req.duration)}`;
6764
+ const title2 = `${req.key} \xB7 ${req.status} \xB7 start +${formatMs2(req.offset)} \xB7 ${req.duration === null ? "no duration" : formatMs2(req.duration)}`;
6131
6765
  if (req.duration !== null && (longest === null || req.duration > (longest.duration ?? 0))) {
6132
6766
  longest = req;
6133
6767
  }
@@ -6140,7 +6774,7 @@ function waterfallSvg(waterfall2, id) {
6140
6774
  const width = Math.max(2, r(req.duration * scale));
6141
6775
  const end = r(from + width);
6142
6776
  const ok = /^[23]/u.test(req.status);
6143
- const text2 = `${formatMs(req.duration)}${ok ? "" : ` \xB7 ${req.status}`}`;
6777
+ const text2 = `${formatMs2(req.duration)}${ok ? "" : ` \xB7 ${req.status}`}`;
6144
6778
  const label = end > W_RIGHT - 40 ? html`<text class="d ae" x="${r(from - 6)}" y="${y + 14}">${text2}</text>` : html`<text class="d" x="${r(end + 6)}" y="${y + 14}">${text2}</text>`;
6145
6779
  mark = html`<rect x="${from}" y="${y + 4}" width="${width}" height="12" rx="2"/>${label}`;
6146
6780
  }
@@ -6148,8 +6782,8 @@ function waterfallSvg(waterfall2, id) {
6148
6782
  });
6149
6783
  const top = longest;
6150
6784
  const summary = [
6151
- `Waterfall of ${plural3(waterfall2.requestCount, "request")} over ${formatMs(waterfall2.spanMs)}`,
6152
- top === null ? null : `longest request ${top.key} ${formatMs(top.duration ?? 0)}`
6785
+ `Waterfall of ${plural3(waterfall2.requestCount, "request")} over ${formatMs2(waterfall2.spanMs)}`,
6786
+ top === null ? null : `longest request ${top.key} ${formatMs2(top.duration ?? 0)}`
6153
6787
  ].filter((s) => s !== null).join("; ");
6154
6788
  return html`<svg class="wf ch" viewBox="0 0 ${W_WIDTH} ${height}" role="img" aria-label="${summary}">${defs}${ticks}<path class="sep" d="M${W_SEP} 16V${height}"/>${rowSvg}</svg>`;
6155
6789
  }
@@ -6180,32 +6814,30 @@ function text(params, name) {
6180
6814
  function capitalize(label) {
6181
6815
  return /^p\d/u.test(label) ? label : label.charAt(0).toUpperCase() + label.slice(1);
6182
6816
  }
6183
- function times(usage) {
6184
- return (Math.floor(Math.round(usage * 1e4) / 1e3) / 10).toFixed(1);
6185
- }
6186
- function hintText(hint2, level, muted) {
6817
+ function hintText(hint2, level, muted, kind2 = "api") {
6187
6818
  const p = hint2.params;
6819
+ const responses = kind2 === "step" ? "samples" : "responses";
6188
6820
  const over = () => String(overPercent(num2(p, "usage")));
6189
6821
  const pctMedian = () => String(usagePercent(num2(p, "medianUsage")));
6190
6822
  switch (hint2.code) {
6191
6823
  case "HINT_HARD_LIMIT":
6192
- return `${capitalize(ruleLabel(text(p, "rule"), level))} is ${times(num2(p, "usage"))}\xD7 its limit, above the hard limit of ${String(num2(p, "factor"))}\xD7: it fails the run regardless of tolerance.`;
6824
+ return `${capitalize(ruleLabel(text(p, "rule"), level))} is ${formatFactor(num2(p, "usage"), num2(p, "factor"))}\xD7 its limit, above the hard limit of ${String(num2(p, "factor"))}\xD7: it fails the run regardless of tolerance.`;
6193
6825
  case "HINT_SLOWDOWN":
6194
- return `The median is ${over()}% over its limit: most responses are slower, not only the tail.`;
6826
+ return `The median is ${over()}% over its limit: most ${responses} are slower, not only the tail.`;
6195
6827
  case "HINT_TAIL":
6196
- return `${level} is ${over()}% over its limit while the median is at ${pctMedian()}% of its limit: a growing tail of slow responses, not a general slowdown.`;
6828
+ return `${level} is ${over()}% over its limit while the median is at ${pctMedian()}% of its limit: a growing tail of slow ${responses}, not a general slowdown.`;
6197
6829
  case "HINT_SHIFT":
6198
6830
  return `${level} is ${over()}% over its limit and the median is at ${pctMedian()}% of its limit: the whole distribution moved up.`;
6199
6831
  case "HINT_OUTLIERS":
6200
- return `Only p99 is over its limit (by ${over()}%): a few very slow responses, up to ${formatMs(num2(p, "max"))}; see the slowest samples.`;
6832
+ return `Only p99 is over its limit (by ${over()}%): a few very slow ${responses}, up to ${formatMs2(num2(p, "max"))}; see the slowest samples.`;
6201
6833
  case "HINT_ERRORS_DOMINANT":
6202
6834
  return `Error rate ${formatPercent(num2(p, "rate"))} is above the limit of ${formatPercent(num2(p, "limit"))}, mostly ${text(p, "label")} (${String(num2(p, "count"))} of ${String(num2(p, "errors"))} errors).`;
6203
6835
  case "HINT_ERRORS_MIXED":
6204
6836
  return `Error rate ${formatPercent(num2(p, "rate"))} is above the limit of ${formatPercent(num2(p, "limit"))}; errors are spread over ${text(p, "label1")} (${String(num2(p, "count1"))}), ${text(p, "label2")} (${String(num2(p, "count2"))}) and ${text(p, "label3")} (${String(num2(p, "count3"))}).`;
6205
6837
  case "HINT_APDEX":
6206
- return `Apdex ${formatRatio(num2(p, "apdex"))} is below the limit of ${formatRatio(num2(p, "limit"))} although the percentiles are within limits: many responses are slower than T = ${formatMs(num2(p, "t"))}.`;
6838
+ return `Apdex ${formatRatio(num2(p, "apdex"))} is below the limit of ${formatRatio(num2(p, "limit"))} although the percentiles are within limits: many ${responses} are slower than T = ${formatMs2(num2(p, "t"))}.`;
6207
6839
  case "HINT_SLOW_SHARE":
6208
- return `${formatPercent(num2(p, "share"))} of responses are slower than T = ${formatMs(num2(p, "t"))} (limit ${formatPercent(num2(p, "limit"))}) although the percentiles are within limits: a slow minority.`;
6840
+ return `${formatPercent(num2(p, "share"))} of ${responses} are slower than T = ${formatMs2(num2(p, "t"))} (limit ${formatPercent(num2(p, "limit"))}) although the percentiles are within limits: a slow minority.`;
6209
6841
  case "HINT_MEDIAN_ONLY":
6210
6842
  return `Only the median was evaluated (n = ${String(num2(p, "n"))}): add repetitions for a reliable verdict.`;
6211
6843
  case "HINT_MUTED":
@@ -6266,19 +6898,20 @@ var SHARE_RULES2 = /* @__PURE__ */ new Set([
6266
6898
  "wilson",
6267
6899
  "errors"
6268
6900
  ]);
6269
- function pointsOver(check2) {
6270
- if (check2.passed || !SHARE_RULES2.has(check2.rule)) return void 0;
6271
- return Math.max(1, Math.round(Math.abs(check2.actual - check2.limit) * 100));
6901
+ function overOf(check2) {
6902
+ if (check2.passed) return void 0;
6903
+ if (!SHARE_RULES2.has(check2.rule) && check2.usage === null) return void 0;
6904
+ return overText(check2);
6272
6905
  }
6273
6906
  function usageMeter(check2, long = false) {
6274
6907
  const usage = check2.usage;
6275
6908
  const failed = !check2.passed;
6276
6909
  const value = usage === null ? 1.25 : Math.min(usage, 1.25);
6277
6910
  const cls = usageClass(usage, failed);
6278
- return html`<label class="hr"><meter max="1.25" low="0.9" high="1" optimum="0" value="${value}"></meter><b${cls === "" ? null : html` class="${cls}"`}>${usageText(usage, failed, long, pointsOver(check2))}</b></label>`;
6911
+ return html`<label class="hr"><meter max="1.25" low="0.9" high="1" optimum="0" value="${value}"></meter><b${cls === "" ? null : html` class="${cls}"`}>${usageText(usage, failed, long, overOf(check2))}</b></label>`;
6279
6912
  }
6280
6913
  function checkValue(check2, value) {
6281
- if (TIME_RULES4.has(check2.rule)) return formatMs(value);
6914
+ if (TIME_RULES4.has(check2.rule)) return formatMs2(value);
6282
6915
  return check2.rule === "errors" ? formatPercent(value) : formatRatio(value);
6283
6916
  }
6284
6917
  function lowestMinSamples(report, level) {
@@ -6307,7 +6940,30 @@ function checkPill(c) {
6307
6940
  if (c.hardLimitExceeded) return pill("fb", "hard limit");
6308
6941
  return c.blocking ? pill("fb", "blocking") : pill("f", "fail");
6309
6942
  }
6310
- function checksTable(ctx, agg) {
6943
+ function lowestT(report, kind2) {
6944
+ let value = report.thresholdFiles.find((f) => f.kind === kind2)?.generated;
6945
+ for (const name of ["derivation", "t", "min"]) {
6946
+ value = typeof value === "object" && value !== null ? value[name] : void 0;
6947
+ }
6948
+ return typeof value === "number" ? value : null;
6949
+ }
6950
+ function checksLegend(ctx, kind2, agg) {
6951
+ const checks = agg.evaluation.checks;
6952
+ const lines = [];
6953
+ if (checks.some((c) => SHARE_RULES2.has(c.rule))) {
6954
+ lines.push(
6955
+ "Raw is measured in this run; time rules compare it with the limit. Share rules compare Bound, the 95% confidence bound (upper for Apdex, lower otherwise), so chance alone does not fail them."
6956
+ );
6957
+ }
6958
+ const t = agg.evaluation.limits.t;
6959
+ if (t !== null && checks.some((c) => c.rule === "apdex" || c.rule === "wilson")) {
6960
+ lines.push(
6961
+ lowestT(ctx.report, kind2) === t ? `T = ${formatMs2(t)}, the lowest allowed for ${kind2 === "step" ? "steps" : "endpoints"}: faster samples count as satisfied, so Apdex and slow share can pass while the percentiles fail.` : `T = ${formatMs2(t)}: slower samples count as slow.`
6962
+ );
6963
+ }
6964
+ return lines.length === 0 ? null : html`<p class="legend">${lines.join(" ")}</p>`;
6965
+ }
6966
+ function checksTable(ctx, kind2, agg) {
6311
6967
  const ev = agg.evaluation;
6312
6968
  if (ev.result === "not-evaluated") {
6313
6969
  const reason = reasonText(ev.reason);
@@ -6322,30 +6978,36 @@ function checksTable(ctx, agg) {
6322
6978
  }
6323
6979
  const ns = new Set(ev.checks.map((c) => c.n));
6324
6980
  const commonN = ns.size === 1 ? [...ns][0] : void 0;
6325
- const observed = ev.checks.some((c) => c.observed !== null);
6326
- const row = (c) => join4(
6327
- html`<tr${c.passed ? null : html` class="ov"`}><th scope="row">${ruleLabel(c.rule, ctx.level)}</th>`,
6328
- // Numbers are right-aligned by the table style, without a class per cell.
6329
- commonN === void 0 ? html`<td>${c.n}</td>` : null,
6330
- html`<td>${checkValue(c, c.actual)}</td>`,
6331
- observed ? html`<td>${c.observed === null ? null : checkValue(c, c.observed)}</td>` : null,
6332
- html`<td>${checkValue(c, c.limit)}</td><td>`,
6333
- ctx.migrated ? DASH : usageMeter(c, true),
6334
- html`</td><td>${checkPill(c)}</td></tr>`
6335
- );
6981
+ const bound = ev.checks.some((c) => SHARE_RULES2.has(c.rule));
6982
+ const row = (c) => {
6983
+ const share2 = SHARE_RULES2.has(c.rule);
6984
+ const ov = c.passed ? null : html` class="ov"`;
6985
+ const raw = share2 ? c.observed : c.actual;
6986
+ return join4(
6987
+ html`<tr><th scope="row">${ruleLabel(c.rule, ctx.level)}</th>`,
6988
+ // Numbers are right-aligned by the table style, without a class per cell.
6989
+ commonN === void 0 ? html`<td>${c.n}</td>` : null,
6990
+ html`<td${share2 ? null : ov}>${raw === null ? null : checkValue(c, raw)}</td>`,
6991
+ bound ? html`<td${share2 ? ov : null}>${share2 ? checkValue(c, c.actual) : null}</td>` : null,
6992
+ html`<td>${checkValue(c, c.limit)}</td><td>`,
6993
+ ctx.migrated ? DASH : usageMeter(c, true),
6994
+ html`</td><td>${checkPill(c)}</td></tr>`
6995
+ );
6996
+ };
6336
6997
  return part(
6337
6998
  "Checks",
6338
6999
  commonN === void 0 ? null : `n = ${String(commonN)} for every rule`,
6339
7000
  html`<div class="ct" tabindex="0"><table class="ck"><caption>Checks</caption><thead><tr><th scope="col">Rule</th>`,
6340
7001
  commonN === void 0 ? html`<th scope="col" class="num">n</th>` : null,
6341
- html`<th scope="col" class="num">Actual</th>`,
6342
- observed ? html`<th scope="col" class="num">Observed</th>` : null,
6343
- html`<th scope="col" class="num">Limit</th><th scope="col">Headroom</th><th scope="col">Result</th></tr></thead>`,
6344
- html`<tbody>${ev.checks.map(row)}</tbody></table></div>`
7002
+ html`<th scope="col" class="num">Raw</th>`,
7003
+ bound ? html`<th scope="col" class="num">Bound</th>` : null,
7004
+ html`<th scope="col" class="num">Limit</th><th scope="col">Limit used</th><th scope="col">Result</th></tr></thead>`,
7005
+ html`<tbody>${ev.checks.map(row)}</tbody></table></div>`,
7006
+ checksLegend(ctx, kind2, agg)
6345
7007
  );
6346
7008
  }
6347
7009
  function msValue(value) {
6348
- const [number, unit] = formatMs(value).split(" ");
7010
+ const [number, unit] = formatMs2(value).split(" ");
6349
7011
  return html`${number}<small> ${unit}</small>`;
6350
7012
  }
6351
7013
  function notTimedNote(ctx, kind2, agg) {
@@ -6359,6 +7021,9 @@ function notTimedNote(ctx, kind2, agg) {
6359
7021
  return `${shown.join(", ")}${more > 0 ? ` +${String(more)} more` : ""} (not timed)`;
6360
7022
  }
6361
7023
  var NOT_TIMED_LABELS = 3;
7024
+ function evaluatedLimit(agg, rule, limit) {
7025
+ return agg.evaluation.checks.some((c) => c.rule === rule) ? limit : null;
7026
+ }
6362
7027
  function statsGrid(ctx, kind2, agg) {
6363
7028
  const stats2 = agg.stats;
6364
7029
  if (stats2 === null) {
@@ -6367,14 +7032,19 @@ function statsGrid(ctx, kind2, agg) {
6367
7032
  }
6368
7033
  const limits = agg.evaluation.limits;
6369
7034
  const cell2 = (label, value, limit) => {
6370
- const over = value !== void 0 && limit !== null && value > limit;
6371
- return html`<div${over ? html` class="ov"` : null}><dt>${label}${limit === null ? null : ` \xB7 limit ${formatMs(limit)}`}</dt><dd>${value === void 0 ? DASH : msValue(value)}</dd></div>`;
7035
+ const over = value !== void 0 && limit != null && value > limit;
7036
+ const note = limit === void 0 ? null : limit === null ? " \xB7 not evaluated" : ` \xB7 limit ${formatMs2(limit)}`;
7037
+ return html`<div${over ? html` class="ov"` : null}><dt>${label}${note}</dt><dd>${value === void 0 ? DASH : msValue(value)}</dd></div>`;
6372
7038
  };
6373
7039
  return html`<div class="ds"><dl class="stats">${[
6374
- cell2("p50", stats2.percentiles["p50"], null),
6375
- cell2(ctx.level, stats2.percentiles[ctx.level], limits.percentile),
6376
- cell2("p99", stats2.percentiles["p99"], limits.p99),
6377
- cell2("max", stats2.max, null)
7040
+ cell2("p50", stats2.percentiles["p50"], void 0),
7041
+ cell2(
7042
+ ctx.level,
7043
+ stats2.percentiles[ctx.level],
7044
+ evaluatedLimit(agg, "percentile", limits.percentile)
7045
+ ),
7046
+ cell2("p99", stats2.percentiles["p99"], evaluatedLimit(agg, "p99", limits.p99)),
7047
+ cell2("max", stats2.max, void 0)
6378
7048
  ]}</dl></div>`;
6379
7049
  }
6380
7050
  function distribution(ctx, agg) {
@@ -6415,13 +7085,15 @@ function ttfbSplit(agg) {
6415
7085
  if (ttfb === null || ttfb.otherP50 === null || agg.stats === null) return null;
6416
7086
  const svg = ttfbSplitSvg(ttfb.p50, ttfb.otherP50);
6417
7087
  if (svg === null) return null;
6418
- const sum3 = Math.round((ttfb.p50 + ttfb.otherP50) * 10) / 10;
7088
+ const sum3 = formatMs2(Math.round((ttfb.p50 + ttfb.otherP50) * 10) / 10);
7089
+ const p50 = formatMs2(agg.stats.percentiles["p50"] ?? 0);
6419
7090
  return part(
6420
7091
  "Server wait vs rest",
6421
7092
  "p50 of each part",
6422
7093
  svg,
6423
- html`<p class="legend"><span><i class="s-acc"></i>Server wait (TTFB p50) ${formatMs(ttfb.p50)}</span><span><i class="s-trk"></i>Rest (p50 of duration − TTFB) ${formatMs(ttfb.otherP50)}</span></p>`,
6424
- html`<p class="sub">Medians of each part: their sum (${formatMs(sum3)}) can differ from p50 of the duration (${formatMs(agg.stats.percentiles["p50"] ?? 0)}).</p>`
7094
+ html`<p class="legend"><span><i class="s-acc"></i>Server wait (TTFB p50) ${formatMs2(ttfb.p50)}</span><span><i class="s-trk"></i>Rest (p50 of duration − TTFB) ${formatMs2(ttfb.otherP50)}</span></p>`,
7095
+ // Only when the numbers differ (11-REQ-33).
7096
+ sum3 === p50 ? null : html`<p class="sub">Medians of each part: their sum (${sum3}) can differ from p50 of the duration (${p50}).</p>`
6425
7097
  );
6426
7098
  }
6427
7099
  function isErrorStatus(label, statuses) {
@@ -6429,9 +7101,10 @@ function isErrorStatus(label, statuses) {
6429
7101
  (s) => s === label || /^\dxx$/u.test(s) && /^\d{3}$/u.test(label) && s[0] === label[0]
6430
7102
  );
6431
7103
  }
6432
- function keyHeader(kind2, key2, agg) {
7104
+ function keyHeader(ctx, kind2, key2, agg) {
6433
7105
  const ev = agg.evaluation;
6434
- return html`<div class="kh"><p class="fkl"><code class="fk">${key2}</code></p><p class="pills">${[
7106
+ const full = kind2 === "api" ? keyView(kind2, key2, Number.MAX_SAFE_INTEGER, false, ctx.report.origins) : key2;
7107
+ return html`<div class="kh"><p class="fkl"><code class="fk">${full}</code></p><p class="pills">${[
6435
7108
  resultPill(ev),
6436
7109
  kindToken(kind2),
6437
7110
  sourceToken(ev.thresholdSource),
@@ -6452,7 +7125,7 @@ function statusesPart(ctx, kind2, key2, agg) {
6452
7125
  kind2 === "step" ? html`<span>Defined at: <code>${locationText(agg)}</code></span>` : null,
6453
7126
  kind2 === "step" && (agg.stepErrorsFromFailedTests ?? 0) > 0 ? html`<span>Step errors in failed tests (not counted): ${agg.stepErrorsFromFailedTests ?? 0}</span>` : null,
6454
7127
  request ? html`<span>Source: request (worker clock)</span>` : null,
6455
- kind2 === "api" && !request ? html`<span>TTFB: ${agg.ttfb === null ? DASH : `p50 ${formatMs(agg.ttfb.p50)}, p95 ${formatMs(agg.ttfb.p95)}`}</span>` : null,
7128
+ kind2 === "api" && !request ? html`<span>TTFB: ${agg.ttfb === null ? DASH : `p50 ${formatMs2(agg.ttfb.p50)}, p95 ${formatMs2(agg.ttfb.p95)}`}</span>` : null,
6456
7129
  html`<span>Retained samples: ${agg.samples.sampled ? `${String(agg.samples.retained)} (uniform sample of ${String(agg.successCount)}; the histogram shows them)` : `${String(agg.samples.retained)} (all successful)`}</span>`
6457
7130
  ];
6458
7131
  return part(
@@ -6468,11 +7141,11 @@ function keyDetails(ctx, kind2, key2, agg) {
6468
7141
  const hints = ctx.migrated ? [] : agg.hints;
6469
7142
  return join4(
6470
7143
  html`<div class="kd">`,
6471
- keyHeader(kind2, key2, agg),
6472
- hints.length === 0 ? null : html`<ul class="hints">${hints.map((h) => html`<li>${icon("bulb")}${hintText(h, ctx.level, agg.evaluation.muted)}</li>`)}</ul>`,
7144
+ keyHeader(ctx, kind2, key2, agg),
7145
+ hints.length === 0 ? null : html`<ul class="hints">${hints.map((h) => html`<li>${icon("bulb")}${hintText(h, ctx.level, agg.evaluation.muted, kind2)}</li>`)}</ul>`,
6473
7146
  statsGrid(ctx, kind2, agg),
6474
7147
  distribution(ctx, agg),
6475
- checksTable(ctx, agg),
7148
+ checksTable(ctx, kind2, agg),
6476
7149
  kind2 === "api" ? ttfbSplit(agg) : null,
6477
7150
  statusesPart(ctx, kind2, key2, agg),
6478
7151
  agg.slowest.length === 0 ? null : part(
@@ -6480,7 +7153,7 @@ function keyDetails(ctx, kind2, key2, agg) {
6480
7153
  null,
6481
7154
  html`<ol class="samples">${agg.slowest.map(
6482
7155
  (s) => join4(
6483
- html`<li><b>${formatMs(s.duration)}</b><span class="tt"><span>${s.test.title}</span>`,
7156
+ html`<li><b>${formatMs2(s.duration)}</b><span class="tt"><span>${s.test.title}</span>`,
6484
7157
  html`<span class="sub">${testRef2(s.test)} · rep ${s.test.repeatEachIndex} · ${formatDate(s.startedAt)}</span>`,
6485
7158
  s.url === void 0 ? null : html`<span class="url">${s.url}</span>`,
6486
7159
  html`</span></li>`
@@ -6511,10 +7184,10 @@ function timeCell(value) {
6511
7184
  function limitCell(value, limit) {
6512
7185
  if (value === void 0) return html`<td class="num z">${DASH}</td>`;
6513
7186
  const over = limit !== null && value > limit;
6514
- return html`<td class="num${over ? " ov" : ""}">${Math.round(value)}${limit === null ? null : html`<span class="lim"> / ${Math.round(limit)}</span>`}</td>`;
7187
+ return html`<td class="num${over ? " ov" : ""}">${Math.round(value)}<span class="lim"> / ${limit === null ? DASH : Math.round(limit)}</span></td>`;
6515
7188
  }
6516
7189
  function headroomCell(ctx, agg) {
6517
- const top = ctx.migrated ? void 0 : topCheck(agg.evaluation.checks);
7190
+ const top = ctx.migrated ? void 0 : keyCheck(agg.evaluation.checks);
6518
7191
  if (top === void 0) return html`<td class="z">${DASH}</td>`;
6519
7192
  return html`<td>${usageMeter(top)}</td>`;
6520
7193
  }
@@ -6540,8 +7213,11 @@ function keyRow(ctx, kind2, key2, agg, columns, ttfb) {
6540
7213
  samplesCell(ctx, kind2, agg),
6541
7214
  agg.errorCount === 0 ? html`<td class="num"></td>` : html`<td class="num e">${agg.errorCount}</td>`,
6542
7215
  timeCell(s?.percentiles["p50"]),
6543
- s === null ? timeCell(void 0) : limitCell(s.percentiles[ctx.level], ev.limits.percentile),
6544
- s === null ? timeCell(void 0) : limitCell(s.percentiles["p99"], ev.limits.p99),
7216
+ s === null ? timeCell(void 0) : limitCell(
7217
+ s.percentiles[ctx.level],
7218
+ evaluatedLimit(agg, "percentile", ev.limits.percentile)
7219
+ ),
7220
+ s === null ? timeCell(void 0) : limitCell(s.percentiles["p99"], evaluatedLimit(agg, "p99", ev.limits.p99)),
6545
7221
  timeCell(s?.max),
6546
7222
  ttfb ? timeCell(agg.ttfb?.p50) : null,
6547
7223
  kind2 === "step" ? html`<td class="loc">${locationText(agg)}</td>` : null,
@@ -6586,7 +7262,7 @@ function keyTable(ctx, kind2, title2) {
6586
7262
  // Browser traffic or APIRequestContext calls (15-REQ-15).
6587
7263
  ...kind2 === "api" ? [["source", "Source"]] : [],
6588
7264
  ["result", "Result"],
6589
- ["headroom", "Headroom"],
7265
+ ["headroom", "Limit used"],
6590
7266
  ["samples", "Samples"],
6591
7267
  ["errors", "Errors"],
6592
7268
  ["p50", "p50"],
@@ -6607,10 +7283,17 @@ function keyTable(ctx, kind2, title2) {
6607
7283
  "ttfb",
6608
7284
  "tests"
6609
7285
  ]);
7286
+ const notEvaluated = keys.some((key2) => {
7287
+ const agg = aggregates[key2];
7288
+ if (agg?.stats == null) return false;
7289
+ const rules = new Set(agg.evaluation.checks.map((c) => c.rule));
7290
+ return !rules.has("percentile") || !rules.has("p99");
7291
+ });
6610
7292
  const notes = [
6611
7293
  "All times in ms",
6612
- "the tick on each headroom bar marks the limit",
7294
+ "the tick on each limit used bar marks the limit",
6613
7295
  `${ctx.level} is the evaluated percentile`,
7296
+ notEvaluated ? "/ \u2014 : rule not evaluated (too few samples or rule off)" : null,
6614
7297
  kind2 === "step" ? "step keys are title paths joined with \u203A" : null
6615
7298
  ].filter((n) => n !== null);
6616
7299
  return join4(
@@ -6639,7 +7322,7 @@ var MAX_PIPS = 10;
6639
7322
  function sum2(report, field3) {
6640
7323
  return LINK_KINDS.reduce((total, kind2) => total + report.evaluation.counts[kind2][field3], 0);
6641
7324
  }
6642
- function failedChecks(report, which = "all") {
7325
+ function failedChecks2(report, which = "all") {
6643
7326
  let n = 0;
6644
7327
  for (const kind2 of [report.endpoints, report.steps]) {
6645
7328
  for (const agg of Object.values(kind2)) {
@@ -6651,10 +7334,10 @@ function failedChecks(report, which = "all") {
6651
7334
  return n;
6652
7335
  }
6653
7336
  function blockingChecks(report) {
6654
- return failedChecks(report, "blocking");
7337
+ return failedChecks2(report, "blocking");
6655
7338
  }
6656
7339
  function violationsText(report) {
6657
- return `${plural3(failedChecks(report), "violation")} in ${plural3(sum2(report, "violations"), "key")}`;
7340
+ return `${plural3(failedChecks2(report), "violation")} in ${plural3(sum2(report, "violations"), "key")}`;
6658
7341
  }
6659
7342
  function banner(report) {
6660
7343
  const ev = report.evaluation;
@@ -6730,7 +7413,8 @@ function verdictResults(report) {
6730
7413
  const t = report.tests;
6731
7414
  const untrustworthy = report.toolErrors.some((i) => i.code === "TESTS_FAILED_TOO_MANY");
6732
7415
  const testParts = [
6733
- plural3(t.expected + t.unexpected + t.flaky, "test"),
7416
+ // Playwright results: every pass, repetition, setup and teardown is one test run (11-REQ-08).
7417
+ plural3(t.expected + t.unexpected + t.flaky, "test run"),
6734
7418
  t.unexpected > 0 ? `${String(t.unexpected)} failed` : null,
6735
7419
  t.flaky > 0 ? `${String(t.flaky)} flaky` : null,
6736
7420
  t.skipped > 0 ? `${String(t.skipped)} skipped` : null,
@@ -6785,8 +7469,8 @@ function verdictCard(ctx) {
6785
7469
  html`</section>`
6786
7470
  );
6787
7471
  }
6788
- function widthClass(share) {
6789
- const clamped = Math.max(0, Math.min(1, Number.isFinite(share) ? share : 0));
7472
+ function widthClass(share2) {
7473
+ const clamped = Math.max(0, Math.min(1, Number.isFinite(share2) ? share2 : 0));
6790
7474
  return `w-${String(Math.round(clamped * 20) * 5)}`;
6791
7475
  }
6792
7476
  function field(label, value, note, viz = null, cls = "") {
@@ -6803,6 +7487,9 @@ function clock(iso) {
6803
7487
  const d = new Date(time);
6804
7488
  return `${String(d.getUTCHours()).padStart(2, "0")}:${String(d.getUTCMinutes()).padStart(2, "0")}`;
6805
7489
  }
7490
+ function overLimit(data) {
7491
+ return Object.values(data).filter((a) => a.evaluation.result === "fail").length;
7492
+ }
6806
7493
  function nearLimit(data) {
6807
7494
  return Object.values(data).filter((a) => {
6808
7495
  if (a.evaluation.result !== "pass") return false;
@@ -6821,15 +7508,15 @@ function kpis(ctx) {
6821
7508
  const passes = r2.passes;
6822
7509
  const t = r2.tests;
6823
7510
  const keys = sum2(r2, "violations");
6824
- const violations3 = failedChecks(r2);
6825
- const blocking = failedChecks(r2, "blocking");
6826
- const muted = failedChecks(r2, "muted");
7511
+ const violations3 = failedChecks2(r2);
7512
+ const blocking = failedChecks2(r2, "blocking");
7513
+ const muted = failedChecks2(r2, "muted");
6827
7514
  const other = Math.max(0, violations3 - blocking - muted);
6828
- const share = (n) => widthClass(violations3 === 0 ? 0 : n / violations3);
7515
+ const share2 = (n) => widthClass(violations3 === 0 ? 0 : n / violations3);
6829
7516
  const split = violations3 === 0 ? null : html`<span class="vsplit" aria-hidden="true">${[
6830
- blocking > 0 ? html`<span class="s-bad ${share(blocking)}"></span>` : null,
6831
- other > 0 ? html`<span class="s-warn ${share(other)}"></span>` : null,
6832
- muted > 0 ? html`<span class="s-mute ${share(muted)}"></span>` : null
7517
+ blocking > 0 ? html`<span class="s-bad ${share2(blocking)}"></span>` : null,
7518
+ other > 0 ? html`<span class="s-warn ${share2(other)}"></span>` : null,
7519
+ muted > 0 ? html`<span class="s-mute ${share2(muted)}"></span>` : null
6833
7520
  ]}</span>`;
6834
7521
  const rate = requests === 0 ? 0 : failedRequests / requests;
6835
7522
  const ring = requests === 0 ? null : html`<svg class="ring" viewBox="0 0 36 36" aria-hidden="true"><circle class="tr" cx="18" cy="18" r="14"/>${failedRequests === 0 ? null : html`<circle class="vl" cx="18" cy="18" r="14" pathLength="100" stroke-dasharray="${Math.max(1, Math.round(rate * 1e3) / 10)} 100"/>`}</svg>`;
@@ -6845,8 +7532,12 @@ function kpis(ctx) {
6845
7532
  `${String(counts.api.fromFile + counts.api.fromDefaults)} evaluated \xB7 ${String(counts.api.tooFewSamples)} too few`
6846
7533
  ),
6847
7534
  // Steps when the report has step keys, otherwise Tests (11-REQ-28).
6848
- steps > 0 ? field("Steps", steps, `${String(nearLimit(ctx.data.steps))} near limit`) : field(
6849
- "Tests",
7535
+ steps > 0 ? field(
7536
+ "Steps",
7537
+ steps,
7538
+ `${String(overLimit(ctx.data.steps))} over limit \xB7 ${String(nearLimit(ctx.data.steps))} near limit`
7539
+ ) : field(
7540
+ "Test runs",
6850
7541
  t.expected + t.unexpected + t.flaky,
6851
7542
  `${String(t.unexpected)} failed \xB7 ${String(t.flaky)} flaky \xB7 ${String(t.skipped)} skipped`
6852
7543
  ),
@@ -6898,14 +7589,14 @@ function badge(n, tone = "") {
6898
7589
  }
6899
7590
  function violationCard(ctx, e) {
6900
7591
  const ev = e.agg.evaluation;
6901
- const top = topCheck(ev.checks.filter((c) => !c.passed)) ?? topCheck(ev.checks);
7592
+ const top = keyCheck(ev.checks);
6902
7593
  const hint2 = ctx.migrated ? void 0 : e.agg.hints[0];
6903
7594
  const muted = ev.muted !== null && !ev.muted.expired;
6904
7595
  return join4(
6905
7596
  html`<article class="card vio${muted ? " mu" : ""}"><p class="top">${resultPill(ev)}${mutedPill(ev.muted)}${kindToken(e.kind)}${sourceToken(ev.thresholdSource)}</p>`,
6906
7597
  keyLink(ctx, e.kind, e.key, KEY_COLUMN_MAX, true),
6907
7598
  top === void 0 ? null : html`<p class="rule"><span>${ruleLabel(top.rule, ctx.level)} <b>${checkValue(top, top.actual)}</b> · limit ${checkValue(top, top.limit)}</span>${ctx.migrated ? null : usageMeter(top)}</p>`,
6908
- hint2 === void 0 ? null : html`<p class="hint">${icon("bulb")}<span>${hintText(hint2, ctx.level, ev.muted)}</span></p>`,
7599
+ hint2 === void 0 ? null : html`<p class="hint">${icon("bulb")}<span>${hintText(hint2, ctx.level, ev.muted, e.kind)}</span></p>`,
6909
7600
  html`</article>`
6910
7601
  );
6911
7602
  }
@@ -6919,7 +7610,7 @@ function violations2(ctx) {
6919
7610
  heading(
6920
7611
  "viol-h",
6921
7612
  "Violations",
6922
- badge(failedChecks(ctx.report), "bad"),
7613
+ badge(failedChecks2(ctx.report), "bad"),
6923
7614
  html`<a class="more" href="#tab-endpoints" data-show-violations="">All ${violationsText(ctx.report)} →</a>`
6924
7615
  ),
6925
7616
  html`<div class="vlist">${failed.slice(0, RANKING_SIZE).map((e) => violationCard(ctx, e))}</div></section>`
@@ -6948,7 +7639,7 @@ function rankings(ctx) {
6948
7639
  entries: all.filter((e) => e.agg.stats !== null).sort(order((e) => [e.agg.stats?.percentiles[level] ?? 0])),
6949
7640
  size: (e) => e.agg.stats?.percentiles[level] ?? 0,
6950
7641
  tone: errorTone,
6951
- value: (e) => html`<b>${formatMs(e.agg.stats?.percentiles[level] ?? 0)}</b> · ${e.agg.count}`
7642
+ value: (e) => html`<b>${formatMs2(e.agg.stats?.percentiles[level] ?? 0)}</b> · ${e.agg.count}`
6952
7643
  },
6953
7644
  {
6954
7645
  id: "called",
@@ -7045,7 +7736,7 @@ function expensiveTests(ctx) {
7045
7736
  html`<a class="more" href="#tab-tests">All ${plural3(tests.length, "test")} →</a>`
7046
7737
  ),
7047
7738
  html`<div class="card"><ul class="tl">${tests.slice(0, EXPENSIVE_TESTS).map(
7048
- (t) => html`<li><span class="tt"><span>${truncateMiddle2(t.title, 120)}</span><span class="sub">${several ? `${t.project === "" ? "default project" : t.project} \xB7 ` : ""}${t.file}:${t.line}</span></span><span class="num">${formatMs(t.totalMs)}<span class="sub">${formatMs(Math.round(t.totalMs / t.executions * 10) / 10)} per run</span></span><span class="num">${t.requestCount}<span class="sub">requests</span></span></li>`
7739
+ (t) => html`<li><span class="tt"><span>${truncateMiddle2(t.title, 120)}</span><span class="sub">${several ? `${t.project === "" ? "default project" : t.project} \xB7 ` : ""}${t.file}:${t.line}</span></span><span class="num">${formatMs2(t.totalMs)}<span class="sub">${formatMs2(Math.round(t.totalMs / t.executions * 10) / 10)} per run</span></span><span class="num">${t.requestCount}<span class="sub">requests</span></span></li>`
7049
7740
  )}</ul></div></section>`
7050
7741
  );
7051
7742
  }
@@ -7213,12 +7904,12 @@ function generatedSource(file) {
7213
7904
  const tool2 = field2(generated, "tool");
7214
7905
  const run = textOf(field2(generated, "sourceRunId"));
7215
7906
  const at2 = textOf(field2(generated, "sourceRunStartedAt"));
7216
- const count2 = field2(generated, "sourceSampleCount");
7907
+ const count3 = field2(generated, "sourceSampleCount");
7217
7908
  return [
7218
7909
  `generated by ${textOf(field2(tool2, "name")) ?? "unknown"} v${textOf(field2(tool2, "version")) ?? "?"}`,
7219
7910
  run === null ? "" : ` from run ${run}`,
7220
7911
  at2 === null ? "" : ` (${formatDate(at2)})`,
7221
- typeof count2 === "number" ? `, ${plural3(count2, "sample")}` : ""
7912
+ typeof count3 === "number" ? `, ${plural3(count3, "sample")}` : ""
7222
7913
  ].join("");
7223
7914
  }
7224
7915
  function sourceCell(file) {
@@ -7236,12 +7927,14 @@ function sourceCell(file) {
7236
7927
  function thresholdsFileRow(file, report) {
7237
7928
  const percentile2 = textOf(field2(file.generated, "evaluatedPercentile"));
7238
7929
  const fingerprint2 = textOf(field2(file.generated, "normalization"));
7930
+ const run = file.kind === "step" ? report.stepNormalization : report.normalization;
7239
7931
  let normalization;
7240
- if (fingerprint2 === null) normalization = html`run <code>${report.normalization}</code>`;
7241
- else if (fingerprint2 === report.normalization)
7242
- normalization = html`<code>${fingerprint2}</code> matches this run`;
7932
+ if (run === null)
7933
+ normalization = fingerprint2 === null ? html`${DASH}` : html`file <code>${fingerprint2}</code>`;
7934
+ else if (fingerprint2 === null) normalization = html`run <code>${run}</code>`;
7935
+ else if (fingerprint2 === run) normalization = html`<code>${fingerprint2}</code> matches this run`;
7243
7936
  else
7244
- normalization = html`file <code>${fingerprint2}</code>, run <code>${report.normalization}</code> ${pill("w", "differs: keys may not match")}`;
7937
+ normalization = html`file <code>${fingerprint2}</code>, run <code>${run}</code> ${pill("w", "differs: keys may not match")} (see Warnings)`;
7245
7938
  const status = file.status === "loaded" ? pill("p", "loaded") : file.status === "invalid" ? pill("fb", "invalid") : pill("ne", "missing");
7246
7939
  const unseen = file.unseenKeys;
7247
7940
  return join4(
@@ -7329,17 +8022,17 @@ function perRun(t) {
7329
8022
  return Math.round(t.totalMs / t.executions * 10) / 10;
7330
8023
  }
7331
8024
  function testRow(ctx, t, i, most) {
7332
- const share = (ms2) => t.totalMs === 0 ? "0%" : `${String(Math.round(ms2 / t.totalMs * 100))}%`;
8025
+ const share2 = (ms2) => t.totalMs === 0 ? "0%" : `${String(Math.round(ms2 / t.totalMs * 100))}%`;
7333
8026
  const more = t.violatedKeyCount - t.violatedKeys.length;
7334
8027
  return join4(
7335
8028
  html`<tr data-i="${i}"${t.violatedKeyCount > 0 ? html` data-v=""` : null}><th scope="row" class="tc"><span class="tn">${title(t.title)}</span><span class="sub mono">${where(t)}</span></th>`,
7336
8029
  html`<td class="num">${t.executions}</td><td class="num">${t.requestCount}</td>`,
7337
8030
  t.errorCount === 0 ? html`<td class="num"></td>` : html`<td class="num e">${t.errorCount}</td>`,
7338
- html`<td><span class="hr"><span class="tb neu tw"><span class="${widthClass(most > 0 ? t.totalMs / most : 0)}"></span></span><b>${formatMs(t.totalMs)}</b></span></td>`,
7339
- html`<td class="num">${formatMs(perRun(t))}</td>`,
7340
- html`<td class="num">${t.maxRequestMs === null ? "\u2014" : formatMs(t.maxRequestMs)}</td><td class="num">${t.keyCount}</td>`,
8031
+ html`<td><span class="hr"><span class="tb neu tw"><span class="${widthClass(most > 0 ? t.totalMs / most : 0)}"></span></span><b>${formatMs2(t.totalMs)}</b></span></td>`,
8032
+ html`<td class="num">${formatMs2(perRun(t))}</td>`,
8033
+ html`<td class="num">${t.maxRequestMs === null ? "\u2014" : formatMs2(t.maxRequestMs)}</td><td class="num">${t.keyCount}</td>`,
7341
8034
  // Each key on its own line, its time and share below (F2 decision 12).
7342
- html`<td class="tk tk2">${t.topKeys.map((k) => html`<span>${keyLink(ctx, "api", k.key, KEY_MAX)} <span class="sub">${formatMs(k.totalMs)} · ${share(k.totalMs)}</span></span>`)}</td>`,
8035
+ html`<td class="tk tk2">${t.topKeys.map((k) => html`<span>${keyLink(ctx, "api", k.key, KEY_MAX)} <span class="sub">${formatMs2(k.totalMs)} · ${share2(k.totalMs)}</span></span>`)}</td>`,
7343
8036
  html`<td class="tk">`,
7344
8037
  t.violatedKeyCount === 0 ? null : html`<span class="pill f">${plural3(t.violatedKeyCount, "key")}</span>${t.violatedKeys.map((k) => html`<span>${keyLink(ctx, "api", k, KEY_MAX)}</span>`)}${more > 0 ? html`<span class="sub">+${more} more</span>` : null}`,
7345
8038
  html`</td></tr>`
@@ -7376,7 +8069,7 @@ function testsTable(ctx, tests, omitted) {
7376
8069
  function waterfallCard(w, i) {
7377
8070
  return join4(
7378
8071
  html`<figure class="card wfb"><figcaption class="wf-h"><div><h4>${title(w.test.title)}</h4><p class="sub mono">${where(w.test)} · repetition ${w.test.repeatEachIndex}</p></div>`,
7379
- html`<dl><div><dt>Span</dt><dd>${formatMs(w.spanMs)}</dd></div><div><dt>Total wait</dt><dd>${formatMs(w.totalMs)}</dd></div><div><dt>Requests</dt><dd>${w.requestCount}</dd></div></dl></figcaption>`,
8072
+ html`<dl><div><dt>Span</dt><dd>${formatMs2(w.spanMs)}</dd></div><div><dt>Total wait</dt><dd>${formatMs2(w.totalMs)}</dd></div><div><dt>Requests</dt><dd>${w.requestCount}</dd></div></dl></figcaption>`,
7380
8073
  html`<div class="scroll wfs" tabindex="0" role="region" aria-label="Waterfall ${i + 1}, scrolls sideways">${waterfallSvg(w, `w${String(i + 1)}`)}</div>`,
7381
8074
  w.omitted > 0 ? html`<p class="tfoot">and ${plural3(w.omitted, "more request")} not shown</p>` : null,
7382
8075
  html`</figure>`
@@ -7410,7 +8103,7 @@ function testsTab(ctx) {
7410
8103
  }
7411
8104
 
7412
8105
  // src/html/render.ts
7413
- var DOCS_URL = `${chunkIUI4AFE5_cjs.REPOSITORY_URL}#readme`;
8106
+ var DOCS_URL = `${chunkLEIBG5A4_cjs.REPOSITORY_URL}#readme`;
7414
8107
  function chip2(name, content) {
7415
8108
  return html`<span class="chip">${icon(name)}${content}</span>`;
7416
8109
  }
@@ -7538,7 +8231,7 @@ function keyDialog() {
7538
8231
  );
7539
8232
  }
7540
8233
  function footer(report) {
7541
- return html`<footer><div class="wrap">Generated by <a href="${chunkIUI4AFE5_cjs.REPOSITORY_URL}" rel="noopener noreferrer">${report.tool.name}</a> v${report.tool.version}</div></footer>`;
8234
+ return html`<footer><div class="wrap">Generated by <a href="${chunkLEIBG5A4_cjs.REPOSITORY_URL}" rel="noopener noreferrer">${report.tool.name}</a> v${report.tool.version}</div></footer>`;
7542
8235
  }
7543
8236
  var CONTENT_SECURITY_POLICY = `default-src 'none'; script-src 'sha256-${SCRIPT_SHA256}'; style-src 'sha256-${STYLES_SHA256}'; img-src data:`;
7544
8237
  function renderHtmlReport(report) {
@@ -7549,7 +8242,7 @@ function renderHtmlReport(report) {
7549
8242
  html`<meta http-equiv="Content-Security-Policy" content="${CONTENT_SECURITY_POLICY}">`,
7550
8243
  html`<meta name="viewport" content="width=device-width, initial-scale=1">`,
7551
8244
  html`<meta name="color-scheme" content="light dark">`,
7552
- html`<meta name="generator" content="${`${chunkIUI4AFE5_cjs.PACKAGE_NAME} ${report.tool.version}`}">`,
8245
+ html`<meta name="generator" content="${`${chunkLEIBG5A4_cjs.PACKAGE_NAME} ${report.tool.version}`}">`,
7553
8246
  html`<link rel="icon" type="image/svg+xml" href="${FAVICON_URI}"><title>${report.suite === void 0 ? "" : `${report.suite.name} \xB7 `}Performance report ${report.runId}</title>`,
7554
8247
  html`<style>${trustedHtml(STYLES)}</style></head>`
7555
8248
  );
@@ -7842,7 +8535,7 @@ function reportDirRefusal(io, input) {
7842
8535
  }
7843
8536
  for (const entry of entries2) {
7844
8537
  const name = entry.slice(entry.lastIndexOf("/") + 1);
7845
- if (isThresholdsFile(name, input.thresholdsPrefix))
8538
+ if (entry.includes("/") && isThresholdsFile(name, input.thresholdsPrefix))
7846
8539
  return `contains a thresholds file (${entry})`;
7847
8540
  if (isProjectMarker(name)) return `contains ${entry}, so it looks like a project folder`;
7848
8541
  }
@@ -7859,7 +8552,7 @@ function cleanReportDir(io, input) {
7859
8552
  if (refusal2 !== null) {
7860
8553
  return warning(
7861
8554
  `it ${refusal2}`,
7862
- `Set report.dir to a folder used only for the results of this package (default ${chunkLUA4WRIQ_cjs.DEFAULT_CONFIG.report.dir}); files of earlier runs in it were kept.`
8555
+ `Set report.dir to a folder used only for the results of this package (default ${chunkW7NEFS5V_cjs.DEFAULT_CONFIG.report.dir}); files of earlier runs in it were kept.`
7863
8556
  );
7864
8557
  }
7865
8558
  try {
@@ -7901,7 +8594,7 @@ function testMeta(test, result2, file) {
7901
8594
  };
7902
8595
  }
7903
8596
  function sampleAttachments(result2) {
7904
- return result2.attachments.filter((a) => a.name === chunkIUI4AFE5_cjs.SAMPLES_ATTACHMENT_NAME).map((a) => a.body === void 0 ? "" : a.body.toString("utf8"));
8597
+ return result2.attachments.filter((a) => a.name === chunkLEIBG5A4_cjs.SAMPLES_ATTACHMENT_NAME).map((a) => a.body === void 0 ? "" : a.body.toString("utf8"));
7905
8598
  }
7906
8599
  function hasTraceOrVideo(result2) {
7907
8600
  return result2.attachments.some((a) => a.name === "trace" || a.name === "video");
@@ -7925,10 +8618,10 @@ function runSettings(registered, env, packageVersion) {
7925
8618
  perfConfigPassed: registered.perfConfigPassed ?? true
7926
8619
  };
7927
8620
  }
7928
- const read2 = chunkIUI4AFE5_cjs.readModeState(env);
8621
+ const read2 = chunkLEIBG5A4_cjs.readModeState(env);
7929
8622
  if (read2.ok && read2.value === null) return null;
7930
8623
  const mode2 = read2.ok && read2.value !== null ? read2.value : { mode: "test" };
7931
- const resolved = chunkLUA4WRIQ_cjs.resolveConfig(void 0, {
8624
+ const resolved = chunkW7NEFS5V_cjs.resolveConfig(void 0, {
7932
8625
  mode: mode2.mode === "check" ? "test" : mode2.mode,
7933
8626
  ...mode2.mode === "check" ? {} : mode2.pass !== void 0 ? { passes: mode2.pass.total } : mode2.passes === void 0 ? {} : { passes: mode2.passes },
7934
8627
  ...mode2.env === void 0 ? {} : { env: mode2.env },
@@ -7948,7 +8641,7 @@ function runSettings(registered, env, packageVersion) {
7948
8641
  replacedReporters: []
7949
8642
  },
7950
8643
  registered: false,
7951
- warnings: [chunkIUI4AFE5_cjs.notWrappedWarning()],
8644
+ warnings: [chunkLEIBG5A4_cjs.notWrappedWarning()],
7952
8645
  toolErrors: read2.ok ? [] : read2.issues
7953
8646
  };
7954
8647
  }
@@ -8028,7 +8721,7 @@ var RunSession = class {
8028
8721
  this.warnings = [...settings.warnings];
8029
8722
  this.toolErrors = [...settings.toolErrors];
8030
8723
  this.startedAt = host.now();
8031
- this.runId = settings.mode.runId ?? chunkIUI4AFE5_cjs.generateRunId(this.startedAt, host.random);
8724
+ this.runId = settings.mode.runId ?? chunkLEIBG5A4_cjs.generateRunId(this.startedAt, host.random);
8032
8725
  this.configDir = host.cwd;
8033
8726
  this.conditions = { workers: 1, projects: [], overriddenSettings: [] };
8034
8727
  const keys = settings.config.keys;
@@ -8068,7 +8761,7 @@ var RunSession = class {
8068
8761
  });
8069
8762
  }
8070
8763
  info(line) {
8071
- this.host.stdout.write(`${chunkIUI4AFE5_cjs.PACKAGE_NAME}: ${line}
8764
+ this.host.stdout.write(`${chunkLEIBG5A4_cjs.PACKAGE_NAME}: ${line}
8072
8765
  `);
8073
8766
  }
8074
8767
  /** A hook threw: the error goes to the report and the outcome file (01-REQ-16). */
@@ -8086,7 +8779,7 @@ var RunSession = class {
8086
8779
  this.configLike = config;
8087
8780
  this.startedAt = this.host.now();
8088
8781
  if (this.settings.mode.runId === void 0) {
8089
- this.runId = chunkIUI4AFE5_cjs.generateRunId(this.startedAt, this.host.random);
8782
+ this.runId = chunkLEIBG5A4_cjs.generateRunId(this.startedAt, this.host.random);
8090
8783
  }
8091
8784
  const io = this.host.io;
8092
8785
  this.configDir = config.configFile === void 0 ? config.rootDir : io.directoryOf(config.configFile);
@@ -8199,11 +8892,11 @@ var RunSession = class {
8199
8892
  dependencies: this.conditions.projects.filter((p) => p.role !== "measured").map((p) => p.name),
8200
8893
  tests,
8201
8894
  passes: this.passes,
8202
- maxTests: this.settings.mode.maxTests ?? chunkIUI4AFE5_cjs.DEFAULT_MAX_TESTS,
8895
+ maxTests: this.settings.mode.maxTests ?? chunkLEIBG5A4_cjs.DEFAULT_MAX_TESTS,
8203
8896
  estimate: this.check ? null : startEstimate({ tests, passes: this.passes, msPerTest: this.lastMsPerTest() }),
8204
8897
  report: this.check ? null : io.relativeSlashPath(this.host.cwd, io.resolvePath(this.reportDir(), file)),
8205
8898
  // run.grep already selects the measured subset (04-REQ-65, 04-D-51).
8206
- tip: cfg.run.grep === null && chunkIUI4AFE5_cjs.testFilters(chunkIUI4AFE5_cjs.testArgsFromArgv(this.host.argv)).length === 0
8899
+ tip: cfg.run.grep === null && chunkLEIBG5A4_cjs.testFilters(chunkLEIBG5A4_cjs.testArgsFromArgv(this.host.argv)).length === 0
8207
8900
  },
8208
8901
  { width, color, ascii: asciiTerminal(this.host.env) }
8209
8902
  );
@@ -8261,7 +8954,7 @@ var RunSession = class {
8261
8954
  if (bodies.length > 1) {
8262
8955
  this.warnings.push({
8263
8956
  code: "ATTACHMENT_DUPLICATE",
8264
- message: `Test "${meta.title}" has ${bodies.length} ${chunkIUI4AFE5_cjs.SAMPLES_ATTACHMENT_NAME} attachments; all of them were processed.`,
8957
+ message: `Test "${meta.title}" has ${bodies.length} ${chunkLEIBG5A4_cjs.SAMPLES_ATTACHMENT_NAME} attachments; all of them were processed.`,
8265
8958
  hint: "Apply withPerfFixtures() once per test object."
8266
8959
  });
8267
8960
  }
@@ -8386,7 +9079,7 @@ var RunSession = class {
8386
9079
  reportInput(status, finishedAt, aggregates, evaluation, warnings, toolErrors) {
8387
9080
  return {
8388
9081
  meta: {
8389
- tool: { name: chunkIUI4AFE5_cjs.PACKAGE_NAME, version: this.settings.packageVersion },
9082
+ tool: { name: chunkLEIBG5A4_cjs.PACKAGE_NAME, version: this.settings.packageVersion },
8390
9083
  runId: this.runId,
8391
9084
  mode: this.mode,
8392
9085
  startedAt: this.startedAt.toISOString(),
@@ -8443,7 +9136,7 @@ var RunSession = class {
8443
9136
  this.recordInternalError("onEnd", error);
8444
9137
  outcome = this.fallbackOutcome({ status });
8445
9138
  for (const issue2 of outcome.toolErrors) {
8446
- this.host.stderr.write(`${chunkIUI4AFE5_cjs.PACKAGE_NAME}: ${issue2.code}: ${issue2.message}
9139
+ this.host.stderr.write(`${chunkLEIBG5A4_cjs.PACKAGE_NAME}: ${issue2.code}: ${issue2.message}
8447
9140
  `);
8448
9141
  }
8449
9142
  }
@@ -8496,7 +9189,7 @@ var RunSession = class {
8496
9189
  await this.host.io.writeJsonStable(path, file);
8497
9190
  } catch (error) {
8498
9191
  this.host.stderr.write(
8499
- `${chunkIUI4AFE5_cjs.PACKAGE_NAME}: ${label}: the pass file could not be written to ${path}: ${error instanceof Error ? error.message : String(error)}
9192
+ `${chunkLEIBG5A4_cjs.PACKAGE_NAME}: ${label}: the pass file could not be written to ${path}: ${error instanceof Error ? error.message : String(error)}
8500
9193
  `
8501
9194
  );
8502
9195
  return void 0;
@@ -8523,11 +9216,11 @@ var RunSession = class {
8523
9216
  const passInput = {
8524
9217
  execPath: this.host.execPath,
8525
9218
  argv: this.host.argv,
8526
- env: this.host.env,
9219
+ env: this.scriptEnv(info.scripts),
8527
9220
  scripts: info.scripts
8528
9221
  };
8529
- const command = chunkIUI4AFE5_cjs.passCommand(passInput);
8530
- const shape = chunkIUI4AFE5_cjs.runShape(passInput);
9222
+ const command = chunkLEIBG5A4_cjs.passCommand(passInput);
9223
+ const shape = chunkLEIBG5A4_cjs.runShape(passInput);
8531
9224
  const pm = packageManager({
8532
9225
  userAgent: this.host.env["npm_config_user_agent"] ?? null,
8533
9226
  lockFiles: info.lockFiles
@@ -8538,7 +9231,7 @@ var RunSession = class {
8538
9231
  this.info(`${label}: ${shown}`);
8539
9232
  const env = {
8540
9233
  ...this.host.env,
8541
- ...chunkIUI4AFE5_cjs.writeModeState({ ...this.settings.mode, runId: this.runId, pass: { index, total } })
9234
+ ...chunkLEIBG5A4_cjs.writeModeState({ ...this.settings.mode, runId: this.runId, pass: { index, total } })
8542
9235
  };
8543
9236
  const exit = await this.host.runPass(command, env);
8544
9237
  if (exit.error !== void 0) {
@@ -8696,6 +9389,14 @@ var RunSession = class {
8696
9389
  if (paths.reportJson !== null) await writeJson();
8697
9390
  }
8698
9391
  }
9392
+ if (this.mode === "test" && cfg.report.junit) {
9393
+ const junit = await writeJunitFile(io, report, reportDir, this.options.buildJunit);
9394
+ if ("issue" in junit) {
9395
+ toolErrors.push(junit.issue);
9396
+ report = build();
9397
+ if (paths.reportJson !== null) await writeJson();
9398
+ }
9399
+ }
8699
9400
  const { width, color } = this.terminal();
8700
9401
  const temporary = this.settings.mode.thresholdsDir !== void 0;
8701
9402
  this.host.stdout.write(
@@ -8716,10 +9417,11 @@ var RunSession = class {
8716
9417
  width,
8717
9418
  color,
8718
9419
  prune: this.pruned,
8719
- subset: chunkIUI4AFE5_cjs.testFilters(chunkIUI4AFE5_cjs.testArgsFromArgv(this.host.argv)).length > 0,
9420
+ subset: chunkLEIBG5A4_cjs.testFilters(chunkLEIBG5A4_cjs.testArgsFromArgv(this.host.argv)).length > 0,
8720
9421
  // Absolute, like the Report line of the summary (10, chapter 9.1; 09-REQ-30).
8721
9422
  diffPath: paths.thresholdsDiff,
8722
- temporary
9423
+ temporary,
9424
+ ascii: asciiTerminal(this.host.env)
8723
9425
  })
8724
9426
  );
8725
9427
  }
@@ -8765,7 +9467,7 @@ var RunSession = class {
8765
9467
  if (this.settings.mode.runId !== void 0) {
8766
9468
  try {
8767
9469
  this.host.io.removeFileSync(
8768
- this.host.io.tempPath(chunkIUI4AFE5_cjs.checkStateFileName(this.settings.mode.runId))
9470
+ this.host.io.tempPath(chunkLEIBG5A4_cjs.checkStateFileName(this.settings.mode.runId))
8769
9471
  );
8770
9472
  } catch {
8771
9473
  }
@@ -8827,12 +9529,12 @@ var RunSession = class {
8827
9529
  [...new Set(candidates)].filter((o) => !coveredByOrigins(keys.origins, o)).map((origin) => ({ origin, base: baseSet.has(origin) }))
8828
9530
  );
8829
9531
  if (random !== null) warnings.push(random);
8830
- const patterns = chunkLUA4WRIQ_cjs.compileHostPatterns(keys.origins);
9532
+ const patterns = chunkW7NEFS5V_cjs.compileHostPatterns(keys.origins);
8831
9533
  const exact = new Set(
8832
- Object.keys(keys.origins).filter((k) => !chunkLUA4WRIQ_cjs.isHostPattern(k)).flatMap((k) => URL.canParse(k) ? [new URL(k).origin] : [])
9534
+ Object.keys(keys.origins).filter((k) => !chunkW7NEFS5V_cjs.isHostPattern(k)).flatMap((k) => URL.canParse(k) ? [new URL(k).origin] : [])
8833
9535
  );
8834
9536
  const origins = [...aggregates.origins].sort((a, b) => b.requestCount - a.requestCount || (a.origin < b.origin ? -1 : 1)).map((o) => {
8835
- const pattern = URL.canParse(o.origin) ? chunkLUA4WRIQ_cjs.matchingPattern(patterns, new URL(o.origin)) : null;
9537
+ const pattern = URL.canParse(o.origin) ? chunkW7NEFS5V_cjs.matchingPattern(patterns, new URL(o.origin)) : null;
8836
9538
  const source = exact.has(o.origin) ? "keys.origins" : pattern !== null ? `keys.origins pattern ${pattern.canonical}` : baseSet.has(o.origin) ? "baseURL" : "host";
8837
9539
  return { origin: o.origin, label: o.label, requests: o.requestCount, source };
8838
9540
  });
@@ -8872,9 +9574,10 @@ var RunSession = class {
8872
9574
  const state = file.status === "loaded" ? `${String(Object.keys(file.file.entries).length)} entries` : file.status === "missing" ? "missing" : `invalid (${file.issues[0]?.code ?? "SCHEMA_VALIDATION_FAILED"})`;
8873
9575
  return { kind: kind2, name: file.path, state };
8874
9576
  });
8875
- const missingFile = ["api", "step"].some(
8876
- (kind2) => kindsWithKeys[kind2] && loaded[kind2].status !== "loaded"
8877
- );
9577
+ const missingFile = ["api", "step"].some((kind2) => {
9578
+ const file = loaded[kind2];
9579
+ return kindsWithKeys[kind2] && (file.status !== "loaded" || Object.keys(file.file.entries).length === 0);
9580
+ });
8878
9581
  const meanMs = c.durations.length === 0 ? null : c.durations.reduce((a, b) => a + b, 0) / c.durations.length;
8879
9582
  const reporters = (config?.reporter ?? []).map(
8880
9583
  ([name]) => /playwright-performance-regression|[\\/]dist[\\/]reporter\.c?js$/u.test(name) ? "pw-perf" : name
@@ -8937,14 +9640,29 @@ var RunSession = class {
8937
9640
  }
8938
9641
  /** The words the run added to the test command, as for the next pass (09-REQ-32, 04-REQ-63). */
8939
9642
  runArgs() {
8940
- const shape = chunkIUI4AFE5_cjs.runShape({
9643
+ const { scripts } = this.host.io.readPackageInfo(this.host.cwd);
9644
+ const shape = chunkLEIBG5A4_cjs.runShape({
8941
9645
  execPath: this.host.execPath,
8942
9646
  argv: this.host.argv,
8943
- env: this.host.env,
8944
- scripts: this.host.io.readPackageInfo(this.host.cwd).scripts
9647
+ env: this.scriptEnv(scripts),
9648
+ scripts
8945
9649
  });
8946
9650
  return { script: shape.script !== null, tail: shape.tail };
8947
9651
  }
9652
+ scriptEnvCache = null;
9653
+ /**
9654
+ * The environment with npm_lifecycle_event of the script that started Playwright through
9655
+ * `npx` (04-REQ-63 point 2); the process table is read at most once per run.
9656
+ */
9657
+ scriptEnv(scripts) {
9658
+ this.scriptEnvCache ??= chunkLEIBG5A4_cjs.scriptEnv({
9659
+ env: this.host.env,
9660
+ scripts,
9661
+ pid: this.host.pid,
9662
+ processTable: this.host.processTable?.bind(this.host)
9663
+ });
9664
+ return this.scriptEnvCache;
9665
+ }
8948
9666
  /**
8949
9667
  * The test directory relative to INIT_CWD, the directory the package manager was called from
8950
9668
  * (e.g. the root of a monorepo), or null when it is the same or not below it: an INIT_CWD
@@ -8959,8 +9677,8 @@ var RunSession = class {
8959
9677
  }
8960
9678
  /** Commands of the project for each mode, for the Next: hint (09-REQ-32). */
8961
9679
  commands() {
8962
- const env = this.host.env;
8963
9680
  const info = this.host.io.readPackageInfo(this.configDir);
9681
+ const env = this.scriptEnv(this.host.io.readPackageInfo(this.host.cwd).scripts);
8964
9682
  const ctx = {
8965
9683
  env: this.settings.config.run.env,
8966
9684
  lifecycleEvent: env["npm_lifecycle_event"] ?? null,
@@ -9009,8 +9727,9 @@ var RunSession = class {
9009
9727
  }
9010
9728
  /**
9011
9729
  * Derivation in thresholds mode (10, chapter 3): refusals and write errors are tool errors, so
9012
- * nothing is written for an incomplete run (04-REQ-36); the diff file failing is a warning.
9013
- * Returns the diffs and the absolute path of each thresholds file.
9730
+ * nothing is written for an incomplete run (04-REQ-36); the copies in report.dir (10-REQ-24) and
9731
+ * the diff file failing are warnings. Returns the diffs and the absolute path of each thresholds
9732
+ * file.
9014
9733
  */
9015
9734
  async deriveAndWrite(report, loaded, location, paths, warnings, toolErrors) {
9016
9735
  const cfg = this.settings.config;
@@ -9026,6 +9745,8 @@ var RunSession = class {
9026
9745
  }
9027
9746
  warnings.push(...derived.value.warnings);
9028
9747
  const absolute = io.thresholdsFilePaths(location);
9748
+ const reportDir = io.resolvePath(this.configDir, cfg.report.dir);
9749
+ let writeFailed = false;
9029
9750
  for (const file of derived.value.files) {
9030
9751
  if (file.content === null || !file.changed) continue;
9031
9752
  try {
@@ -9036,6 +9757,7 @@ var RunSession = class {
9036
9757
  entries: Object.keys(file.content.entries).length
9037
9758
  });
9038
9759
  } catch (error) {
9760
+ writeFailed = true;
9039
9761
  toolErrors.push({
9040
9762
  code: "THRESHOLDS_WRITE_FAILED",
9041
9763
  message: `The thresholds file ${loaded[file.kind].path} could not be written: ${error instanceof Error ? error.message : String(error)}`,
@@ -9047,10 +9769,13 @@ var RunSession = class {
9047
9769
  (file) => diffThresholds(loaded[file.kind], file, report, cfg)
9048
9770
  );
9049
9771
  const filePaths = derived.value.files.map((file) => absolute[file.kind]);
9050
- const diffPath = io.resolvePath(
9051
- io.resolvePath(this.configDir, cfg.report.dir),
9052
- "thresholds-diff.md"
9053
- );
9772
+ if (!writeFailed && this.settings.mode.thresholdsDir === void 0) {
9773
+ const copies = io.thresholdsFilePaths({ ...location, configDir: reportDir, dir: "." });
9774
+ for (const file of derived.value.files) {
9775
+ await this.copyThresholdsFile(absolute[file.kind], copies[file.kind], warnings);
9776
+ }
9777
+ }
9778
+ const diffPath = io.resolvePath(reportDir, "thresholds-diff.md");
9054
9779
  try {
9055
9780
  await io.writeTextAtomic(
9056
9781
  diffPath,
@@ -9069,6 +9794,23 @@ var RunSession = class {
9069
9794
  }
9070
9795
  return { diffs, paths: filePaths };
9071
9796
  }
9797
+ /**
9798
+ * A byte-identical copy of a thresholds file in report.dir, for the CI artifact (10-REQ-24).
9799
+ * A missing file (a kind that was never written) has no copy; a failure is a warning.
9800
+ */
9801
+ async copyThresholdsFile(from, to, warnings) {
9802
+ const io = this.host.io;
9803
+ try {
9804
+ const text2 = await io.readTextFile(from);
9805
+ if (text2 !== null) await io.writeTextAtomic(to, text2);
9806
+ } catch (error) {
9807
+ warnings.push({
9808
+ code: "THRESHOLDS_COPY_FAILED",
9809
+ message: `The thresholds file ${from} could not be copied to ${to}: ${error instanceof Error ? error.message : String(error)}`,
9810
+ hint: "The thresholds file itself is written; commit it from thresholds.dir or check that report.dir is writable."
9811
+ });
9812
+ }
9813
+ }
9072
9814
  /** The outcome when building the report failed: exit code 3 with the error (02-REQ-27). */
9073
9815
  fallbackOutcome(result2) {
9074
9816
  return {
@@ -9094,7 +9836,7 @@ var RunSession = class {
9094
9836
  */
9095
9837
  prune(warnings) {
9096
9838
  if (this.settings.mode.prune !== true) return false;
9097
- const filters = chunkIUI4AFE5_cjs.testFilters(chunkIUI4AFE5_cjs.testArgsFromArgv(this.host.argv));
9839
+ const filters = chunkLEIBG5A4_cjs.testFilters(chunkLEIBG5A4_cjs.testArgsFromArgv(this.host.argv));
9098
9840
  if (filters.length > 0) {
9099
9841
  warnings.push({
9100
9842
  code: "RUN_PRUNE_SKIPPED",
@@ -9122,7 +9864,7 @@ var RunSession = class {
9122
9864
  return file;
9123
9865
  } catch (error) {
9124
9866
  this.host.stderr.write(
9125
- `${chunkIUI4AFE5_cjs.PACKAGE_NAME}: OUTCOME_WRITE_FAILED: the outcome file could not be written to ${file}: ${error instanceof Error ? error.message : String(error)}
9867
+ `${chunkLEIBG5A4_cjs.PACKAGE_NAME}: OUTCOME_WRITE_FAILED: the outcome file could not be written to ${file}: ${error instanceof Error ? error.message : String(error)}
9126
9868
  `
9127
9869
  );
9128
9870
  return null;
@@ -9131,7 +9873,7 @@ var RunSession = class {
9131
9873
  };
9132
9874
  function configFileNotPassedWarning(entries2) {
9133
9875
  const names2 = new Set(entries2);
9134
- const file = chunkIUI4AFE5_cjs.CONFIG_FILE_EXTENSIONS.map((ext) => `${chunkIUI4AFE5_cjs.CONFIG_FILE_BASENAME}${ext}`).find(
9876
+ const file = chunkLEIBG5A4_cjs.CONFIG_FILE_EXTENSIONS.map((ext) => `${chunkLEIBG5A4_cjs.CONFIG_FILE_BASENAME}${ext}`).find(
9135
9877
  (name) => names2.has(name)
9136
9878
  );
9137
9879
  if (file === void 0) return null;
@@ -9198,6 +9940,8 @@ function processHost() {
9198
9940
  ci: readCiInfo(env),
9199
9941
  host: readHostInfo(env),
9200
9942
  execPath: process.execPath,
9943
+ pid: process.pid,
9944
+ processTable: readProcessTable,
9201
9945
  runPass: (command, passEnv) => runPass(command, passEnv, process.cwd())
9202
9946
  };
9203
9947
  }
@@ -9212,7 +9956,7 @@ var PerfReporter = class {
9212
9956
  let startError;
9213
9957
  try {
9214
9958
  const host = processHost();
9215
- const settings = runSettings(chunkIUI4AFE5_cjs.getRegistered(), host.env, chunkIUI4AFE5_cjs.version);
9959
+ const settings = runSettings(chunkLEIBG5A4_cjs.getRegistered(), host.env, chunkLEIBG5A4_cjs.version);
9216
9960
  session = settings === null ? null : new RunSession(host, settings);
9217
9961
  } catch (error) {
9218
9962
  startError = error;