|
2 | 2 |
|
3 | 3 | Helper scripts. The build-related ones (`generate-version.cjs`, |
4 | 4 | `smoke-test*.sh`, `check-screens.tsx`) are wired into `package.json`. The rest |
5 | | -below are **manual, runnable tools** for the `wizard-ci-tools` control plane and |
6 | | -e2e — each is a standalone `tsx` entry, named `*.no-jest.ts` so Jest ignores it. |
| 5 | +below are **manual, runnable tools** for headless e2e + snapshots — each is a |
| 6 | +standalone `tsx` entry, named `*.no-jest.ts` so Jest ignores it. |
7 | 7 |
|
8 | 8 | Run from the repo root, e.g. `npx tsx scripts/<name>.no-jest.ts`. |
9 | 9 |
|
10 | | -## Control-plane e2e (drive the wizard headlessly via wizard-ci-tools) |
11 | | - |
12 | | -| Script | What it does | Needs | |
13 | | -| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------- | |
14 | | -| **`ci-driver-demo.ts`** | Drives the real store/router/detection flow with `WizardCiDriver` — **offline, agent stubbed**. Proves the control loop on a 1-file project. | nothing | |
15 | | -| **`e2e-full-run.no-jest.ts`** | The full headless e2e: real `WizardStore` + `InkUI` (never rendered) + concurrent driver + **real `runAgent`** against prod cloud. Emits a structured result (`E2E_RESULT_JSON`) and a recording (`E2E_RECORDING_JSON`). | `POSTHOG_PERSONAL_API_KEY`, `APP_DIR`, `PROJECT_ID`; host `CLAUDE_*` env stripped | |
16 | | -| **`ci-driver-live-agent.ts`** | A **real gateway LLM** drives the `wizard-ci-tools` MCP server (read_state / perform_action) to advance the wizard — agent-vs-agent proof. | `PHX_KEY_FILE` | |
17 | | - |
18 | | -> Normally you don't call these directly — `pnpm wizard-ci <app> --e2e` (in |
19 | | -> [wizard-workbench](https://github.com/PostHog/wizard-workbench)) orchestrates |
20 | | -> `e2e-full-run` with the env hygiene + assertions. |
21 | | -
|
22 | | -## Record & replay (view a run back in the terminal) |
23 | | - |
24 | | -| Script | What it does | Needs | |
25 | | -| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | |
26 | | -| **`record-demo.no-jest.ts`** | Produces a sample recording **offline** (no agent, no network) by driving the flow with a `WizardRecorder`. Writes `/tmp/wizard-demo.recording.json` (override with `RECORDING_OUT`). | nothing | |
27 | | -| **`replay-e2e.no-jest.ts`** | Replays a recording in the terminal — reconstructs each frame's store and renders the **real Ink screen**. `--step` (Enter to advance, default) or `--delay <ms>` (auto-play). | a `*.recording.json` | |
28 | | - |
29 | | -```bash |
30 | | -# make a sample recording, then watch it |
31 | | -npx tsx scripts/record-demo.no-jest.ts |
32 | | -npx tsx scripts/replay-e2e.no-jest.ts /tmp/wizard-demo.recording.json --step |
33 | | -``` |
34 | | - |
35 | | -Real `--e2e` runs also drop a recording at |
36 | | -`/tmp/wizard-e2e-<app>.recording.json`. |
| 10 | +| Script | What it does | Needs | |
| 11 | +| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | |
| 12 | +| **`e2e-full-run.no-jest.ts`** | The full headless e2e: real `WizardStore` + `InkUI` (never rendered) + concurrent driver + **real `runAgent`** against prod cloud. Emits a structured result + a recording. | `POSTHOG_PERSONAL_API_KEY`, `APP_DIR`, `PROJECT_ID`; host `CLAUDE_*` env stripped | |
| 13 | +| **`render-snapshots.no-jest.ts`** | Renders a recording's key-moment frames to per-frame `.ans` snapshots (real Ink → ANSI). Feeds the workbench visual-regression flow. | a `recording.json` + outDir | |
| 14 | +| **`replay-e2e.no-jest.ts`** | Replays a recording in the terminal — reconstructs each frame's store and renders the **real Ink screen**. `--step` (Enter to advance) or `--delay <ms>` (auto-play). | a `recording.json` | |
| 15 | + |
| 16 | +> You usually don't call these directly — `pnpm wizard-ci <app> --e2e` and |
| 17 | +> `pnpm wizard-ci-snapshots` (in |
| 18 | +> [wizard-workbench](https://github.com/PostHog/wizard-workbench)) orchestrate |
| 19 | +> them with the env hygiene + assertions. A real `--e2e` run drops a recording |
| 20 | +> at `/tmp/wizard-e2e-<app>.recording.json`. |
37 | 21 |
|
38 | 22 | ## Background |
39 | 23 |
|
|
0 commit comments