commit b25865f94f437358a0ae4ac40a24ea8dd4fe7f5a
parent b24ad5a680472cd7c2caa6e2b21c980a62fa14e1
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Thu, 12 Nov 2026 00:25:09 -0500
e2e: the model log's screenshot directory is E2E_MODEL_LOG_SHOTS -- a test-only variable carries the E2E_ prefix and is declared in the playwright config that reads it
MODEL_LOG_SHOTS failed envVars.test on main's newer rule (two tests). Renamed
in both specs, declared in editor/ and umtool/ playwright.config.ts,
ENVIRONMENT.md regenerated.
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat:
6 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/ENVIRONMENT.md b/ENVIRONMENT.md
@@ -220,7 +220,7 @@ Read only by a test harness, a fake binary or a test-mode branch. Never set one
| `E2E_TEST_ROUTES` | off | `1` opens the editor's `/api/test/*` routes and marks a test server at boot. Set by `editor/playwright.config.ts` on its test server, and by nothing else. | editor/app/api/test/_guard.ts, editor/instrumentation.ts |
| `E2E_MODE` | `start` | `start`: the editor and umtool suites run against `next start` from a build `scripts/e2e-stamp.mjs` vouches for, rebuilt through the heavy slot when the tree moved. `dev`: against `next dev`, for iterating on one spec. The export and homepage suites always run `next dev` (static exports) and say so when asked for `start`. | editor/playwright.config.ts, umtool/playwright.config.ts, scripts/e2e-stamp.mjs |
| `E2E_NEXT_DIST_DIR` | `.next` | The editor's build directory for the e2e suite's start mode (`.next/e2e`), so a test build never replaces the `.next` a running editor serves from. Set by `scripts/e2e-stamp.mjs` for its build and by `editor/playwright.config.ts` for its test server — and for the editor suite's export dev server (`.next/e2e-editor`), which then runs beside the export suite's own (Next allows one `next dev` per dist dir). | editor/next.config.ts, export/next.config.ts |
-| `MODEL_LOG_SHOTS` | unset (no screenshots) | A directory: the model log's e2e (demo epic D3) saves its 1366×768 screenshots of the panel there — the run page live and done, a call opened, the Iterations tab, a media draft, the settings table, the editor's job page — for a lane's report. Unset, none is taken. | umtool/e2e/model-log.spec.ts, editor/e2e/report-draft.spec.ts |
+| `E2E_MODEL_LOG_SHOTS` | unset (no screenshots) | A directory: the model log's e2e (demo epic D3) saves its 1366×768 screenshots of the panel there — the run page live and done, a call opened, the Iterations tab, a media draft, the settings table, the editor's job page — for a lane's report. Unset, none is taken. | umtool/e2e/model-log.spec.ts, editor/e2e/report-draft.spec.ts |
| `E2E_DATA_ROOT` | the editor directory | Where the editor test server's data lives: `test-transcripts/`, `test-settings.json` and the disposable changelogs sit under it. The test server's scripts and the specs' `testPaths()` read the same variable, so they agree by construction. E2E_-prefixed, never TRANSCRIPTS_DIR: a `--share-data` worktree's `.worktree-env` points that at the real corpus. | editor/package.json (dev:test, start:test), editor/e2e/testPaths.ts |
| `E2E_WORKERS` | 1 | How many workers the editor suite runs, each with a server set of its own (editor, export dev server, Ollama stub) over its own data root (`editor/.e2e-workers/w<n>`): a number (up to 8), or `auto` — floor((MemAvailable − HEAVY_MIN_FREE_MB) / 1.5 GB), 1 to 3. Specs in `editor/e2e/serial.ts` run afterwards on one worker. | editor/playwright.config.ts (editor/e2e/servers.ts) |
| `E2E_SERIAL_LAST` | — | Set by the editor suite's runner for its workers: `1` when the run is whole (no spec file or filter on the command line), so the @serial project runs last; `0` for a focused run, where Playwright would run a teardown project whole. | editor/playwright.config.ts |
diff --git a/common/lib/envVars.ts b/common/lib/envVars.ts
@@ -217,7 +217,7 @@ const DECLARED: EnvVarDecl[] = [
{ name: "E2E_TEST_ROUTES", audience: "test", default: "off", readBy: "editor/app/api/test/_guard.ts, editor/instrumentation.ts", doc: "`1` opens the editor's `/api/test/*` routes and marks a test server at boot. Set by `editor/playwright.config.ts` on its test server, and by nothing else." },
{ name: "E2E_MODE", audience: "test", default: "`start`", readBy: "editor/playwright.config.ts, umtool/playwright.config.ts, scripts/e2e-stamp.mjs", doc: "`start`: the editor and umtool suites run against `next start` from a build `scripts/e2e-stamp.mjs` vouches for, rebuilt through the heavy slot when the tree moved. `dev`: against `next dev`, for iterating on one spec. The export and homepage suites always run `next dev` (static exports) and say so when asked for `start`." },
{ name: "E2E_NEXT_DIST_DIR", audience: "test", default: "`.next`", readBy: "editor/next.config.ts, export/next.config.ts", doc: "The editor's build directory for the e2e suite's start mode (`.next/e2e`), so a test build never replaces the `.next` a running editor serves from. Set by `scripts/e2e-stamp.mjs` for its build and by `editor/playwright.config.ts` for its test server — and for the editor suite's export dev server (`.next/e2e-editor`), which then runs beside the export suite's own (Next allows one `next dev` per dist dir)." },
- { name: "MODEL_LOG_SHOTS", audience: "test", default: "unset (no screenshots)", readBy: "umtool/e2e/model-log.spec.ts, editor/e2e/report-draft.spec.ts", doc: "A directory: the model log's e2e (demo epic D3) saves its 1366×768 screenshots of the panel there — the run page live and done, a call opened, the Iterations tab, a media draft, the settings table, the editor's job page — for a lane's report. Unset, none is taken." },
+ { name: "E2E_MODEL_LOG_SHOTS", audience: "test", default: "unset (no screenshots)", readBy: "umtool/e2e/model-log.spec.ts, editor/e2e/report-draft.spec.ts", doc: "A directory: the model log's e2e (demo epic D3) saves its 1366×768 screenshots of the panel there — the run page live and done, a call opened, the Iterations tab, a media draft, the settings table, the editor's job page — for a lane's report. Unset, none is taken." },
{ name: "E2E_DATA_ROOT", audience: "test", default: "the editor directory", readBy: "editor/package.json (dev:test, start:test), editor/e2e/testPaths.ts", doc: "Where the editor test server's data lives: `test-transcripts/`, `test-settings.json` and the disposable changelogs sit under it. The test server's scripts and the specs' `testPaths()` read the same variable, so they agree by construction. E2E_-prefixed, never TRANSCRIPTS_DIR: a `--share-data` worktree's `.worktree-env` points that at the real corpus." },
{ name: "E2E_WORKERS", audience: "test", default: "1", readBy: "editor/playwright.config.ts (editor/e2e/servers.ts)", doc: "How many workers the editor suite runs, each with a server set of its own (editor, export dev server, Ollama stub) over its own data root (`editor/.e2e-workers/w<n>`): a number (up to 8), or `auto` — floor((MemAvailable − HEAVY_MIN_FREE_MB) / 1.5 GB), 1 to 3. Specs in `editor/e2e/serial.ts` run afterwards on one worker." },
{ name: "E2E_SERIAL_LAST", audience: "test", default: "—", readBy: "editor/playwright.config.ts", doc: "Set by the editor suite's runner for its workers: `1` when the run is whole (no spec file or filter on the command line), so the @serial project runs last; `0` for a focused run, where Playwright would run a teardown project whole." },
diff --git a/editor/e2e/report-draft.spec.ts b/editor/e2e/report-draft.spec.ts
@@ -125,7 +125,7 @@ test("a sweep draft: enqueued over ops, followed to done, its iteration read bac
await log.locator("[data-phase=agent] [data-call] button").first().click();
await expect(log.locator("[data-call-open] [data-call-prompt]").first()).toContainText(r.question);
expect(await page.content()).not.toContain(FAKE_KEY);
- if (process.env.MODEL_LOG_SHOTS) await page.screenshot({ path: join(process.env.MODEL_LOG_SHOTS, "editor-job-page.png"), fullPage: true });
+ if (process.env.E2E_MODEL_LOG_SHOTS) await page.screenshot({ path: join(process.env.E2E_MODEL_LOG_SHOTS, "editor-job-page.png"), fullPage: true });
});
test("a cancel mid-run: job cancel stops the draft and its iteration ends cancelled", async ({ request }) => {
diff --git a/editor/playwright.config.ts b/editor/playwright.config.ts
@@ -92,6 +92,8 @@ import { currentSlot } from "./e2e/testPaths";
// the @serial project runs last (a whole run)
// E2E_RACK_SHOTS=1 run the /channels rack screenshot audit
// E2E_UI_OPS_SHOTS=<dir> social-channel.spec's Sync screenshots (UI notes #17) go there
+// E2E_MODEL_LOG_SHOTS=<dir> report-draft.spec's screenshot of the job page's
+// Model log panel goes there (demo epic D3)
// E2E_FAKE_YTDLP_AUDIO_CHECK_MODE, E2E_FAKE_YTDLP_CHUNK_DELAY_MS,
// E2E_FAKE_YTDLP_CORRUPT_AFTER_CHUNK, E2E_FAKE_YTDLP_CORRUPT_RUNS,
// E2E_FAKE_YTDLP_DETERMINISTIC_CORRUPT, E2E_FAKE_YTDLP_RECOVER_ON_RESUME,
diff --git a/umtool/e2e/model-log.spec.ts b/umtool/e2e/model-log.spec.ts
@@ -22,7 +22,7 @@ import * as urls from "./urls";
const SWEEP = "mlog-sweep";
const QUESTION = "Did the baker enter the pie contest?";
// Screenshots for the lane's report (1366×768), when a directory is named.
-const SHOTS = process.env.MODEL_LOG_SHOTS;
+const SHOTS = process.env.E2E_MODEL_LOG_SHOTS;
const shot = async (page: Page, name: string) => {
if (SHOTS) await page.screenshot({ path: path.join(SHOTS, `${name}.png`) });
};
diff --git a/umtool/playwright.config.ts b/umtool/playwright.config.ts
@@ -16,6 +16,9 @@ import { dataRootRefusal } from "./lib/e2eEnvGuard.mjs";
// revision writes its project (release 27)
// E2E_UMTOOL_EXTRA_KINDS set by projects.spec.ts on the CLI it runs: a kind
// injected into the registry (lib/projects/kinds.mjs)
+// E2E_MODEL_LOG_SHOTS a directory: model-log.spec.ts saves its
+// screenshots of the Model log panel there (demo
+// epic D3); unset, none is taken
// E2E_MODE `start` (the default): the app runs under
// `next start` from a build in .next-e2e-start that
// scripts/e2e-stamp.mjs vouches for (rebuilt through