verifaied 0.36.1.dev102__tar.gz → 0.37.0.dev103__tar.gz

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 (93) hide show
  1. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/PKG-INFO +1 -1
  2. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/pyproject.toml +1 -1
  3. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/cli.py +18 -14
  4. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/client.py +8 -0
  5. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/record.py +4 -1
  6. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/repo_config.py +16 -10
  7. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/testcmd.py +46 -9
  8. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/video_render.py +14 -0
  9. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_client.py +49 -0
  10. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_record.py +4 -0
  11. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_testcmd.py +139 -22
  12. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_video_render.py +4 -0
  13. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/uv.lock +1 -1
  14. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/.gitignore +0 -0
  15. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/LICENSE +0 -0
  16. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/README.md +0 -0
  17. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/__init__.py +0 -0
  18. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/__main__.py +0 -0
  19. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/agent_mcp.py +0 -0
  20. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/agent_steps.py +0 -0
  21. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/analyzer.py +0 -0
  22. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/audit.py +0 -0
  23. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/collect_browser.js +0 -0
  24. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/collect_browser.py +0 -0
  25. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/config.py +0 -0
  26. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/credentials.py +0 -0
  27. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/failure_text.py +0 -0
  28. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/finishing.py +0 -0
  29. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/instrument.py +0 -0
  30. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/instrument_snippets.py +0 -0
  31. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/instrumenter.js +0 -0
  32. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/instrumenter.py +0 -0
  33. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/lanes.py +0 -0
  34. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/logincmd.py +0 -0
  35. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/prompts.py +0 -0
  36. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/proxy.py +0 -0
  37. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/recorder_driver.js +0 -0
  38. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/recorder_observer.js +0 -0
  39. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/recorder_picker.js +0 -0
  40. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/recorder_refs.js +0 -0
  41. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/recorder_spec.js +0 -0
  42. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/replay_harvest.ts +0 -0
  43. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/run_reporter.js +0 -0
  44. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/runner_dir.py +0 -0
  45. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/setupcmd.py +0 -0
  46. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/skill/SKILL.md +0 -0
  47. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/skill/reference/commands.md +0 -0
  48. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/skillcmd.py +0 -0
  49. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/source_index.py +0 -0
  50. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/stepcheck.py +0 -0
  51. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/subprocess_util.py +0 -0
  52. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/suite_report.py +0 -0
  53. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/uploader.py +0 -0
  54. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/varcmd.py +0 -0
  55. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/src/verifaied/video_render.js +0 -0
  56. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/__init__.py +0 -0
  57. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/conftest.py +0 -0
  58. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_agent_mcp.py +0 -0
  59. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_audit.py +0 -0
  60. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_browser_settings_parity.py +0 -0
  61. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_caption_parity.py +0 -0
  62. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_check.py +0 -0
  63. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_check_done.py +0 -0
  64. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_clear_manual.py +0 -0
  65. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_cli.py +0 -0
  66. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_collect_browser.py +0 -0
  67. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_config.py +0 -0
  68. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_console_label_parity.py +0 -0
  69. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_credentials.py +0 -0
  70. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_finishing.py +0 -0
  71. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_help_markup.py +0 -0
  72. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_instrument.py +0 -0
  73. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_instrument_detect.py +0 -0
  74. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_instrument_snippets.py +0 -0
  75. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_instrumenter.py +0 -0
  76. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_lanes.py +0 -0
  77. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_login_commands.py +0 -0
  78. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_logincmd.py +0 -0
  79. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_pause_parity.py +0 -0
  80. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_prompt_parity.py +0 -0
  81. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_proxy.py +0 -0
  82. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_render_parity.py +0 -0
  83. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_replay_harvest_runner.py +0 -0
  84. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_repo_config.py +0 -0
  85. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_setupcmd.py +0 -0
  86. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_skill_parity.py +0 -0
  87. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_skillcmd.py +0 -0
  88. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_source_index.py +0 -0
  89. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_stepcheck_parity.py +0 -0
  90. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_suite_report.py +0 -0
  91. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_uploader.py +0 -0
  92. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_varcmd.py +0 -0
  93. {verifaied-0.36.1.dev102 → verifaied-0.37.0.dev103}/tests/test_video_render_runner.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: verifaied
3
- Version: 0.36.1.dev102
3
+ Version: 0.37.0.dev103
4
4
  Summary: Find what's untested in your code — locally, no account required
5
5
  Project-URL: Homepage, https://pypi.org/project/verifaied/
6
6
  Author: Kyle Richards
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "verifaied"
3
- version = "0.36.1.dev102"
3
+ version = "0.37.0.dev103"
4
4
  description = "Find what's untested in your code — locally, no account required"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -2087,19 +2087,20 @@ def test_run_command(
2087
2087
  "`watch` lingers on every action; `off` records without any of "
2088
2088
  "it and skips the pauses the flow asks for. Overrides "
2089
2089
  "replay_show_actions_ms / replay_slow_mo_ms / replay_cursor_ms / "
2090
- "replay_type_delay_ms / replay_pauses for this run. The run "
2091
- "itself goes at full speed and the paced video is rendered "
2092
- "afterwards, unless --no-render."
2090
+ "replay_type_delay_ms / replay_pauses for this run."
2093
2091
  ),
2094
2092
  ),
2095
- no_render: bool = typer.Option(
2096
- False,
2097
- "--no-render",
2093
+ render: bool | None = typer.Option(
2094
+ None,
2095
+ "--render/--no-render",
2098
2096
  help=(
2099
- "Pace each replay live, slowing the browser down so its own "
2100
- "recording is the paced video, instead of running at full speed "
2101
- "and rendering the paced video afterwards. Same as "
2102
- "replay_render = false for this run."
2097
+ "Whether to run at full speed and render the paced video "
2098
+ "afterwards (--render) or pace the replay live, slowing the "
2099
+ "browser down so its own recording is the paced video "
2100
+ "(--no-render). Default: a test named on its own is paced live, "
2101
+ "because somebody is about to watch it; --all and --folder run "
2102
+ "fast. A rendered video holds one frame still through each "
2103
+ "pause, so on a page that animates the live one is the smoother."
2103
2104
  ),
2104
2105
  ),
2105
2106
  retries: int = typer.Option(
@@ -2158,9 +2159,12 @@ def test_run_command(
2158
2159
  of the app with its own reset. Only this flag turns it on: the
2159
2160
  Settings page's "Tests run at once" is for the studio.
2160
2161
 
2161
- Each replay runs at full speed and its paced video — cursor, marks,
2162
- typing, captions and holds — is rendered afterwards, in the background
2163
- while the next test runs. ``--no-render`` paces each one live instead.
2162
+ A test named on its own is paced live: the browser is slowed down
2163
+ and its own recording is the video, the way somebody about to watch
2164
+ it wants it. ``--all`` and ``--folder`` run each replay at full speed
2165
+ and render its paced video — cursor, marks, typing, captions and
2166
+ holds — afterwards, in the background while the next test runs.
2167
+ ``--render`` and ``--no-render`` choose for this run either way.
2164
2168
 
2165
2169
  Exit codes:
2166
2170
 
@@ -2195,7 +2199,7 @@ def test_run_command(
2195
2199
  video=video.value if video is not None else None,
2196
2200
  retries=retries,
2197
2201
  parallel=parallel,
2198
- no_render=no_render,
2202
+ render=render,
2199
2203
  )
2200
2204
  except (RecordedTestError, UploaderError) as e:
2201
2205
  err_console.print(f"[red]VerifAIed error[/red]: {e}")
@@ -328,10 +328,16 @@ def upload_artifact(
328
328
  path: Path,
329
329
  kind: str,
330
330
  label: str | None = None,
331
+ pacing: str | None = None,
331
332
  timeout: float = 120.0,
332
333
  ) -> dict[str, Any]:
333
334
  """Attach a file — a video, a screenshot, a Playwright trace — to a session.
334
335
 
336
+ ``pacing`` says how a video was made (``live``, ``rendered`` or
337
+ ``unpaced``), which is what lets the service keep a live one when a
338
+ later fast run would otherwise replace it. A service older than the
339
+ field ignores it.
340
+
335
341
  Streamed as multipart with a generous timeout: a trace archive is tens
336
342
  of megabytes and the server hashes it on the way through, so the
337
343
  default 60s used elsewhere is too tight to be safe. Retried like
@@ -341,6 +347,8 @@ def upload_artifact(
341
347
  data: dict[str, str] = {"kind": kind}
342
348
  if label is not None:
343
349
  data["label"] = label
350
+ if pacing is not None:
351
+ data["pacing"] = pacing
344
352
 
345
353
  def send() -> httpx.Response:
346
354
  # Reopened per attempt: a retry has to stream the file from the top.
@@ -501,6 +501,7 @@ def upload_artifacts(
501
501
  console: Console,
502
502
  err_console: Console,
503
503
  labels: Mapping[Path, str] | None = None,
504
+ pacing: Mapping[Path, str] | None = None,
504
505
  ) -> int:
505
506
  """Attach each harvested file to the session; returns how many landed.
506
507
 
@@ -511,7 +512,8 @@ def upload_artifacts(
511
512
 
512
513
  ``labels`` names a file whose label is not its place under
513
514
  ``results_root`` — a paced video rendered elsewhere, standing in for
514
- the run's own, or a video kept unpaced and saying so.
515
+ the run's own, or a video kept unpaced and saying so. ``pacing`` says
516
+ how a video was made, for the ones somebody can say it of.
515
517
  """
516
518
  uploaded = 0
517
519
  for kind, path in items:
@@ -531,6 +533,7 @@ def upload_artifacts(
531
533
  path=path,
532
534
  kind=kind,
533
535
  label=(labels or {}).get(path) or artifact_label(path, results_root),
536
+ pacing=(pacing or {}).get(path),
534
537
  )
535
538
  except ApiError as e:
536
539
  err_console.print(
@@ -68,7 +68,7 @@ the app is:
68
68
  replay_captions = true # draw each step's caption on the video
69
69
  replay_viewport = "1280x900" # the replay's page size — and its video's
70
70
  replay_video_step_banner = true # name the test in the corner
71
- replay_render = true # run headless at full speed, pace the video after
71
+ replay_render = true # run a batch at full speed, pace its videos after
72
72
 
73
73
  And two keys about **authoring**, which the studio reads off the recording
74
74
  and may override for one recording:
@@ -124,12 +124,16 @@ trace) whatever this says.
124
124
  ``replay_video_step_banner`` pins the test's own name in a corner of the
125
125
  video, for the reader who has more than one of them open.
126
126
 
127
- ``replay_render`` is how a headless replay makes its video. On, the
128
- browser runs at full speed — no cursor, no marks, no typing delay and no
129
- hold after a check — and the paced video is rendered afterwards from what
130
- the run captured, so it still follows every key above. Off, the browser
131
- itself is slowed down so its own recording is the paced video. A headed
132
- replay is always paced live, because somebody is watching it.
127
+ ``replay_render`` is how a replay nobody asked to see makes its video — a
128
+ ``test run --all`` or ``--folder``, a batch queued from the web, CI. On,
129
+ the browser runs at full speed — no cursor, no marks, no typing delay and
130
+ no hold after a check — and the paced video is rendered afterwards from
131
+ what the run captured, so it still follows every key above; it holds one
132
+ frame still through each pause, which on a page that animates is less
133
+ smooth than a live video. Off, the browser itself is slowed down so its
134
+ own recording is the paced video. A headed replay is always paced live,
135
+ because somebody is watching it, and so is a test somebody just recorded
136
+ or ran by name, because they are about to.
133
137
 
134
138
  ``assertion_pause_ms`` is how long every *new* check holds the video on
135
139
  what it just checked, so a reader can see it: the studio, the assistant
@@ -382,9 +386,11 @@ class ReplayConfig:
382
386
  that size rather than Playwright's default of "scaled to fit 800
383
387
  pixels".
384
388
 
385
- ``render`` is whether a headless replay runs at full speed and has its
386
- paced video rendered afterwards (see ``video_render.py``), rather than
387
- being slowed down so that its own recording is the paced video.
389
+ ``render`` is whether an unattended headless replay — one of a batch
390
+ — runs at full speed and has its paced video rendered afterwards (see
391
+ ``video_render.py``), rather than being slowed down so that its own
392
+ recording is the paced video. A replay somebody asked to see is paced
393
+ live whatever this says (``capture_refusal``).
388
394
  """
389
395
 
390
396
  slow_mo_ms: int = DEFAULT_REPLAY_SLOW_MO_MS
@@ -187,6 +187,7 @@ from verifaied.video_render import (
187
187
  ACTION_CAPTION_FONT_PX,
188
188
  ACTION_CAPTION_POSITION,
189
189
  CAPTURE_TYPE_DELAY_MS,
190
+ PACING_LIVE,
190
191
  VIDEO_UNPACED,
191
192
  Rendered,
192
193
  render_paced_videos,
@@ -3304,7 +3305,12 @@ _LIVE_ONLY = re.compile(
3304
3305
 
3305
3306
 
3306
3307
  def capture_refusal(
3307
- replay: ReplayConfig, *, headed: bool, harvested: bool, run_text: str
3308
+ replay: ReplayConfig,
3309
+ *,
3310
+ headed: bool,
3311
+ harvested: bool,
3312
+ run_text: str,
3313
+ unattended: bool,
3308
3314
  ) -> str | None:
3309
3315
  """Why this replay cannot run fast and have its video paced afterwards,
3310
3316
  or None when it can.
@@ -3312,12 +3318,18 @@ def capture_refusal(
3312
3318
  ``harvested`` says the spec runs through the harvest module, which is
3313
3319
  what records the run; ``run_text`` is every line the run will execute,
3314
3320
  the chain's included. A headed run is somebody watching, and is paced
3315
- live for them. ``None`` for a quiet reason is the caller's to print.
3321
+ live for them. So is one that is not ``unattended`` — a test somebody
3322
+ just made or asked for by name, whose video they are about to watch: a
3323
+ render freezes one frame for each hold, and on a page that is still
3324
+ moving that is not the video a live run makes. ``None`` for a quiet
3325
+ reason is the caller's to print.
3316
3326
  """
3317
3327
  if headed:
3318
3328
  return "somebody is watching this run"
3319
3329
  if not replay.render:
3320
3330
  return "replay_render is off"
3331
+ if not unattended:
3332
+ return "its video is one somebody asked to see"
3321
3333
  if not harvested:
3322
3334
  return "the spec does not run through the harvest"
3323
3335
  if _LIVE_ONLY.search(run_text):
@@ -4095,9 +4107,14 @@ def replay_spec(
4095
4107
  finisher: FinishPool | None = None,
4096
4108
  on_finished: Callable[[int, str], None] | None = None,
4097
4109
  request_id: UUID | None = None,
4110
+ unattended: bool = False,
4098
4111
  ) -> int:
4099
4112
  """Run one recorded spec and record everything it produced.
4100
4113
 
4114
+ ``unattended`` says nobody asked to see this run in particular — it is
4115
+ one of a batch — which is the only kind that runs fast and has its
4116
+ video rendered afterwards. Everything else is paced live.
4117
+
4101
4118
  This is where a recorded test becomes evidence: the spec runs with
4102
4119
  video and trace on, under the coverage collector, against a session
4103
4120
  linked to the test. Video, trace and coverage all land on that session,
@@ -4466,9 +4483,17 @@ def replay_spec(
4466
4483
  headed=headed,
4467
4484
  harvested=harvested,
4468
4485
  run_text=run_text,
4486
+ unattended=unattended,
4469
4487
  )
4470
4488
  capture = refusal is None and wants_render(replay_config, run_text)
4471
- if refusal is not None and not headed and replay_config.render:
4489
+ # Said only of a run that was meant to go fast: one paced
4490
+ # live because that is what it is has nothing to explain.
4491
+ if (
4492
+ refusal is not None
4493
+ and not headed
4494
+ and replay_config.render
4495
+ and unattended
4496
+ ):
4472
4497
  console.print(f"[dim]Pacing this run live: {refusal}.[/dim]")
4473
4498
  holds = (
4474
4499
  HoldMode.SKIP
@@ -4700,7 +4725,8 @@ def _upload_evidence(
4700
4725
  """
4701
4726
  items = new_artifacts_under(output_dir)
4702
4727
  labels: dict[Path, str] = {}
4703
- outcome = "live" if any(kind == "video" for kind, _ in items) else "none"
4728
+ pacing = {path: PACING_LIVE for kind, path in items if kind == "video"}
4729
+ outcome = "live" if pacing else "none"
4704
4730
  if capture:
4705
4731
  rendered: Rendered = render_paced_videos(
4706
4732
  items,
@@ -4715,6 +4741,7 @@ def _upload_evidence(
4715
4741
  stop=stop,
4716
4742
  )
4717
4743
  items, labels, outcome = rendered.items, rendered.labels, rendered.outcome
4744
+ pacing = rendered.pacing
4718
4745
  if stop is not None and stop.is_set():
4719
4746
  return "none"
4720
4747
  upload_artifacts(
@@ -4726,6 +4753,7 @@ def _upload_evidence(
4726
4753
  console=console,
4727
4754
  err_console=err_console,
4728
4755
  labels=labels,
4756
+ pacing=pacing,
4729
4757
  )
4730
4758
  return outcome
4731
4759
 
@@ -9790,6 +9818,10 @@ def _run_requested(
9790
9818
  finisher=finisher,
9791
9819
  on_finished=finished if settle is not None else None,
9792
9820
  request_id=request_id if finisher is not None else None,
9821
+ # A headless request is the web's Run all, a folder's Run or a
9822
+ # batch: nobody asked to see any one of them. A single row's Run
9823
+ # is headed, and paced live for whoever pressed it.
9824
+ unattended=not headed,
9793
9825
  )
9794
9826
  # Honoured, not merely asked: a stop that arrived after the replay
9795
9827
  # ended on its own leaves a real verdict on the session, and the
@@ -10016,7 +10048,7 @@ def run_test_run(
10016
10048
  video: str | None = None,
10017
10049
  retries: int = 0,
10018
10050
  parallel: int = 1,
10019
- no_render: bool = False,
10051
+ render: bool | None = None,
10020
10052
  ) -> int:
10021
10053
  """Replay one recorded test, every ready one, or a folder of them.
10022
10054
 
@@ -10063,8 +10095,11 @@ def run_test_run(
10063
10095
  Each fast replay's video is rendered, and its evidence attached, in the
10064
10096
  background while the next test runs (:class:`FinishPool`); the command
10065
10097
  returns once every one of them is finished, and a close that failed
10066
- there still turns a pass into 2. ``no_render`` paces every replay
10067
- live instead, as ``replay_render = false`` does.
10098
+ there still turns a pass into 2. Only ``--all`` and ``--folder`` run
10099
+ fast: a test asked for by name is one somebody wants to see, and is
10100
+ paced live. ``render`` overrides that either way for this run — True
10101
+ runs a named test fast too, False paces every replay live, as
10102
+ ``replay_render = false`` does.
10068
10103
  """
10069
10104
  if retries < 0:
10070
10105
  raise RecordedTestError("--retries must be 0 or more")
@@ -10180,8 +10215,9 @@ def run_test_run(
10180
10215
  {"profile": video} if video is not None else None,
10181
10216
  )
10182
10217
 
10183
- if no_render:
10184
- override = replace_fields(override, render=False)
10218
+ if render is not None:
10219
+ override = replace_fields(override, render=render)
10220
+ unattended = ref is None if render is None else render
10185
10221
  # Sized once the lanes are known, below: one worker per lane.
10186
10222
  finisher_box: list[FinishPool] = []
10187
10223
  # Each test's last word — its final code and what became of its video —
@@ -10212,6 +10248,7 @@ def run_test_run(
10212
10248
  test=test,
10213
10249
  runner_dir=resolved_runner_dir,
10214
10250
  replay_override=override,
10251
+ unattended=unattended,
10215
10252
  # Replaying a saved spec is a suite run, whoever typed the
10216
10253
  # command — nobody is driving the browser.
10217
10254
  driver="suite",
@@ -112,6 +112,13 @@ MASK = "••••"
112
112
  # by why: ``unpaced: <reason>``.
113
113
  VIDEO_UNPACED = "unpaced"
114
114
 
115
+ # How a video was made, as the service records it beside the file: by the
116
+ # browser itself, slowed down for somebody to watch; rendered afterwards
117
+ # from a fast run; or a fast run's own video, which could not be rendered.
118
+ PACING_LIVE = "live"
119
+ PACING_RENDERED = "rendered"
120
+ PACING_UNPACED = "unpaced"
121
+
115
122
  # How long a render may take before it is given up: twice the video it is
116
123
  # making, and never under a minute — a busy machine composites slowly.
117
124
  MIN_RENDER_TIMEOUT_S = 60.0
@@ -925,6 +932,9 @@ class Rendered:
925
932
  labels: dict[Path, str]
926
933
  # "paced", "unpaced: <why>", or "none" when there was no video.
927
934
  outcome: str
935
+ # How each video in ``items`` came to be: ``PACING_RENDERED`` for a
936
+ # render, ``PACING_UNPACED`` for a run's own video kept as it was.
937
+ pacing: dict[Path, str] = field(default_factory=dict)
928
938
 
929
939
 
930
940
  def render_paced_videos(
@@ -956,6 +966,7 @@ def render_paced_videos(
956
966
  return Rendered(items=list(items), labels={}, outcome="none")
957
967
  out_items: list[tuple[str, Path]] = []
958
968
  labels: dict[Path, str] = {}
969
+ pacing: dict[Path, str] = {}
959
970
  outcomes: list[str] = []
960
971
  by_dir: dict[Path, list[Path]] = {}
961
972
  for _kind, path in videos:
@@ -994,10 +1005,12 @@ def render_paced_videos(
994
1005
  f"[yellow]kept the unpaced video[/yellow]{_for(label)}: {e}"
995
1006
  )
996
1007
  labels[paths[0]] = f"{own} (unpaced)"
1008
+ pacing.update(dict.fromkeys(paths, PACING_UNPACED))
997
1009
  outcomes.append(f"{VIDEO_UNPACED}: {e}")
998
1010
  continue
999
1011
  swapped[paths[0]] = out
1000
1012
  labels[out] = own
1013
+ pacing[out] = PACING_RENDERED
1001
1014
  outcomes.append("paced")
1002
1015
  console.print(
1003
1016
  f"[dim]Rendered the paced video{_for(label)} "
@@ -1010,6 +1023,7 @@ def render_paced_videos(
1010
1023
  items=out_items,
1011
1024
  labels=labels,
1012
1025
  outcome="paced" if paced else next(o for o in outcomes if o != "paced"),
1026
+ pacing=pacing,
1013
1027
  )
1014
1028
 
1015
1029
 
@@ -701,6 +701,55 @@ def test_upload_artifact_posts_multipart(httpx_mock: HTTPXMock, tmp_path):
701
701
  assert "application/zip" in body
702
702
 
703
703
 
704
+ def test_upload_artifact_says_how_a_video_was_made(httpx_mock: HTTPXMock, tmp_path):
705
+ session_id = uuid4()
706
+ video = tmp_path / "video.webm"
707
+ video.write_bytes(b"webm")
708
+ httpx_mock.add_response(
709
+ method="POST",
710
+ url=f"http://api.test/sessions/{session_id}/artifacts",
711
+ status_code=201,
712
+ json={"id": str(uuid4()), "kind": "video"},
713
+ )
714
+
715
+ upload_artifact(
716
+ api_url="http://api.test",
717
+ token="vr_live_tok",
718
+ session_id=session_id,
719
+ path=video,
720
+ kind="video",
721
+ pacing="live",
722
+ )
723
+
724
+ body = httpx_mock.get_request().content.decode("latin-1")
725
+ assert 'name="pacing"\r\n\r\nlive\r\n' in body
726
+ assert 'name="label"' not in body
727
+
728
+
729
+ def test_upload_artifact_says_nothing_of_pacing_it_was_not_told(
730
+ httpx_mock: HTTPXMock, tmp_path
731
+ ):
732
+ session_id = uuid4()
733
+ trace = tmp_path / "trace.zip"
734
+ trace.write_bytes(b"PK")
735
+ httpx_mock.add_response(
736
+ method="POST",
737
+ url=f"http://api.test/sessions/{session_id}/artifacts",
738
+ status_code=201,
739
+ json={"id": str(uuid4()), "kind": "trace"},
740
+ )
741
+
742
+ upload_artifact(
743
+ api_url="http://api.test",
744
+ token="vr_live_tok",
745
+ session_id=session_id,
746
+ path=trace,
747
+ kind="trace",
748
+ )
749
+
750
+ assert 'name="pacing"' not in httpx_mock.get_request().content.decode("latin-1")
751
+
752
+
704
753
  def test_upload_artifact_infers_png_media_type(httpx_mock: HTTPXMock, tmp_path):
705
754
  shot = tmp_path / "failure.PNG"
706
755
  shot.write_bytes(b"\x89PNG")
@@ -1600,6 +1600,7 @@ def test_upload_artifacts_attaches_each_file(tmp_path: Path):
1600
1600
  "path": trace,
1601
1601
  "kind": "trace",
1602
1602
  "label": "slug",
1603
+ "pacing": None,
1603
1604
  }
1604
1605
  assert "attached 1 artifact(s)" in " ".join(
1605
1606
  str(c) for c in console.print.call_args_list
@@ -1621,9 +1622,12 @@ def test_upload_artifacts_takes_a_label_it_is_given(tmp_path: Path):
1621
1622
  console=MagicMock(),
1622
1623
  err_console=MagicMock(),
1623
1624
  labels={paced: "slug"},
1625
+ pacing={paced: "rendered"},
1624
1626
  )
1625
1627
  assert count == 2
1626
1628
  assert [c.kwargs["label"] for c in up.call_args_list] == ["slug", "slug"]
1629
+ # How it was made is said of the video, and of nothing else.
1630
+ assert [c.kwargs["pacing"] for c in up.call_args_list] == [None, "rendered"]
1627
1631
  assert [c.kwargs["kind"] for c in up.call_args_list] == ["trace", "video"]
1628
1632
 
1629
1633
 
@@ -1578,6 +1578,8 @@ def _replay(
1578
1578
  on_finished=None,
1579
1579
  retry_follows: bool = False,
1580
1580
  closed: MagicMock | None = None,
1581
+ unattended: bool = False,
1582
+ console=None,
1581
1583
  ):
1582
1584
  root = _repo(tmp_path)
1583
1585
  row = test or _test_row()
@@ -1620,7 +1622,7 @@ def _replay(
1620
1622
  driver="suite",
1621
1623
  port=0,
1622
1624
  interval=0.01,
1623
- console=_console(),
1625
+ console=console or _console(),
1624
1626
  err_console=_console(),
1625
1627
  headed=headed,
1626
1628
  env_name=env_name,
@@ -1631,6 +1633,7 @@ def _replay(
1631
1633
  finisher=finisher,
1632
1634
  on_finished=on_finished,
1633
1635
  retry_follows=retry_follows,
1636
+ unattended=unattended,
1634
1637
  )
1635
1638
  if finisher is not None:
1636
1639
  # Inside the patches: the pool's thread closes the session.
@@ -3390,8 +3393,38 @@ def test_ctrl_c_while_waiting_on_the_videos_stops_them_and_closes_every_session(
3390
3393
  assert seen == [(True, RUN_INTERRUPTED_MESSAGE)]
3391
3394
 
3392
3395
 
3393
- def test_no_render_paces_every_replay_live(tmp_path: Path):
3394
- _code, replayed = _run(tmp_path, rows=[_test_row()], codes=[0], no_render=True)
3396
+ def test_a_test_asked_for_by_name_is_paced_live(tmp_path: Path):
3397
+ """Somebody named it, so somebody is about to watch it — and the
3398
+ repository's own switch is left as it was."""
3399
+ _code, replayed = _run(tmp_path, rows=[_test_row()], codes=[0])
3400
+ assert replayed.call_args.kwargs["unattended"] is False
3401
+ assert replayed.call_args.kwargs["replay_override"].render is True
3402
+
3403
+
3404
+ @pytest.mark.parametrize(
3405
+ "form", [{"run_all": True, "ref": None}, {"folder": "Settings", "ref": None}]
3406
+ )
3407
+ def test_a_batch_runs_fast(tmp_path: Path, form: dict):
3408
+ """One test in the folder or twenty: nobody asked to see any one."""
3409
+ _code, replayed = _run(tmp_path, rows=[_test_row()], codes=[0], **form)
3410
+ assert replayed.call_args.kwargs["unattended"] is True
3411
+ assert replayed.call_args.kwargs["replay_override"].render is True
3412
+
3413
+
3414
+ def test_render_runs_a_named_test_fast_whatever_the_repository_says(tmp_path: Path):
3415
+ path = tmp_path / CONFIG_PATH
3416
+ path.parent.mkdir(parents=True, exist_ok=True)
3417
+ path.write_text("[browser-tests]\nreplay_render = false\n", "utf-8")
3418
+ _code, replayed = _run(tmp_path, rows=[_test_row()], codes=[0], render=True)
3419
+ assert replayed.call_args.kwargs["unattended"] is True
3420
+ assert replayed.call_args.kwargs["replay_override"].render is True
3421
+
3422
+
3423
+ def test_no_render_paces_every_replay_of_a_batch_live(tmp_path: Path):
3424
+ _code, replayed = _run(
3425
+ tmp_path, rows=[_test_row()], codes=[0], run_all=True, ref=None, render=False
3426
+ )
3427
+ assert replayed.call_args.kwargs["unattended"] is False
3395
3428
  assert replayed.call_args.kwargs["replay_override"].render is False
3396
3429
 
3397
3430
 
@@ -4200,15 +4233,17 @@ def test_test_run_command_sends_no_profile_when_the_flag_is_absent(monkeypatch):
4200
4233
  assert run.call_args.kwargs["video"] is None
4201
4234
 
4202
4235
 
4203
- def test_test_run_command_forwards_no_render(monkeypatch):
4236
+ def test_test_run_command_forwards_the_render_choice(monkeypatch):
4204
4237
  monkeypatch.setenv(ENV_API_TOKEN, "vr_live_tok")
4205
4238
  with patch("verifaied.cli.run_test_run", return_value=0) as run:
4206
- result = runner.invoke(
4207
- app, ["test", "run", "--all", "--repo", str(uuid4()), "--no-render"]
4208
- )
4209
- absent = runner.invoke(app, ["test", "run", "--all", "--repo", str(uuid4())])
4210
- assert (result.exit_code, absent.exit_code) == (0, 0)
4211
- assert [c.kwargs["no_render"] for c in run.call_args_list] == [True, False]
4239
+ codes = [
4240
+ runner.invoke(
4241
+ app, ["test", "run", "--all", "--repo", str(uuid4()), *flag]
4242
+ ).exit_code
4243
+ for flag in (["--no-render"], ["--render"], [])
4244
+ ]
4245
+ assert codes == [0, 0, 0]
4246
+ assert [c.kwargs["render"] for c in run.call_args_list] == [False, True, None]
4212
4247
 
4213
4248
 
4214
4249
  def test_test_run_command_refuses_a_profile_it_does_not_have(monkeypatch):
@@ -5796,6 +5831,7 @@ def test_a_chained_replay_rewrites_its_holds_from_a_relative_runner_dir(
5796
5831
  patch.object(CoverageCollector, "snapshot", lambda self: {"a.ts": {}}),
5797
5832
  ):
5798
5833
  replay_spec(
5834
+ unattended=True,
5799
5835
  api_url="http://api.test",
5800
5836
  token="t",
5801
5837
  repo_id=uuid4(),
@@ -10991,7 +11027,7 @@ def test_a_headless_replay_runs_fast_and_records_for_the_render(tmp_path: Path):
10991
11027
  harvest records instead, a fill is still typed a key a frame, and the
10992
11028
  page size and the test's banner are what the rendered video wants."""
10993
11029
  fake = ConfigReadingRunner()
10994
- _replay(tmp_path, runner=fake)
11030
+ _replay(tmp_path, runner=fake, unattended=True)
10995
11031
  config = fake.config_text or ""
10996
11032
  assert "verifaiedCapture: true" in config
10997
11033
  assert "launchOptions: { slowMo: 0 }" in config
@@ -11023,7 +11059,7 @@ def test_a_fast_replay_hands_a_checks_hold_to_the_renderer(tmp_path: Path):
11023
11059
  "});\n"
11024
11060
  )
11025
11061
  fake = ConfigReadingRunner()
11026
- _replay(tmp_path, runner=fake, spec_text=spec)
11062
+ _replay(tmp_path, runner=fake, spec_text=spec, unattended=True)
11027
11063
  staged = fake.spec_text or ""
11028
11064
  assert f"await {HOLD_HOOK}(2000);" in staged
11029
11065
  assert "await page.waitForTimeout(1500);" in staged
@@ -11045,7 +11081,10 @@ def _rendering(tmp_path: Path, outcome: str = "paced"):
11045
11081
  def render(items, **kwargs):
11046
11082
  calls.append({"items": items, **kwargs})
11047
11083
  return Rendered(
11048
- items=[("video", paced)], labels={paced: "api-tokens"}, outcome=outcome
11084
+ items=[("video", paced)],
11085
+ labels={paced: "api-tokens"},
11086
+ outcome=outcome,
11087
+ pacing={paced: "rendered"},
11049
11088
  )
11050
11089
 
11051
11090
  return (
@@ -11066,6 +11105,7 @@ def test_a_fast_replay_hands_its_video_and_its_close_to_the_finisher(
11066
11105
  with artifacts_patch, render_patch:
11067
11106
  code, _fake, _opened, closed, artifacts, _root = _replay(
11068
11107
  tmp_path,
11108
+ unattended=True,
11069
11109
  finisher=pool,
11070
11110
  on_finished=lambda code, video: finished.append((code, video)),
11071
11111
  )
@@ -11082,6 +11122,7 @@ def test_a_fast_replay_hands_its_video_and_its_close_to_the_finisher(
11082
11122
  assert artifacts.call_args.kwargs["labels"] == {
11083
11123
  tmp_path / "paced.webm": "api-tokens"
11084
11124
  }
11125
+ assert artifacts.call_args.kwargs["pacing"] == {tmp_path / "paced.webm": "rendered"}
11085
11126
  # The pool owned the temp directory, and removed it.
11086
11127
  assert not calls[0]["work_root"].exists()
11087
11128
 
@@ -11093,6 +11134,7 @@ def test_a_close_the_finisher_could_not_make_turns_a_pass_into_2(tmp_path: Path)
11093
11134
  with artifacts_patch, render_patch:
11094
11135
  code, *_rest = _replay(
11095
11136
  tmp_path,
11137
+ unattended=True,
11096
11138
  finisher=pool,
11097
11139
  on_finished=lambda code, video: finished.append((code, video)),
11098
11140
  close_ok=False,
@@ -11110,7 +11152,10 @@ def test_an_interrupted_finisher_closes_with_the_verdict_and_no_video(
11110
11152
  pool.interrupt("Stopped: the run was interrupted")
11111
11153
  with artifacts_patch, render_patch:
11112
11154
  code, _fake, _opened, closed, artifacts, _root = _replay(
11113
- tmp_path, finisher=pool, codes=[1]
11155
+ tmp_path,
11156
+ finisher=pool,
11157
+ codes=[1],
11158
+ unattended=True,
11114
11159
  )
11115
11160
  assert code == 1
11116
11161
  assert calls == []
@@ -11144,6 +11189,7 @@ def test_ctrl_c_while_waiting_for_room_closes_the_run_with_its_verdict(
11144
11189
  ):
11145
11190
  _replay(
11146
11191
  tmp_path,
11192
+ unattended=True,
11147
11193
  finisher=full,
11148
11194
  closed=closed,
11149
11195
  codes=[1],
@@ -11197,7 +11243,9 @@ def test_a_fast_replay_with_no_finisher_renders_before_it_returns(tmp_path: Path
11197
11243
  finished: list[int] = []
11198
11244
  with artifacts_patch, render_patch:
11199
11245
  code, _fake, _opened, closed, artifacts, _root = _replay(
11200
- tmp_path, on_finished=lambda code, video: finished.append((code, video))
11246
+ tmp_path,
11247
+ on_finished=lambda code, video: finished.append((code, video)),
11248
+ unattended=True,
11201
11249
  )
11202
11250
  assert code == 0
11203
11251
  assert finished == [(0, "paced")]
@@ -11222,6 +11270,43 @@ def test_a_failed_attempt_that_is_retried_is_neither_rendered_nor_handed_over(
11222
11270
  closed.assert_called_once()
11223
11271
 
11224
11272
 
11273
+ def test_a_replay_nobody_called_unattended_is_paced_live_and_says_nothing(
11274
+ tmp_path: Path,
11275
+ ):
11276
+ """A test somebody just made or asked for by name: its video is the
11277
+ browser's own, and that needs no explaining."""
11278
+ console = _console()
11279
+ config = _config_written(tmp_path, console=console)
11280
+ assert "verifaiedCapture" not in config
11281
+ assert "verifaiedCursorMs: 400" in config
11282
+ assert "Pacing this run live" not in " ".join(_printed(console))
11283
+
11284
+
11285
+ def test_a_batch_replay_that_cannot_run_fast_says_why(tmp_path: Path):
11286
+ console = _console()
11287
+ config = _config_written(
11288
+ tmp_path,
11289
+ console=console,
11290
+ unattended=True,
11291
+ spec_text=SPEC_BODY.replace("test(", "// page.mouse.click(1, 1);\ntest(", 1),
11292
+ )
11293
+ assert "verifaiedCapture" not in config
11294
+ assert (
11295
+ "Pacing this run live: the flow opens another page, resizes its own, "
11296
+ "or acts on the page without a locator." in " ".join(_printed(console))
11297
+ )
11298
+
11299
+
11300
+ def test_a_live_replays_video_is_uploaded_as_live(tmp_path: Path):
11301
+ video = tmp_path / "video.webm"
11302
+ with patch(
11303
+ "verifaied.testcmd.new_artifacts_under",
11304
+ return_value=[("trace", tmp_path / "trace.zip"), ("video", video)],
11305
+ ):
11306
+ _code, _fake, _opened, _closed, artifacts, _root = _replay(tmp_path)
11307
+ assert artifacts.call_args.kwargs["pacing"] == {video: "live"}
11308
+
11309
+
11225
11310
  def test_a_watched_replay_is_paced_live(tmp_path: Path):
11226
11311
  config = _config_written(tmp_path, headed=True)
11227
11312
  assert "verifaiedCapture" not in config
@@ -11436,6 +11521,7 @@ def test_studio_replays_a_run_request_headed_and_records_nothing(
11436
11521
  assert len(studio.replays) == 1
11437
11522
  call = studio.replays[0]
11438
11523
  assert call["headed"] is True
11524
+ assert call["unattended"] is False
11439
11525
  assert call["driver"] == "suite"
11440
11526
  assert call["test"] is row
11441
11527
  assert call["all_rows"] == [row]
@@ -11456,6 +11542,8 @@ def test_studio_replays_a_headless_run_request_with_no_window(tmp_path: Path):
11456
11542
  assert len(studio.replays) == 1
11457
11543
  call = studio.replays[0]
11458
11544
  assert call["headed"] is False
11545
+ # …and nobody asked to see any one of them, so it runs fast.
11546
+ assert call["unattended"] is True
11459
11547
  assert call["driver"] == "suite"
11460
11548
  assert call["test"] is row
11461
11549
  assert [s["status"] for s in studio.statuses] == ["recording", "done"]
@@ -17497,15 +17585,26 @@ def test_rendered_holds_hands_a_checks_hold_to_the_renderer_and_only_that():
17497
17585
 
17498
17586
 
17499
17587
  @pytest.mark.parametrize(
17500
- ("replay", "headed", "harvested", "text", "reason"),
17588
+ ("replay", "headed", "harvested", "unattended", "text", "reason"),
17501
17589
  [
17502
- (ReplayConfig(), False, True, "await page.goto('/');", None),
17503
- (ReplayConfig(), True, True, "", "somebody is watching this run"),
17504
- (ReplayConfig(render=False), False, True, "", "replay_render is off"),
17590
+ (ReplayConfig(), False, True, True, "await page.goto('/');", None),
17591
+ (ReplayConfig(), True, True, True, "", "somebody is watching this run"),
17592
+ (ReplayConfig(render=False), False, True, True, "", "replay_render is off"),
17593
+ # Off is the reason given, attended or not: it is the one somebody set.
17594
+ (ReplayConfig(render=False), False, True, False, "", "replay_render is off"),
17505
17595
  (
17506
17596
  ReplayConfig(),
17507
17597
  False,
17598
+ True,
17599
+ False,
17600
+ "await page.goto('/');",
17601
+ "its video is one somebody asked to see",
17602
+ ),
17603
+ (
17604
+ ReplayConfig(),
17508
17605
  False,
17606
+ False,
17607
+ True,
17509
17608
  "",
17510
17609
  "the spec does not run through the harvest",
17511
17610
  ),
@@ -17514,6 +17613,7 @@ def test_rendered_holds_hands_a_checks_hold_to_the_renderer_and_only_that():
17514
17613
  ReplayConfig(),
17515
17614
  False,
17516
17615
  True,
17616
+ True,
17517
17617
  line,
17518
17618
  "the flow opens another page, resizes its own, or acts on the "
17519
17619
  "page without a locator",
@@ -17535,10 +17635,21 @@ def test_rendered_holds_hands_a_checks_hold_to_the_renderer_and_only_that():
17535
17635
  ],
17536
17636
  )
17537
17637
  def test_capture_refusal_says_why_a_run_is_paced_live(
17538
- replay: ReplayConfig, headed: bool, harvested: bool, text: str, reason: str | None
17638
+ replay: ReplayConfig,
17639
+ headed: bool,
17640
+ harvested: bool,
17641
+ unattended: bool,
17642
+ text: str,
17643
+ reason: str | None,
17539
17644
  ):
17540
17645
  assert (
17541
- capture_refusal(replay, headed=headed, harvested=harvested, run_text=text)
17646
+ capture_refusal(
17647
+ replay,
17648
+ headed=headed,
17649
+ harvested=harvested,
17650
+ run_text=text,
17651
+ unattended=unattended,
17652
+ )
17542
17653
  == reason
17543
17654
  )
17544
17655
 
@@ -17551,7 +17662,13 @@ def test_a_locator_call_and_a_hand_written_wait_can_still_be_captured():
17551
17662
  "await page.waitForTimeout(300);\n"
17552
17663
  )
17553
17664
  assert (
17554
- capture_refusal(ReplayConfig(), headed=False, harvested=True, run_text=text)
17665
+ capture_refusal(
17666
+ ReplayConfig(),
17667
+ headed=False,
17668
+ harvested=True,
17669
+ run_text=text,
17670
+ unattended=True,
17671
+ )
17555
17672
  is None
17556
17673
  )
17557
17674
 
@@ -678,6 +678,7 @@ def test_a_rendered_video_takes_the_place_of_the_runs_own(
678
678
  assert paced.name == PACED_VIDEO_NAME
679
679
  assert paced.read_bytes() == b"paced"
680
680
  assert rendered.labels == {paced: "settings-api-tokens"}
681
+ assert rendered.pacing == {paced: "rendered"}
681
682
  assert seen["cwd"] == tmp_path
682
683
  assert seen["timeout"] == 60.0
683
684
  assert seen["config"]["width"] == 1280
@@ -714,6 +715,7 @@ def test_a_render_that_fails_keeps_the_runs_video_and_says_so(tmp_path: Path):
714
715
  )
715
716
  assert rendered.items == items
716
717
  assert rendered.labels == {items[1][1]: "settings-api-tokens (unpaced)"}
718
+ assert rendered.pacing == {items[1][1]: "unpaced"}
717
719
  assert rendered.outcome == (
718
720
  "unpaced: the video could not be rendered: ffmpeg exited 1"
719
721
  )
@@ -745,6 +747,7 @@ def test_a_compositor_that_cannot_start_keeps_the_runs_video(tmp_path: Path):
745
747
  assert rendered.items == items
746
748
  assert rendered.outcome == "unpaced: the video could not be rendered: node"
747
749
  assert rendered.labels == {items[1][1]: "settings-api-tokens (unpaced)"}
750
+ assert rendered.pacing == {items[1][1]: "unpaced"}
748
751
 
749
752
 
750
753
  def test_no_ffmpeg_keeps_the_runs_video(tmp_path: Path, monkeypatch):
@@ -778,3 +781,4 @@ def test_a_run_with_no_video_has_nothing_to_render(tmp_path: Path):
778
781
  err_console=MagicMock(),
779
782
  )
780
783
  assert (rendered.items, rendered.labels, rendered.outcome) == (trace, {}, "none")
784
+ assert rendered.pacing == {}
@@ -1242,7 +1242,7 @@ wheels = [
1242
1242
 
1243
1243
  [[package]]
1244
1244
  name = "verifaied"
1245
- version = "0.36.1"
1245
+ version = "0.37.0"
1246
1246
  source = { editable = "." }
1247
1247
  dependencies = [
1248
1248
  { name = "httpx" },