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.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { getRegistered, notWrappedWarning } from './chunk-S6UH6QPK.js';
2
- import { emptyDirSync, scanDirSync, homeDir, realPathSync, isDirectorySync, listDirSync, readTextFileSync, readTextFile, tempPath, readSuite, readPackageInfo, removeFileSync, relativeSlashPath, directoryOf, resolvePath, writeTextAtomic, writeJsonStable, thresholdsFilePaths, loadThresholds, runPass, readHostInfo, readCiInfo, parseRunReport, asciiTerminal, parseSampleBatch, schemaIssueToIssue, colorEnabled, SCHEMA_VERSIONS, stringifyStable, plural, box, painter, marks, padEnd, truncateMiddle, compareText, textWidth, boxLines, table, roundMs, roundRatio, ceilTo, floorTo } from './chunk-CXE5IWZY.js';
3
- import { ABORT_FAILURE_TEXTS, version, readModeState, generateRunId, PACKAGE_NAME, testFilters, testArgsFromArgv, DEFAULT_MAX_TESTS, SAMPLES_ATTACHMENT_NAME, passCommand, runShape, writeModeState, checkStateFileName, CONFIG_FILE_EXTENSIONS, CONFIG_FILE_BASENAME, REQUEST_KEY_PREFIX, KINDS, THRESHOLDS_COMMAND, DIFF_CATEGORIES, diffCountsText, LISTED_CATEGORIES, diffValuesText, diffMarker, skippedReasonText, PRUNE_COMMAND, diffChangeText, REPOSITORY_URL, LIMIT_NAMES, isRequestKey } from './chunk-RL27E3AB.js';
4
- import { resolveConfig, compileHostPatterns, isHostPattern, matchingPattern, DEFAULT_CONFIG, perfDefaults } from './chunk-CISGJCFW.js';
2
+ import { readProcessTable, emptyDirSync, scanDirSync, homeDir, realPathSync, isDirectorySync, listDirSync, readTextFileSync, readTextFile, tempPath, readSuite, readPackageInfo, removeFileSync, relativeSlashPath, directoryOf, resolvePath, writeTextAtomic, writeJsonStable, thresholdsFilePaths, loadThresholds, runPass, readHostInfo, readCiInfo, parseRunReport, asciiTerminal, parseSampleBatch, schemaIssueToIssue, colorEnabled, SCHEMA_VERSIONS, stringifyStable, plural, table, painter, marks, padEnd, truncateMiddle, exceedance, compareText, textWidth, boxLines, formatMs, formatActual, formatLimit, overText, roundMs, roundRatio, ceilTo, floorTo, formatFactor } from './chunk-BA37V6SL.js';
3
+ import { ABORT_FAILURE_TEXTS, version, readModeState, generateRunId, PACKAGE_NAME, testFilters, testArgsFromArgv, DEFAULT_MAX_TESTS, SAMPLES_ATTACHMENT_NAME, passCommand, runShape, writeModeState, checkStateFileName, scriptEnv, CONFIG_FILE_EXTENSIONS, CONFIG_FILE_BASENAME, REQUEST_KEY_PREFIX, KINDS, THRESHOLDS_COMMAND, DIFF_CATEGORIES, diffCountsText, LISTED_CATEGORIES, diffValuesText, diffMarker, skippedReasonText, PRUNE_COMMAND, diffChangeText, REPOSITORY_URL, LIMIT_NAMES, isRequestKey } from './chunk-ORWOFAZ5.js';
4
+ import { resolveConfig, compileHostPatterns, isHostPattern, matchingPattern, DEFAULT_CONFIG, perfDefaults } from './chunk-5Y34Q4DR.js';
5
5
 
6
6
  // src/core/evaluate/files.ts
7
7
  function compareText2(a, b) {
@@ -24,6 +24,25 @@ function missingFileWarning(file, env) {
24
24
  hint: `${derive}${envless}`
25
25
  };
26
26
  }
27
+ function emptyFileWarning(path, kind, env) {
28
+ return {
29
+ code: "THRESHOLDS_FILE_EMPTY",
30
+ message: `Thresholds file ${path} has no entries; ${KIND_NOUN[kind]} keys are evaluated with default thresholds.`,
31
+ hint: `Derive thresholds with \`${THRESHOLDS_COMMAND}\`${env === null ? "" : ` (environment "${env}")`}.`
32
+ };
33
+ }
34
+ var MAX_KEYS_IN_MESSAGE = 3;
35
+ function keysOnDefaultsWarning(path, kind, keys, env) {
36
+ const one = keys.length === 1;
37
+ const named = keys.slice(0, MAX_KEYS_IN_MESSAGE).join(", ");
38
+ const rest = keys.length - MAX_KEYS_IN_MESSAGE;
39
+ const list2 = rest > 0 ? `${named} and ${plural2(rest, "other key")}` : named;
40
+ return {
41
+ code: "THRESHOLDS_KEYS_ON_DEFAULTS",
42
+ message: `${plural2(keys.length, `${KIND_NOUN[kind]} key`)} ${one ? "has" : "have"} no entry in ${path} and ${one ? "is" : "are"} evaluated with default thresholds: ${list2}.`,
43
+ hint: `New endpoints or steps, or keys renamed by a code or normalization change, get the default thresholds. Add entries with \`${THRESHOLDS_COMMAND}\`${env === null ? "" : ` (environment "${env}")`}; locked entries are kept.`
44
+ };
45
+ }
27
46
  function majorMinor(version2) {
28
47
  return version2.split(".").slice(0, 2).join(".");
29
48
  }
@@ -615,7 +634,7 @@ function costOf(test) {
615
634
  const topKeys = keys.map((key) => {
616
635
  const index = test.keys.get(key) ?? -1;
617
636
  return { key, count: test.counts[index] ?? 0, tenths: test.sums[index] ?? 0 };
618
- }).sort((a, b) => b.tenths - a.tenths || b.count - a.count || compareText4(a.key, b.key)).slice(0, TOP_KEYS).map(({ key, count, tenths }) => ({ key, count, totalMs: tenths / 10 }));
637
+ }).sort((a, b) => b.tenths - a.tenths || b.count - a.count || compareText4(a.key, b.key)).slice(0, TOP_KEYS).map(({ key, count: count2, tenths }) => ({ key, count: count2, totalMs: tenths / 10 }));
619
638
  return {
620
639
  title: test.title,
621
640
  project: test.project,
@@ -1054,9 +1073,9 @@ function exceedingShare(sorted, t) {
1054
1073
  function wilsonBounds(k, n) {
1055
1074
  if (n === 0) return null;
1056
1075
  const z2 = WILSON_Z * WILSON_Z;
1057
- const share = k / n;
1058
- const center = share + z2 / (2 * n);
1059
- const margin = WILSON_Z * Math.sqrt(share * (1 - share) / n + z2 / (4 * n * n));
1076
+ const share2 = k / n;
1077
+ const center = share2 + z2 / (2 * n);
1078
+ const margin = WILSON_Z * Math.sqrt(share2 * (1 - share2) / n + z2 / (4 * n * n));
1060
1079
  const denominator = 1 + z2 / n;
1061
1080
  const clamp2 = (x) => Math.min(1, Math.max(0, roundRatio(x)));
1062
1081
  return {
@@ -1308,6 +1327,9 @@ function evaluate(aggregates, thresholds, cfg, opts) {
1308
1327
  } else if (file.status === "invalid") {
1309
1328
  toolErrors.push(...file.issues.map(schemaIssueToIssue));
1310
1329
  } else {
1330
+ if (opts.mode === "test" && Object.keys(file.file.entries).length === 0 && Object.keys(byKind[kind]).length > 0) {
1331
+ warnings.push(emptyFileWarning(file.path, kind, opts.env));
1332
+ }
1311
1333
  if (file.migratedFrom !== void 0) {
1312
1334
  warnings.push(outdatedWarning(file.path, file.migratedFrom, SCHEMA_VERSIONS.thresholds));
1313
1335
  }
@@ -1324,6 +1346,12 @@ function evaluate(aggregates, thresholds, cfg, opts) {
1324
1346
  }
1325
1347
  unseen = Object.keys(file.file.entries).filter((key) => !Object.hasOwn(byKind[kind], key)).sort(compareText2);
1326
1348
  if (unseen.length > 0) warnings.push(unseenWarning(file.path, unseen));
1349
+ if (opts.mode === "test" && Object.keys(file.file.entries).length > 0) {
1350
+ const onDefaults = Object.entries(perKey[kind]).filter(([, e]) => e.thresholdSource === "default" && e.result !== "not-evaluated").map(([key]) => key).sort(compareText2);
1351
+ if (onDefaults.length > 0) {
1352
+ warnings.push(keysOnDefaultsWarning(file.path, kind, onDefaults, opts.env));
1353
+ }
1354
+ }
1327
1355
  }
1328
1356
  unseenCount[kind] = unseen.length;
1329
1357
  thresholdFiles.push(fileInfo(file, unseen));
@@ -1365,20 +1393,20 @@ function evaluate(aggregates, thresholds, cfg, opts) {
1365
1393
  }
1366
1394
 
1367
1395
  // src/core/evaluate/outcome.ts
1368
- function percent(share) {
1369
- return `${Math.round(share * 1e3) / 10}%`;
1396
+ function percent(share2) {
1397
+ return `${Math.round(share2 * 1e3) / 10}%`;
1370
1398
  }
1371
1399
  function assessRun(input, gate) {
1372
1400
  const { tests, maxFailures, sharded } = input;
1373
1401
  const warnings = [];
1374
1402
  const toolErrors = [];
1375
1403
  const executions = tests.expected + tests.unexpected + tests.flaky;
1376
- const share = executions === 0 ? 0 : tests.unexpected / executions;
1404
+ const share2 = executions === 0 ? 0 : tests.unexpected / executions;
1377
1405
  const failedText = `${tests.unexpected} of ${plural2(executions, "test execution")} failed`;
1378
- if (share > gate.maxFailedTestShare) {
1406
+ if (share2 > gate.maxFailedTestShare) {
1379
1407
  toolErrors.push({
1380
1408
  code: "TESTS_FAILED_TOO_MANY",
1381
- 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.`,
1409
+ 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.`,
1382
1410
  hint: "Fix the failing tests (run them without perf mode), or raise gate.maxFailedTestShare if the failures are expected."
1383
1411
  });
1384
1412
  } else if (tests.unexpected > 0) {
@@ -1844,7 +1872,7 @@ var RULES = [
1844
1872
  return { code: "HINT_MEDIAN_ONLY", params: { n: median.n } };
1845
1873
  },
1846
1874
  ({ evaluation: { result: result2, muted } }) => result2 === "fail" && muted !== null && !muted.expired ? { code: "HINT_MUTED", params: {} } : null,
1847
- ({ count, fromFailedTests }) => count > 0 && fromFailedTests * 2 >= count ? { code: "HINT_FAILED_TESTS", params: { share: roundRatio(fromFailedTests / count) } } : null,
1875
+ ({ count: count2, fromFailedTests }) => count2 > 0 && fromFailedTests * 2 >= count2 ? { code: "HINT_FAILED_TESTS", params: { share: roundRatio(fromFailedTests / count2) } } : null,
1848
1876
  ({ evaluation: { result: result2, checks } }) => {
1849
1877
  if (result2 !== "pass") return null;
1850
1878
  const headroom = keyHeadroom(checks);
@@ -2041,6 +2069,368 @@ function buildRunReport(input) {
2041
2069
  };
2042
2070
  }
2043
2071
 
2072
+ // src/core/report/junit.ts
2073
+ var JUNIT_FILE = "junit.xml";
2074
+ var JUNIT_MESSAGE_MAX = 500;
2075
+ var JUNIT_TEXT_MAX = 4e3;
2076
+ var JUNIT_MAX_WARNINGS = 50;
2077
+ var RULE_ORDER2 = [
2078
+ "median",
2079
+ "percentile",
2080
+ "p99",
2081
+ "apdex",
2082
+ "wilson",
2083
+ "errors"
2084
+ ];
2085
+ var SUITES = [
2086
+ { kind: "api", name: "pw-perf endpoints", classname: "pw-perf.endpoints" },
2087
+ { kind: "step", name: "pw-perf steps", classname: "pw-perf.steps" }
2088
+ ];
2089
+ var INVALID_CHARS = (
2090
+ // eslint-disable-next-line no-control-regex -- the control characters are what is replaced
2091
+ /[\u0000-\u0008\u000B\u000C\u000E-\u001F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g
2092
+ );
2093
+ function xmlChars(text2) {
2094
+ return text2.replace(INVALID_CHARS, "�");
2095
+ }
2096
+ function escapeText(text2) {
2097
+ return xmlChars(text2).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
2098
+ }
2099
+ function escapeAttr(text2) {
2100
+ return escapeText(text2).replace(/\t/g, "&#9;").replace(/\n/g, "&#10;").replace(/\r/g, "&#13;");
2101
+ }
2102
+ function truncateEnd(text2, max) {
2103
+ const chars = Array.from(text2);
2104
+ return chars.length <= max ? text2 : `${chars.slice(0, max - 1).join("")}…`;
2105
+ }
2106
+ function seconds(ms) {
2107
+ const whole = Math.max(0, Math.round(ms));
2108
+ return `${String(Math.floor(whole / 1e3))}.${String(whole % 1e3).padStart(3, "0")}`;
2109
+ }
2110
+ function attrs(values) {
2111
+ return Object.entries(values).map(([name, value]) => ` ${name}="${escapeAttr(String(value))}"`).join("");
2112
+ }
2113
+ function childXml(child, indent) {
2114
+ const a = child.attrs === void 0 ? "" : attrs(
2115
+ Object.fromEntries(
2116
+ Object.entries(child.attrs).map(([k, v]) => [
2117
+ k,
2118
+ k === "message" ? truncateEnd(String(v), JUNIT_MESSAGE_MAX) : v
2119
+ ])
2120
+ )
2121
+ );
2122
+ if (child.text === void 0 || child.text === "") return `${indent}<${child.tag}${a}/>`;
2123
+ return `${indent}<${child.tag}${a}>${escapeText(truncateEnd(child.text, JUNIT_TEXT_MAX))}</${child.tag}>`;
2124
+ }
2125
+ function count(cases, tag) {
2126
+ return cases.filter((c) => c.children.some((child) => child.tag === tag)).length;
2127
+ }
2128
+ function totals(cases) {
2129
+ return {
2130
+ tests: cases.length,
2131
+ failures: count(cases, "failure"),
2132
+ errors: count(cases, "error")
2133
+ };
2134
+ }
2135
+ function isMuteActive2(evaluation) {
2136
+ return evaluation.muted !== null && !evaluation.muted.expired;
2137
+ }
2138
+ function failedChecks(evaluation) {
2139
+ const r2 = exceedance;
2140
+ return evaluation.checks.filter((c) => !c.passed).sort(
2141
+ (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)
2142
+ );
2143
+ }
2144
+ function checkLine(check, evaluation, ctx) {
2145
+ const rule = check.rule === "percentile" ? ctx.level : check.rule;
2146
+ const sign = check.rule === "apdex" ? "<" : ">";
2147
+ const source = evaluation.thresholdSource === "file" ? "thresholds file" : "default thresholds";
2148
+ let line = `${rule} ${formatActual(check)} ${sign} limit ${formatLimit(check)} (${overText(check)}), ${String(check.n)} samples, ${source}`;
2149
+ if (check.hardLimitExceeded) line += ", HARD limit";
2150
+ if (evaluation.muted?.expired === true) line += `, muting expired on ${evaluation.muted.until}`;
2151
+ return line;
2152
+ }
2153
+ function share(value) {
2154
+ return value.toFixed(3);
2155
+ }
2156
+ function violationBody(key, aggregate, checks, ctx) {
2157
+ const evaluation = aggregate.evaluation;
2158
+ const lines = checks.map(
2159
+ (c) => `${checkLine(c, evaluation, ctx)} (${c.blocking ? "blocking" : "not blocking"})`
2160
+ );
2161
+ const l = evaluation.limits;
2162
+ let limits = `Limits: median ${formatMs(l.median)}, ${ctx.level} ${formatMs(l.percentile)}, p99 ${formatMs(l.p99)}, errors <= ${share(l.maxErrorRate)}`;
2163
+ if (l.t !== null) {
2164
+ limits += `, T ${formatMs(l.t)}`;
2165
+ if (l.minApdex !== null) limits += `, apdex >= ${share(l.minApdex)}`;
2166
+ if (l.maxWilson !== null) limits += `, wilson <= ${share(l.maxWilson)}`;
2167
+ }
2168
+ lines.push(limits);
2169
+ lines.push(`Samples: ${String(aggregate.count)}, errors ${String(aggregate.errorCount)}`);
2170
+ const slowest = aggregate.slowest[0];
2171
+ if (slowest !== void 0) {
2172
+ const t = slowest.test;
2173
+ lines.push(
2174
+ `Slowest: ${formatMs(slowest.duration)} in "${t.title}" (${t.file}:${String(t.line)})`
2175
+ );
2176
+ }
2177
+ lines.push(`Details: ${ctx.details} (key "${key}")`);
2178
+ return lines;
2179
+ }
2180
+ function notBlockingReason(evaluation, report) {
2181
+ const gate = report.config.gate;
2182
+ const defaultThresholds = gate?.defaultThresholds ?? DEFAULT_CONFIG.gate.defaultThresholds;
2183
+ if (evaluation.thresholdSource === "default" && defaultThresholds === "warn") {
2184
+ return "default thresholds only warn (gate.defaultThresholds: warn)";
2185
+ }
2186
+ if (!report.evaluation.gateEnabled) return "the gate is off";
2187
+ return `within gate.tolerance (${String(gate?.tolerance ?? DEFAULT_CONFIG.gate.tolerance)})`;
2188
+ }
2189
+ function mildestRule(report) {
2190
+ const checks = report.config.checks;
2191
+ const d = DEFAULT_CONFIG.checks;
2192
+ const rules = [
2193
+ {
2194
+ rule: "median",
2195
+ enabled: checks?.time?.median?.enabled ?? d.time.median.enabled,
2196
+ minSamples: checks?.time?.median?.minSamples ?? d.time.median.minSamples
2197
+ },
2198
+ {
2199
+ rule: "percentile",
2200
+ enabled: checks?.time?.percentile?.enabled ?? d.time.percentile.enabled,
2201
+ minSamples: checks?.time?.percentile?.minSamples ?? d.time.percentile.minSamples
2202
+ },
2203
+ {
2204
+ rule: "p99",
2205
+ enabled: checks?.time?.p99?.enabled ?? d.time.p99.enabled,
2206
+ minSamples: checks?.time?.p99?.minSamples ?? d.time.p99.minSamples
2207
+ },
2208
+ {
2209
+ rule: "apdex",
2210
+ enabled: checks?.slowShare?.apdex?.enabled ?? d.slowShare.apdex.enabled,
2211
+ minSamples: checks?.slowShare?.apdex?.minSamples ?? d.slowShare.apdex.minSamples
2212
+ },
2213
+ {
2214
+ rule: "wilson",
2215
+ enabled: checks?.slowShare?.wilson?.enabled ?? d.slowShare.wilson.enabled,
2216
+ minSamples: checks?.slowShare?.wilson?.minSamples ?? d.slowShare.wilson.minSamples
2217
+ },
2218
+ {
2219
+ rule: "errors",
2220
+ enabled: checks?.errors?.enabled ?? d.errors.enabled,
2221
+ minSamples: checks?.errors?.minSamples ?? d.errors.minSamples
2222
+ }
2223
+ ];
2224
+ let best = null;
2225
+ for (const r2 of rules) {
2226
+ if (r2.enabled && (best === null || r2.minSamples < best.minSamples)) {
2227
+ best = { rule: r2.rule, minSamples: r2.minSamples };
2228
+ }
2229
+ }
2230
+ return best;
2231
+ }
2232
+ function notEvaluatedMessage(kind, aggregate, report) {
2233
+ switch (aggregate.evaluation.reason) {
2234
+ case "too-few-samples": {
2235
+ const mildest = mildestRule(report);
2236
+ if (mildest === null) return `too few samples (${String(aggregate.successCount)})`;
2237
+ const n = mildest.rule === "errors" ? aggregate.count : aggregate.successCount;
2238
+ const rule = mildest.rule === "percentile" ? levelOf(report) : mildest.rule;
2239
+ return `too few samples (${String(n)}, the ${rule} rule needs ${String(mildest.minSamples)})`;
2240
+ }
2241
+ case "thresholds-error": {
2242
+ const file = report.thresholdFiles.find((f) => f.kind === kind && f.status === "invalid");
2243
+ return file === void 0 ? "the thresholds file is invalid" : `thresholds file ${file.path} is invalid`;
2244
+ }
2245
+ default:
2246
+ return "no enabled rule applies";
2247
+ }
2248
+ }
2249
+ function levelOf(report) {
2250
+ return report.config.checks?.time?.percentile?.level ?? DEFAULT_CONFIG.checks.time.percentile.level;
2251
+ }
2252
+ function keyCase(kind, classname, key, aggregate, ctx) {
2253
+ const evaluation = aggregate.evaluation;
2254
+ const median = aggregate.stats?.percentiles["p50"];
2255
+ const children = [];
2256
+ const muted = evaluation.muted;
2257
+ if (evaluation.result === "not-evaluated") {
2258
+ children.push({
2259
+ tag: "skipped",
2260
+ attrs: { message: `not evaluated: ${notEvaluatedMessage(kind, aggregate, ctx.report)}` }
2261
+ });
2262
+ } else if (evaluation.result === "fail") {
2263
+ const checks = failedChecks(evaluation);
2264
+ const body = violationBody(key, aggregate, checks, ctx);
2265
+ const first = checks[0];
2266
+ const blocking = checks.find((c) => c.blocking);
2267
+ if (blocking !== void 0) {
2268
+ children.push({
2269
+ tag: "failure",
2270
+ attrs: { type: blocking.rule, message: checkLine(blocking, evaluation, ctx) },
2271
+ text: body.join("\n")
2272
+ });
2273
+ } else if (muted !== null && isMuteActive2(evaluation)) {
2274
+ const exceeded = first === void 0 ? "" : `; ${checkLine(first, evaluation, ctx)}`;
2275
+ children.push({
2276
+ tag: "skipped",
2277
+ attrs: { message: `muted until ${muted.until}: ${muted.note}${exceeded}` },
2278
+ text: body.join("\n")
2279
+ });
2280
+ } else {
2281
+ body.push(`not blocking: ${notBlockingReason(evaluation, ctx.report)}`);
2282
+ children.push({ tag: "system-out", text: body.join("\n") });
2283
+ }
2284
+ } else if (muted !== null && isMuteActive2(evaluation)) {
2285
+ children.push({ tag: "system-out", text: `muted until ${muted.until}: ${muted.note}` });
2286
+ }
2287
+ return {
2288
+ classname,
2289
+ name: key,
2290
+ ms: median === void 0 ? 0 : median,
2291
+ noTime: median === void 0,
2292
+ children
2293
+ };
2294
+ }
2295
+ function issueLines(issue) {
2296
+ return issue.hint === void 0 ? `${issue.code}: ${issue.message}` : `${issue.code}: ${issue.message}
2297
+ hint: ${issue.hint}`;
2298
+ }
2299
+ function runCase(report, exitCode) {
2300
+ const children = [];
2301
+ const first = report.toolErrors[0];
2302
+ if (first !== void 0) {
2303
+ children.push({
2304
+ tag: "error",
2305
+ attrs: { type: first.code, message: first.message },
2306
+ text: report.toolErrors.map(issueLines).join("\n")
2307
+ });
2308
+ }
2309
+ const t = report.tests;
2310
+ const lines = [
2311
+ `Mode: ${report.mode}${report.env === null ? "" : ` (env ${report.env})`}`,
2312
+ `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)}`,
2313
+ `Evaluation: ${report.evaluation.status} (exit code ${String(exitCode)})`
2314
+ ];
2315
+ const warnings = report.warnings;
2316
+ if (warnings.length === 0) {
2317
+ lines.push("Warnings: none");
2318
+ } else {
2319
+ lines.push(`Warnings: ${String(warnings.length)}`);
2320
+ for (const w of warnings.slice(0, JUNIT_MAX_WARNINGS)) lines.push(`${w.code}: ${w.message}`);
2321
+ if (warnings.length > JUNIT_MAX_WARNINGS) {
2322
+ const more = warnings.length - JUNIT_MAX_WARNINGS;
2323
+ lines.push(`… and ${String(more)} more warning${more === 1 ? "" : "s"} (see report.json)`);
2324
+ }
2325
+ }
2326
+ children.push({ tag: "system-out", text: lines.join("\n") });
2327
+ return { classname: "pw-perf.run", name: "measurement run", ms: 0, noTime: true, children };
2328
+ }
2329
+ function caseTime(c) {
2330
+ return c.noTime ? "0" : seconds(c.ms);
2331
+ }
2332
+ function suiteXml(suite, timestamp) {
2333
+ const t = totals(suite.cases);
2334
+ const ms = suite.cases.reduce(
2335
+ (sum2, c) => sum2 + (c.noTime ? 0 : Math.max(0, Math.round(c.ms))),
2336
+ 0
2337
+ );
2338
+ const lines = [
2339
+ ` <testsuite${attrs({
2340
+ name: suite.name,
2341
+ tests: t.tests,
2342
+ failures: t.failures,
2343
+ errors: t.errors,
2344
+ skipped: count(suite.cases, "skipped"),
2345
+ time: suite.time ?? seconds(ms),
2346
+ timestamp
2347
+ })}>`
2348
+ ];
2349
+ if (suite.properties !== void 0) {
2350
+ lines.push(" <properties>");
2351
+ for (const [name, value] of suite.properties) {
2352
+ lines.push(` <property${attrs({ name, value })}/>`);
2353
+ }
2354
+ lines.push(" </properties>");
2355
+ }
2356
+ for (const c of suite.cases) {
2357
+ const head = ` <testcase${attrs({ classname: c.classname, name: c.name, time: caseTime(c) })}`;
2358
+ if (c.children.length === 0) {
2359
+ lines.push(`${head}/>`);
2360
+ continue;
2361
+ }
2362
+ lines.push(`${head}>`);
2363
+ for (const child of c.children) lines.push(childXml(child, " "));
2364
+ lines.push(" </testcase>");
2365
+ }
2366
+ lines.push(" </testsuite>");
2367
+ return lines;
2368
+ }
2369
+ function buildJunitXml(report) {
2370
+ const exitCode = buildOutcome(report, {
2371
+ reportJson: null,
2372
+ reportHtml: null,
2373
+ thresholds: [],
2374
+ thresholdsDiff: null
2375
+ }).exitCode;
2376
+ const ctx = {
2377
+ report,
2378
+ level: levelOf(report),
2379
+ details: report.config.report?.html === false ? "report.json" : "report.html"
2380
+ };
2381
+ const ci = report.ci;
2382
+ const suites = [
2383
+ {
2384
+ name: "pw-perf run",
2385
+ time: "0",
2386
+ cases: [runCase(report, exitCode)],
2387
+ properties: [
2388
+ ["pw-perf.runId", report.runId],
2389
+ ["pw-perf.mode", report.mode],
2390
+ ["pw-perf.env", report.env ?? ""],
2391
+ ["pw-perf.toolVersion", report.tool.version],
2392
+ ["pw-perf.evaluation", report.evaluation.status],
2393
+ ["pw-perf.exitCode", String(exitCode)],
2394
+ ["pw-perf.passes", `${String(report.passes.completed)}/${String(report.passes.planned)}`],
2395
+ // Number of merged shards (17-REQ-17); 0 until a merge writes the report.
2396
+ ["pw-perf.shards", "0"],
2397
+ ["pw-perf.commit", ci?.commit ?? ""],
2398
+ ["pw-perf.branch", ci?.branch ?? ""],
2399
+ ["pw-perf.buildUrl", ci?.buildUrl ?? ""]
2400
+ ]
2401
+ }
2402
+ ];
2403
+ const byKind = {
2404
+ api: report.endpoints,
2405
+ step: report.steps
2406
+ };
2407
+ for (const { kind, name, classname } of SUITES) {
2408
+ const keys = Object.keys(byKind[kind]).sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
2409
+ if (keys.length === 0) continue;
2410
+ suites.push({
2411
+ name,
2412
+ cases: keys.map((key) => keyCase(kind, classname, key, byKind[kind][key], ctx))
2413
+ });
2414
+ }
2415
+ const all = suites.flatMap((s) => s.cases);
2416
+ const t = totals(all);
2417
+ const duration = Date.parse(report.finishedAt) - Date.parse(report.startedAt);
2418
+ const lines = [
2419
+ '<?xml version="1.0" encoding="UTF-8"?>',
2420
+ `<testsuites${attrs({
2421
+ name: "pw-perf",
2422
+ tests: t.tests,
2423
+ failures: t.failures,
2424
+ errors: t.errors,
2425
+ time: seconds(Number.isFinite(duration) ? duration : 0)
2426
+ })}>`,
2427
+ ...suites.flatMap((s) => suiteXml(s, report.startedAt)),
2428
+ "</testsuites>"
2429
+ ];
2430
+ return `${lines.join("\n")}
2431
+ `;
2432
+ }
2433
+
2044
2434
  // src/core/report/next-hint.ts
2045
2435
  function perfCommand(mode, env, command, platform) {
2046
2436
  const vars = `PW_PERF_MODE=${mode}${env === null ? "" : ` PW_PERF_ENV=${env}`}`;
@@ -2119,7 +2509,9 @@ function nextHint(input) {
2119
2509
  const local = report.ci === null ? "; for CI, derive them on the CI machines (docs/thresholds.md)" : "";
2120
2510
  return `commit ${files}${local}`;
2121
2511
  }
2122
- if (report.warnings.some((w) => w.code === "THRESHOLDS_FILE_MISSING")) {
2512
+ if (report.warnings.some(
2513
+ (w) => w.code === "THRESHOLDS_FILE_MISSING" || w.code === "THRESHOLDS_FILE_EMPTY"
2514
+ )) {
2123
2515
  return `derive thresholds: ${commands.thresholds}`;
2124
2516
  }
2125
2517
  if (report.evaluation.status === "failed") {
@@ -2139,8 +2531,8 @@ function estimateText(input) {
2139
2531
  const mean = input.meanMs;
2140
2532
  if (mean === null) return "not available (no measured test ran)";
2141
2533
  const run = (passes) => passes * (input.setupMs + input.tests * mean);
2142
- const seconds = (Math.round(mean / 100) / 10).toFixed(1);
2143
- return `measurement run ≈ ${formatDuration(run(input.passesTest))} (${String(input.tests)} tests × ${String(input.passesTest)} passes × ${seconds} s), thresholds run ≈ ${formatDuration(run(input.passesThresholds))} (× ${String(input.passesThresholds)} passes), 1 worker`;
2534
+ const seconds2 = (Math.round(mean / 100) / 10).toFixed(1);
2535
+ return `measurement run ≈ ${formatDuration(run(input.passesTest))} (${String(input.tests)} tests × ${String(input.passesTest)} passes × ${seconds2} s), thresholds run ≈ ${formatDuration(run(input.passesThresholds))} (× ${String(input.passesThresholds)} passes), 1 worker`;
2144
2536
  }
2145
2537
  function msPerTest(report) {
2146
2538
  const executions = report.tests.expected + report.tests.unexpected + report.tests.flaky;
@@ -2755,6 +3147,36 @@ var StepRecorder = class {
2755
3147
  }
2756
3148
  };
2757
3149
 
3150
+ // src/reporter/junit.ts
3151
+ async function writeJunitFile(io, report, dir, build = buildJunitXml) {
3152
+ const path = io.resolvePath(dir, JUNIT_FILE);
3153
+ const hint = "Check that report.dir is writable, then run again; set report.junit to false to skip the file.";
3154
+ let xml;
3155
+ try {
3156
+ xml = build(report);
3157
+ } catch (error) {
3158
+ return {
3159
+ issue: {
3160
+ code: "REPORT_JUNIT_WRITE_FAILED",
3161
+ message: `junit.xml could not be built: ${error instanceof Error ? error.stack ?? error.message : String(error)}`,
3162
+ hint: "This is a bug in the package; please report it with the message above. report.json is complete."
3163
+ }
3164
+ };
3165
+ }
3166
+ try {
3167
+ await io.writeTextAtomic(path, xml);
3168
+ return { path };
3169
+ } catch (error) {
3170
+ return {
3171
+ issue: {
3172
+ code: "REPORT_JUNIT_WRITE_FAILED",
3173
+ message: `junit.xml could not be written to ${path}: ${error instanceof Error ? error.message : String(error)}`,
3174
+ hint
3175
+ }
3176
+ };
3177
+ }
3178
+ }
3179
+
2758
3180
  // src/core/thresholds/constants.ts
2759
3181
  var WILSON_SELF_GAP = 0.01;
2760
3182
  var ERR_SELF_GAP = 0.01;
@@ -3066,7 +3488,7 @@ function deriveKind(report, cfg, file, opts) {
3066
3488
  return { file: { kind, content: null, changed: false }, warnings, loosenedMuch: 0 };
3067
3489
  }
3068
3490
  const loaded = file.status === "loaded" ? file : null;
3069
- if (loaded !== null && loaded.file.generated === null) {
3491
+ if (loaded !== null && loaded.file.generated === null && Object.keys(loaded.file.entries).length > 0) {
3070
3492
  warnings.push({
3071
3493
  code: "THRESHOLDS_MANUAL_FILE",
3072
3494
  message: `${loaded.path} was written by hand (generated: null); its complete entries that are not locked are recomputed.`,
@@ -3377,6 +3799,7 @@ function nextLine(text2, color) {
3377
3799
  var MAX_WARNINGS = 10;
3378
3800
  var MAX_VIOLATION_ROWS = 20;
3379
3801
  var MAX_SLOWEST_LINES = 5;
3802
+ var MAX_DEFAULT_ROWS = 10;
3380
3803
  var MIN_KEY_WIDTH = 30;
3381
3804
  var KIND_LABEL = { api: "Endpoints", step: "Steps" };
3382
3805
  var ALWAYS_SHOWN = /* @__PURE__ */ new Set(["api"]);
@@ -3387,7 +3810,7 @@ function aggregatesOf2(report, kind) {
3387
3810
  };
3388
3811
  return byKind[kind];
3389
3812
  }
3390
- var RULE_ORDER2 = [
3813
+ var RULE_ORDER3 = [
3391
3814
  "median",
3392
3815
  "percentile",
3393
3816
  "p99",
@@ -3395,30 +3818,6 @@ var RULE_ORDER2 = [
3395
3818
  "wilson",
3396
3819
  "errors"
3397
3820
  ];
3398
- var TIME_RULES3 = /* @__PURE__ */ new Set([
3399
- "median",
3400
- "percentile",
3401
- "p99"
3402
- ]);
3403
- function exceedance(check) {
3404
- if (check.rule === "apdex") return check.actual === 0 ? Infinity : check.limit / check.actual;
3405
- return check.limit === 0 ? Infinity : check.actual / check.limit;
3406
- }
3407
- var SHARE_RULES = /* @__PURE__ */ new Set([
3408
- "apdex",
3409
- "wilson",
3410
- "errors"
3411
- ]);
3412
- function overText(check) {
3413
- if (SHARE_RULES.has(check.rule)) {
3414
- const points = Math.max(1, Math.round(Math.abs(check.actual - check.limit) * 100));
3415
- return `+${String(points)} pp`;
3416
- }
3417
- const r2 = exceedance(check);
3418
- if (!Number.isFinite(r2)) return ">999%";
3419
- const over = Math.round((r2 - 1) * 100);
3420
- return over > 999 ? ">999%" : `+${over}%`;
3421
- }
3422
3821
  function violations(report) {
3423
3822
  const list2 = [];
3424
3823
  for (const kind of KINDS) {
@@ -3432,7 +3831,7 @@ function violations(report) {
3432
3831
  }
3433
3832
  }
3434
3833
  return list2.sort(
3435
- (a, b) => Number(b.check.blocking) - Number(a.check.blocking) || (a.r === b.r ? 0 : b.r > a.r ? 1 : -1) || KINDS.indexOf(a.kind) - KINDS.indexOf(b.kind) || compareText(a.key, b.key) || RULE_ORDER2.indexOf(a.check.rule) - RULE_ORDER2.indexOf(b.check.rule)
3834
+ (a, b) => Number(b.check.blocking) - Number(a.check.blocking) || (a.r === b.r ? 0 : b.r > a.r ? 1 : -1) || KINDS.indexOf(a.kind) - KINDS.indexOf(b.kind) || compareText(a.key, b.key) || RULE_ORDER3.indexOf(a.check.rule) - RULE_ORDER3.indexOf(b.check.rule)
3436
3835
  );
3437
3836
  }
3438
3837
  function isMuted(evaluation) {
@@ -3461,9 +3860,9 @@ function issueBox(level, issues, limit, opts) {
3461
3860
  const indent = textWidth(mark) + 1;
3462
3861
  const lines = [];
3463
3862
  for (const issue of issues.slice(0, limit)) {
3464
- const times2 = issue.count !== void 0 && issue.count > 1 ? ` (×${issue.count})` : "";
3863
+ const times = issue.count !== void 0 && issue.count > 1 ? ` (×${issue.count})` : "";
3465
3864
  lines.push({
3466
- spans: [{ text: `${mark} ${issue.code}`, style }, { text: `: ${issue.message}${times2}` }],
3865
+ spans: [{ text: `${mark} ${issue.code}`, style }, { text: `: ${issue.message}${times}` }],
3467
3866
  indent
3468
3867
  });
3469
3868
  if (issue.hint !== void 0) {
@@ -3527,16 +3926,73 @@ function mutedLines(report, paint) {
3527
3926
  }
3528
3927
  return lines;
3529
3928
  }
3530
- function formatTime(ms) {
3531
- return `${Math.round(ms)} ms`;
3532
- }
3533
- function formatActual(check) {
3534
- if (TIME_RULES3.has(check.rule)) return formatTime(check.actual);
3535
- const observed = check.observed === null ? "" : ` (${check.observed.toFixed(3)})`;
3536
- return `${check.actual.toFixed(3)}${observed}`;
3929
+ function keysOnDefaults(report) {
3930
+ if (report.mode !== "test") return [];
3931
+ const list2 = [];
3932
+ for (const kind of KINDS) {
3933
+ const file = report.thresholdFiles.find((f) => f.kind === kind);
3934
+ if (file?.status !== "loaded") continue;
3935
+ const aggregates = Object.entries(aggregatesOf2(report, kind));
3936
+ const hasEntries = file.unseenKeys.length > 0 || aggregates.some(([, a]) => a.evaluation.thresholdSource === "file");
3937
+ if (!hasEntries) continue;
3938
+ for (const [key, aggregate] of aggregates) {
3939
+ const e = aggregate.evaluation;
3940
+ if (e.thresholdSource !== "default" || e.result === "not-evaluated") continue;
3941
+ const failed = e.checks.filter((c) => !c.passed);
3942
+ const rank = failed.some((c) => c.blocking) ? 2 : failed.length > 0 ? 1 : 0;
3943
+ list2.push({ kind, key, aggregate, rank });
3944
+ }
3945
+ }
3946
+ return list2.sort(
3947
+ (a, b) => b.rank - a.rank || KINDS.indexOf(a.kind) - KINDS.indexOf(b.kind) || compareText(a.key, b.key)
3948
+ );
3537
3949
  }
3538
- function formatLimit(check) {
3539
- return TIME_RULES3.has(check.rule) ? formatTime(check.limit) : check.limit.toFixed(3);
3950
+ function defaultKeyLines(report, opts, m, paint) {
3951
+ const list2 = keysOnDefaults(report);
3952
+ if (list2.length === 0) return [];
3953
+ const level = report.config.checks?.time?.percentile?.level ?? "percentile";
3954
+ const ms = (value) => value === void 0 ? "—" : formatMs(value);
3955
+ const columns = [
3956
+ { header: "" },
3957
+ { header: "kind" },
3958
+ { header: "key", flex: true, minWidth: MIN_KEY_WIDTH },
3959
+ { header: "n", align: "right" },
3960
+ { header: "median", align: "right" },
3961
+ { header: level, align: "right" },
3962
+ { header: "limit", align: "right" },
3963
+ { header: "result" }
3964
+ ];
3965
+ const shown = list2.slice(0, MAX_DEFAULT_ROWS);
3966
+ const rows = shown.map(({ kind, key, aggregate, rank }) => {
3967
+ const limits = aggregate.evaluation.limits;
3968
+ const percentiles = aggregate.stats?.percentiles;
3969
+ return {
3970
+ cells: [
3971
+ rank === 2 ? m.error : rank === 1 ? m.warn : m.ok,
3972
+ kind,
3973
+ key,
3974
+ String(aggregate.successCount),
3975
+ ms(percentiles?.["p50"]),
3976
+ ms(percentiles?.[level]),
3977
+ `${Math.round(limits.median)} / ${formatMs(limits.percentile)}`,
3978
+ rank === 0 ? "pass" : "fail"
3979
+ ],
3980
+ ...rank === 2 ? { style: "red" } : rank === 1 ? { style: "yellow" } : {}
3981
+ };
3982
+ });
3983
+ const lines = [
3984
+ paint("On default thresholds (no entry in the thresholds file):", "bold"),
3985
+ ...table(columns, rows, opts)
3986
+ ];
3987
+ if (list2.length > shown.length) {
3988
+ const more = plural(
3989
+ list2.length - shown.length,
3990
+ "more key on default thresholds",
3991
+ "more keys on default thresholds"
3992
+ );
3993
+ lines.push(paint(` … and ${more} (see report)`, "dim"));
3994
+ }
3995
+ return [...lines, ""];
3540
3996
  }
3541
3997
  function tableLines(report, list2, opts, m, paint) {
3542
3998
  const level = report.config.checks?.time?.percentile?.level ?? "percentile";
@@ -3588,7 +4044,7 @@ function slowestLines(report, list2) {
3588
4044
  if (slowest === void 0) continue;
3589
4045
  const t = slowest.test;
3590
4046
  lines.push(
3591
- ` slowest: ${v.key} — ${formatTime(slowest.duration)} in "${t.title}" (${t.file}:${t.line})`
4047
+ ` slowest: ${v.key} — ${formatMs(slowest.duration)} in "${t.title}" (${t.file}:${t.line})`
3592
4048
  );
3593
4049
  }
3594
4050
  return lines;
@@ -3698,6 +4154,7 @@ function formatSummary(report, opts) {
3698
4154
  lines.push(...issueBox("error", report.toolErrors, Infinity, frame));
3699
4155
  lines.push(...issueBox("warning", report.warnings, MAX_WARNINGS, frame));
3700
4156
  lines.push(...counterLines(report, frame), ...mutedLines(report, paint), "");
4157
+ lines.push(...defaultKeyLines(report, frame, m, paint));
3701
4158
  if (list2.length > 0) {
3702
4159
  lines.push(...tableLines(report, list2, frame, m, paint));
3703
4160
  const slowest = slowestLines(report, list2);
@@ -3785,36 +4242,40 @@ var TITLES = {
3785
4242
  function names(list2) {
3786
4243
  return list2.map((n) => n === "" ? "(default)" : n).join(", ");
3787
4244
  }
3788
- var LABEL = 10;
3789
4245
  function formatStartBanner(input, opts) {
3790
- const row = (label, value) => ({
3791
- text: `${label.padEnd(LABEL)}${value}`
3792
- });
3793
- const icon2 = opts.ascii ? "" : "⏱️ ";
3794
- const lines = [
3795
- { text: `${icon2}${input.packageName} · ${TITLES[input.mode]}`, style: "bold" }
3796
- ];
4246
+ const rows = [];
3797
4247
  const deps = input.dependencies.length > 0 ? ` (setup: ${names(input.dependencies)})` : "";
3798
- lines.push(row("Projects", `${names(input.measured)}${deps}`));
4248
+ rows.push(["Projects", `${names(input.measured)}${deps}`]);
3799
4249
  if (input.mode === "check") {
3800
- lines.push(
3801
- row(
3802
- "Tests",
3803
- `${plural(input.tests, "test")}; the first test of each file runs once, at most ${String(input.maxTests ?? input.tests)}`
3804
- )
3805
- );
4250
+ rows.push([
4251
+ "Tests",
4252
+ `${plural(input.tests, "test")}; the first test of each file runs once, at most ${String(input.maxTests ?? input.tests)}`
4253
+ ]);
3806
4254
  } else {
3807
- lines.push(
3808
- row(
3809
- "Tests",
3810
- `${plural(input.tests, "test")} × ${plural(input.passes, "pass", "passes")} = ${plural(input.tests * input.passes, "test run")}`
3811
- )
3812
- );
4255
+ rows.push([
4256
+ "Tests",
4257
+ `${plural(input.tests, "test")} × ${plural(input.passes, "pass", "passes")} = ${plural(input.tests * input.passes, "test run")}`
4258
+ ]);
3813
4259
  }
3814
- if (input.estimate !== null) lines.push(row("Estimate", input.estimate));
3815
- lines.push(row("Report", input.report ?? "no files are written"));
3816
- if (input.tip) lines.push(row("Tip", "measure a subset, e.g. --grep @perf"));
3817
- return box(lines, { ...opts, border: "cyan" });
4260
+ if (input.estimate !== null) rows.push(["Estimate", input.estimate]);
4261
+ rows.push(["Report", input.report ?? "no files are written"]);
4262
+ if (input.tip) rows.push(["Tip", "measure a subset, e.g. --grep @perf"]);
4263
+ const icon2 = opts.ascii ? "" : "⏳ ";
4264
+ const lines = table(
4265
+ [
4266
+ { header: "", style: "bold" },
4267
+ { header: "", flex: true, minWidth: 10 }
4268
+ ],
4269
+ rows.map((cells) => ({ cells })),
4270
+ {
4271
+ ...opts,
4272
+ border: "cyan",
4273
+ header: false,
4274
+ title: `${icon2}${input.packageName} · ${TITLES[input.mode]}`
4275
+ }
4276
+ );
4277
+ return `${lines.join("\n")}
4278
+ `;
3818
4279
  }
3819
4280
 
3820
4281
  // src/console/thresholds-diff.ts
@@ -3828,57 +4289,56 @@ var MARKER_STYLE = {
3828
4289
  "↓": "green",
3829
4290
  "±": "yellow"
3830
4291
  };
4292
+ function markerStyle(marker) {
4293
+ if (marker.length > 1) return "red";
4294
+ return MARKER_STYLE[marker] ?? "yellow";
4295
+ }
3831
4296
  function fileLines(diff, path, opts, paint) {
3832
4297
  const lines = [`Thresholds: ${path} (${fileStatusText(diff)})`];
3833
4298
  const listed = diff.keys.filter((k) => LISTED_CATEGORIES.has(k.category));
3834
4299
  const expired = diff.keys.filter((k) => k.muted?.expired === true);
3835
4300
  if (diff.fileStatus !== "unchanged") lines.push(` ${diffCountsText(diff)}`);
4301
+ const tableOpts = { width: opts.width, color: opts.color, ascii: opts.ascii === true };
3836
4302
  const shown = listed.slice(0, MAX_DIFF_ROWS);
3837
- const rows = shown.map((k) => ({
3838
- marker: diffMarker(k),
3839
- key: k.key,
3840
- change: diffChangeText(k, diff.level, " ") + mutedSuffix(k)
3841
- }));
3842
- const skipped2 = diff.keys.filter((k) => k.category === "skipped" && k.samples !== void 0);
3843
- const skippedRows = skipped2.slice(0, MAX_SKIPPED_ROWS).map((k) => ({
3844
- marker: ".",
3845
- key: k.key,
3846
- change: k.samples === void 0 ? "" : skippedReasonText(k.samples)
3847
- }));
3848
- const all = [...rows, ...skippedRows];
3849
- if (all.length > 0) {
3850
- const markerWidth = Math.max(...all.map((r2) => textWidth(r2.marker)));
3851
- const changeWidth = Math.max(...all.map((r2) => textWidth(r2.change)));
3852
- const longest = Math.max(...all.map((r2) => textWidth(r2.key)));
3853
- const rest = opts.width - 2 - markerWidth - 1 - 2 - changeWidth;
3854
- const keyWidth = Math.max(MIN_KEY_WIDTH2, Math.min(longest, rest));
3855
- const line = (r2, marker) => {
3856
- const pad2 = " ".repeat(markerWidth - textWidth(r2.marker));
3857
- return ` ${marker}${pad2} ${padEnd(truncateMiddle(r2.key, keyWidth), keyWidth)} ${r2.change}`.trimEnd();
3858
- };
3859
- if (rows.length > 0) {
3860
- lines.push("");
3861
- for (const r2 of rows) {
3862
- const head = r2.marker.slice(0, 1);
3863
- const style = MARKER_STYLE[head] ?? "yellow";
3864
- lines.push(
3865
- line(
3866
- r2,
3867
- paint(head, style) + (r2.marker.length > 1 ? paint(r2.marker.slice(1), "red") : "")
3868
- )
3869
- );
3870
- }
3871
- if (listed.length > shown.length) {
3872
- lines.push(` … and ${listed.length - shown.length} more`);
3873
- }
4303
+ if (shown.length > 0) {
4304
+ lines.push("");
4305
+ lines.push(
4306
+ ...table(
4307
+ [
4308
+ { header: "" },
4309
+ { header: "key", flex: true, minWidth: MIN_KEY_WIDTH2 },
4310
+ { header: "change" }
4311
+ ],
4312
+ shown.map((k) => {
4313
+ const marker = diffMarker(k);
4314
+ return {
4315
+ cells: [marker, k.key, diffChangeText(k, diff.level, " ") + mutedSuffix(k)],
4316
+ cellStyles: [markerStyle(marker)]
4317
+ };
4318
+ }),
4319
+ tableOpts
4320
+ )
4321
+ );
4322
+ if (listed.length > shown.length) {
4323
+ lines.push(paint(` … and ${String(listed.length - shown.length)} more`, "dim"));
3874
4324
  }
3875
- if (skippedRows.length > 0) {
3876
- lines.push("");
3877
- for (const r2 of skippedRows) lines.push(line(r2, r2.marker));
3878
- if (skipped2.length > skippedRows.length) {
3879
- const more = ` … and ${String(skipped2.length - skippedRows.length)} more skipped`;
3880
- lines.push(opts.diffPath === null ? more : `${more} (see thresholds-diff.md)`);
3881
- }
4325
+ }
4326
+ const skipped2 = diff.keys.filter((k) => k.category === "skipped" && k.samples !== void 0);
4327
+ const skippedShown = skipped2.slice(0, MAX_SKIPPED_ROWS);
4328
+ if (skippedShown.length > 0) {
4329
+ lines.push("");
4330
+ lines.push(
4331
+ ...table(
4332
+ [{ header: "skipped", flex: true, minWidth: MIN_KEY_WIDTH2 }, { header: "reason" }],
4333
+ skippedShown.map((k) => ({
4334
+ cells: [k.key, k.samples === void 0 ? "" : skippedReasonText(k.samples)]
4335
+ })),
4336
+ tableOpts
4337
+ )
4338
+ );
4339
+ if (skipped2.length > skippedShown.length) {
4340
+ const more = ` … and ${String(skipped2.length - skippedShown.length)} more skipped`;
4341
+ lines.push(paint(opts.diffPath === null ? more : `${more} (see thresholds-diff.md)`, "dim"));
3882
4342
  }
3883
4343
  }
3884
4344
  if (expired.length > 0) {
@@ -4005,7 +4465,7 @@ function html(strings, ...values) {
4005
4465
  }
4006
4466
 
4007
4467
  // src/html/format.ts
4008
- function formatMs(value) {
4468
+ function formatMs2(value) {
4009
4469
  if (value >= 1e4) return `${(Math.round(value / 100) / 10).toFixed(1)} s`;
4010
4470
  if (value < 10) return `${(Math.round(value * 10) / 10).toFixed(1)} ms`;
4011
4471
  return `${Math.round(value)} ms`;
@@ -4013,8 +4473,8 @@ function formatMs(value) {
4013
4473
  function formatRatio(value) {
4014
4474
  return value.toFixed(3);
4015
4475
  }
4016
- function formatPercent(share) {
4017
- return `${(Math.round(share * 1e3) / 10).toFixed(1)}%`;
4476
+ function formatPercent(share2) {
4477
+ return `${(Math.round(share2 * 1e3) / 10).toFixed(1)}%`;
4018
4478
  }
4019
4479
  function pad(n) {
4020
4480
  return String(n).padStart(2, "0");
@@ -4049,14 +4509,18 @@ function truncateMiddle2(text2, max) {
4049
4509
  function basisPoints(usage) {
4050
4510
  return Math.round(usage * 1e4);
4051
4511
  }
4512
+ var NEAR_LIMIT_BP = 9e3;
4052
4513
  function usagePercent(usage) {
4053
- return Math.floor(basisPoints(usage) / 100);
4514
+ const bp = basisPoints(usage);
4515
+ const pct = Math.round(bp / 100);
4516
+ if (bp < NEAR_LIMIT_BP) return Math.min(89, pct);
4517
+ return bp <= 1e4 ? Math.min(100, pct) : pct;
4054
4518
  }
4055
4519
  function overPercent(usage) {
4056
- return Math.max(1, Math.ceil((basisPoints(usage) - 1e4) / 100));
4520
+ return Math.max(1, Math.round((basisPoints(usage) - 1e4) / 100));
4057
4521
  }
4058
- function usageText(usage, failed, long = false, points) {
4059
- if (failed && points !== void 0) return `+${String(points)} pp over`;
4522
+ function usageText(usage, failed, long = false, over) {
4523
+ if (failed && over !== void 0) return `${over} over`;
4060
4524
  if (usage === null) return "over (limit 0)";
4061
4525
  const suffix = long ? " of limit" : "";
4062
4526
  if (basisPoints(usage) >= 1e5) return `>999%${suffix}`;
@@ -4088,11 +4552,15 @@ function pathView(path) {
4088
4552
  function methodBadge(method) {
4089
4553
  return METHODS.has(method) ? html`<b class="m ${method}">${method}</b>` : html`<b class="m">${method}</b>`;
4090
4554
  }
4091
- function endpointView(key, max, full) {
4555
+ function originToken(label, origins) {
4556
+ const address = origins?.find((o) => o.label === label)?.origin;
4557
+ return html`<span class="o" title="${address === void 0 ? "origin label" : `origin label: ${address}`}">${label}</span>`;
4558
+ }
4559
+ function endpointView(key, max, full, origins) {
4092
4560
  const { method, origin, path, request } = splitEndpoint(key);
4093
4561
  const room = Math.max(8, max - method.length - 1 - origin.length - (request ? 8 : 0));
4094
4562
  const short = truncateMiddle2(path, room);
4095
- return html`${request ? html`<span class="rq">request</span> ` : null}${method === "" ? null : html`${methodBadge(method)} `}<span class="key"${short === path && !full ? null : html` title="${key}"`}>${origin === "" ? null : html`<span class="o">${origin}</span>`}${pathView(short)}</span>`;
4563
+ return html`${request ? html`<span class="rq">request</span> ` : null}${method === "" ? null : html`${methodBadge(method)} `}<span class="key"${short === path && !full ? null : html` title="${key}"`}>${origin === "" ? null : originToken(origin, origins)}${pathView(short)}</span>`;
4096
4564
  }
4097
4565
  function stepView(key, max, full) {
4098
4566
  const short = truncateMiddle2(key, max);
@@ -4100,8 +4568,8 @@ function stepView(key, max, full) {
4100
4568
  const last = titles.pop() ?? "";
4101
4569
  return html`<span class="key st"${short === key && !full ? null : html` title="${key}"`}>${titles.map((t) => html`<s>${t}${STEP_SEPARATOR2}</s>`)}<b>${last}</b></span>`;
4102
4570
  }
4103
- function keyView(kind, key, max, full = false) {
4104
- return kind === "step" ? stepView(key, max, full) : endpointView(key, max, full);
4571
+ function keyView(kind, key, max, full = false, origins) {
4572
+ return kind === "step" ? stepView(key, max, full) : endpointView(key, max, full, origins);
4105
4573
  }
4106
4574
  function stepDepth(key) {
4107
4575
  const depth = Math.min(3, key.split(STEP_SEPARATOR2).length);
@@ -4156,6 +4624,21 @@ function topCheck(checks) {
4156
4624
  }
4157
4625
  return top;
4158
4626
  }
4627
+ var RULE_ORDER4 = [
4628
+ "median",
4629
+ "percentile",
4630
+ "p99",
4631
+ "apdex",
4632
+ "wilson",
4633
+ "errors"
4634
+ ];
4635
+ function decidingCheck(checks) {
4636
+ const failed = [...checks].filter((c) => !c.passed).sort((a, b) => RULE_ORDER4.indexOf(a.rule) - RULE_ORDER4.indexOf(b.rule));
4637
+ return failed.find((c) => c.blocking && c.hardLimitExceeded) ?? topCheck(failed.filter((c) => c.blocking)) ?? topCheck(failed);
4638
+ }
4639
+ function keyCheck(checks) {
4640
+ return decidingCheck(checks) ?? topCheck(checks);
4641
+ }
4159
4642
  function aggregatesOf3(data, kind) {
4160
4643
  const byKind = {
4161
4644
  api: data.endpoints,
@@ -4187,13 +4670,13 @@ function keyAnchor(ctx, kind, key) {
4187
4670
  var KEY_COLUMN_MAX = 80;
4188
4671
  function keyLink(ctx, kind, key, max = KEY_COLUMN_MAX, full = false) {
4189
4672
  const anchor = keyAnchor(ctx, kind, key);
4190
- const view = keyView(kind, key, max, full);
4673
+ const view = keyView(kind, key, max, full, ctx.report.origins);
4191
4674
  return anchor === null ? html`<span class="kl">${view}</span>` : html`<a class="kl" href="#${anchor}">${view}</a>`;
4192
4675
  }
4193
4676
 
4194
4677
  // src/html/generated/assets.ts
4195
- 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:"↓";font-size:11px;color:var(--accent)}th[aria-sort=ascending] button:after{content:"↑";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}}';
4196
- var STYLES_SHA256 = "shLzLv0QA/UumVUIqubLpwCwqmv+SeH1rfHBn3IF8z4=";
4678
+ 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:"↓";font-size:11px;color:var(--accent)}th[aria-sort=ascending] button:after{content:"↑";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}}';
4679
+ var STYLES_SHA256 = "P8DYPJROVk22uiAg4SQ4HzTpzX2h3D1hiPSUAQXSQwo=";
4197
4680
  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);})();';
4198
4681
  var SCRIPT_SHA256 = "Jda/ayo/X8RNPoTXXep2nOa041MPnyTQ/N6biJU+P6k=";
4199
4682
 
@@ -4263,7 +4746,7 @@ function place(marks2, axisMax) {
4263
4746
  const rowsEnd = [];
4264
4747
  return [...marks2].sort((a, b) => a.value - b.value).map((mark) => {
4265
4748
  const x = coordinate(mark.value, axisMax);
4266
- const text2 = `${mark.label} ${formatMs(mark.value)}`;
4749
+ const text2 = `${mark.label} ${formatMs2(mark.value)}`;
4267
4750
  const width = text2.length * CHAR;
4268
4751
  const anchor = x - width / 2 < 0 ? "start" : x + width / 2 > WIDTH ? "end" : "middle";
4269
4752
  const from = anchor === "start" ? x : anchor === "end" ? x - width : x - width / 2;
@@ -4310,9 +4793,9 @@ function percentileBar(stats, limits, level) {
4310
4793
  const width = Math.max(0, Math.round((coordinate(p99, axisMax) - x1) * 10) / 10);
4311
4794
  range = html`<rect class="bar-range" x="${x1}" y="${axisY - 4}" width="${width}" height="8"/>`;
4312
4795
  }
4313
- const describe = [...markers, ...lines].map((m) => `${m.label} ${formatMs(m.value)}`).join(", ");
4796
+ const describe = [...markers, ...lines].map((m) => `${m.label} ${formatMs2(m.value)}`).join(", ");
4314
4797
  const label = `Percentiles and limits: ${describe}`;
4315
- 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>`;
4798
+ 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>`;
4316
4799
  }
4317
4800
 
4318
4801
  // src/html/charts.ts
@@ -4339,7 +4822,7 @@ function place2(marks2, width) {
4339
4822
  return [...marks2].sort((a, b) => a.x - b.x).map((mark) => {
4340
4823
  const arrowLeft = mark.side === "left" ? "← " : "";
4341
4824
  const arrowRight = mark.side === "right" ? " →" : "";
4342
- const text2 = `${arrowLeft}${mark.label} ${formatMs(mark.value)}${arrowRight}`;
4825
+ const text2 = `${arrowLeft}${mark.label} ${formatMs2(mark.value)}${arrowRight}`;
4343
4826
  const w = text2.length * CHAR2;
4344
4827
  const anchor = mark.x - w / 2 < 0 ? "start" : mark.x + w / 2 > width ? "end" : "middle";
4345
4828
  const from = anchor === "start" ? mark.x : anchor === "end" ? mark.x - w : mark.x - w / 2;
@@ -4368,7 +4851,7 @@ function histogramX(edges, value) {
4368
4851
  return { x: r(H_LEFT + (i + (value - lo) / (hi - lo)) * width) };
4369
4852
  }
4370
4853
  function edgeText(value) {
4371
- return formatMs(value);
4854
+ return formatMs2(value);
4372
4855
  }
4373
4856
  function histogramSvg(input) {
4374
4857
  const { edges, counts } = input;
@@ -4392,8 +4875,8 @@ function histogramSvg(input) {
4392
4875
  }
4393
4876
  const outline = (from, to) => {
4394
4877
  let previous = base;
4395
- const steps = counts.slice(from, to).map((count) => {
4396
- const y = r(base - H_BARS * count / most);
4878
+ const steps = counts.slice(from, to).map((count2) => {
4879
+ const y = r(base - H_BARS * count2 / most);
4397
4880
  const step = y === previous ? "" : `V${y}`;
4398
4881
  previous = y;
4399
4882
  return `${step}h${r(width)}`;
@@ -4425,9 +4908,9 @@ function histogramSvg(input) {
4425
4908
  )}</g>`;
4426
4909
  const peak = counts.indexOf(Math.max(...counts));
4427
4910
  const summary = [
4428
- `Histogram of ${plural3(input.retained, "duration")} from ${formatMs(first)} to ${formatMs(last)}`,
4429
- `most (${String(counts[peak] ?? 0)}) in ${formatMs(edges[peak] ?? 0)}–${formatMs(edges[peak + 1] ?? 0)}`,
4430
- marks2.map((m) => `${m.label} ${formatMs(m.value)}`).join(", ")
4911
+ `Histogram of ${plural3(input.retained, "duration")} from ${formatMs2(first)} to ${formatMs2(last)}`,
4912
+ `most (${String(counts[peak] ?? 0)}) in ${formatMs2(edges[peak] ?? 0)}–${formatMs2(edges[peak + 1] ?? 0)}`,
4913
+ marks2.map((m) => `${m.label} ${formatMs2(m.value)}`).join(", ")
4431
4914
  ].join("; ");
4432
4915
  const label = input.sampled ? `${summary}; uniform sample of ${String(input.retained)}` : summary;
4433
4916
  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>`;
@@ -4436,7 +4919,7 @@ function ttfbSplitSvg(ttfb, other) {
4436
4919
  const total = ttfb + other;
4437
4920
  if (total <= 0) return null;
4438
4921
  const width = r(H_WIDTH * ttfb / total);
4439
- const label = `TTFB p50 ${formatMs(ttfb)}, rest ${formatMs(other)}`;
4922
+ const label = `TTFB p50 ${formatMs2(ttfb)}, rest ${formatMs2(other)}`;
4440
4923
  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>`;
4441
4924
  }
4442
4925
  var W_WIDTH = 960;
@@ -4461,7 +4944,7 @@ function waterfallSvg(waterfall, id) {
4461
4944
  const ticks = [0, 1, 2, 3, 4].map((q) => {
4462
4945
  const value = waterfall.spanMs * q / 4;
4463
4946
  const anchor = q === 0 ? "start" : q === 4 ? "end" : "middle";
4464
- return html`<text class="wt ${ANCHOR[anchor]}" x="${x(value)}" y="12">+${formatMs(value)}</text><path class="wg" d="M${x(value)} 16V${height}"/>`;
4947
+ return html`<text class="wt ${ANCHOR[anchor]}" x="${x(value)}" y="12">+${formatMs2(value)}</text><path class="wg" d="M${x(value)} 16V${height}"/>`;
4465
4948
  });
4466
4949
  let longest = null;
4467
4950
  const labels = /* @__PURE__ */ new Map();
@@ -4483,7 +4966,7 @@ function waterfallSvg(waterfall, id) {
4483
4966
  const rowSvg = rows.map((req, i) => {
4484
4967
  const y = W_TOP + i * W_ROW;
4485
4968
  const ref = labels.get(req.key)?.ref ?? "";
4486
- const title2 = `${req.key} · ${req.status} · start +${formatMs(req.offset)} · ${req.duration === null ? "no duration" : formatMs(req.duration)}`;
4969
+ const title2 = `${req.key} · ${req.status} · start +${formatMs2(req.offset)} · ${req.duration === null ? "no duration" : formatMs2(req.duration)}`;
4487
4970
  if (req.duration !== null && (longest === null || req.duration > (longest.duration ?? 0))) {
4488
4971
  longest = req;
4489
4972
  }
@@ -4496,7 +4979,7 @@ function waterfallSvg(waterfall, id) {
4496
4979
  const width = Math.max(2, r(req.duration * scale));
4497
4980
  const end = r(from + width);
4498
4981
  const ok = /^[23]/u.test(req.status);
4499
- const text2 = `${formatMs(req.duration)}${ok ? "" : ` · ${req.status}`}`;
4982
+ const text2 = `${formatMs2(req.duration)}${ok ? "" : ` · ${req.status}`}`;
4500
4983
  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>`;
4501
4984
  mark = html`<rect x="${from}" y="${y + 4}" width="${width}" height="12" rx="2"/>${label}`;
4502
4985
  }
@@ -4504,8 +4987,8 @@ function waterfallSvg(waterfall, id) {
4504
4987
  });
4505
4988
  const top = longest;
4506
4989
  const summary = [
4507
- `Waterfall of ${plural3(waterfall.requestCount, "request")} over ${formatMs(waterfall.spanMs)}`,
4508
- top === null ? null : `longest request ${top.key} ${formatMs(top.duration ?? 0)}`
4990
+ `Waterfall of ${plural3(waterfall.requestCount, "request")} over ${formatMs2(waterfall.spanMs)}`,
4991
+ top === null ? null : `longest request ${top.key} ${formatMs2(top.duration ?? 0)}`
4509
4992
  ].filter((s) => s !== null).join("; ");
4510
4993
  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>`;
4511
4994
  }
@@ -4536,32 +5019,30 @@ function text(params, name) {
4536
5019
  function capitalize(label) {
4537
5020
  return /^p\d/u.test(label) ? label : label.charAt(0).toUpperCase() + label.slice(1);
4538
5021
  }
4539
- function times(usage) {
4540
- return (Math.floor(Math.round(usage * 1e4) / 1e3) / 10).toFixed(1);
4541
- }
4542
- function hintText(hint, level, muted) {
5022
+ function hintText(hint, level, muted, kind = "api") {
4543
5023
  const p = hint.params;
5024
+ const responses = kind === "step" ? "samples" : "responses";
4544
5025
  const over = () => String(overPercent(num(p, "usage")));
4545
5026
  const pctMedian = () => String(usagePercent(num(p, "medianUsage")));
4546
5027
  switch (hint.code) {
4547
5028
  case "HINT_HARD_LIMIT":
4548
- return `${capitalize(ruleLabel(text(p, "rule"), level))} is ${times(num(p, "usage"))}× its limit, above the hard limit of ${String(num(p, "factor"))}×: it fails the run regardless of tolerance.`;
5029
+ return `${capitalize(ruleLabel(text(p, "rule"), level))} is ${formatFactor(num(p, "usage"), num(p, "factor"))}× its limit, above the hard limit of ${String(num(p, "factor"))}×: it fails the run regardless of tolerance.`;
4549
5030
  case "HINT_SLOWDOWN":
4550
- return `The median is ${over()}% over its limit: most responses are slower, not only the tail.`;
5031
+ return `The median is ${over()}% over its limit: most ${responses} are slower, not only the tail.`;
4551
5032
  case "HINT_TAIL":
4552
- 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.`;
5033
+ 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.`;
4553
5034
  case "HINT_SHIFT":
4554
5035
  return `${level} is ${over()}% over its limit and the median is at ${pctMedian()}% of its limit: the whole distribution moved up.`;
4555
5036
  case "HINT_OUTLIERS":
4556
- return `Only p99 is over its limit (by ${over()}%): a few very slow responses, up to ${formatMs(num(p, "max"))}; see the slowest samples.`;
5037
+ return `Only p99 is over its limit (by ${over()}%): a few very slow ${responses}, up to ${formatMs2(num(p, "max"))}; see the slowest samples.`;
4557
5038
  case "HINT_ERRORS_DOMINANT":
4558
5039
  return `Error rate ${formatPercent(num(p, "rate"))} is above the limit of ${formatPercent(num(p, "limit"))}, mostly ${text(p, "label")} (${String(num(p, "count"))} of ${String(num(p, "errors"))} errors).`;
4559
5040
  case "HINT_ERRORS_MIXED":
4560
5041
  return `Error rate ${formatPercent(num(p, "rate"))} is above the limit of ${formatPercent(num(p, "limit"))}; errors are spread over ${text(p, "label1")} (${String(num(p, "count1"))}), ${text(p, "label2")} (${String(num(p, "count2"))}) and ${text(p, "label3")} (${String(num(p, "count3"))}).`;
4561
5042
  case "HINT_APDEX":
4562
- return `Apdex ${formatRatio(num(p, "apdex"))} is below the limit of ${formatRatio(num(p, "limit"))} although the percentiles are within limits: many responses are slower than T = ${formatMs(num(p, "t"))}.`;
5043
+ return `Apdex ${formatRatio(num(p, "apdex"))} is below the limit of ${formatRatio(num(p, "limit"))} although the percentiles are within limits: many ${responses} are slower than T = ${formatMs2(num(p, "t"))}.`;
4563
5044
  case "HINT_SLOW_SHARE":
4564
- return `${formatPercent(num(p, "share"))} of responses are slower than T = ${formatMs(num(p, "t"))} (limit ${formatPercent(num(p, "limit"))}) although the percentiles are within limits: a slow minority.`;
5045
+ return `${formatPercent(num(p, "share"))} of ${responses} are slower than T = ${formatMs2(num(p, "t"))} (limit ${formatPercent(num(p, "limit"))}) although the percentiles are within limits: a slow minority.`;
4565
5046
  case "HINT_MEDIAN_ONLY":
4566
5047
  return `Only the median was evaluated (n = ${String(num(p, "n"))}): add repetitions for a reliable verdict.`;
4567
5048
  case "HINT_MUTED":
@@ -4576,7 +5057,7 @@ function hintText(hint, level, muted) {
4576
5057
  // src/html/keys.ts
4577
5058
  var NEAR_LIMIT = 0.9;
4578
5059
  var DEFAULT_ERROR_STATUSES = ["5xx", "FAILED", "PENDING"];
4579
- var TIME_RULES4 = /* @__PURE__ */ new Set([
5060
+ var TIME_RULES3 = /* @__PURE__ */ new Set([
4580
5061
  "median",
4581
5062
  "percentile",
4582
5063
  "p99"
@@ -4617,24 +5098,25 @@ function usageClass(usage, failed) {
4617
5098
  if (failed || usage === null || usage > 1) return "ov";
4618
5099
  return usage >= NEAR_LIMIT ? "nr" : "";
4619
5100
  }
4620
- var SHARE_RULES2 = /* @__PURE__ */ new Set([
5101
+ var SHARE_RULES = /* @__PURE__ */ new Set([
4621
5102
  "apdex",
4622
5103
  "wilson",
4623
5104
  "errors"
4624
5105
  ]);
4625
- function pointsOver(check) {
4626
- if (check.passed || !SHARE_RULES2.has(check.rule)) return void 0;
4627
- return Math.max(1, Math.round(Math.abs(check.actual - check.limit) * 100));
5106
+ function overOf(check) {
5107
+ if (check.passed) return void 0;
5108
+ if (!SHARE_RULES.has(check.rule) && check.usage === null) return void 0;
5109
+ return overText(check);
4628
5110
  }
4629
5111
  function usageMeter(check, long = false) {
4630
5112
  const usage = check.usage;
4631
5113
  const failed = !check.passed;
4632
5114
  const value = usage === null ? 1.25 : Math.min(usage, 1.25);
4633
5115
  const cls = usageClass(usage, failed);
4634
- 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(check))}</b></label>`;
5116
+ 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(check))}</b></label>`;
4635
5117
  }
4636
5118
  function checkValue(check, value) {
4637
- if (TIME_RULES4.has(check.rule)) return formatMs(value);
5119
+ if (TIME_RULES3.has(check.rule)) return formatMs2(value);
4638
5120
  return check.rule === "errors" ? formatPercent(value) : formatRatio(value);
4639
5121
  }
4640
5122
  function lowestMinSamples(report, level) {
@@ -4663,7 +5145,30 @@ function checkPill(c) {
4663
5145
  if (c.hardLimitExceeded) return pill("fb", "hard limit");
4664
5146
  return c.blocking ? pill("fb", "blocking") : pill("f", "fail");
4665
5147
  }
4666
- function checksTable(ctx, agg) {
5148
+ function lowestT(report, kind) {
5149
+ let value = report.thresholdFiles.find((f) => f.kind === kind)?.generated;
5150
+ for (const name of ["derivation", "t", "min"]) {
5151
+ value = typeof value === "object" && value !== null ? value[name] : void 0;
5152
+ }
5153
+ return typeof value === "number" ? value : null;
5154
+ }
5155
+ function checksLegend(ctx, kind, agg) {
5156
+ const checks = agg.evaluation.checks;
5157
+ const lines = [];
5158
+ if (checks.some((c) => SHARE_RULES.has(c.rule))) {
5159
+ lines.push(
5160
+ "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."
5161
+ );
5162
+ }
5163
+ const t = agg.evaluation.limits.t;
5164
+ if (t !== null && checks.some((c) => c.rule === "apdex" || c.rule === "wilson")) {
5165
+ lines.push(
5166
+ lowestT(ctx.report, kind) === t ? `T = ${formatMs2(t)}, the lowest allowed for ${kind === "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.`
5167
+ );
5168
+ }
5169
+ return lines.length === 0 ? null : html`<p class="legend">${lines.join(" ")}</p>`;
5170
+ }
5171
+ function checksTable(ctx, kind, agg) {
4667
5172
  const ev = agg.evaluation;
4668
5173
  if (ev.result === "not-evaluated") {
4669
5174
  const reason = reasonText(ev.reason);
@@ -4678,30 +5183,36 @@ function checksTable(ctx, agg) {
4678
5183
  }
4679
5184
  const ns = new Set(ev.checks.map((c) => c.n));
4680
5185
  const commonN = ns.size === 1 ? [...ns][0] : void 0;
4681
- const observed = ev.checks.some((c) => c.observed !== null);
4682
- const row = (c) => join(
4683
- html`<tr${c.passed ? null : html` class="ov"`}><th scope="row">${ruleLabel(c.rule, ctx.level)}</th>`,
4684
- // Numbers are right-aligned by the table style, without a class per cell.
4685
- commonN === void 0 ? html`<td>${c.n}</td>` : null,
4686
- html`<td>${checkValue(c, c.actual)}</td>`,
4687
- observed ? html`<td>${c.observed === null ? null : checkValue(c, c.observed)}</td>` : null,
4688
- html`<td>${checkValue(c, c.limit)}</td><td>`,
4689
- ctx.migrated ? DASH : usageMeter(c, true),
4690
- html`</td><td>${checkPill(c)}</td></tr>`
4691
- );
5186
+ const bound = ev.checks.some((c) => SHARE_RULES.has(c.rule));
5187
+ const row = (c) => {
5188
+ const share2 = SHARE_RULES.has(c.rule);
5189
+ const ov = c.passed ? null : html` class="ov"`;
5190
+ const raw = share2 ? c.observed : c.actual;
5191
+ return join(
5192
+ html`<tr><th scope="row">${ruleLabel(c.rule, ctx.level)}</th>`,
5193
+ // Numbers are right-aligned by the table style, without a class per cell.
5194
+ commonN === void 0 ? html`<td>${c.n}</td>` : null,
5195
+ html`<td${share2 ? null : ov}>${raw === null ? null : checkValue(c, raw)}</td>`,
5196
+ bound ? html`<td${share2 ? ov : null}>${share2 ? checkValue(c, c.actual) : null}</td>` : null,
5197
+ html`<td>${checkValue(c, c.limit)}</td><td>`,
5198
+ ctx.migrated ? DASH : usageMeter(c, true),
5199
+ html`</td><td>${checkPill(c)}</td></tr>`
5200
+ );
5201
+ };
4692
5202
  return part(
4693
5203
  "Checks",
4694
5204
  commonN === void 0 ? null : `n = ${String(commonN)} for every rule`,
4695
5205
  html`<div class="ct" tabindex="0"><table class="ck"><caption>Checks</caption><thead><tr><th scope="col">Rule</th>`,
4696
5206
  commonN === void 0 ? html`<th scope="col" class="num">n</th>` : null,
4697
- html`<th scope="col" class="num">Actual</th>`,
4698
- observed ? html`<th scope="col" class="num">Observed</th>` : null,
4699
- html`<th scope="col" class="num">Limit</th><th scope="col">Headroom</th><th scope="col">Result</th></tr></thead>`,
4700
- html`<tbody>${ev.checks.map(row)}</tbody></table></div>`
5207
+ html`<th scope="col" class="num">Raw</th>`,
5208
+ bound ? html`<th scope="col" class="num">Bound</th>` : null,
5209
+ html`<th scope="col" class="num">Limit</th><th scope="col">Limit used</th><th scope="col">Result</th></tr></thead>`,
5210
+ html`<tbody>${ev.checks.map(row)}</tbody></table></div>`,
5211
+ checksLegend(ctx, kind, agg)
4701
5212
  );
4702
5213
  }
4703
5214
  function msValue(value) {
4704
- const [number, unit] = formatMs(value).split(" ");
5215
+ const [number, unit] = formatMs2(value).split(" ");
4705
5216
  return html`${number}<small> ${unit}</small>`;
4706
5217
  }
4707
5218
  function notTimedNote(ctx, kind, agg) {
@@ -4715,6 +5226,9 @@ function notTimedNote(ctx, kind, agg) {
4715
5226
  return `${shown.join(", ")}${more > 0 ? ` +${String(more)} more` : ""} (not timed)`;
4716
5227
  }
4717
5228
  var NOT_TIMED_LABELS = 3;
5229
+ function evaluatedLimit(agg, rule, limit) {
5230
+ return agg.evaluation.checks.some((c) => c.rule === rule) ? limit : null;
5231
+ }
4718
5232
  function statsGrid(ctx, kind, agg) {
4719
5233
  const stats = agg.stats;
4720
5234
  if (stats === null) {
@@ -4723,14 +5237,19 @@ function statsGrid(ctx, kind, agg) {
4723
5237
  }
4724
5238
  const limits = agg.evaluation.limits;
4725
5239
  const cell2 = (label, value, limit) => {
4726
- const over = value !== void 0 && limit !== null && value > limit;
4727
- return html`<div${over ? html` class="ov"` : null}><dt>${label}${limit === null ? null : ` · limit ${formatMs(limit)}`}</dt><dd>${value === void 0 ? DASH : msValue(value)}</dd></div>`;
5240
+ const over = value !== void 0 && limit != null && value > limit;
5241
+ const note = limit === void 0 ? null : limit === null ? " · not evaluated" : ` · limit ${formatMs2(limit)}`;
5242
+ return html`<div${over ? html` class="ov"` : null}><dt>${label}${note}</dt><dd>${value === void 0 ? DASH : msValue(value)}</dd></div>`;
4728
5243
  };
4729
5244
  return html`<div class="ds"><dl class="stats">${[
4730
- cell2("p50", stats.percentiles["p50"], null),
4731
- cell2(ctx.level, stats.percentiles[ctx.level], limits.percentile),
4732
- cell2("p99", stats.percentiles["p99"], limits.p99),
4733
- cell2("max", stats.max, null)
5245
+ cell2("p50", stats.percentiles["p50"], void 0),
5246
+ cell2(
5247
+ ctx.level,
5248
+ stats.percentiles[ctx.level],
5249
+ evaluatedLimit(agg, "percentile", limits.percentile)
5250
+ ),
5251
+ cell2("p99", stats.percentiles["p99"], evaluatedLimit(agg, "p99", limits.p99)),
5252
+ cell2("max", stats.max, void 0)
4734
5253
  ]}</dl></div>`;
4735
5254
  }
4736
5255
  function distribution(ctx, agg) {
@@ -4771,13 +5290,15 @@ function ttfbSplit(agg) {
4771
5290
  if (ttfb === null || ttfb.otherP50 === null || agg.stats === null) return null;
4772
5291
  const svg = ttfbSplitSvg(ttfb.p50, ttfb.otherP50);
4773
5292
  if (svg === null) return null;
4774
- const sum2 = Math.round((ttfb.p50 + ttfb.otherP50) * 10) / 10;
5293
+ const sum2 = formatMs2(Math.round((ttfb.p50 + ttfb.otherP50) * 10) / 10);
5294
+ const p50 = formatMs2(agg.stats.percentiles["p50"] ?? 0);
4775
5295
  return part(
4776
5296
  "Server wait vs rest",
4777
5297
  "p50 of each part",
4778
5298
  svg,
4779
- 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>`,
4780
- html`<p class="sub">Medians of each part: their sum (${formatMs(sum2)}) can differ from p50 of the duration (${formatMs(agg.stats.percentiles["p50"] ?? 0)}).</p>`
5299
+ 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>`,
5300
+ // Only when the numbers differ (11-REQ-33).
5301
+ sum2 === p50 ? null : html`<p class="sub">Medians of each part: their sum (${sum2}) can differ from p50 of the duration (${p50}).</p>`
4781
5302
  );
4782
5303
  }
4783
5304
  function isErrorStatus(label, statuses) {
@@ -4785,9 +5306,10 @@ function isErrorStatus(label, statuses) {
4785
5306
  (s) => s === label || /^\dxx$/u.test(s) && /^\d{3}$/u.test(label) && s[0] === label[0]
4786
5307
  );
4787
5308
  }
4788
- function keyHeader(kind, key, agg) {
5309
+ function keyHeader(ctx, kind, key, agg) {
4789
5310
  const ev = agg.evaluation;
4790
- return html`<div class="kh"><p class="fkl"><code class="fk">${key}</code></p><p class="pills">${[
5311
+ const full = kind === "api" ? keyView(kind, key, Number.MAX_SAFE_INTEGER, false, ctx.report.origins) : key;
5312
+ return html`<div class="kh"><p class="fkl"><code class="fk">${full}</code></p><p class="pills">${[
4791
5313
  resultPill(ev),
4792
5314
  kindToken(kind),
4793
5315
  sourceToken(ev.thresholdSource),
@@ -4808,7 +5330,7 @@ function statusesPart(ctx, kind, key, agg) {
4808
5330
  kind === "step" ? html`<span>Defined at: <code>${locationText(agg)}</code></span>` : null,
4809
5331
  kind === "step" && (agg.stepErrorsFromFailedTests ?? 0) > 0 ? html`<span>Step errors in failed tests (not counted): ${agg.stepErrorsFromFailedTests ?? 0}</span>` : null,
4810
5332
  request ? html`<span>Source: request (worker clock)</span>` : null,
4811
- kind === "api" && !request ? html`<span>TTFB: ${agg.ttfb === null ? DASH : `p50 ${formatMs(agg.ttfb.p50)}, p95 ${formatMs(agg.ttfb.p95)}`}</span>` : null,
5333
+ kind === "api" && !request ? html`<span>TTFB: ${agg.ttfb === null ? DASH : `p50 ${formatMs2(agg.ttfb.p50)}, p95 ${formatMs2(agg.ttfb.p95)}`}</span>` : null,
4812
5334
  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>`
4813
5335
  ];
4814
5336
  return part(
@@ -4824,11 +5346,11 @@ function keyDetails(ctx, kind, key, agg) {
4824
5346
  const hints = ctx.migrated ? [] : agg.hints;
4825
5347
  return join(
4826
5348
  html`<div class="kd">`,
4827
- keyHeader(kind, key, agg),
4828
- hints.length === 0 ? null : html`<ul class="hints">${hints.map((h) => html`<li>${icon("bulb")}${hintText(h, ctx.level, agg.evaluation.muted)}</li>`)}</ul>`,
5349
+ keyHeader(ctx, kind, key, agg),
5350
+ hints.length === 0 ? null : html`<ul class="hints">${hints.map((h) => html`<li>${icon("bulb")}${hintText(h, ctx.level, agg.evaluation.muted, kind)}</li>`)}</ul>`,
4829
5351
  statsGrid(ctx, kind, agg),
4830
5352
  distribution(ctx, agg),
4831
- checksTable(ctx, agg),
5353
+ checksTable(ctx, kind, agg),
4832
5354
  kind === "api" ? ttfbSplit(agg) : null,
4833
5355
  statusesPart(ctx, kind, key, agg),
4834
5356
  agg.slowest.length === 0 ? null : part(
@@ -4836,7 +5358,7 @@ function keyDetails(ctx, kind, key, agg) {
4836
5358
  null,
4837
5359
  html`<ol class="samples">${agg.slowest.map(
4838
5360
  (s) => join(
4839
- html`<li><b>${formatMs(s.duration)}</b><span class="tt"><span>${s.test.title}</span>`,
5361
+ html`<li><b>${formatMs2(s.duration)}</b><span class="tt"><span>${s.test.title}</span>`,
4840
5362
  html`<span class="sub">${testRef(s.test)} · rep ${s.test.repeatEachIndex} · ${formatDate(s.startedAt)}</span>`,
4841
5363
  s.url === void 0 ? null : html`<span class="url">${s.url}</span>`,
4842
5364
  html`</span></li>`
@@ -4867,10 +5389,10 @@ function timeCell(value) {
4867
5389
  function limitCell(value, limit) {
4868
5390
  if (value === void 0) return html`<td class="num z">${DASH}</td>`;
4869
5391
  const over = limit !== null && value > limit;
4870
- return html`<td class="num${over ? " ov" : ""}">${Math.round(value)}${limit === null ? null : html`<span class="lim"> / ${Math.round(limit)}</span>`}</td>`;
5392
+ return html`<td class="num${over ? " ov" : ""}">${Math.round(value)}<span class="lim"> / ${limit === null ? DASH : Math.round(limit)}</span></td>`;
4871
5393
  }
4872
5394
  function headroomCell(ctx, agg) {
4873
- const top = ctx.migrated ? void 0 : topCheck(agg.evaluation.checks);
5395
+ const top = ctx.migrated ? void 0 : keyCheck(agg.evaluation.checks);
4874
5396
  if (top === void 0) return html`<td class="z">${DASH}</td>`;
4875
5397
  return html`<td>${usageMeter(top)}</td>`;
4876
5398
  }
@@ -4896,8 +5418,11 @@ function keyRow(ctx, kind, key, agg, columns, ttfb) {
4896
5418
  samplesCell(ctx, kind, agg),
4897
5419
  agg.errorCount === 0 ? html`<td class="num"></td>` : html`<td class="num e">${agg.errorCount}</td>`,
4898
5420
  timeCell(s?.percentiles["p50"]),
4899
- s === null ? timeCell(void 0) : limitCell(s.percentiles[ctx.level], ev.limits.percentile),
4900
- s === null ? timeCell(void 0) : limitCell(s.percentiles["p99"], ev.limits.p99),
5421
+ s === null ? timeCell(void 0) : limitCell(
5422
+ s.percentiles[ctx.level],
5423
+ evaluatedLimit(agg, "percentile", ev.limits.percentile)
5424
+ ),
5425
+ s === null ? timeCell(void 0) : limitCell(s.percentiles["p99"], evaluatedLimit(agg, "p99", ev.limits.p99)),
4901
5426
  timeCell(s?.max),
4902
5427
  ttfb ? timeCell(agg.ttfb?.p50) : null,
4903
5428
  kind === "step" ? html`<td class="loc">${locationText(agg)}</td>` : null,
@@ -4942,7 +5467,7 @@ function keyTable(ctx, kind, title2) {
4942
5467
  // Browser traffic or APIRequestContext calls (15-REQ-15).
4943
5468
  ...kind === "api" ? [["source", "Source"]] : [],
4944
5469
  ["result", "Result"],
4945
- ["headroom", "Headroom"],
5470
+ ["headroom", "Limit used"],
4946
5471
  ["samples", "Samples"],
4947
5472
  ["errors", "Errors"],
4948
5473
  ["p50", "p50"],
@@ -4963,10 +5488,17 @@ function keyTable(ctx, kind, title2) {
4963
5488
  "ttfb",
4964
5489
  "tests"
4965
5490
  ]);
5491
+ const notEvaluated = keys.some((key) => {
5492
+ const agg = aggregates[key];
5493
+ if (agg?.stats == null) return false;
5494
+ const rules = new Set(agg.evaluation.checks.map((c) => c.rule));
5495
+ return !rules.has("percentile") || !rules.has("p99");
5496
+ });
4966
5497
  const notes = [
4967
5498
  "All times in ms",
4968
- "the tick on each headroom bar marks the limit",
5499
+ "the tick on each limit used bar marks the limit",
4969
5500
  `${ctx.level} is the evaluated percentile`,
5501
+ notEvaluated ? "/ — : rule not evaluated (too few samples or rule off)" : null,
4970
5502
  kind === "step" ? "step keys are title paths joined with ›" : null
4971
5503
  ].filter((n) => n !== null);
4972
5504
  return join(
@@ -4995,7 +5527,7 @@ var MAX_PIPS = 10;
4995
5527
  function sum(report, field3) {
4996
5528
  return LINK_KINDS.reduce((total, kind) => total + report.evaluation.counts[kind][field3], 0);
4997
5529
  }
4998
- function failedChecks(report, which = "all") {
5530
+ function failedChecks2(report, which = "all") {
4999
5531
  let n = 0;
5000
5532
  for (const kind of [report.endpoints, report.steps]) {
5001
5533
  for (const agg of Object.values(kind)) {
@@ -5007,10 +5539,10 @@ function failedChecks(report, which = "all") {
5007
5539
  return n;
5008
5540
  }
5009
5541
  function blockingChecks(report) {
5010
- return failedChecks(report, "blocking");
5542
+ return failedChecks2(report, "blocking");
5011
5543
  }
5012
5544
  function violationsText(report) {
5013
- return `${plural3(failedChecks(report), "violation")} in ${plural3(sum(report, "violations"), "key")}`;
5545
+ return `${plural3(failedChecks2(report), "violation")} in ${plural3(sum(report, "violations"), "key")}`;
5014
5546
  }
5015
5547
  function banner(report) {
5016
5548
  const ev = report.evaluation;
@@ -5086,7 +5618,8 @@ function verdictResults(report) {
5086
5618
  const t = report.tests;
5087
5619
  const untrustworthy = report.toolErrors.some((i) => i.code === "TESTS_FAILED_TOO_MANY");
5088
5620
  const testParts = [
5089
- plural3(t.expected + t.unexpected + t.flaky, "test"),
5621
+ // Playwright results: every pass, repetition, setup and teardown is one test run (11-REQ-08).
5622
+ plural3(t.expected + t.unexpected + t.flaky, "test run"),
5090
5623
  t.unexpected > 0 ? `${String(t.unexpected)} failed` : null,
5091
5624
  t.flaky > 0 ? `${String(t.flaky)} flaky` : null,
5092
5625
  t.skipped > 0 ? `${String(t.skipped)} skipped` : null,
@@ -5141,8 +5674,8 @@ function verdictCard(ctx) {
5141
5674
  html`</section>`
5142
5675
  );
5143
5676
  }
5144
- function widthClass(share) {
5145
- const clamped = Math.max(0, Math.min(1, Number.isFinite(share) ? share : 0));
5677
+ function widthClass(share2) {
5678
+ const clamped = Math.max(0, Math.min(1, Number.isFinite(share2) ? share2 : 0));
5146
5679
  return `w-${String(Math.round(clamped * 20) * 5)}`;
5147
5680
  }
5148
5681
  function field(label, value, note, viz = null, cls = "") {
@@ -5159,6 +5692,9 @@ function clock(iso) {
5159
5692
  const d = new Date(time);
5160
5693
  return `${String(d.getUTCHours()).padStart(2, "0")}:${String(d.getUTCMinutes()).padStart(2, "0")}`;
5161
5694
  }
5695
+ function overLimit(data) {
5696
+ return Object.values(data).filter((a) => a.evaluation.result === "fail").length;
5697
+ }
5162
5698
  function nearLimit(data) {
5163
5699
  return Object.values(data).filter((a) => {
5164
5700
  if (a.evaluation.result !== "pass") return false;
@@ -5177,15 +5713,15 @@ function kpis(ctx) {
5177
5713
  const passes = r2.passes;
5178
5714
  const t = r2.tests;
5179
5715
  const keys = sum(r2, "violations");
5180
- const violations3 = failedChecks(r2);
5181
- const blocking = failedChecks(r2, "blocking");
5182
- const muted = failedChecks(r2, "muted");
5716
+ const violations3 = failedChecks2(r2);
5717
+ const blocking = failedChecks2(r2, "blocking");
5718
+ const muted = failedChecks2(r2, "muted");
5183
5719
  const other = Math.max(0, violations3 - blocking - muted);
5184
- const share = (n) => widthClass(violations3 === 0 ? 0 : n / violations3);
5720
+ const share2 = (n) => widthClass(violations3 === 0 ? 0 : n / violations3);
5185
5721
  const split = violations3 === 0 ? null : html`<span class="vsplit" aria-hidden="true">${[
5186
- blocking > 0 ? html`<span class="s-bad ${share(blocking)}"></span>` : null,
5187
- other > 0 ? html`<span class="s-warn ${share(other)}"></span>` : null,
5188
- muted > 0 ? html`<span class="s-mute ${share(muted)}"></span>` : null
5722
+ blocking > 0 ? html`<span class="s-bad ${share2(blocking)}"></span>` : null,
5723
+ other > 0 ? html`<span class="s-warn ${share2(other)}"></span>` : null,
5724
+ muted > 0 ? html`<span class="s-mute ${share2(muted)}"></span>` : null
5189
5725
  ]}</span>`;
5190
5726
  const rate = requests === 0 ? 0 : failedRequests / requests;
5191
5727
  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>`;
@@ -5201,8 +5737,12 @@ function kpis(ctx) {
5201
5737
  `${String(counts.api.fromFile + counts.api.fromDefaults)} evaluated · ${String(counts.api.tooFewSamples)} too few`
5202
5738
  ),
5203
5739
  // Steps when the report has step keys, otherwise Tests (11-REQ-28).
5204
- steps > 0 ? field("Steps", steps, `${String(nearLimit(ctx.data.steps))} near limit`) : field(
5205
- "Tests",
5740
+ steps > 0 ? field(
5741
+ "Steps",
5742
+ steps,
5743
+ `${String(overLimit(ctx.data.steps))} over limit · ${String(nearLimit(ctx.data.steps))} near limit`
5744
+ ) : field(
5745
+ "Test runs",
5206
5746
  t.expected + t.unexpected + t.flaky,
5207
5747
  `${String(t.unexpected)} failed · ${String(t.flaky)} flaky · ${String(t.skipped)} skipped`
5208
5748
  ),
@@ -5254,14 +5794,14 @@ function badge(n, tone = "") {
5254
5794
  }
5255
5795
  function violationCard(ctx, e) {
5256
5796
  const ev = e.agg.evaluation;
5257
- const top = topCheck(ev.checks.filter((c) => !c.passed)) ?? topCheck(ev.checks);
5797
+ const top = keyCheck(ev.checks);
5258
5798
  const hint = ctx.migrated ? void 0 : e.agg.hints[0];
5259
5799
  const muted = ev.muted !== null && !ev.muted.expired;
5260
5800
  return join(
5261
5801
  html`<article class="card vio${muted ? " mu" : ""}"><p class="top">${resultPill(ev)}${mutedPill(ev.muted)}${kindToken(e.kind)}${sourceToken(ev.thresholdSource)}</p>`,
5262
5802
  keyLink(ctx, e.kind, e.key, KEY_COLUMN_MAX, true),
5263
5803
  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>`,
5264
- hint === void 0 ? null : html`<p class="hint">${icon("bulb")}<span>${hintText(hint, ctx.level, ev.muted)}</span></p>`,
5804
+ hint === void 0 ? null : html`<p class="hint">${icon("bulb")}<span>${hintText(hint, ctx.level, ev.muted, e.kind)}</span></p>`,
5265
5805
  html`</article>`
5266
5806
  );
5267
5807
  }
@@ -5275,7 +5815,7 @@ function violations2(ctx) {
5275
5815
  heading(
5276
5816
  "viol-h",
5277
5817
  "Violations",
5278
- badge(failedChecks(ctx.report), "bad"),
5818
+ badge(failedChecks2(ctx.report), "bad"),
5279
5819
  html`<a class="more" href="#tab-endpoints" data-show-violations="">All ${violationsText(ctx.report)} →</a>`
5280
5820
  ),
5281
5821
  html`<div class="vlist">${failed.slice(0, RANKING_SIZE).map((e) => violationCard(ctx, e))}</div></section>`
@@ -5304,7 +5844,7 @@ function rankings(ctx) {
5304
5844
  entries: all.filter((e) => e.agg.stats !== null).sort(order((e) => [e.agg.stats?.percentiles[level] ?? 0])),
5305
5845
  size: (e) => e.agg.stats?.percentiles[level] ?? 0,
5306
5846
  tone: errorTone,
5307
- value: (e) => html`<b>${formatMs(e.agg.stats?.percentiles[level] ?? 0)}</b> · ${e.agg.count}`
5847
+ value: (e) => html`<b>${formatMs2(e.agg.stats?.percentiles[level] ?? 0)}</b> · ${e.agg.count}`
5308
5848
  },
5309
5849
  {
5310
5850
  id: "called",
@@ -5401,7 +5941,7 @@ function expensiveTests(ctx) {
5401
5941
  html`<a class="more" href="#tab-tests">All ${plural3(tests.length, "test")} →</a>`
5402
5942
  ),
5403
5943
  html`<div class="card"><ul class="tl">${tests.slice(0, EXPENSIVE_TESTS).map(
5404
- (t) => html`<li><span class="tt"><span>${truncateMiddle2(t.title, 120)}</span><span class="sub">${several ? `${t.project === "" ? "default project" : t.project} · ` : ""}${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>`
5944
+ (t) => html`<li><span class="tt"><span>${truncateMiddle2(t.title, 120)}</span><span class="sub">${several ? `${t.project === "" ? "default project" : t.project} · ` : ""}${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>`
5405
5945
  )}</ul></div></section>`
5406
5946
  );
5407
5947
  }
@@ -5569,12 +6109,12 @@ function generatedSource(file) {
5569
6109
  const tool = field2(generated, "tool");
5570
6110
  const run = textOf(field2(generated, "sourceRunId"));
5571
6111
  const at2 = textOf(field2(generated, "sourceRunStartedAt"));
5572
- const count = field2(generated, "sourceSampleCount");
6112
+ const count2 = field2(generated, "sourceSampleCount");
5573
6113
  return [
5574
6114
  `generated by ${textOf(field2(tool, "name")) ?? "unknown"} v${textOf(field2(tool, "version")) ?? "?"}`,
5575
6115
  run === null ? "" : ` from run ${run}`,
5576
6116
  at2 === null ? "" : ` (${formatDate(at2)})`,
5577
- typeof count === "number" ? `, ${plural3(count, "sample")}` : ""
6117
+ typeof count2 === "number" ? `, ${plural3(count2, "sample")}` : ""
5578
6118
  ].join("");
5579
6119
  }
5580
6120
  function sourceCell(file) {
@@ -5592,12 +6132,14 @@ function sourceCell(file) {
5592
6132
  function thresholdsFileRow(file, report) {
5593
6133
  const percentile2 = textOf(field2(file.generated, "evaluatedPercentile"));
5594
6134
  const fingerprint = textOf(field2(file.generated, "normalization"));
6135
+ const run = file.kind === "step" ? report.stepNormalization : report.normalization;
5595
6136
  let normalization;
5596
- if (fingerprint === null) normalization = html`run <code>${report.normalization}</code>`;
5597
- else if (fingerprint === report.normalization)
5598
- normalization = html`<code>${fingerprint}</code> matches this run`;
6137
+ if (run === null)
6138
+ normalization = fingerprint === null ? html`${DASH}` : html`file <code>${fingerprint}</code>`;
6139
+ else if (fingerprint === null) normalization = html`run <code>${run}</code>`;
6140
+ else if (fingerprint === run) normalization = html`<code>${fingerprint}</code> matches this run`;
5599
6141
  else
5600
- normalization = html`file <code>${fingerprint}</code>, run <code>${report.normalization}</code> ${pill("w", "differs: keys may not match")}`;
6142
+ normalization = html`file <code>${fingerprint}</code>, run <code>${run}</code> ${pill("w", "differs: keys may not match")} (see Warnings)`;
5601
6143
  const status = file.status === "loaded" ? pill("p", "loaded") : file.status === "invalid" ? pill("fb", "invalid") : pill("ne", "missing");
5602
6144
  const unseen = file.unseenKeys;
5603
6145
  return join(
@@ -5685,17 +6227,17 @@ function perRun(t) {
5685
6227
  return Math.round(t.totalMs / t.executions * 10) / 10;
5686
6228
  }
5687
6229
  function testRow(ctx, t, i, most) {
5688
- const share = (ms) => t.totalMs === 0 ? "0%" : `${String(Math.round(ms / t.totalMs * 100))}%`;
6230
+ const share2 = (ms) => t.totalMs === 0 ? "0%" : `${String(Math.round(ms / t.totalMs * 100))}%`;
5689
6231
  const more = t.violatedKeyCount - t.violatedKeys.length;
5690
6232
  return join(
5691
6233
  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>`,
5692
6234
  html`<td class="num">${t.executions}</td><td class="num">${t.requestCount}</td>`,
5693
6235
  t.errorCount === 0 ? html`<td class="num"></td>` : html`<td class="num e">${t.errorCount}</td>`,
5694
- 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>`,
5695
- html`<td class="num">${formatMs(perRun(t))}</td>`,
5696
- html`<td class="num">${t.maxRequestMs === null ? "—" : formatMs(t.maxRequestMs)}</td><td class="num">${t.keyCount}</td>`,
6236
+ 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>`,
6237
+ html`<td class="num">${formatMs2(perRun(t))}</td>`,
6238
+ html`<td class="num">${t.maxRequestMs === null ? "—" : formatMs2(t.maxRequestMs)}</td><td class="num">${t.keyCount}</td>`,
5697
6239
  // Each key on its own line, its time and share below (F2 decision 12).
5698
- 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>`,
6240
+ 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>`,
5699
6241
  html`<td class="tk">`,
5700
6242
  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}`,
5701
6243
  html`</td></tr>`
@@ -5732,7 +6274,7 @@ function testsTable(ctx, tests, omitted) {
5732
6274
  function waterfallCard(w, i) {
5733
6275
  return join(
5734
6276
  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>`,
5735
- 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>`,
6277
+ 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>`,
5736
6278
  html`<div class="scroll wfs" tabindex="0" role="region" aria-label="Waterfall ${i + 1}, scrolls sideways">${waterfallSvg(w, `w${String(i + 1)}`)}</div>`,
5737
6279
  w.omitted > 0 ? html`<p class="tfoot">and ${plural3(w.omitted, "more request")} not shown</p>` : null,
5738
6280
  html`</figure>`
@@ -6198,7 +6740,7 @@ function reportDirRefusal(io, input) {
6198
6740
  }
6199
6741
  for (const entry of entries2) {
6200
6742
  const name = entry.slice(entry.lastIndexOf("/") + 1);
6201
- if (isThresholdsFile(name, input.thresholdsPrefix))
6743
+ if (entry.includes("/") && isThresholdsFile(name, input.thresholdsPrefix))
6202
6744
  return `contains a thresholds file (${entry})`;
6203
6745
  if (isProjectMarker(name)) return `contains ${entry}, so it looks like a project folder`;
6204
6746
  }
@@ -6879,7 +7421,7 @@ var RunSession = class {
6879
7421
  const passInput = {
6880
7422
  execPath: this.host.execPath,
6881
7423
  argv: this.host.argv,
6882
- env: this.host.env,
7424
+ env: this.scriptEnv(info.scripts),
6883
7425
  scripts: info.scripts
6884
7426
  };
6885
7427
  const command = passCommand(passInput);
@@ -7052,6 +7594,14 @@ var RunSession = class {
7052
7594
  if (paths.reportJson !== null) await writeJson();
7053
7595
  }
7054
7596
  }
7597
+ if (this.mode === "test" && cfg.report.junit) {
7598
+ const junit = await writeJunitFile(io, report, reportDir, this.options.buildJunit);
7599
+ if ("issue" in junit) {
7600
+ toolErrors.push(junit.issue);
7601
+ report = build();
7602
+ if (paths.reportJson !== null) await writeJson();
7603
+ }
7604
+ }
7055
7605
  const { width, color } = this.terminal();
7056
7606
  const temporary = this.settings.mode.thresholdsDir !== void 0;
7057
7607
  this.host.stdout.write(
@@ -7075,7 +7625,8 @@ var RunSession = class {
7075
7625
  subset: testFilters(testArgsFromArgv(this.host.argv)).length > 0,
7076
7626
  // Absolute, like the Report line of the summary (10, chapter 9.1; 09-REQ-30).
7077
7627
  diffPath: paths.thresholdsDiff,
7078
- temporary
7628
+ temporary,
7629
+ ascii: asciiTerminal(this.host.env)
7079
7630
  })
7080
7631
  );
7081
7632
  }
@@ -7228,9 +7779,10 @@ var RunSession = class {
7228
7779
  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"})`;
7229
7780
  return { kind, name: file.path, state };
7230
7781
  });
7231
- const missingFile = ["api", "step"].some(
7232
- (kind) => kindsWithKeys[kind] && loaded[kind].status !== "loaded"
7233
- );
7782
+ const missingFile = ["api", "step"].some((kind) => {
7783
+ const file = loaded[kind];
7784
+ return kindsWithKeys[kind] && (file.status !== "loaded" || Object.keys(file.file.entries).length === 0);
7785
+ });
7234
7786
  const meanMs = c.durations.length === 0 ? null : c.durations.reduce((a, b) => a + b, 0) / c.durations.length;
7235
7787
  const reporters = (config?.reporter ?? []).map(
7236
7788
  ([name]) => /playwright-performance-regression|[\\/]dist[\\/]reporter\.c?js$/u.test(name) ? "pw-perf" : name
@@ -7293,14 +7845,29 @@ var RunSession = class {
7293
7845
  }
7294
7846
  /** The words the run added to the test command, as for the next pass (09-REQ-32, 04-REQ-63). */
7295
7847
  runArgs() {
7848
+ const { scripts } = this.host.io.readPackageInfo(this.host.cwd);
7296
7849
  const shape = runShape({
7297
7850
  execPath: this.host.execPath,
7298
7851
  argv: this.host.argv,
7299
- env: this.host.env,
7300
- scripts: this.host.io.readPackageInfo(this.host.cwd).scripts
7852
+ env: this.scriptEnv(scripts),
7853
+ scripts
7301
7854
  });
7302
7855
  return { script: shape.script !== null, tail: shape.tail };
7303
7856
  }
7857
+ scriptEnvCache = null;
7858
+ /**
7859
+ * The environment with npm_lifecycle_event of the script that started Playwright through
7860
+ * `npx` (04-REQ-63 point 2); the process table is read at most once per run.
7861
+ */
7862
+ scriptEnv(scripts) {
7863
+ this.scriptEnvCache ??= scriptEnv({
7864
+ env: this.host.env,
7865
+ scripts,
7866
+ pid: this.host.pid,
7867
+ processTable: this.host.processTable?.bind(this.host)
7868
+ });
7869
+ return this.scriptEnvCache;
7870
+ }
7304
7871
  /**
7305
7872
  * The test directory relative to INIT_CWD, the directory the package manager was called from
7306
7873
  * (e.g. the root of a monorepo), or null when it is the same or not below it: an INIT_CWD
@@ -7315,8 +7882,8 @@ var RunSession = class {
7315
7882
  }
7316
7883
  /** Commands of the project for each mode, for the Next: hint (09-REQ-32). */
7317
7884
  commands() {
7318
- const env = this.host.env;
7319
7885
  const info = this.host.io.readPackageInfo(this.configDir);
7886
+ const env = this.scriptEnv(this.host.io.readPackageInfo(this.host.cwd).scripts);
7320
7887
  const ctx = {
7321
7888
  env: this.settings.config.run.env,
7322
7889
  lifecycleEvent: env["npm_lifecycle_event"] ?? null,
@@ -7365,8 +7932,9 @@ var RunSession = class {
7365
7932
  }
7366
7933
  /**
7367
7934
  * Derivation in thresholds mode (10, chapter 3): refusals and write errors are tool errors, so
7368
- * nothing is written for an incomplete run (04-REQ-36); the diff file failing is a warning.
7369
- * Returns the diffs and the absolute path of each thresholds file.
7935
+ * nothing is written for an incomplete run (04-REQ-36); the copies in report.dir (10-REQ-24) and
7936
+ * the diff file failing are warnings. Returns the diffs and the absolute path of each thresholds
7937
+ * file.
7370
7938
  */
7371
7939
  async deriveAndWrite(report, loaded, location, paths, warnings, toolErrors) {
7372
7940
  const cfg = this.settings.config;
@@ -7382,6 +7950,8 @@ var RunSession = class {
7382
7950
  }
7383
7951
  warnings.push(...derived.value.warnings);
7384
7952
  const absolute = io.thresholdsFilePaths(location);
7953
+ const reportDir = io.resolvePath(this.configDir, cfg.report.dir);
7954
+ let writeFailed = false;
7385
7955
  for (const file of derived.value.files) {
7386
7956
  if (file.content === null || !file.changed) continue;
7387
7957
  try {
@@ -7392,6 +7962,7 @@ var RunSession = class {
7392
7962
  entries: Object.keys(file.content.entries).length
7393
7963
  });
7394
7964
  } catch (error) {
7965
+ writeFailed = true;
7395
7966
  toolErrors.push({
7396
7967
  code: "THRESHOLDS_WRITE_FAILED",
7397
7968
  message: `The thresholds file ${loaded[file.kind].path} could not be written: ${error instanceof Error ? error.message : String(error)}`,
@@ -7403,10 +7974,13 @@ var RunSession = class {
7403
7974
  (file) => diffThresholds(loaded[file.kind], file, report, cfg)
7404
7975
  );
7405
7976
  const filePaths = derived.value.files.map((file) => absolute[file.kind]);
7406
- const diffPath = io.resolvePath(
7407
- io.resolvePath(this.configDir, cfg.report.dir),
7408
- "thresholds-diff.md"
7409
- );
7977
+ if (!writeFailed && this.settings.mode.thresholdsDir === void 0) {
7978
+ const copies = io.thresholdsFilePaths({ ...location, configDir: reportDir, dir: "." });
7979
+ for (const file of derived.value.files) {
7980
+ await this.copyThresholdsFile(absolute[file.kind], copies[file.kind], warnings);
7981
+ }
7982
+ }
7983
+ const diffPath = io.resolvePath(reportDir, "thresholds-diff.md");
7410
7984
  try {
7411
7985
  await io.writeTextAtomic(
7412
7986
  diffPath,
@@ -7425,6 +7999,23 @@ var RunSession = class {
7425
7999
  }
7426
8000
  return { diffs, paths: filePaths };
7427
8001
  }
8002
+ /**
8003
+ * A byte-identical copy of a thresholds file in report.dir, for the CI artifact (10-REQ-24).
8004
+ * A missing file (a kind that was never written) has no copy; a failure is a warning.
8005
+ */
8006
+ async copyThresholdsFile(from, to, warnings) {
8007
+ const io = this.host.io;
8008
+ try {
8009
+ const text2 = await io.readTextFile(from);
8010
+ if (text2 !== null) await io.writeTextAtomic(to, text2);
8011
+ } catch (error) {
8012
+ warnings.push({
8013
+ code: "THRESHOLDS_COPY_FAILED",
8014
+ message: `The thresholds file ${from} could not be copied to ${to}: ${error instanceof Error ? error.message : String(error)}`,
8015
+ hint: "The thresholds file itself is written; commit it from thresholds.dir or check that report.dir is writable."
8016
+ });
8017
+ }
8018
+ }
7428
8019
  /** The outcome when building the report failed: exit code 3 with the error (02-REQ-27). */
7429
8020
  fallbackOutcome(result2) {
7430
8021
  return {
@@ -7554,6 +8145,8 @@ function processHost() {
7554
8145
  ci: readCiInfo(env),
7555
8146
  host: readHostInfo(env),
7556
8147
  execPath: process.execPath,
8148
+ pid: process.pid,
8149
+ processTable: readProcessTable,
7557
8150
  runPass: (command, passEnv) => runPass(command, passEnv, process.cwd())
7558
8151
  };
7559
8152
  }