# @empiricalrun/test-run

## 1.1.4

### Patch Changes

- Updated dependencies [5c32550]
  - @empiricalrun/r2-uploader@0.11.5
  - @empiricalrun/reporter@0.30.3

## 1.1.3

### Patch Changes

- 68cfa70: Read the Playwright config once per CLI process instead of on every lookup
- 3cde266: Fail the setup pass with exit code 21 when a selected project uses the msedge channel
- cacd228: Read playwright config with tsx instead of ts-node so it no longer depends on the repo's TypeScript version.
- 9b5c02d: Fail the setup pass with exit code 21 on globalSetup, globalTeardown or chained teardown projects
- fe0d79c: Upgrade ts-morph from 23 to 28, which bundles TypeScript 6.0 instead of 5.5.
  - @empiricalrun/reporter@0.30.3

## 1.1.2

### Patch Changes

- bcc8fce: fix: setup pass keeps setup chain order when a teardown exists
- 0ee0550: fix: setup plan includes the setups that selected setups depend on
- Updated dependencies [d30f9e6]
  - @empiricalrun/r2-uploader@0.11.4
  - @empiricalrun/reporter@0.30.3

## 1.1.1

### Patch Changes

- 15d4651: Bundle the test-case-sync reporter so test-run no longer depends on playwright-utils at runtime
  - @empiricalrun/reporter@0.30.3

## 1.1.0

### Minor Changes

- c7616d2: feat: record setup teardowns in the auth manifest and add `test-run run --teardown-only` to run them after the tests

### Patch Changes

- 7c30d84: chore: remove comments across packages
- 3ac499b: fix: setup-once no longer runs Playwright teardown projects early, in the --setup-only pass or as leaves under --no-setup
- Updated dependencies [a4796b0]
- Updated dependencies [7c30d84]
  - @empiricalrun/playwright-utils@0.63.0
  - @empiricalrun/r2-uploader@0.11.3
  - @empiricalrun/reporter@0.30.3

## 1.0.11

### Patch Changes

- 390c7bc: feat: add exclude_tags to test runs, passed to Playwright as --grep-invert
  - @empiricalrun/playwright-utils@0.62.1
  - @empiricalrun/reporter@0.30.2

## 1.0.10

### Patch Changes

- Updated dependencies [b260289]
  - @empiricalrun/r2-uploader@0.11.2
  - @empiricalrun/playwright-utils@0.62.1
  - @empiricalrun/reporter@0.30.2

## 1.0.9

### Patch Changes

- Updated dependencies [771fafd]
  - @empiricalrun/playwright-utils@0.62.0

## 1.0.8

### Patch Changes

- Updated dependencies [842aeb6]
  - @empiricalrun/r2-uploader@0.11.1
  - @empiricalrun/playwright-utils@0.61.3
  - @empiricalrun/reporter@0.30.2

## 1.0.7

### Patch Changes

- Updated dependencies [2d62ed5]
- Updated dependencies [4eb967e]
- Updated dependencies [34f3362]
  - @empiricalrun/playwright-utils@0.61.2
  - @empiricalrun/r2-uploader@0.11.0
  - @empiricalrun/reporter@0.30.2

## 1.0.6

### Patch Changes

- f95dec6: fix: drop anonymous describe titles from --test-list lines so tests inside test.describe(() => ...) are scheduled
- Updated dependencies [b9f4ad2]
  - @empiricalrun/playwright-utils@0.61.1
  - @empiricalrun/reporter@0.30.2

## 1.0.5

### Patch Changes

- 72b1e29: fix: serial expansion no longer treats a describe as serial because a nested describe is
  - @empiricalrun/playwright-utils@0.61.0
  - @empiricalrun/reporter@0.30.2

## 1.0.4

### Patch Changes

- 37a0fc9: Declare Node.js >=22 in engines
- Updated dependencies [37a0fc9]
- Updated dependencies [bf77957]
  - @empiricalrun/playwright-utils@0.61.0
  - @empiricalrun/r2-uploader@0.10.3
  - @empiricalrun/reporter@0.30.2

## 1.0.3

### Patch Changes

- Updated dependencies [50a93dc]
  - @empiricalrun/playwright-utils@0.60.4

## 1.0.2

### Patch Changes

- 1f7f7fa: chore: bump internal Playwright to 1.63.0; IBR now records step subtitle and params
- 3806980: fix: rewrite merged report artifact URLs to the configured delivery origin
- 03cee8c: fix: return a distinct exit code when a run selects no tests or Playwright projects.
- Updated dependencies [79c1262]
- Updated dependencies [1f7f7fa]
- Updated dependencies [17eb533]
  - @empiricalrun/playwright-utils@0.60.3
  - @empiricalrun/reporter@0.30.1

## 1.0.1

### Patch Changes

- 185182e: refactor: route test-execution api-worker requests through openapi-fetch.
- Updated dependencies [185182e]
  - @empiricalrun/playwright-utils@0.60.2

## 1.0.0

### Major Changes

- 9f30170: `run` keeps only `--tags`/`--setup-only`/`--no-setup` (Playwright's own flags now pass through, including `--forbid-only`, which commander used to swallow), drops the `BUILD_URL` download step, and the package no longer exports `runSingleTest`/`listProjectsAndTests`/`runSpecificTestsCmd`/`parseTestListOutput`

### Minor Changes

- e877031: Rerun-only-failed builds its test list from the source run's failed `pw_test_id`s via the test-case-ids path, so the report download, line reconstruction and the `test-run failed-list` command are gone
- 6a9b5c4: The run worker fetches the run's environment variables once per job and writes the repo's `.env` files itself, applies them under (not over) the run's own plumbing keys, sets `ENV_SLUG`, and errors the run when the fetch fails instead of running with none
- e089023: `run --tags <tags>` replaces the `GREP_TAGS` environment variable; the tag selection now travels as argv like every other narrowing

### Patch Changes

- 3732f68: fix: fail a run whose tags match no tests with an `empty_selection` error instead of a generic runtime error
- fd758cc: `run --setup-only` narrows the setup plan by the run's `--tags`, asking Playwright (`--list --grep`) which projects the tags touch
- e2fe91c: Shards now say when a leaf was dropped because the narrowing skipped its setup, instead of mislabeling it "their setup did not pass"
- Updated dependencies [1a9be2c]
- Updated dependencies [c77aae6]
- Updated dependencies [3497d85]
  - @empiricalrun/playwright-utils@0.60.1
  - @empiricalrun/reporter@0.30.0

## 0.17.14

### Patch Changes

- Updated dependencies [12c3b00]
  - @empiricalrun/playwright-utils@0.60.0
  - @empiricalrun/reporter@0.30.0

## 0.17.13

### Patch Changes

- 8d27df6: Only list files that carry a serial block when expanding a `--test-list`

  `expandSerialDependencies` spawned one `playwright test --list <file>` process per unique file in
  the selection, sequentially — a fresh Node plus a full config load each, ~1.2s apiece. The result
  is only ever read through `isTestInSerialBlock`, which rejects on file mismatch first, so files
  without a serial block could never contribute a line and were listed for nothing.

  Serial blocks are now detected first (AST parsing, in-process) and only their files are listed.
  On a Flash shard that is 1-2 files instead of 24-43, worth ~30-50s per shard on the critical path
  before its first test runs. Output is unchanged; a 21-file selection goes from 6067ms to 274ms
  with byte-identical results.

- d6f6d57: `run --setup-only` no longer forwards `--test-list` to the setup pass

  A narrowing — rerun-failed or explicit test-case ids — is a run-wide list of _leaf_ tests, and
  the `run_setup` job hands it to the CLI like every other job of the run. Filtering the setup
  projects by it selects nothing: setup ran zero tests, exited 0, and wrote a manifest recording a
  passing setup with no storage state — so every shard dropped its leaves behind the missing state
  and a rerun-failed run on a setup-once project reported success having executed nothing
  (setup-once oracle, scenario 8).

  The setup pass now strips `--test-list` (both spellings) from its passthrough args and always
  runs the setup projects whole. The narrowing still reaches the leaf shards untouched.

- 5a5fc0b: `run --setup-only` chooses its setup projects from the run's narrowing

  A narrowed plain run executes only the dependencies of projects that still have tests selected;
  the setup pass now matches it instead of running every setup project unconditionally. The plan is
  the dependencies of the leaf projects the `--test-list` names, plus any setup project the list
  names itself — a rerun after a setup failure holds only the setup test (the skipped leaves were
  `ok()`), and a plan derived from leaf dependencies alone would silently skip setup and never run
  the one test the rerun asked for (setup-once oracle, scenarios 9 and 10).

  Setup projects the narrowing skips are absent from the manifest's `successfulSetupProjects`, so
  the shards drop the leaves behind them — correct, because the narrowing selects no test there. An
  unreadable or unparseable list falls back to running every setup project: over-running setup is
  recoverable, skipping one the run needs is not.

- Updated dependencies [17d8ac5]
  - @empiricalrun/playwright-utils@0.59.0
  - @empiricalrun/reporter@0.30.0

## 0.17.12

### Patch Changes

- 2e50132: setup-once: only carry auth-shaped files the setup run wrote

  The first version of the working-tree diff carried any changed JSON outside a
  short list of output directories. That list missed `blob-report-incremental`, so
  the setup shard's own IBR marker and `_empirical_urls.json` were uploaded and
  restored into every leaf shard — where a non-empty `blob-report-incremental/`
  reads as "this shard produced a report". Reporter output dirs are now matched by
  prefix, and an undeclared file must additionally look like auth state: Playwright
  storage state (a `cookies`/`origins` array), or a file sharing a directory with a
  storage state some project declares.

- 9254ac3: setup-once: carry the storage-state files setup wrote, not the ones leaves declare

  The auth manifest listed each selected leaf's `use.storageState`, so a repo that
  opens a storage state from inside a test — `browser.newContext({ storageState:
AuthStore.location(user) })` — had that file dropped: no project declares it, so
  nothing uploaded it, and the shard failed with ENOENT deep inside a test. The
  `--setup-only` run now diffs the working tree around the setup projects and
  records what they actually wrote.

  - @empiricalrun/playwright-utils@0.58.6
  - @empiricalrun/reporter@0.30.0

## 0.17.11

### Patch Changes

- 7532123: fix: refuse an unusable setup-once auth manifest instead of failing or silently passing dependent tests
- Updated dependencies [bcf5ed7]
- Updated dependencies [68091d9]
- Updated dependencies [ed03fc8]
  - @empiricalrun/playwright-utils@0.58.6
  - @empiricalrun/reporter@0.30.0

## 0.17.10

### Patch Changes

- Updated dependencies [157ea19]
- Updated dependencies [8e8cea6]
- Updated dependencies [ff99f5e]
- Updated dependencies [15e769c]
  - @empiricalrun/playwright-utils@0.58.5
  - @empiricalrun/r2-uploader@0.10.2

## 0.17.9

### Patch Changes

- Updated dependencies [4af421a]
  - @empiricalrun/playwright-utils@0.58.4
  - @empiricalrun/reporter@0.29.1

## 0.17.8

### Patch Changes

- Updated dependencies [edef32d]
- Updated dependencies [9f1f2d1]
- Updated dependencies [760771b]
- Updated dependencies [8b883dd]
  - @empiricalrun/playwright-utils@0.58.3

## 0.17.7

### Patch Changes

- Updated dependencies [0c9577d]
  - @empiricalrun/playwright-utils@0.58.2

## 0.17.6

### Patch Changes

- Updated dependencies [e0aba62]
  - @empiricalrun/playwright-utils@0.58.1
  - @empiricalrun/r2-uploader@0.10.1

## 0.17.5

### Patch Changes

- Updated dependencies [2b65c99]
  - @empiricalrun/playwright-utils@0.58.0

## 0.17.4

### Patch Changes

- Updated dependencies [3648c5c]
  - @empiricalrun/r2-uploader@0.10.0
  - @empiricalrun/playwright-utils@0.57.0

## 0.17.3

### Patch Changes

- Updated dependencies [10f0931]
  - @empiricalrun/playwright-utils@0.56.0

## 0.17.2

### Patch Changes

- Updated dependencies [91798e6]
  - @empiricalrun/playwright-utils@0.55.0
  - @empiricalrun/reporter@0.29.1

## 0.17.1

### Patch Changes

- 8b1be9e: fix: html report attachment urls for pw 1.60.0
- Updated dependencies [8b1be9e]
  - @empiricalrun/reporter@0.29.1

## 0.17.0

### Minor Changes

- 6fb8170: feat: playwright utils upgraded to use new core

### Patch Changes

- Updated dependencies [6fb8170]
  - @empiricalrun/reporter@0.29.0

## 0.16.1

### Patch Changes

- Updated dependencies [3a315aa]
  - @empiricalrun/reporter@0.28.1

## 0.16.0

### Minor Changes

- ab403b8: fix: move json report location to avoid accidental agent commits

## 0.15.0

### Minor Changes

- c815fc2: feat: use common code to modify html report paths for shard/non-shard

### Patch Changes

- Updated dependencies [c815fc2]
  - @empiricalrun/reporter@0.28.0

## 0.14.2

### Patch Changes

- Updated dependencies [92254ba]
  - @empiricalrun/r2-uploader@0.9.1

## 0.14.1

### Patch Changes

- Updated dependencies [617e9f8]
  - @empiricalrun/reporter@0.27.0

## 0.14.0

### Minor Changes

- 0dfc150: fix: exports config between packages

### Patch Changes

- Updated dependencies [0dfc150]
  - @empiricalrun/reporter@0.26.0

## 0.13.2

### Patch Changes

- Updated dependencies [1967ac3]
  - @empiricalrun/r2-uploader@0.9.0

## 0.13.1

### Patch Changes

- Updated dependencies [3ee1aec]
  - @empiricalrun/r2-uploader@0.8.0

## 0.13.0

### Minor Changes

- d270c6d: feat: add cancellation watcher to self destruct
- 2d9919d: feat: consolidate zip utils and move to streaming

### Patch Changes

- Updated dependencies [2d9919d]
  - @empiricalrun/r2-uploader@0.7.0

## 0.12.0

### Minor Changes

- 79a4e0f: feat: add blob reporters for sharding

### Patch Changes

- Updated dependencies [79a4e0f]
  - @empiricalrun/r2-uploader@0.6.0

## 0.11.1

### Patch Changes

- 9fb0ba1: feat: reuse glob matcher for envs to show on dash

## 0.11.0

### Minor Changes

- cdc0995: feat: introduce env vars for the test run

## 0.10.9

### Patch Changes

- 450b79a: feat: show resolved projects for environments in cli

## 0.10.8

### Patch Changes

- f44505a: fix: smaller responses from run-test tool

## 0.10.7

### Patch Changes

- 6d5a283: fix: pw project resolution in dirs with spaces

## 0.10.6

### Patch Changes

- 298b5e5: feat: ask for project name in recorder flow

## 0.10.5

### Patch Changes

- ff84083: feat: request verification for recording, more logs clean up

## 0.10.4

### Patch Changes

- b533712: chore: remove verbose logs, hide pw glass pane

## 0.10.3

### Patch Changes

- cfb157a: fix: follow-ups for playwright reporter upgrade

## 0.10.2

### Patch Changes

- 9b873e3: fix: escape special characters before creating test-run command
- 8a83b29: fix: ts-node not found error

## 0.10.1

### Patch Changes

- f05aac2: feat: add environment overrides for projects in tool calls

## 0.10.0

### Minor Changes

- 0ef2e11: feat(test-run): add environment variables fetching and injection

### Patch Changes

- 226c361: fix: validate file existence in text edit tools, browser agent and run test tool and update fileName to filePath
- 8c7e9c6: fix: trim playwright_projects before environment update to ensure glob matching

## 0.9.4

### Patch Changes

- f926e40: feat: consume repoPath in test run tool

## 0.9.3

### Patch Changes

- 333b99f: fix: test run tool should report correct status
- 3739bc0: fix: replace tsx with an execSync call to fetch playwright projects

## 0.9.2

### Patch Changes

- d71508f: chore: set playwright runs to headed based on env key
- fca6729: feat: implement TypeScript compiler execution and error handling in strReplaceEditor

## 0.9.1

### Patch Changes

- 24d672a: feat: use playwright --list to get project names

## 0.9.0

### Minor Changes

- 72f4577: feat: stop marking files as only and move to cmd builder approach

### Patch Changes

- 97cef16: test: add memfs mocks for fs, remove unused config utils
- 28682e2: feat: use test-run cmd builder in test-gen, remove test.only marking

## 0.8.5

### Patch Changes

- 0634233: fix: run setup projects when test-run tool call has teardown project

## 0.8.4

### Patch Changes

- a7f2e24: fix: downgrade tsx logs to warn instead of errors

## 0.8.3

### Patch Changes

- f49b645: feat: Add tool response API endpoint

## 0.8.2

### Patch Changes

- d05bb69: chore: remove fs-extra

## 0.8.1

### Patch Changes

- 3831109: fix: use platform from environment to support mobile runs with bin entrypoint
- a58ac3f: feat: add dashboard agent integration and optimize tsx handling
- f77e33d: feat: load dotenv in test-run package

## 0.8.0

### Minor Changes

- 9c64161: fix: rm -rf magic token, now using API key auth

## 0.7.7

### Patch Changes

- 088545c: feat: upload test reports from run-test tool calls

## 0.7.6

### Patch Changes

- d04190f: fix: remove process.on listeners to avoid leaks

## 0.7.5

### Patch Changes

- c907653: fix: Remove deprecated lodash.isequal in favor of node:util.isDeepStrictEqual

## 0.7.4

### Patch Changes

- b070af3: fix: error handling in test run tool

## 0.7.3

### Patch Changes

- b14d5bf: feat: support headed executions of test run tool

## 0.7.2

### Patch Changes

- 049102a: fix: support suites in agent tool calls

## 0.7.1

### Patch Changes

- 72a8cf2: feat: expose projects in test-run tool call interface
- 242f659: feat: new method to list all tests
- 6328aaf: feat: test-gen can use test-run package as a tool call
- d995e4c: feat: enable conversation along with test-run tool call

## 0.7.0

### Minor Changes

- 6d37d4e: feat: support for token and run config file

## 0.6.0

### Minor Changes

- 5fbc669: feat: support for token and run config file

## 0.5.3

### Patch Changes

- b9f53be: fix: logs for other signals to catch github actions behavior

## 0.5.2

### Patch Changes

- 7332043: feat: pass signals to test-run child process for graceful exit

## 0.5.1

### Patch Changes

- bce3667: fix: use name and suites to find test block
- bce3667: fix: test-run package to support suites

## 0.5.0

### Minor Changes

- 0c445bf: feat: add support for running specific file in test-run package

## 0.4.6

### Patch Changes

- 4ab570f: fix: consider "setup" and "teardown" aliases as test block in test-run

## 0.4.5

### Patch Changes

- 793d21c: feat: use package.json name to infer project name

## 0.4.4

### Patch Changes

- 92bb271: fix: add retry on dashboard fetch call inside test-run package

## 0.4.3

### Patch Changes

- 19075b9: fix: expose --skip-teardown flag on test-run package

## 0.4.2

### Patch Changes

- 27716bd: fix: consider latest build url only when dispatch build url is not preset

## 0.4.1

### Patch Changes

- 00263d3: fix: revert file changes on process exit/kill
- ece893a: chore: error message for fetching environment

## 0.4.0

### Minor Changes

- bc34d28: feat: support calling appwright from test-run package

## 0.3.1

### Patch Changes

- 1d2d9fc: fix: download latest build before running tests

## 0.3.0

### Minor Changes

- 7a2606c: feat: make call to dashboard to fetch environment detail inside test-run

## 0.2.1

### Patch Changes

- 7ea52ce: fix: set default value of options.project

## 0.2.0

### Minor Changes

- c6c6b49: feat: support project filtering via cli options

## 0.1.2

### Patch Changes

- 177ad09: fix: test-run fails due to a syntax error

## 0.1.1

### Patch Changes

- cb2ec31: fix: test-run marking failed tests as pass

## 0.1.0

### Minor Changes

- 70668eb: feat: add test-run package
