@cnc-tools/storm 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/dist/application.js +5 -1
  2. package/dist/bin/storm.js +6 -2
  3. package/dist/build-info.js +1 -1
  4. package/dist/chunks/{chunk-FK4RLDEK.js → chunk-27P2QSIM.js} +1 -1
  5. package/dist/chunks/{chunk-ODQHQJLE.js → chunk-5ED3IDUJ.js} +749 -1121
  6. package/dist/chunks/{chunk-FSP3SJ35.js → chunk-5TMHYH7G.js} +16 -46
  7. package/dist/chunks/{chunk-Y3BUNNRG.js → chunk-BFLYGMG3.js} +12 -7
  8. package/dist/chunks/{chunk-LQKNI3EG.js → chunk-BRUIATTR.js} +6 -6
  9. package/dist/chunks/{chunk-RYRJNHL7.js → chunk-HOKDKP5A.js} +3 -9
  10. package/dist/chunks/{chunk-SXW6XN4R.js → chunk-IVRRGGCD.js} +60 -20
  11. package/dist/chunks/{chunk-TMQQYHUX.js → chunk-QBR5VHJ7.js} +1 -1
  12. package/dist/chunks/{chunk-YT5OROR7.js → chunk-RA4L2ACU.js} +12 -2
  13. package/dist/chunks/{chunk-TEEZL3GA.js → chunk-RKONDLPS.js} +17 -71
  14. package/dist/chunks/{chunk-IYM44FUX.js → chunk-UC6DULWY.js} +2 -2
  15. package/dist/chunks/{chunk-4XT5RC5T.js → chunk-XPCUINWS.js} +6 -42
  16. package/dist/chunks/{chunk-U7M3ZB3Z.js → chunk-YBPTMJUM.js} +123 -180
  17. package/dist/chunks/{chunk-ISGQJIQM.js → chunk-Z5OXOZD3.js} +125 -83
  18. package/dist/chunks/{chunk-7D6LC5JY.js → chunk-ZH5R7W4A.js} +7 -39
  19. package/dist/chunks/{live-app-AZ5N5HBD.js → live-app-FBVWUUMT.js} +7 -7
  20. package/dist/commands/exec/command.d.ts +4 -90
  21. package/dist/commands/exec/command.js +15 -41
  22. package/dist/commands/exec/define-run-command.d.ts +19 -100
  23. package/dist/commands/exec/define-run-command.js +48 -15
  24. package/dist/commands/exec/driver-plan.d.ts +24 -16
  25. package/dist/commands/exec/driver-plan.js +34 -15
  26. package/dist/commands/exec/driver-refusals.js +7 -6
  27. package/dist/commands/exec/exec-words.d.ts +1 -1
  28. package/dist/commands/exec/exec-words.js +8 -2
  29. package/dist/commands/exec/final-results.d.ts +39 -0
  30. package/dist/commands/exec/final-results.js +29 -0
  31. package/dist/commands/exec/live-view.js +18 -22
  32. package/dist/commands/exec/metadata.js +1 -1
  33. package/dist/commands/exec/outcomes.d.ts +15 -109
  34. package/dist/commands/exec/outcomes.js +25 -39
  35. package/dist/commands/exec/plan-run.d.ts +11 -3
  36. package/dist/commands/exec/plan-run.js +3 -2
  37. package/dist/commands/exec/progress.d.ts +3 -19
  38. package/dist/commands/exec/progress.js +16 -60
  39. package/dist/commands/exec/run-command.d.ts +5 -24
  40. package/dist/commands/exec/run-command.js +32 -84
  41. package/dist/commands/exec/run-metadata.d.ts +0 -6
  42. package/dist/commands/exec/run-metadata.js +2 -8
  43. package/dist/commands/exec/snapshot-text.d.ts +7 -16
  44. package/dist/commands/exec/snapshot-text.js +9 -49
  45. package/dist/commands/exec/test-plan.d.ts +2 -1
  46. package/dist/commands/exec/test-plan.js +13 -4
  47. package/dist/commands/exec/tests-summary.d.ts +2 -2
  48. package/dist/commands/exec/view.js +2 -12
  49. package/dist/commands/exec/worker-chart.d.ts +1 -1
  50. package/dist/commands/playwright/command.d.ts +12 -97
  51. package/dist/commands/playwright/command.js +14 -14
  52. package/dist/commands/playwright/metadata.js +2 -2
  53. package/dist/commands/runs/facts.d.ts +1 -37
  54. package/dist/commands/runs/facts.js +4 -36
  55. package/dist/commands/runs/list/command.d.ts +0 -72
  56. package/dist/commands/runs/list/command.js +6 -6
  57. package/dist/commands/runs/list/outcomes.d.ts +0 -36
  58. package/dist/commands/runs/logs/command.js +6 -6
  59. package/dist/commands/runs/show/command.d.ts +2 -74
  60. package/dist/commands/runs/show/command.js +16 -43
  61. package/dist/commands/runs/show/metadata.js +1 -1
  62. package/dist/commands/runs/show/outcomes.d.ts +1 -37
  63. package/dist/commands/runs/show/outcomes.js +8 -42
  64. package/dist/commands/snapshots/build/command.d.ts +14 -411
  65. package/dist/commands/snapshots/build/command.js +59 -234
  66. package/dist/commands/snapshots/build/metadata.js +10 -7
  67. package/dist/commands/snapshots/build/outcomes.d.ts +11 -241
  68. package/dist/commands/snapshots/build/outcomes.js +29 -196
  69. package/dist/commands/snapshots/list/command.d.ts +2 -36
  70. package/dist/commands/snapshots/list/command.js +20 -56
  71. package/dist/commands/snapshots/list/metadata.js +1 -1
  72. package/dist/commands/snapshots/list/outcomes.d.ts +2 -37
  73. package/dist/commands/snapshots/list/outcomes.js +13 -53
  74. package/dist/commands/vitest/command.d.ts +14 -98
  75. package/dist/commands/vitest/command.js +14 -14
  76. package/dist/commands/vitest/metadata.js +2 -2
  77. package/dist/config/resolve.d.ts +1 -1
  78. package/dist/config/resolve.js +2 -1
  79. package/dist/config/schema.d.ts +8 -0
  80. package/dist/config/schema.js +5 -4
  81. package/dist/core/events.d.ts +5 -6
  82. package/dist/core/run-state.d.ts +7 -29
  83. package/dist/core/run-state.js +3 -26
  84. package/dist/core/run.d.ts +6 -14
  85. package/dist/core/run.js +17 -28
  86. package/dist/extensions/playwright/driver.js +17 -10
  87. package/dist/extensions/testserver/commands/pool/create/command.js +4 -4
  88. package/dist/extensions/testserver/commands/pool/list/command.js +2 -2
  89. package/dist/extensions/testserver/definition.d.ts +1 -1
  90. package/dist/extensions/testserver/extension.d.ts +1 -1
  91. package/dist/extensions/testserver/options/rules.d.ts +3 -3
  92. package/dist/extensions/testserver/options/rules.js +5 -5
  93. package/dist/extensions/testserver/resource.d.ts +1 -1
  94. package/dist/extensions/testserver/vercel-cli/index.d.ts +1 -0
  95. package/dist/extensions/testserver/vercel-cli/index.js +1 -0
  96. package/dist/extensions/testserver/vercel-cli/report.js +5 -2
  97. package/dist/extensions/testserver/vercel-cli/session-id.d.ts +8 -0
  98. package/dist/extensions/testserver/vercel-cli/session-id.js +16 -0
  99. package/dist/extensions/testserver/vitest/config.d.ts +2 -2
  100. package/dist/extensions/testserver/vitest/config.js +2 -2
  101. package/dist/extensions/testserver/vitest/container-scope.d.ts +25 -16
  102. package/dist/extensions/testserver/vitest/container-scope.js +32 -13
  103. package/dist/extensions/testserver/vitest/diagnostics.d.ts +5 -4
  104. package/dist/extensions/testserver/vitest/diagnostics.js +15 -8
  105. package/dist/extensions/testserver/vitest/fixtures.d.ts +10 -1
  106. package/dist/extensions/testserver/vitest/fixtures.js +36 -10
  107. package/dist/extensions/testserver/vitest/types.d.ts +9 -0
  108. package/dist/extensions/vitest/driver.js +28 -14
  109. package/dist/extensions/vitest/plan/gateways.d.ts +28 -5
  110. package/dist/extensions/vitest/plan/gateways.js +2 -2
  111. package/dist/extensions/vitest/plan/list-output.d.ts +5 -0
  112. package/dist/extensions/vitest/plan/list-output.js +23 -9
  113. package/dist/extensions/vitest/plan/live/list-gateway.d.ts +3 -2
  114. package/dist/extensions/vitest/plan/live/list-gateway.js +77 -64
  115. package/dist/extensions/vitest/plan/plan-over.d.ts +19 -7
  116. package/dist/extensions/vitest/plan/plan-over.js +18 -7
  117. package/dist/extensions/vitest/plan/plan.d.ts +14 -5
  118. package/dist/extensions/vitest/plan/plan.js +23 -9
  119. package/dist/extensions.d.ts +2 -2
  120. package/dist/run-directory/index.d.ts +1 -1
  121. package/dist/run-directory/index.js +0 -1
  122. package/dist/run-directory/plan.d.ts +3 -2
  123. package/dist/run-directory/plan.js +6 -3
  124. package/dist/run-directory/recording.js +2 -2
  125. package/dist/run-directory/run-record.d.ts +18 -135
  126. package/dist/run-directory/run-record.js +8 -68
  127. package/dist/runner/build-snapshots.d.ts +50 -114
  128. package/dist/runner/build-snapshots.js +70 -159
  129. package/dist/runner/events.d.ts +4 -88
  130. package/dist/runner/gateways.d.ts +5 -23
  131. package/dist/runner/index.d.ts +5 -6
  132. package/dist/runner/index.js +1 -1
  133. package/dist/runner/live/snapshot-records.js +7 -18
  134. package/dist/runner/prepare.d.ts +11 -22
  135. package/dist/runner/prepare.js +6 -17
  136. package/dist/runner/ready.d.ts +16 -45
  137. package/dist/runner/ready.js +34 -59
  138. package/dist/runner/recipe.d.ts +5 -45
  139. package/dist/runner/recipe.js +0 -41
  140. package/dist/runner/sandboxed-command.d.ts +5 -3
  141. package/dist/runner/sandboxed-command.js +10 -4
  142. package/dist/runner/scope.d.ts +8 -25
  143. package/dist/runner/scope.js +4 -8
  144. package/dist/runner/session.d.ts +18 -65
  145. package/dist/runner/session.js +15 -83
  146. package/dist/runner/snapshot-build.d.ts +2 -2
  147. package/dist/runner/snapshot-cache.d.ts +22 -74
  148. package/dist/runner/snapshot-cache.js +15 -107
  149. package/dist/runner/snapshot-inspect.d.ts +9 -13
  150. package/dist/runner/snapshot-inspect.js +48 -57
  151. package/dist/runner/snapshot-key.d.ts +9 -14
  152. package/dist/runner/snapshot-key.js +15 -22
  153. package/dist/sdk/extension/driver.d.ts +32 -6
  154. package/dist/sdk/extension/driver.js +12 -2
  155. package/dist/sdk/extension/index.d.ts +1 -1
  156. package/dist/sdk/extension/index.js +2 -1
  157. package/dist/sdk/extension/resource-definition.d.ts +6 -5
  158. package/dist/vendor/testserver-sdk/container/api-request.d.ts +2 -3
  159. package/dist/vendor/testserver-sdk/container/api-request.js +2 -3
  160. package/dist/vendor/testserver-sdk/container/container.d.ts +12 -2
  161. package/dist/vendor/testserver-sdk/container/container.js +10 -7
  162. package/dist/vendor/testserver-sdk/container/recorder.d.ts +29 -7
  163. package/dist/vendor/testserver-sdk/container/recorder.js +26 -14
  164. package/dist/vendor/testserver-sdk/index.d.ts +1 -1
  165. package/dist/vendor/testserver-sdk/index.js +1 -1
  166. package/dist/vendor/testserver-sdk/proxy/exchange.d.ts +24 -5
  167. package/dist/vendor/testserver-sdk/proxy/exchange.js +43 -25
  168. package/dist/vendor/testserver-sdk/proxy/faulted-exchange.js +15 -10
  169. package/dist/vendor/testserver-sdk/proxy/faults.d.ts +6 -5
  170. package/dist/vendor/testserver-sdk/proxy/proxy.d.ts +10 -1
  171. package/dist/vendor/testserver-sdk/proxy/proxy.js +5 -3
  172. package/dist/vendor/testserver-sdk/proxy/records.d.ts +17 -17
  173. package/dist/vendor/testserver-sdk/proxy/records.js +18 -17
  174. package/dist/vendor/testserver-sdk/records/body.d.ts +7 -9
  175. package/dist/vendor/testserver-sdk/records/body.js +10 -15
  176. package/dist/vendor/testserver-sdk/records/headers.d.ts +79 -0
  177. package/dist/vendor/testserver-sdk/records/headers.js +162 -0
  178. package/dist/vendor/testserver-sdk/records/index.d.ts +2 -1
  179. package/dist/vendor/testserver-sdk/records/index.js +4 -2
  180. package/dist/vendor/testserver-sdk/records/records.d.ts +19 -10
  181. package/package.json +5 -4
  182. package/skills/overview.md +5 -5
  183. package/skills/read-run-output.md +8 -9
  184. package/dist/runner/snapshot-save.d.ts +0 -70
  185. package/dist/runner/snapshot-save.js +0 -160
  186. package/dist/runner/snapshot-start.d.ts +0 -25
  187. package/dist/runner/snapshot-start.js +0 -16
  188. package/skills/testserver-builds.md +0 -82
@@ -1,6 +1,6 @@
1
1
  // What a run, `storm runs show` and `storm snapshots list` say about a runner snapshot: where it was built, in
2
- // commits a person knows, why a run doesn't start from one, why a run saved no dev snapshot, and what the cache read
3
- // noticed. Each text says only what storm checked.
2
+ // commits a person knows, why a run doesn't start from one, and what the cache read noticed. Each text says only what
3
+ // storm checked.
4
4
  import { short } from "./text.js";
5
5
  /** How many of the snapshots a run doesn't start from its build line lists, before it counts the rest. */
6
6
  export const REJECTIONS_SHOWN = 5;
@@ -10,48 +10,32 @@ export function commitsText(count) {
10
10
  }
11
11
  /**
12
12
  * Where a runner snapshot was built, from the commits a run knows: at HEAD's commit, at the run's merge-base, or some
13
- * commits before HEAD. It names no kind. `atMergeBase` is whether the built-at commit is the run's base, which each
14
- * caller compares itself, so a run record written before every snapshot a run started from was at its merge-base
15
- * still reads true; a count storm doesn't have is null.
13
+ * commits before HEAD. A snapshot is built at its `base`; `mergeBase` is the run's own, undefined when the run didn't
14
+ * say it; a count storm doesn't have is null.
16
15
  */
17
16
  export function builtAtText(snapshot) {
18
- const at = `(${short(snapshot.builtAt)})`;
17
+ const at = `(${short(snapshot.base)})`;
19
18
  if (snapshot.builtBehind === 0)
20
19
  return `built at this commit ${at}`;
21
- if (snapshot.atMergeBase)
20
+ if (snapshot.base === snapshot.mergeBase)
22
21
  return `built at the merge-base ${at}`;
23
22
  if (snapshot.builtBehind !== null)
24
23
  return `built ${commitsText(snapshot.builtBehind)} before HEAD ${at}`;
25
- return `built at commit ${short(snapshot.builtAt)}`;
24
+ return `built at commit ${short(snapshot.base)}`;
26
25
  }
27
- /**
28
- * Why a run doesn't start from a cached snapshot, as a person reads it after the snapshot's id. It reads only the root
29
- * of the checkout that saved the snapshot (`repoRoot`, null for a base snapshot), its built-at commit (`builtAt`) and
30
- * its base (`base`).
31
- */
26
+ /** Why a run doesn't start from a cached snapshot, as a person reads it after the snapshot's id. */
32
27
  export function rejectionText(reason, snapshot) {
33
28
  switch (reason) {
34
29
  case "expired":
35
30
  return "expired";
36
31
  case "expires-soon":
37
32
  return "expires within the hour";
38
- case "other-checkout":
39
- return `saved by another checkout (${snapshot.repoRoot ?? "unknown"})`;
40
- case "reuse-off":
41
- return "reuse of dev snapshots is switched off";
42
- case "not-trusted":
43
- return "the runner recipe doesn't trust dev snapshots";
44
33
  case "other-base":
45
34
  return `its base ${short(snapshot.base)} is not the merge-base`;
46
35
  case "steps-changed":
47
36
  return "the recipe's snapshot steps changed since it was built";
48
- case "not-in-history":
49
- return `its commit ${short(snapshot.builtAt)} is not in HEAD's history`;
50
37
  case "other-owner":
51
38
  return "built for another team or project";
52
- case "not-picked":
53
- // Of two at one commit the pick prefers a dev snapshot, so the one passed over need not be farther from HEAD.
54
- return "the pick preferred another snapshot";
55
39
  }
56
40
  }
57
41
  /**
@@ -62,41 +46,17 @@ export function rejectionLines(rejected) {
62
46
  const shown = rejected.slice(0, REJECTIONS_SHOWN);
63
47
  const more = rejected.length - shown.length;
64
48
  return [
65
- ...shown.map(({ entry, reason }) => ` ${entry.snapshotId}: ${rejectionText(reason, { repoRoot: entry.repoRoot ?? null, builtAt: entry.head ?? entry.base, base: entry.base })}`),
49
+ ...shown.map(({ entry, reason }) => ` ${entry.snapshotId}: ${rejectionText(reason, entry)}`),
66
50
  ...(more === 0 ? [] : [` and ${more} more: storm snapshots list shows them`]),
67
51
  ];
68
52
  }
69
- /** Why a run whose command ended on its own saved no dev snapshot, as its cleanup line says after the colon. */
70
- export function noSaveText(reason) {
71
- switch (reason) {
72
- case "already-saved":
73
- return "this commit already has one";
74
- case "command-failed":
75
- return "the command did not exit 0";
76
- case "ci":
77
- return "CI is set";
78
- case "keep-sandbox":
79
- return "--keep-sandbox keeps the runner sandbox instead";
80
- case "no-save-flag":
81
- return "--save-dev-snapshot=false";
82
- case "recipe":
83
- return "saveDevSnapshot is false in the runner recipe";
84
- case "not-trusted":
85
- return "the runner recipe doesn't trust dev snapshots (trustDevSnapshots)";
86
- }
87
- }
88
53
  /** Every reason a run doesn't start from a cached snapshot, for a schema. */
89
54
  export const REJECTION_REASONS = [
90
55
  "expired",
91
56
  "expires-soon",
92
- "other-checkout",
93
- "reuse-off",
94
- "not-trusted",
95
57
  "other-base",
96
58
  "steps-changed",
97
- "not-in-history",
98
59
  "other-owner",
99
- "not-picked",
100
60
  ];
101
61
  /**
102
62
  * What removing expired entries from the runner snapshot cache noticed, as a run's and `storm snapshots build`'s
@@ -4,7 +4,8 @@ import { type RunTestPlan } from "../../sdk/extension/index.ts";
4
4
  export declare function recordedPlan(testPlan: RunTestPlan, options: readonly PlanOption[]): TestPlanFacts | undefined;
5
5
  /**
6
6
  * The plan as `vitest` and `playwright` say it before the run: `Running 65 tests in 19 files; resources.<key>.<option>
7
- * 5 (default)`, each option with where its value came from, or `Running 65 tests in 19 files` without one.
7
+ * 5 (default)`, each option with where its value came from, or `Running 65 tests in 19 files` without one, and
8
+ * `Running tests in 19 files` for a plan that counted only the files.
8
9
  */
9
10
  export declare function testPlanLine(plan: TestPlanFacts): string;
10
11
  /** The plan as a phrase: `65 tests in 19 files; resources.<key>.<option> 5 (--<prefix>-<option>)`. */
@@ -8,12 +8,17 @@ import { RESOURCE_FLAGS } from "./resource-flags.js";
8
8
  /** The plan a run records: with a counted test plan, its counts and `options`; none for a run that counted nothing. */
9
9
  export function recordedPlan(testPlan, options) {
10
10
  return testPlan.kind === "counted"
11
- ? { tests: testPlan.tests, files: testPlan.files, options: options.map((option) => ({ ...option })) }
11
+ ? {
12
+ ...(testPlan.tests === undefined ? {} : { tests: testPlan.tests }),
13
+ files: testPlan.files,
14
+ options: options.map((option) => ({ ...option })),
15
+ }
12
16
  : undefined;
13
17
  }
14
18
  /**
15
19
  * The plan as `vitest` and `playwright` say it before the run: `Running 65 tests in 19 files; resources.<key>.<option>
16
- * 5 (default)`, each option with where its value came from, or `Running 65 tests in 19 files` without one.
20
+ * 5 (default)`, each option with where its value came from, or `Running 65 tests in 19 files` without one, and
21
+ * `Running tests in 19 files` for a plan that counted only the files.
17
22
  */
18
23
  export function testPlanLine(plan) {
19
24
  return `Running ${testPlanText(plan)}`;
@@ -22,9 +27,13 @@ export function testPlanLine(plan) {
22
27
  export function testPlanText(plan) {
23
28
  return [countText(plan), ...plan.options.map(planOptionText)].join("; ");
24
29
  }
25
- /** What a plan step counted, as a phrase, such as `65 tests in 19 files` or `1 test in 1 file`. */
30
+ /**
31
+ * What a plan step counted, as a phrase, such as `65 tests in 19 files` or `1 test in 1 file`, or `tests in 19 files`
32
+ * when it counted only the files.
33
+ */
26
34
  function countText({ tests, files }) {
27
- return `${tests} ${tests === 1 ? "test" : "tests"} in ${files} ${files === 1 ? "file" : "files"}`;
35
+ const inFiles = `in ${files} ${files === 1 ? "file" : "files"}`;
36
+ return tests === undefined ? `tests ${inFiles}` : `${tests} ${tests === 1 ? "test" : "tests"} ${inFiles}`;
28
37
  }
29
38
  /** An option as the plan names it: its key path, its value, and where that came from, a flag by its spelling. */
30
39
  function planOptionText({ path, value, from }) {
@@ -21,7 +21,7 @@ export interface TestsSummary {
21
21
  * driver (`hints`), and counts the workers' test attempts instead. `unreadable` counts the lines in the test events
22
22
  * file that held none; `incomplete` is why the final read of the test events failed, when it did.
23
23
  */
24
- export declare function testsSummaryLines(events: readonly TestEvent[], hints: DriverHints, unreadable?: number, incomplete?: string): string[];
24
+ export declare function testsSummaryLines(events: readonly TestEvent[], hints: Pick<DriverHints, "noFinalResults">, unreadable?: number, incomplete?: string): string[];
25
25
  /** What the summary says when the final read of the test events failed with `message`. */
26
26
  export declare function incompleteText(message: string): string;
27
27
  /**
@@ -35,7 +35,7 @@ export declare function noFinalResultsText(hint: string): string;
35
35
  * What the summary says about the tests, from `events`, of which `unreadable` lines held none, and `incomplete`, why the
36
36
  * final read of the test events file failed. `hints` are the run's driver's, for a run with no final result.
37
37
  */
38
- export declare function testsSummary(events: readonly TestEvent[], hints: DriverHints, unreadable?: number, incomplete?: string): TestsSummary;
38
+ export declare function testsSummary(events: readonly TestEvent[], hints: Pick<DriverHints, "noFinalResults">, unreadable?: number, incomplete?: string): TestsSummary;
39
39
  /**
40
40
  * How the setup phases in `events` are worded, every view's alike (`setupPhaseWords`): by label, and with the
41
41
  * resource beside it where two resources' phases share one.
@@ -4,7 +4,7 @@
4
4
  import { EMPTY_RUN_STATE, } from "../../core/index.js";
5
5
  import { DEFINITION_SET } from "../../extensions.js";
6
6
  import { activePhase, headerLine, phaseFrame, phaseRecord } from "./live-view.js";
7
- import { devSnapshotSaveText, devSnapshotSkippedText, snapshotBuildTexts, devSnapshotsDropText, cacheWriteFailureText, lineProgress, preparedNoteTexts, progressLine, resourceWarningText, skippedText, } from "./progress.js";
7
+ import { snapshotBuildTexts, cacheWriteFailureText, lineProgress, preparedNoteTexts, progressLine, resourceWarningText, skippedText, } from "./progress.js";
8
8
  import { paint } from "./text.js";
9
9
  /** The plain summary's width when stderr reports none: 80 columns. */
10
10
  const PLAIN_WIDTH = 80;
@@ -168,21 +168,12 @@ function noticeLines(timed, origin, verbose) {
168
168
  }
169
169
  }
170
170
  /**
171
- * The runner's notices: why the cached snapshots didn't fit a run that builds one, a cache entry not written, what
172
- * `storm snapshots build --full` dropped, and how a save ended or why none started.
171
+ * The runner's notices: why the cached snapshots didn't fit a run that builds one, and a cache entry not written.
173
172
  */
174
173
  function runnerNoticeLines(event, line) {
175
174
  switch (event.kind) {
176
175
  case "snapshot-entry-not-written":
177
176
  return [line("runner", cacheWriteFailureText(event.failure))];
178
- case "dev-snapshots-dropped":
179
- case "dev-snapshots-not-dropped":
180
- return [line("runner", devSnapshotsDropText(event))];
181
- case "dev-snapshot-saved":
182
- case "dev-snapshot-not-saved":
183
- return [line("cleanup", devSnapshotSaveText(event))];
184
- case "dev-snapshot-skipped":
185
- return [line("cleanup", devSnapshotSkippedText(event))];
186
177
  // The runner row shows the build; its reasons, when a cached snapshot didn't fit, are lines of their own.
187
178
  case "snapshot-build-started":
188
179
  return event.why.kind === "no-snapshot" && event.why.rejected.length > 0
@@ -206,7 +197,6 @@ function runnerNoticeLines(event, line) {
206
197
  case "stopping":
207
198
  case "waiting-for-snapshot":
208
199
  case "sandbox-kept":
209
- case "dev-snapshot-saving":
210
200
  return [];
211
201
  }
212
202
  }
@@ -54,7 +54,7 @@ export interface TestsChart {
54
54
  * stands alone. `hints` are the run's driver's, for the totals of a run with no final test result; `unreadable` counts
55
55
  * the lines in the test events file that held none; `incomplete` is why its final read failed, when it did.
56
56
  */
57
- export declare function testsChart(events: readonly TestEvent[], hints: DriverHints, unreadable: number, clock: WorkerClock, incomplete?: string): TestsChart | undefined;
57
+ export declare function testsChart(events: readonly TestEvent[], hints: Pick<DriverHints, "noFinalResults">, unreadable: number, clock: WorkerClock, incomplete?: string): TestsChart | undefined;
58
58
  /**
59
59
  * Each worker's files and setup phases, from its events, by the run's clock, by worker; a worker that started no
60
60
  * file has none. A file without a `file-finished`, from a run that stopped, ends at its worker's last event. The
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * `storm playwright`: the run command of storm's Playwright driver, which the Playwright extension brings and the
3
3
  * registry gives by name (`driverNamed`, `src/extensions.ts`). It runs `playwright test <args>` in a run, after counting
4
- * the tests with `playwright test --list`. Its usage, its arguments' help, its examples and what its refusals say are
4
+ * the tests with `playwright test --list` where the config file sets `testPlan`. Its usage, its arguments' help, its examples and what its refusals say are
5
5
  * the driver's; `metadata.ts` holds its summary and description as plain text, so group help loads no driver.
6
6
  */
7
7
  declare const _default: import("@vercel/clinkr").CommandDefinition<import("zod").ZodObject<{
@@ -12,12 +12,11 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<import("zod")
12
12
  mint: "mint";
13
13
  }>>;
14
14
  unsandboxed: import("zod").ZodDefault<import("zod").ZodBoolean>;
15
- saveDevSnapshot: import("zod").ZodOptional<import("zod").ZodBoolean>;
16
- noReuseDevSnapshot: import("zod").ZodDefault<import("zod").ZodBoolean>;
17
15
  showOutput: import("zod").ZodDefault<import("zod").ZodBoolean>;
18
16
  keepSandbox: import("zod").ZodOptional<import("zod").ZodString>;
19
17
  verbose: import("zod").ZodDefault<import("zod").ZodBoolean>;
20
18
  args: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
19
+ countTests?: import("zod").ZodDefault<import("zod").ZodBoolean>;
21
20
  }, import("zod/v4/core").$strip>, import("@vercel/clinkr").Outcomes<{
22
21
  ran: import("zod").ZodObject<{
23
22
  version: import("zod").ZodString;
@@ -32,48 +31,13 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<import("zod")
32
31
  runner: import("zod").ZodNullable<import("zod").ZodObject<{
33
32
  snapshotId: import("zod").ZodString;
34
33
  base: import("zod").ZodString;
35
- snapshotBranch: import("zod").ZodNullable<import("zod").ZodString>;
36
- snapshotHead: import("zod").ZodNullable<import("zod").ZodString>;
37
- snapshotKind: import("zod").ZodEnum<{
38
- base: "base";
39
- dev: "dev";
40
- }>;
41
- snapshotBuiltAt: import("zod").ZodString;
42
- builtBehind: import("zod").ZodNullable<import("zod").ZodNumber>;
34
+ builtBehind: import("zod").ZodNumber;
43
35
  uploadBytes: import("zod").ZodNumber;
44
36
  built: import("zod").ZodBoolean;
45
37
  vcpus: import("zod").ZodNumber;
46
38
  region: import("zod").ZodString;
47
39
  runtime: import("zod").ZodString;
48
40
  buildMs: import("zod").ZodNumber;
49
- save: import("zod").ZodNullable<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
50
- kind: import("zod").ZodLiteral<"saved">;
51
- snapshotId: import("zod").ZodString;
52
- base: import("zod").ZodString;
53
- branch: import("zod").ZodNullable<import("zod").ZodString>;
54
- head: import("zod").ZodString;
55
- ms: import("zod").ZodNumber;
56
- sizeBytes: import("zod").ZodNumber;
57
- entryWritten: import("zod").ZodBoolean;
58
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
59
- kind: import("zod").ZodLiteral<"failed">;
60
- step: import("zod").ZodEnum<{
61
- "save-snapshot": "save-snapshot";
62
- scrub: "scrub";
63
- }>;
64
- message: import("zod").ZodString;
65
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
66
- kind: import("zod").ZodLiteral<"stopped">;
67
- }, import("zod/v4/core").$strip>], "kind">>;
68
- noSaveReason: import("zod").ZodNullable<import("zod").ZodEnum<{
69
- "already-saved": "already-saved";
70
- ci: "ci";
71
- "command-failed": "command-failed";
72
- "keep-sandbox": "keep-sandbox";
73
- "no-save-flag": "no-save-flag";
74
- "not-trusted": "not-trusted";
75
- recipe: "recipe";
76
- }>>;
77
41
  }, import("zod/v4/core").$strip>>;
78
42
  timeline: import("zod").ZodObject<{
79
43
  startedAt: import("zod").ZodString;
@@ -118,8 +82,9 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<import("zod")
118
82
  }, import("zod/v4/core").$strip>>;
119
83
  }, import("zod/v4/core").$strip>;
120
84
  runId: import("zod").ZodNullable<import("zod").ZodString>;
121
- plan: import("zod").ZodObject<{
122
- tests: import("zod").ZodNumber;
85
+ noFinalTestResults: import("zod").ZodBoolean;
86
+ plan: import("zod").ZodExactOptional<import("zod").ZodObject<{
87
+ tests: import("zod").ZodOptional<import("zod").ZodNumber>;
123
88
  files: import("zod").ZodNumber;
124
89
  options: import("zod").ZodArray<import("zod").ZodObject<{
125
90
  path: import("zod").ZodString;
@@ -130,7 +95,7 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<import("zod")
130
95
  flag: "flag";
131
96
  }>;
132
97
  }, import("zod/v4/core").$strip>>;
133
- }, import("zod/v4/core").$strip>;
98
+ }, import("zod/v4/core").$strip>>;
134
99
  }, import("zod/v4/core").$strip>;
135
100
  }, {
136
101
  ran: unknown;
@@ -139,10 +104,6 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<import("zod")
139
104
  flags: string[];
140
105
  configFile: string | null;
141
106
  }]>;
142
- devSnapshotsNotTrusted: import("@vercel/clinkr").SharedError<"dev_snapshots_not_trusted", [data: {
143
- flag: string;
144
- configFile: string | null;
145
- }]>;
146
107
  driverPlanFailed: import("@vercel/clinkr").SharedError<"driver_plan_failed", [data: {
147
108
  driver: string;
148
109
  kind: "exited" | "start-failed" | "timed-out" | "unreadable-output";
@@ -262,10 +223,6 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<import("zod")
262
223
  flags: string[];
263
224
  configFile: string | null;
264
225
  }]>;
265
- readonly devSnapshotsNotTrusted: import("@vercel/clinkr").SharedError<"dev_snapshots_not_trusted", [data: {
266
- flag: string;
267
- configFile: string | null;
268
- }]>;
269
226
  readonly driverPlanFailed: import("@vercel/clinkr").SharedError<"driver_plan_failed", [data: {
270
227
  driver: string;
271
228
  kind: "exited" | "start-failed" | "timed-out" | "unreadable-output";
@@ -394,48 +351,13 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<import("zod")
394
351
  runner: import("zod").ZodNullable<import("zod").ZodObject<{
395
352
  snapshotId: import("zod").ZodString;
396
353
  base: import("zod").ZodString;
397
- snapshotBranch: import("zod").ZodNullable<import("zod").ZodString>;
398
- snapshotHead: import("zod").ZodNullable<import("zod").ZodString>;
399
- snapshotKind: import("zod").ZodEnum<{
400
- base: "base";
401
- dev: "dev";
402
- }>;
403
- snapshotBuiltAt: import("zod").ZodString;
404
- builtBehind: import("zod").ZodNullable<import("zod").ZodNumber>;
354
+ builtBehind: import("zod").ZodNumber;
405
355
  uploadBytes: import("zod").ZodNumber;
406
356
  built: import("zod").ZodBoolean;
407
357
  vcpus: import("zod").ZodNumber;
408
358
  region: import("zod").ZodString;
409
359
  runtime: import("zod").ZodString;
410
360
  buildMs: import("zod").ZodNumber;
411
- save: import("zod").ZodNullable<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
412
- kind: import("zod").ZodLiteral<"saved">;
413
- snapshotId: import("zod").ZodString;
414
- base: import("zod").ZodString;
415
- branch: import("zod").ZodNullable<import("zod").ZodString>;
416
- head: import("zod").ZodString;
417
- ms: import("zod").ZodNumber;
418
- sizeBytes: import("zod").ZodNumber;
419
- entryWritten: import("zod").ZodBoolean;
420
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
421
- kind: import("zod").ZodLiteral<"failed">;
422
- step: import("zod").ZodEnum<{
423
- "save-snapshot": "save-snapshot";
424
- scrub: "scrub";
425
- }>;
426
- message: import("zod").ZodString;
427
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
428
- kind: import("zod").ZodLiteral<"stopped">;
429
- }, import("zod/v4/core").$strip>], "kind">>;
430
- noSaveReason: import("zod").ZodNullable<import("zod").ZodEnum<{
431
- "already-saved": "already-saved";
432
- ci: "ci";
433
- "command-failed": "command-failed";
434
- "keep-sandbox": "keep-sandbox";
435
- "no-save-flag": "no-save-flag";
436
- "not-trusted": "not-trusted";
437
- recipe: "recipe";
438
- }>>;
439
361
  }, import("zod/v4/core").$strip>>;
440
362
  timeline: import("zod").ZodObject<{
441
363
  startedAt: import("zod").ZodString;
@@ -480,8 +402,9 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<import("zod")
480
402
  }, import("zod/v4/core").$strip>>;
481
403
  }, import("zod/v4/core").$strip>;
482
404
  runId: import("zod").ZodNullable<import("zod").ZodString>;
483
- plan: import("zod").ZodObject<{
484
- tests: import("zod").ZodNumber;
405
+ noFinalTestResults: import("zod").ZodBoolean;
406
+ plan: import("zod").ZodExactOptional<import("zod").ZodObject<{
407
+ tests: import("zod").ZodOptional<import("zod").ZodNumber>;
485
408
  files: import("zod").ZodNumber;
486
409
  options: import("zod").ZodArray<import("zod").ZodObject<{
487
410
  path: import("zod").ZodString;
@@ -492,7 +415,7 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<import("zod")
492
415
  flag: "flag";
493
416
  }>;
494
417
  }, import("zod/v4/core").$strip>>;
495
- }, import("zod/v4/core").$strip>;
418
+ }, import("zod/v4/core").$strip>>;
496
419
  }, import("zod/v4/core").$strip>;
497
420
  }, {
498
421
  ran: unknown;
@@ -501,10 +424,6 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<import("zod")
501
424
  flags: string[];
502
425
  configFile: string | null;
503
426
  }]>;
504
- devSnapshotsNotTrusted: import("@vercel/clinkr").SharedError<"dev_snapshots_not_trusted", [data: {
505
- flag: string;
506
- configFile: string | null;
507
- }]>;
508
427
  driverPlanFailed: import("@vercel/clinkr").SharedError<"driver_plan_failed", [data: {
509
428
  driver: string;
510
429
  kind: "exited" | "start-failed" | "timed-out" | "unreadable-output";
@@ -624,10 +543,6 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<import("zod")
624
543
  flags: string[];
625
544
  configFile: string | null;
626
545
  }]>;
627
- readonly devSnapshotsNotTrusted: import("@vercel/clinkr").SharedError<"dev_snapshots_not_trusted", [data: {
628
- flag: string;
629
- configFile: string | null;
630
- }]>;
631
546
  readonly driverPlanFailed: import("@vercel/clinkr").SharedError<"driver_plan_failed", [data: {
632
547
  driver: string;
633
548
  kind: "exited" | "start-failed" | "timed-out" | "unreadable-output";
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  defineRunCommand
3
- } from "../../chunks/chunk-SXW6XN4R.js";
4
- import "../../chunks/chunk-RYRJNHL7.js";
5
- import "../../chunks/chunk-U7M3ZB3Z.js";
3
+ } from "../../chunks/chunk-IVRRGGCD.js";
4
+ import "../../chunks/chunk-HOKDKP5A.js";
5
+ import "../../chunks/chunk-YBPTMJUM.js";
6
6
  import "../../chunks/chunk-I5GZLOLQ.js";
7
- import "../../chunks/chunk-FK4RLDEK.js";
8
- import "../../chunks/chunk-Y3BUNNRG.js";
9
- import "../../chunks/chunk-4XT5RC5T.js";
7
+ import "../../chunks/chunk-27P2QSIM.js";
8
+ import "../../chunks/chunk-BFLYGMG3.js";
9
+ import "../../chunks/chunk-XPCUINWS.js";
10
10
  import {
11
11
  driverNamed
12
- } from "../../chunks/chunk-ISGQJIQM.js";
13
- import "../../chunks/chunk-IYM44FUX.js";
14
- import "../../chunks/chunk-LQKNI3EG.js";
12
+ } from "../../chunks/chunk-Z5OXOZD3.js";
13
+ import "../../chunks/chunk-UC6DULWY.js";
14
+ import "../../chunks/chunk-BRUIATTR.js";
15
15
  import "../../chunks/chunk-NMVODY3P.js";
16
- import "../../chunks/chunk-TEEZL3GA.js";
17
- import "../../chunks/chunk-TMQQYHUX.js";
18
- import "../../chunks/chunk-FSP3SJ35.js";
19
- import "../../chunks/chunk-ODQHQJLE.js";
20
- import "../../chunks/chunk-YT5OROR7.js";
16
+ import "../../chunks/chunk-RKONDLPS.js";
17
+ import "../../chunks/chunk-QBR5VHJ7.js";
18
+ import "../../chunks/chunk-5TMHYH7G.js";
19
+ import "../../chunks/chunk-5ED3IDUJ.js";
20
+ import "../../chunks/chunk-RA4L2ACU.js";
21
21
  import "../../chunks/chunk-BW2ADH7U.js";
22
22
  import "../../chunks/chunk-GQIL3AHY.js";
23
23
  import "../../chunks/chunk-GSC6SRTW.js";
@@ -1,7 +1,7 @@
1
1
  // src/commands/playwright/metadata.ts
2
2
  var metadata = {
3
- description: "Run playwright test with the run payload in STORM_RUN, after counting its tests and sizing the run. storm's flags come first; every other argument goes to playwright test unchanged, in order. Put Playwright's own dash options, such as --project or --grep, after --. Before anything is minted, acquired or started, it counts the tests with playwright test --list and the same arguments, on this machine, with this machine's environment: in the working directory for an unsandboxed run (--unsandboxed), and in <repository root>/<runner cwd> for a sandboxed run, the directory where Playwright runs in the runner sandbox. Listing loads the Playwright config and the test files; it neither runs the config's global setup nor starts its web server. A test counts once for each Playwright project that runs it. It refuses with no_matching_tests when Playwright lists none, and with driver_plan_failed when listing fails. A signal while it counts stops the listing and cancels the run. A Playwright config that loads only inside the runner sandbox can't be counted here: run it with storm exec. A resource of the run may size itself from the count: an option whose default is a function of the test plan takes its own flag if given, else its key in storm.config.ts, else the default for the count; the run says each such option's value and where it came from on stderr before it acquires anything. In an unsandboxed run, playwright is the nearest node_modules/.bin/playwright from the working directory up to the repository's root, or the filesystem's root outside a repository; in a sandboxed run, playwright from the runner's PATH, which starts with node_modules/.bin of the runner cwd and of the repository's root. Otherwise it runs as storm exec does: in a runner sandbox by default or on this machine with --unsandboxed, with a live view or plain lines on stderr, a waterfall, a run directory that storm runs show reads back, and the exit code of Playwright. The run's result and its run directory's run.json carry the test plan: the tests and files counted, and each option sized from them, with its value and where it came from.",
4
- summary: "Count the tests, size the run, and run playwright test."
3
+ description: "Run playwright test with the run payload in STORM_RUN, after counting its tests and sizing the run when storm.config.ts sets testPlan. storm's flags come first; every other argument goes to playwright test unchanged, in order. Put Playwright's own dash options, such as --project or --grep, after --. Without testPlan: true in storm.config.ts it counts nothing, as storm exec counts nothing, so no program of the project runs on this machine before a sandboxed run. With it, before anything is minted, acquired or started, it counts the tests with playwright test --list and the same arguments, on this machine, with this machine's environment: in the working directory for an unsandboxed run (--unsandboxed), and in <repository root>/<runner cwd> for a sandboxed run, the directory where Playwright runs in the runner sandbox. Listing loads the Playwright config and the test files; it neither runs the config's global setup nor starts its web server. A test counts once for each Playwright project that runs it. A run that counts refuses with no_matching_tests when Playwright lists none, and with driver_plan_failed when listing fails. A signal while it counts stops the listing and cancels the run. A Playwright config that loads only inside the runner sandbox can't be counted here: leave testPlan out of storm.config.ts. A resource of the run may size itself from the count: an option whose default is a function of the test plan takes its own flag if given, else its key in storm.config.ts, else the default for the count; the run says each such option's value and where it came from on stderr before it acquires anything. In an unsandboxed run, playwright is the nearest node_modules/.bin/playwright from the working directory up to the repository's root, or the filesystem's root outside a repository; in a sandboxed run, playwright from the runner's PATH, which starts with node_modules/.bin of the runner cwd and of the repository's root. Otherwise it runs as storm exec does: in a runner sandbox by default or on this machine with --unsandboxed, with a live view or plain lines on stderr, a waterfall, a run directory that storm runs show reads back, and the exit code of Playwright. A run whose playwright exits 0 but reports no final test result to storm, since the Playwright config lists no storm reporter or a --reporter replaced it, warns no_final_test_results, whose next steps say what to add to the config. The result of a run that counted, and its run directory's run.json, carry the test plan: the tests and files counted, and each option sized from them, with its value and where it came from.",
4
+ summary: "Run playwright test, after counting the tests if storm.config.ts asks."
5
5
  };
6
6
  export {
7
7
  metadata
@@ -1,7 +1,7 @@
1
1
  import { type StyledCell } from "@vercel/clinkr/vcli-kit";
2
2
  import type { Intent } from "@vercel/clinkr/vcli-kit/theme";
3
3
  import { z } from "zod";
4
- import { type ListedRun } from "../../run-directory/index.ts";
4
+ import type { ListedRun } from "../../run-directory/index.ts";
5
5
  import type { RunScope } from "./past-run.ts";
6
6
  /**
7
7
  * The run logs `runs logs` prints and `runs show` names: the command log (`command`), then each step's, in the order a
@@ -47,46 +47,10 @@ export declare const runFactsSchema: z.ZodObject<{
47
47
  id: z.ZodString;
48
48
  base: z.ZodString;
49
49
  built: z.ZodBoolean;
50
- branch: z.ZodNullable<z.ZodString>;
51
- head: z.ZodNullable<z.ZodString>;
52
- kind: z.ZodNullable<z.ZodEnum<{
53
- base: "base";
54
- dev: "dev";
55
- }>>;
56
- builtAt: z.ZodNullable<z.ZodString>;
57
50
  builtBehind: z.ZodNullable<z.ZodNumber>;
58
51
  url: z.ZodString;
59
52
  }, z.core.$strip>>;
60
53
  uploadBytes: z.ZodNullable<z.ZodNumber>;
61
- noSaveReason: z.ZodNullable<z.ZodEnum<{
62
- "already-saved": "already-saved";
63
- ci: "ci";
64
- "command-failed": "command-failed";
65
- "keep-sandbox": "keep-sandbox";
66
- "no-save-flag": "no-save-flag";
67
- "not-trusted": "not-trusted";
68
- recipe: "recipe";
69
- }>>;
70
- save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
71
- kind: z.ZodLiteral<"saved">;
72
- snapshotId: z.ZodString;
73
- base: z.ZodString;
74
- branch: z.ZodNullable<z.ZodString>;
75
- head: z.ZodString;
76
- ms: z.ZodNumber;
77
- sizeBytes: z.ZodNumber;
78
- entryWritten: z.ZodBoolean;
79
- url: z.ZodString;
80
- }, z.core.$strip>, z.ZodObject<{
81
- kind: z.ZodLiteral<"failed">;
82
- step: z.ZodEnum<{
83
- "save-snapshot": "save-snapshot";
84
- scrub: "scrub";
85
- }>;
86
- message: z.ZodString;
87
- }, z.core.$strip>, z.ZodObject<{
88
- kind: z.ZodLiteral<"stopped">;
89
- }, z.core.$strip>], "kind">>;
90
54
  }, z.core.$strip>], "kind">>;
91
55
  git: z.ZodNullable<z.ZodObject<{
92
56
  branch: z.ZodNullable<z.ZodString>;
@@ -2,7 +2,6 @@
2
2
  // share: shared schemas and the facts built from a past run, so the commands' JSON agree.
3
3
  import { muted } from "@vercel/clinkr/vcli-kit";
4
4
  import { z } from "zod";
5
- import { noSaveReasonSchema } from "../../run-directory/index.js";
6
5
  import { sandboxPage, snapshotPage } from "../dashboard.js";
7
6
  import { isoSecondsText, seconds, short } from "../exec/text.js";
8
7
  /**
@@ -69,49 +68,19 @@ export const runFactsSchema = z.object({
69
68
  keptUntil: z.string().nullable(),
70
69
  /** How many whole minutes are left until keptUntil, as of reading the run, 0 once it has passed; null when keptUntil is. */
71
70
  keptMinutesLeft: z.number().nullable(),
72
- /** The runner snapshot it started from: its id, the base it is of, which the run's changes went on top of, whether this run built it or reused it, for a dev snapshot the HEAD commit of the run that saved it and its branch (the commit is null for a base snapshot, the branch for a base snapshot and for a run on a detached HEAD), and its page in the Vercel dashboard. Null until known. */
71
+ /** The runner snapshot it started from: its id, the base it is of, which the run's changes went on top of, whether this run built it or reused it, and its page in the Vercel dashboard. Null until known. */
73
72
  snapshot: z
74
73
  .object({
75
74
  id: z.string(),
76
75
  base: z.string(),
77
76
  built: z.boolean(),
78
- branch: z.string().nullable(),
79
- head: z.string().nullable(),
80
- /** Its kind, a base snapshot or a dev snapshot; null in a record written before storm recorded it. */
81
- kind: z.enum(["base", "dev"]).nullable(),
82
- /** The commit it was built at, a full SHA: a base snapshot's base, or the commit that saved a dev snapshot; null when unknown. */
83
- builtAt: z.string().nullable(),
84
- /** How many commits the run's HEAD had that its built-at commit lacks; null when unknown. */
77
+ /** How many commits the run's HEAD had that its base, the commit it was built at, lacks; null when the run state had no count. */
85
78
  builtBehind: z.number().nullable(),
86
79
  url: z.string(),
87
80
  })
88
81
  .nullable(),
89
- /** How many bytes of changes the run uploaded to the runner sandbox; null when unknown. */
82
+ /** How many bytes of changes the run uploaded to the runner sandbox; null when the run stopped before the upload. */
90
83
  uploadBytes: z.number().nullable(),
91
- /** Why the run, whose command ended on its own, started no save of a dev snapshot; null when it started one, or when unknown. */
92
- noSaveReason: noSaveReasonSchema.nullable(),
93
- /** How saving the runner sandbox as a dev snapshot ended, as the run's ran result's runner.save says, with the saved snapshot's page in the Vercel dashboard (`url`, null unless saved); null when the run started no save. */
94
- save: z
95
- .discriminatedUnion("kind", [
96
- z.object({
97
- kind: z.literal("saved"),
98
- snapshotId: z.string(),
99
- base: z.string(),
100
- branch: z.string().nullable(),
101
- head: z.string(),
102
- ms: z.number(),
103
- sizeBytes: z.number(),
104
- entryWritten: z.boolean(),
105
- url: z.string(),
106
- }),
107
- z.object({
108
- kind: z.literal("failed"),
109
- step: z.enum(["scrub", "save-snapshot"]),
110
- message: z.string(),
111
- }),
112
- z.object({ kind: z.literal("stopped") }),
113
- ])
114
- .nullable(),
115
84
  }),
116
85
  ])
117
86
  .nullable(),
@@ -178,13 +147,12 @@ export function runFacts(run, now) {
178
147
  function whereFacts(where, now) {
179
148
  if (where.kind === "unsandboxed")
180
149
  return { kind: "unsandboxed" };
181
- const { sandbox, snapshot, keptUntil, save } = where;
150
+ const { sandbox, snapshot, keptUntil } = where;
182
151
  return {
183
152
  ...where,
184
153
  keptMinutesLeft: keptUntil === null ? null : Math.max(0, Math.floor((Date.parse(keptUntil) - now.getTime()) / 60_000)),
185
154
  sandboxUrl: sandbox === null ? null : sandboxPage(where, sandbox),
186
155
  snapshot: snapshot === null ? null : { ...snapshot, url: snapshotPage(where, snapshot.id) },
187
- save: save?.kind === "saved" ? { ...save, url: snapshotPage(where, save.snapshotId) } : save,
188
156
  };
189
157
  }
190
158
  /** `scope` as the result reports it. */