Skip to content

Commit 5491e27

Browse files
gewenyu99claude
andcommitted
docs: move agent-exploration to wizard README, trim comments to current behavior
- README: add "Explore with an agent" under Running locally → Testing (was wrongly placed in the workbench README). - scripts/README: drop the cross-PR pointer to the #703 repro scripts. - Trim header/inline comments across the harness + scripts to concise descriptions of what the code does now — no history, no change-rationale. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 5f214b7 commit 5491e27

6 files changed

Lines changed: 178 additions & 143 deletions

File tree

README.md

Lines changed: 167 additions & 113 deletions
Large diffs are not rendered by default.

e2e-harness/ARCHITECTURE.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,7 @@ program e2e-drivable, add its profile to `profiles.ts`.
9191

9292
The flow is **snapshot-tested** offline (no agent, deterministic):
9393
`__tests__/e2e-flow-snapshot.test.ts` golden-checks the (screen → decision)
94-
trace. Update with `jest -u` after an intentional flow/profile change. This is
95-
the structured-state analog of the TUI ANSI screenshots in
96-
`scripts/__screenshots__/`.
94+
trace. Update with `jest -u` after an intentional flow/profile change.
9795

9896
## Record & replay
9997

e2e-harness/e2e-profile.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
/**
2-
* WizardE2eProfile — a program's declarative e2e "test definition": the
3-
* UI choices a headless e2e run should make at each decision point.
2+
* WizardE2eProfile — a program's declarative e2e "test definition": the UI
3+
* choices a headless e2e run makes at each decision point.
44
*
5-
* The *choices* are product knowledge about a program's flow, but they live in
6-
* the harness ({@link ./profiles}, keyed by program id) rather than on the
7-
* program config — so none of this e2e machinery reaches the wizard's
8-
* production source. The harness is generic: it reads a profile and asks
9-
* {@link decideE2eAction} what to commit on the current screen. Add a program's
10-
* profile to {@link ./profiles} to make it e2e-drivable.
5+
* Per-program choices live in {@link ./profiles}, keyed by program id.
6+
* {@link decideE2eAction} maps the current screen + a profile to the commit to
7+
* make. Add a program's profile to {@link ./profiles} to make it e2e-drivable.
118
*/
129

1310
import { ScreenId, Overlay, type ScreenName } from '@ui/tui/router';

e2e-harness/profiles.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
* Per-program e2e profiles — the UI choices a headless run makes driving each
33
* program's flow.
44
*
5-
* Each program declares its test path as a readable JSON next to the program
5+
* Each program declares its test path as JSON next to it
66
* (`src/lib/programs/<program>/test/e2e.json`): a `profile` (the options the run
7-
* auto-takes) plus a documented `path`. We load the `profile` here and map it by
8-
* program id. Those JSONs are *data*, imported only by this harness — never by
9-
* prod code — so they don't reach the wizard's production source or its bundle.
10-
* Look one up with {@link profileFor}.
7+
* auto-takes) plus a documented `path`. {@link profileFor} loads the `profile`
8+
* and maps it by program id.
119
*/
1210

1311
import { Program, type ProgramId } from '@lib/programs/program-registry';

scripts/README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,3 @@ none of it ships in prod. `WizardCiDriver` (read/act over the store), the
2626
screen→action registry, the `wizard-ci-tools` MCP server, the e2e profiles, and
2727
the recorder/replay. See [`ARCHITECTURE.md`](../e2e-harness/ARCHITECTURE.md) for
2828
how an agent drives these (env strip, scoped project id, gotchas).
29-
30-
> **Security-leak repro scripts** (`relay-prod.no-jest.ts`,
31-
> `precedence.no-jest.ts`) that reproduce the `ANTHROPIC_BASE_URL`
32-
> settings-override gateway leak live on the fix PR
33-
> ([PostHog/wizard#703](https://github.com/PostHog/wizard/pull/703)), documented
34-
> in its description + comments.

scripts/render-snapshots.no-jest.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
/**
22
* Render a recording to per-frame TUI snapshots — one `.ans` file per key
3-
* moment, the REAL Ink screen rendered to ANSI (via replay's renderFrame, which
4-
* needs real ink, hence tsx not jest).
5-
*
6-
* These are the snapshots the workbench's visual-comparison flow diffs against a
7-
* committed baseline. A recording comes from a real `--e2e` run, so the
8-
* snapshots are what the user actually saw; run-to-run differences (e.g. the
9-
* agent enqueuing a different task) show up in the side-by-side for a human to
10-
* review.
3+
* moment, the real Ink screen rendered to ANSI via replay's renderFrame (needs
4+
* real ink, hence tsx not jest). Feeds the workbench visual-comparison flow.
115
*
126
* tsx scripts/render-snapshots.no-jest.ts <recording.json> <outDir>
137
*/

0 commit comments

Comments
 (0)