tuffgal 0.2.0-alpha.3 → 0.2.0-alpha.5

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 (110) hide show
  1. package/CHANGELOG.md +41 -20
  2. package/README.md +6 -6
  3. package/dist/cli.d.ts +5 -5
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +12 -5
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/init.d.ts +1 -1
  8. package/dist/commands/init.js +6 -6
  9. package/dist/commands/supervise.d.ts +3 -3
  10. package/dist/commands/supervise.js +8 -4
  11. package/dist/commands/supervise.js.map +1 -1
  12. package/dist/config.d.ts +29 -13
  13. package/dist/config.d.ts.map +1 -1
  14. package/dist/config.js +5 -2
  15. package/dist/config.js.map +1 -1
  16. package/dist/coverage/screens.d.ts +10 -5
  17. package/dist/coverage/screens.d.ts.map +1 -1
  18. package/dist/coverage/screens.js +18 -8
  19. package/dist/coverage/screens.js.map +1 -1
  20. package/dist/reporter/assets/report.css +11 -11
  21. package/dist/reporter/assets/report.js +23 -23
  22. package/dist/reporter/template.js +48 -46
  23. package/dist/reporter/template.js.map +1 -1
  24. package/dist/runner/approve.d.ts +5 -5
  25. package/dist/runner/approve.js +5 -5
  26. package/dist/runner/approveFrom.d.ts +8 -8
  27. package/dist/runner/approveFrom.js +32 -31
  28. package/dist/runner/approveFrom.js.map +1 -1
  29. package/dist/runner/breakpointPasses.d.ts +16 -9
  30. package/dist/runner/breakpointPasses.d.ts.map +1 -1
  31. package/dist/runner/breakpointPasses.js +17 -9
  32. package/dist/runner/breakpointPasses.js.map +1 -1
  33. package/dist/runner/bridges/devServers.d.ts +10 -1
  34. package/dist/runner/bridges/devServers.d.ts.map +1 -1
  35. package/dist/runner/bridges/devServers.js +16 -8
  36. package/dist/runner/bridges/devServers.js.map +1 -1
  37. package/dist/runner/coverage.d.ts +3 -3
  38. package/dist/runner/coverage.js +5 -5
  39. package/dist/runner/coverage.js.map +1 -1
  40. package/dist/runner/exitCode.d.ts +7 -7
  41. package/dist/runner/exitCode.js +7 -7
  42. package/dist/runner/interpolate.js +1 -1
  43. package/dist/runner/interpolate.js.map +1 -1
  44. package/dist/runner/manifest.d.ts +16 -16
  45. package/dist/runner/manifest.js +12 -12
  46. package/dist/runner/mode.d.ts +2 -2
  47. package/dist/runner/mode.js +4 -4
  48. package/dist/runner/orphanScan.d.ts +3 -3
  49. package/dist/runner/orphanScan.js +5 -5
  50. package/dist/runner/orphanScan.js.map +1 -1
  51. package/dist/runner/resolveLocator.d.ts +5 -5
  52. package/dist/runner/resolveLocator.js +6 -6
  53. package/dist/runner/resolveLocator.js.map +1 -1
  54. package/dist/runner/run.d.ts +55 -18
  55. package/dist/runner/run.d.ts.map +1 -1
  56. package/dist/runner/run.js +118 -67
  57. package/dist/runner/run.js.map +1 -1
  58. package/dist/runner/runAction.d.ts +4 -4
  59. package/dist/runner/runAction.d.ts.map +1 -1
  60. package/dist/runner/runAction.js +103 -39
  61. package/dist/runner/runAction.js.map +1 -1
  62. package/dist/runner/runStory.d.ts +29 -18
  63. package/dist/runner/runStory.d.ts.map +1 -1
  64. package/dist/runner/runStory.js +38 -42
  65. package/dist/runner/runStory.js.map +1 -1
  66. package/dist/runner/scheduler.d.ts +11 -0
  67. package/dist/runner/scheduler.d.ts.map +1 -1
  68. package/dist/runner/scheduler.js +1 -1
  69. package/dist/runner/scheduler.js.map +1 -1
  70. package/dist/runner/steps/intercept.d.ts +6 -4
  71. package/dist/runner/steps/intercept.d.ts.map +1 -1
  72. package/dist/runner/steps/intercept.js.map +1 -1
  73. package/dist/runner/steps/navigate.d.ts +5 -2
  74. package/dist/runner/steps/navigate.d.ts.map +1 -1
  75. package/dist/runner/steps/navigate.js +17 -3
  76. package/dist/runner/steps/navigate.js.map +1 -1
  77. package/dist/runner/steps/read.d.ts +1 -1
  78. package/dist/runner/steps/read.js +1 -1
  79. package/dist/runner/steps/scroll.d.ts +1 -1
  80. package/dist/runner/steps/scroll.d.ts.map +1 -1
  81. package/dist/runner/steps/scroll.js +3 -2
  82. package/dist/runner/steps/scroll.js.map +1 -1
  83. package/dist/schema/action.d.ts +2 -2
  84. package/dist/schema/action.d.ts.map +1 -1
  85. package/dist/schema/action.js +58 -13
  86. package/dist/schema/action.js.map +1 -1
  87. package/dist/schema/load.js +1 -1
  88. package/dist/schema/load.js.map +1 -1
  89. package/dist/schema/result.d.ts +22 -22
  90. package/dist/schema/result.d.ts.map +1 -1
  91. package/dist/schema/result.js +1 -1
  92. package/dist/schema/story.d.ts +1 -1
  93. package/dist/schema/story.js +5 -5
  94. package/dist/screenshots/baselineStore.d.ts +44 -21
  95. package/dist/screenshots/baselineStore.d.ts.map +1 -1
  96. package/dist/screenshots/baselineStore.js +59 -28
  97. package/dist/screenshots/baselineStore.js.map +1 -1
  98. package/dist/screenshots/capture.d.ts +35 -4
  99. package/dist/screenshots/capture.d.ts.map +1 -1
  100. package/dist/screenshots/capture.js +61 -9
  101. package/dist/screenshots/capture.js.map +1 -1
  102. package/dist/screenshots/diff.d.ts +57 -8
  103. package/dist/screenshots/diff.d.ts.map +1 -1
  104. package/dist/screenshots/diff.js +78 -28
  105. package/dist/screenshots/diff.js.map +1 -1
  106. package/dist/util.d.ts +23 -2
  107. package/dist/util.d.ts.map +1 -1
  108. package/dist/util.js +42 -2
  109. package/dist/util.js.map +1 -1
  110. package/package.json +7 -5
@@ -1,6 +1,8 @@
1
+ import { isDeepStrictEqual } from 'node:util';
2
+ import { parse as parseYaml } from 'yaml';
1
3
  import { capturePage } from "../screenshots/capture.js";
2
- import { diffPngs, ScreenshotSizeMismatchError } from "../screenshots/diff.js";
3
- import { deleteIfExists, pathsFor, readBaseline, readJsonBaseline, withBaselineLock, writePng, writeText, } from "../screenshots/baselineStore.js";
4
+ import { renderDiffOverlay, scoreDiff, ScreenshotSizeMismatchError, } from "../screenshots/diff.js";
5
+ import { deleteIfExists, pathsFor, readBaseline, readJsonBaseline, withBaselineLock, writeDurablePng, writeText, writeTransientPng, } from "../screenshots/baselineStore.js";
4
6
  import { sleep } from "../util.js";
5
7
  import { comparisonRootFor } from "./mode.js";
6
8
  import { interpolate, interpolateHint } from "./interpolate.js";
@@ -32,7 +34,7 @@ export async function runAction(options) {
32
34
  // so a story can key test-created data per mode (e.g. registering
33
35
  // `fresh+${breakpoint}@example.test` at each viewport instead of colliding on
34
36
  // a shared email). It is injected only into the interpolation map, never the
35
- // validated `parameters` — `validateParameters` rejects undeclared keys, and
37
+ // validated `parameters`, `validateParameters` rejects undeclared keys, and
36
38
  // the ActionResult must still report the author's parameters verbatim. A
37
39
  // story parameter literally named `breakpoint` overrides the injected value.
38
40
  const interpolationParameters = {
@@ -85,7 +87,7 @@ async function dispatchWithRetry(page, step, parameters, config, attempts, backo
85
87
  }
86
88
  catch (error) {
87
89
  lastError = error;
88
- if (!(error instanceof LocatorNotFoundError) || attempt === attempts) {
90
+ if (!isRetryable(error) || attempt === attempts) {
89
91
  throw error;
90
92
  }
91
93
  await sleep(backoffMs * attempt);
@@ -93,6 +95,26 @@ async function dispatchWithRetry(page, step, parameters, config, attempts, backo
93
95
  }
94
96
  throw lastError;
95
97
  }
98
+ /**
99
+ * Only transient faults are retried; real infrastructure errors rethrow
100
+ * immediately so a genuine fault is not masked by burning the retry budget:
101
+ * - `LocatorNotFoundError`: the UI has not hydrated the target element yet.
102
+ * - any bounded Playwright `TimeoutError`: every step whose dispatch is
103
+ * bounded by a Playwright timeout qualifies, not just navigation: a
104
+ * `page.goto` that did not reach its ready signal, AND the step-level
105
+ * click/input/waitFor timeouts (a slow first paint, a lagging dev server, a
106
+ * control still rendering), each of which a re-drive routinely clears.
107
+ * Classified by `name` so it holds for any Playwright timeout whether it
108
+ * arrives as `errors.TimeoutError` or is reconstructed across an async
109
+ * boundary.
110
+ * Anything else (connection refused, protocol error, an origin-escape throw)
111
+ * is a NON-retryable fault and rethrows on the first occurrence.
112
+ */
113
+ function isRetryable(error) {
114
+ if (error instanceof LocatorNotFoundError)
115
+ return true;
116
+ return error instanceof Error && error.name === 'TimeoutError';
117
+ }
96
118
  async function dispatch(page, step, parameters, config) {
97
119
  switch (step.kind) {
98
120
  case 'navigate':
@@ -118,7 +140,7 @@ async function dispatch(page, step, parameters, config) {
118
140
  /**
119
141
  * Polls every hint in `expect.anyOf` concurrently and resolves as soon as one
120
142
  * becomes visible. Throws when none resolve within the configured timeout.
121
- * Race semantics: any single match satisfies the expectation — this is what
143
+ * Race semantics: any single match satisfies the expectation. This is what
122
144
  * lets a single action declare "success looks like list-item OR toast OR
123
145
  * status banner" without the story knowing which renderer the app picked.
124
146
  */
@@ -147,7 +169,7 @@ async function captureAndCompare(options) {
147
169
  // The comparison target moves with the mode (see `comparisonRootFor`, the
148
170
  // single owner of the mode→root mapping). CI compares against (and, on
149
171
  // approval, promotes into) the committed `paths.baselines`; local mode
150
- // self-diffs against — and auto-seeds — the per-machine, gitignored
172
+ // self-diffs against (and auto-seeds) the per-machine, gitignored
151
173
  // `paths.localCache`, never reading or writing `paths.baselines`. Report-side
152
174
  // artifacts (actual, diff, candidate) stay report-rooted regardless; only the
153
175
  // baseline/legacy side follows `comparisonRoot`. Legacy `<action>/0.png`
@@ -164,8 +186,13 @@ async function captureAndCompare(options) {
164
186
  breakpoint,
165
187
  });
166
188
  const masks = resolveMasks(page, action.mask, interpolationParameters);
167
- const actualPng = await capturePage(page, masks, config.captureMode);
168
- await writePng(paths.actual, actualPng);
189
+ const actualPng = await capturePage(page, masks, config.captureMode, {
190
+ maxPixels: config.maxFullPagePixels,
191
+ label: `story "${storyFile}" action "${action.action}" (${breakpoint})`,
192
+ });
193
+ // The run's `actual` is a transient report artifact (overwritten next run,
194
+ // never re-read as a comparison target), so it skips the max-effort recompress.
195
+ await writeTransientPng(paths.actual, actualPng);
169
196
  const a11yJson = await captureA11yTree(page);
170
197
  await writeText(paths.a11yActual, a11yJson);
171
198
  const baseResult = baseResultFor(action.action, parameters, breakpoint, startedAt);
@@ -174,17 +201,17 @@ async function captureAndCompare(options) {
174
201
  // The first holder decides; later holders observe the baseline it produced.
175
202
  //
176
203
  // Read order under the lock:
177
- // 1. breakpoint-keyed baseline (`<action>/<bp>.png`) — the canonical
204
+ // 1. breakpoint-keyed baseline (`<action>/<bp>.png`): the canonical
178
205
  // location once a project has migrated to named breakpoints;
179
- // 2. legacy baseline (`<action>/0.png`) — a project baselined before this
206
+ // 2. legacy baseline (`<action>/0.png`): a project baselined before this
180
207
  // feature has only this file. We compare against it (so it still gates
181
208
  // pass/changed) but deliberately do NOT copy it forward to the
182
209
  // breakpoint location: a real baseline already lives at the legacy path,
183
210
  // and promotion to the new layout is `tuffgal approve`'s job, not a
184
211
  // silent side effect of a read. Auto-creating here would also clobber
185
212
  // the legacy file's role as the shared fallback for every breakpoint.
186
- // 3. neither — the missing-baseline branch, and it splits on mode:
187
- // - `local`: auto-seed the per-machine cache — write a fresh
213
+ // 3. neither, the missing-baseline branch, and it splits on mode:
214
+ // - `local`: auto-seed the per-machine cache, write a fresh
188
215
  // breakpoint baseline under the lock (rooted at `comparisonRoot`,
189
216
  // i.e. `paths.localCache`) and report `new`. Zero-ceremony first run.
190
217
  // `paths.baselines` is never touched.
@@ -203,7 +230,9 @@ async function captureAndCompare(options) {
203
230
  return { png: legacy, source: 'legacy' };
204
231
  }
205
232
  if (mode === 'local') {
206
- await writePng(paths.baseline, actualPng);
233
+ // A local-cache baseline is durable (re-read on every later run), so
234
+ // it earns the lossless recompress.
235
+ await writeDurablePng(paths.baseline, actualPng);
207
236
  await writeText(paths.a11yBaseline, a11yJson);
208
237
  }
209
238
  return undefined;
@@ -224,28 +253,34 @@ async function captureAndCompare(options) {
224
253
  }
225
254
  const baselinePng = found.png;
226
255
  // When the comparison ran against the legacy baseline, its a11y companion
227
- // lives at the legacy a11y path too — read that one so the a11yChanged
256
+ // lives at the legacy a11y path too. Read that one so the a11yChanged
228
257
  // signal reflects the baseline we actually diffed against.
229
258
  const a11yBaselinePathForRead = found.source === 'legacy' ? paths.legacyA11yBaseline : paths.a11yBaseline;
230
259
  const baselineA11y = await readJsonBaseline(a11yBaselinePathForRead);
231
- const a11yChanged = baselineA11y !== undefined && baselineA11y !== a11yJson;
260
+ const a11yChanged = baselineA11y !== undefined && a11yTreeChanged(baselineA11y, a11yJson);
232
261
  try {
233
262
  const pixelThreshold = action.diff?.pixelThreshold ?? 0.1;
234
263
  const ssimThreshold = action.diff?.ssimThreshold ?? 0.99;
235
- const outcome = diffPngs(baselinePng, actualPng, pixelThreshold);
236
- const passesSsim = outcome.ssimScore >= ssimThreshold;
264
+ // Score first (SSIM plus the reported pixel metrics) without encoding
265
+ // the overlay. The red-highlight diff image is expensive to encode and is
266
+ // discarded on a pass, so it is rendered only on the changed branch below.
267
+ // One decode of the pair serves both the score and (on the changed branch
268
+ // below) the overlay render. `decoded` is threaded into renderDiffOverlay
269
+ // so the failing path reads the image pair once, not twice.
270
+ const { score, decoded } = scoreDiff(baselinePng, actualPng, pixelThreshold);
271
+ const passesSsim = score.ssimScore >= ssimThreshold;
237
272
  if (passesSsim) {
238
273
  await deleteIfExists(paths.diff);
239
274
  // A11y-only drift: pixels match but the committed aria snapshot has moved.
240
275
  // In CI mode this must surface as `changed` with a candidate pair, not a
241
- // silent `pass` — under the sole-writer model a `pass` writes no candidate,
276
+ // silent `pass`. Under the sole-writer model a `pass` writes no candidate,
242
277
  // so a drifted committed `a11y.yaml` would be permanently unre-approvable
243
278
  // (`approve --from` has nothing to promote). The pixel-drift path below is
244
279
  // mutually exclusive with this branch, so exactly one candidate pair is
245
- // ever written per action. Local mode keeps the advisory behaviour — the
280
+ // ever written per action. Local mode keeps the advisory behaviour. The
246
281
  // cache is auto-managed, there is no human-approval step, so the flag stays
247
282
  // informational and no candidate is proposed. There is no pixel diff here
248
- // (pixels passed), so `diffPath` is omitted — that, alongside
283
+ // (pixels passed), so `diffPath` is omitted. That, alongside
249
284
  // `a11yChanged`, is what marks a11y-only drift apart from pixel drift
250
285
  // downstream.
251
286
  const a11yDriftInCi = mode === 'ci' && a11yChanged;
@@ -256,16 +291,21 @@ async function captureAndCompare(options) {
256
291
  status: a11yDriftInCi ? 'changed' : 'pass',
257
292
  baselinePath: paths.baseline,
258
293
  actualPath: paths.actual,
259
- diffPixels: outcome.diffPixels,
260
- diffRatio: outcome.diffRatio,
261
- ssimScore: outcome.ssimScore,
294
+ diffPixels: score.diffPixels,
295
+ diffRatio: score.diffRatio,
296
+ ssimScore: score.ssimScore,
262
297
  a11yChanged: a11yChanged || undefined,
263
298
  a11yBaselinePath: a11yBaselinePathForRead,
264
299
  a11yActualPath: paths.a11yActual,
265
300
  });
266
301
  }
267
- await writePng(paths.diff, outcome.diffPng);
268
- // A `changed` action in CI mode proposes a new baseline — emit it to the
302
+ // Changed → the human needs the red-highlight overlay. This is the only
303
+ // branch that pays the pixelmatch-fill + PNG encode cost; it reuses the
304
+ // decode from scoreDiff above. The overlay is a transient report artifact
305
+ // (deleted the moment a later run passes), so it skips the recompress pass.
306
+ // It is already deflate-encoded by renderDiffOverlay.
307
+ await writeTransientPng(paths.diff, renderDiffOverlay(decoded, pixelThreshold));
308
+ // A `changed` action in CI mode proposes a new baseline. Emit it to the
269
309
  // candidate tree so approval is a plain tree copy. Local mode does not
270
310
  // (its comparison target is the auto-managed cache, not a human-approved
271
311
  // set); `writeCandidate` no-ops there.
@@ -275,9 +315,9 @@ async function captureAndCompare(options) {
275
315
  baselinePath: paths.baseline,
276
316
  actualPath: paths.actual,
277
317
  diffPath: paths.diff,
278
- diffPixels: outcome.diffPixels,
279
- diffRatio: outcome.diffRatio,
280
- ssimScore: outcome.ssimScore,
318
+ diffPixels: score.diffPixels,
319
+ diffRatio: score.diffRatio,
320
+ ssimScore: score.ssimScore,
281
321
  a11yChanged: a11yChanged || undefined,
282
322
  a11yBaselinePath: a11yBaselinePathForRead,
283
323
  a11yActualPath: paths.a11yActual,
@@ -285,14 +325,14 @@ async function captureAndCompare(options) {
285
325
  }
286
326
  catch (error) {
287
327
  if (error instanceof ScreenshotSizeMismatchError) {
288
- // Dimension drift is still a `changed` outcome — same candidate emission
328
+ // Dimension drift is still a `changed` outcome, same candidate emission
289
329
  // (CI only; `writeCandidate` no-ops in local mode).
290
330
  await writeCandidate(mode, paths, actualPng, a11yJson);
291
331
  // CONTRACT: this branch must NEVER emit `a11yChanged`. The a11y-only-drift
292
332
  // discriminator downstream is `a11yChanged === true`, and this pixel-drift
293
333
  // (size-mismatch) result already carries no `diffPath`. Were it to also set
294
334
  // `a11yChanged`, a consumer that (incorrectly) inferred a11y-only drift from
295
- // `!diffPath` would misclassify it — but the positive `a11yChanged` gate,
335
+ // `!diffPath` would misclassify it, but the positive `a11yChanged` gate,
296
336
  // which this branch deliberately leaves unset, keeps the two apart. The
297
337
  // locking test `never carries a11yChanged` guards this omission against a
298
338
  // future "cleanup" that would add it. See the `a11yChanged` doc in
@@ -316,20 +356,20 @@ async function captureAndCompare(options) {
316
356
  * Emits the proposed-new-baseline render (PNG + a11y companion) to the
317
357
  * report-rooted candidate tree (`<report>/candidates/<action>/<breakpoint>.*`).
318
358
  * The layout mirrors `paths.baselines` exactly, so approving a candidate set is
319
- * a plain tree copy. Routed through the same `writePng`/`writeText` seams as
320
- * every other write, so candidates inherit the lossless recompress pass for
321
- * free.
359
+ * a plain tree copy. A candidate is a proposed durable baseline, so it is
360
+ * routed through the durable `writeDurablePng`/`writeText` seams and inherits
361
+ * the lossless recompress pass. The promoted baseline is dense from the start.
322
362
  *
323
363
  * The candidate tree is a CI-only artifact: local mode self-diffs against the
324
364
  * per-machine cache and has no human-approval step, so it never proposes
325
- * candidates. The mode guard lives here — a single early-return — rather than
365
+ * candidates. The mode guard lives here (a single early-return) rather than
326
366
  * being repeated at each of the four call sites (`new`, pixel-`changed`,
327
367
  * size-mismatch, and CI a11y-only drift).
328
368
  */
329
369
  async function writeCandidate(mode, paths, actualPng, a11yJson) {
330
370
  if (mode !== 'ci')
331
371
  return;
332
- await writePng(paths.candidate, actualPng);
372
+ await writeDurablePng(paths.candidate, actualPng);
333
373
  await writeText(paths.a11yCandidate, a11yJson);
334
374
  }
335
375
  function resolveMasks(page, maskHints, parameters) {
@@ -339,14 +379,38 @@ function resolveMasks(page, maskHints, parameters) {
339
379
  return maskHints.map((hint) => resolveLocator(page, interpolateHint(hint, parameters)));
340
380
  }
341
381
  /**
342
- * Snapshots the page's accessibility tree as a YAML-shaped string. Two
343
- * runs of the same page produce byte-identical output so a simple string
344
- * comparison detects semantic changes (button label, role, structure)
345
- * without flagging visual-only drift.
382
+ * Snapshots the page's accessibility tree as a YAML-shaped string, exactly as
383
+ * Playwright's `ariaSnapshot()` emits it (an ordered YAML list where array order
384
+ * encodes DOM/reading order). Drift is detected by parsing this against the
385
+ * committed baseline and deep-equal comparing the trees, NOT by string equality,
386
+ * so pure serialization noise (indentation, quote style, mapping-key order,
387
+ * trailing whitespace) in a re-run or hand-edited baseline is not mistaken for a
388
+ * semantic change. See {@link a11yTreeChanged}.
346
389
  */
347
390
  async function captureA11yTree(page) {
348
391
  return page.locator('body').ariaSnapshot();
349
392
  }
393
+ /**
394
+ * True when two aria snapshots describe DIFFERENT accessibility trees. Both
395
+ * sides are parsed with the `yaml` package and deep-equal compared, so only a
396
+ * genuine tree change reads as drift: a different role, accessible name/label,
397
+ * added or removed node, or a reordering of siblings (list order is significant
398
+ * and preserved by the parse, so a real reading-order change still counts). What
399
+ * it deliberately ignores is serialization noise that `YAML.parse` normalizes
400
+ * away, indentation, quote style, mapping-key order, trailing whitespace, none
401
+ * of which changes the tree.
402
+ *
403
+ * A byte-identical fast path short-circuits the common unchanged case (two runs
404
+ * of the same page). Parse errors are NOT swallowed: `actual` is produced by our
405
+ * own {@link captureA11yTree}, so a parse failure there is a real capture bug,
406
+ * and a malformed committed baseline is worth surfacing loudly rather than
407
+ * silently reading as "unchanged". Either throws.
408
+ */
409
+ function a11yTreeChanged(baseline, actual) {
410
+ if (baseline === actual)
411
+ return false;
412
+ return !isDeepStrictEqual(parseYaml(baseline), parseYaml(actual));
413
+ }
350
414
  function baseResultFor(actionName, parameters, breakpoint, startedAt) {
351
415
  return {
352
416
  action: actionName,
@@ -1 +1 @@
1
- {"version":3,"file":"runAction.js","sourceRoot":"","sources":["../../src/runner/runAction.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAEL,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,SAAS,GACV,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAgB,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA+BhD,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACjC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AACrC,MAAM,yBAAyB,GAAG,MAAM,CAAC;AAEzC;;;;;;GAMG;AACH,MAA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AI,GAAG,0BAA0B,CAAC;QACvC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF"}
@@ -9,10 +9,18 @@ export interface RunStoryOptions {
9
9
  story: Story;
10
10
  file: string;
11
11
  needs: string[];
12
+ /**
13
+ * The needs used to resolve on-disk auth state, distinct from the
14
+ * scheduler-facing `needs` which a breakpoint pass strips to its in-pass
15
+ * subset (see {@link adaptNeedsForPass}). Retains the story's ORIGINAL needs
16
+ * so a consumer whose producer rendered in a different pass still loads that
17
+ * producer's persisted auth. Otherwise the consumer renders logged-out.
18
+ * Omitted by direct callers/tests, where it falls back to `needs`.
19
+ */
20
+ authNeeds?: string[];
12
21
  produces: string[];
13
22
  actions: Map<string, Action>;
14
23
  config: ResolvedConfig;
15
- headed: boolean;
16
24
  coverage?: CoverageCollector;
17
25
  /**
18
26
  * Render only this breakpoint. The run driver passes one breakpoint per
@@ -30,33 +38,36 @@ export interface RunStoryOptions {
30
38
  mode?: RunMode;
31
39
  }
32
40
  /**
33
- * Drives one story end-to-end on a freshly launched browser. Wraps the
34
- * context in Playwright tracing so a failed action leaves behind a
35
- * full-fidelity `trace.zip` for post-mortem in the Playwright trace viewer.
36
- * If the story declares `produces` labels, the post-run storage state is
37
- * persisted under `<authState>/<label>.json` so consumer stories can attach
38
- * to it without replaying the producer's actions.
39
- */
40
- export declare function runStory(options: RunStoryOptions): Promise<StoryResult>;
41
- /**
42
- * Drives every selected breakpoint of one story against an already-launched
43
- * browser. Split out from `runStory` (which owns browser lifecycle + fixtures)
44
- * so tests can exercise the per-breakpoint loop — context isolation, the
45
- * failed-action-does-not-abort-others guarantee, trace-zip uniqueness, `produces`
46
- * persistence, and the throw-closes-context invariant — against fake
47
- * Browser/BrowserContext/Page objects without launching a real Chromium.
41
+ * Drives every selected breakpoint of one story against the run's shared,
42
+ * already-launched browser. The run driver (`runAll`) launches ONE browser for
43
+ * the whole run and closes it once at the end, so this function never owns
44
+ * browser lifecycle. It only opens a fresh `browser.newContext()` per
45
+ * breakpoint. That per-breakpoint context is the isolation boundary: cookies,
46
+ * storage, and cache live on the context, not the browser, so stories sharing a
47
+ * browser never leak state into one another. Wraps each context in Playwright
48
+ * tracing so a failed action leaves behind a full-fidelity `trace.zip` for
49
+ * post-mortem in the Playwright trace viewer. If the story declares `produces`
50
+ * labels, the post-run storage state is persisted under
51
+ * `<authState>/<label>.json` so consumer stories can attach to it without
52
+ * replaying the producer's actions.
53
+ *
54
+ * Taking the browser as a parameter also lets tests exercise the per-breakpoint
55
+ * loop (context isolation, the failed-action-does-not-abort-others guarantee,
56
+ * trace-zip uniqueness, `produces` persistence, and the throw-closes-context
57
+ * invariant) against fake Browser/BrowserContext/Page objects without
58
+ * launching a real Chromium.
48
59
  */
49
60
  export declare function runStoryWithBrowser(browser: Browser, options: RunStoryOptions, startedAt: Date): Promise<StoryResult>;
50
61
  /**
51
62
  * Picks the breakpoint(s) this story runs at:
52
63
  *
53
- * - `story.breakpoints` set — run exactly those, REPLACING the project's
64
+ * - `story.breakpoints` set: run exactly those, REPLACING the project's
54
65
  * `config.breakpoints` (not intersected). The story's list stands alone:
55
66
  * it may name a mode the project does not, each selector resolved against
56
67
  * the registry, order preserved, duplicate names dropped (first wins). The
57
68
  * schema guarantees a non-empty list when the field is present.
58
69
  *
59
- * - omitted — run the project's `config.breakpoints`, in order (the default).
70
+ * - omitted: run the project's `config.breakpoints`, in order (the default).
60
71
  */
61
72
  export declare function resolveRunSet(story: Story, config: ResolvedConfig): ResolvedBreakpoint[];
62
73
  export declare function mergeStoryStatus(current: StoryStatus, next: StoryStatus): StoryStatus;
@@ -1 +1 @@
1
- {"version":3,"file":"runStory.d.ts","sourceRoot":"","sources":["../../src/runner/runStory.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,OAAO,EAGb,MAAM,YAAY,CAAC;AACpB,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EAC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AAgB,CAC9B,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,WAAW,GAChB,WAAW,CAEb"}
@@ -1,43 +1,39 @@
1
1
  import { access, mkdir } from 'node:fs/promises';
2
2
  import { join } from 'node:path';
3
- import { chromium, } from 'playwright';
3
+ import {} from 'playwright';
4
4
  import { resolveSelectorList, } from "../config.js";
5
5
  import { applyFixture } from "./bridges/database.js";
6
6
  import { runAction } from "./runAction.js";
7
7
  const TRACE_SUBDIR = 'traces';
8
8
  /**
9
- * Drives one story end-to-end on a freshly launched browser. Wraps the
10
- * context in Playwright tracing so a failed action leaves behind a
11
- * full-fidelity `trace.zip` for post-mortem in the Playwright trace viewer.
12
- * If the story declares `produces` labels, the post-run storage state is
13
- * persisted under `<authState>/<label>.json` so consumer stories can attach
14
- * to it without replaying the producer's actions.
15
- */
16
- export async function runStory(options) {
17
- const startedAt = new Date();
18
- // Fixtures are applied per breakpoint inside `runStoryWithBrowser`, not once
19
- // here — see the reseed comment in the breakpoint loop.
20
- const browser = await chromium.launch({ headless: !options.headed });
21
- try {
22
- return await runStoryWithBrowser(browser, options, startedAt);
23
- }
24
- finally {
25
- await browser.close();
26
- }
27
- }
28
- /**
29
- * Drives every selected breakpoint of one story against an already-launched
30
- * browser. Split out from `runStory` (which owns browser lifecycle + fixtures)
31
- * so tests can exercise the per-breakpoint loop — context isolation, the
32
- * failed-action-does-not-abort-others guarantee, trace-zip uniqueness, `produces`
33
- * persistence, and the throw-closes-context invariant — against fake
34
- * Browser/BrowserContext/Page objects without launching a real Chromium.
9
+ * Drives every selected breakpoint of one story against the run's shared,
10
+ * already-launched browser. The run driver (`runAll`) launches ONE browser for
11
+ * the whole run and closes it once at the end, so this function never owns
12
+ * browser lifecycle. It only opens a fresh `browser.newContext()` per
13
+ * breakpoint. That per-breakpoint context is the isolation boundary: cookies,
14
+ * storage, and cache live on the context, not the browser, so stories sharing a
15
+ * browser never leak state into one another. Wraps each context in Playwright
16
+ * tracing so a failed action leaves behind a full-fidelity `trace.zip` for
17
+ * post-mortem in the Playwright trace viewer. If the story declares `produces`
18
+ * labels, the post-run storage state is persisted under
19
+ * `<authState>/<label>.json` so consumer stories can attach to it without
20
+ * replaying the producer's actions.
21
+ *
22
+ * Taking the browser as a parameter also lets tests exercise the per-breakpoint
23
+ * loop (context isolation, the failed-action-does-not-abort-others guarantee,
24
+ * trace-zip uniqueness, `produces` persistence, and the throw-closes-context
25
+ * invariant) against fake Browser/BrowserContext/Page objects without
26
+ * launching a real Chromium.
35
27
  */
36
28
  export async function runStoryWithBrowser(browser, options, startedAt) {
37
- const { story, file, needs, produces, config, coverage } = options;
29
+ const { story, file, needs, authNeeds, produces, config, coverage } = options;
38
30
  // Resolve the storage state once: it is viewport-independent, so every
39
- // breakpoint context loads the same `needs` auth payload.
40
- const storageStatePath = await resolveStorageStateForNeeds(config, needs);
31
+ // breakpoint context loads the same auth payload. Uses `authNeeds` (the
32
+ // story's ORIGINAL needs) rather than the scheduler-facing `needs`, which a
33
+ // breakpoint pass strips to its in-pass subset. A consumer whose producer
34
+ // rendered in a different pass must still load that producer's off-disk auth.
35
+ // Falls back to `needs` for direct callers/tests that omit `authNeeds`.
36
+ const storageStatePath = await resolveStorageStateForNeeds(config, authNeeds ?? needs);
41
37
  // The run driver hands us a single breakpoint per call so each breakpoint is
42
38
  // its own reset/seed pass (the database-isolation guarantee). Direct
43
39
  // callers/tests that omit it fall back to the story's full run set, which
@@ -50,7 +46,7 @@ export async function runStoryWithBrowser(browser, options, startedAt) {
50
46
  // failed if any breakpoint had a failed/skipped action, else changed if any
51
47
  // breakpoint drifted or introduced a new baseline, else pass.
52
48
  let storyStatus = 'pass';
53
- // `produces` writes the post-run storage state exactly once — from the first
49
+ // `produces` writes the post-run storage state exactly once, from the first
54
50
  // breakpoint whose action sequence did not fail. Persisting per breakpoint
55
51
  // would redundantly rewrite (and risk clobbering) the same `<label>.json`
56
52
  // with state that is identical for auth purposes; one good run is enough.
@@ -62,15 +58,15 @@ export async function runStoryWithBrowser(browser, options, startedAt) {
62
58
  let firstTracePath;
63
59
  for (const breakpoint of runSet) {
64
60
  // Apply the story's own fixtures before the breakpoint context launches.
65
- // The deeper cross-breakpoint isolation — a destructive story (change
61
+ // The deeper cross-breakpoint isolation, a destructive story (change
66
62
  // password, empty read history) mutating globally-seeded rows it does not
67
- // own a fixture for — is handled one level up: the run driver executes each
63
+ // own a fixture for, is handled one level up: the run driver executes each
68
64
  // breakpoint as a separate pass behind a full `database.reset()`, so this
69
65
  // call only owns the story-local seed. Fixtures stay idempotent (each
70
66
  // deletes its own rows before re-inserting), so a non-mutating story pays
71
67
  // just a cheap re-apply. When this loop runs multiple breakpoints itself
72
68
  // (a direct caller that passed no single `breakpoint`), the fixture re-apply
73
- // is the only reset between them — that path does not get the per-pass DB
69
+ // is the only reset between them. That path does not get the per-pass DB
74
70
  // reset, so destructive multi-breakpoint stories must run through the driver.
75
71
  for (const fixture of story.fixtures ?? []) {
76
72
  await applyFixture(config, fixture);
@@ -84,13 +80,13 @@ export async function runStoryWithBrowser(browser, options, startedAt) {
84
80
  });
85
81
  // The whole per-breakpoint lifecycle runs under try/finally so the context
86
82
  // is ALWAYS closed, even when something inside throws. Throw policy: an
87
- // *action* failing is a normal visual-regression outcome — it returns a
83
+ // *action* failing is a normal visual-regression outcome. It returns a
88
84
  // `failed` ActionResult, the loop records it, and the remaining breakpoints
89
85
  // still run (the documented "one breakpoint failing does not abort the
90
86
  // others" guarantee). A *thrown* exception here is different: it means the
91
87
  // harness itself faulted (tracing/coverage threw, the page crashed, an
92
88
  // unexpected error escaped `runActionsForBreakpoint`). That is not a diff to
93
- // report — it is an infra fault, so we let it propagate and abort the whole
89
+ // report. It is an infra fault, so we let it propagate and abort the whole
94
90
  // story. The `finally` guarantees we still close this context first, so a
95
91
  // throw can never leak the in-flight BrowserContext (the bug this guards).
96
92
  try {
@@ -117,8 +113,8 @@ export async function runStoryWithBrowser(browser, options, startedAt) {
117
113
  firstTracePath = tracePath;
118
114
  }
119
115
  // Persist once, from the first breakpoint that ran clean. A failure in
120
- // this breakpoint does not abort the loop — the remaining breakpoints
121
- // still run so the report shows every mode — but it cannot supply the
116
+ // this breakpoint does not abort the loop (the remaining breakpoints
117
+ // still run so the report shows every mode) but it cannot supply the
122
118
  // auth state.
123
119
  if (!producedPersisted &&
124
120
  breakpointRun.status !== 'failed' &&
@@ -146,13 +142,13 @@ export async function runStoryWithBrowser(browser, options, startedAt) {
146
142
  /**
147
143
  * Picks the breakpoint(s) this story runs at:
148
144
  *
149
- * - `story.breakpoints` set — run exactly those, REPLACING the project's
145
+ * - `story.breakpoints` set: run exactly those, REPLACING the project's
150
146
  * `config.breakpoints` (not intersected). The story's list stands alone:
151
147
  * it may name a mode the project does not, each selector resolved against
152
148
  * the registry, order preserved, duplicate names dropped (first wins). The
153
149
  * schema guarantees a non-empty list when the field is present.
154
150
  *
155
- * - omitted — run the project's `config.breakpoints`, in order (the default).
151
+ * - omitted: run the project's `config.breakpoints`, in order (the default).
156
152
  */
157
153
  export function resolveRunSet(story, config) {
158
154
  if (story.breakpoints && story.breakpoints.length > 0) {
@@ -179,7 +175,7 @@ export function mergeStoryStatus(current, next) {
179
175
  * Runs every action of the story once, in order, against a single breakpoint's
180
176
  * page. Preserves the existing within-breakpoint fail-fast: once an action
181
177
  * fails (or names an unknown action), the remaining actions of THIS breakpoint
182
- * are skipped — we never screenshot state that follows a broken step. The
178
+ * are skipped. We never screenshot state that follows a broken step. The
183
179
  * returned status is scoped to this breakpoint; the caller merges it into the
184
180
  * story-wide status across all breakpoints.
185
181
  */
@@ -256,7 +252,7 @@ async function resolveStorageStateForNeeds(config, needs) {
256
252
  catch {
257
253
  // Producer ran but did not emit a storage state file. That is fine
258
254
  // when the label only carries an ordering constraint, not an auth
259
- // payload — fall through to the next label.
255
+ // payload. Fall through to the next label.
260
256
  }
261
257
  }
262
258
  return undefined;