Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit e5fc0088a2fab451076c087dc45a84b977736e3a
parent 234091a7dff733bd2570ace74dd695ac56d88f06
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Sat, 10 Oct 2026 16:14:21 -0400

common: declare E2E_SERIAL_LAST; TEST_PARALLEL_INDEX is Playwright's own

envVars.test's "every variable the code reads is declared" caught both: the
runner's pinned serial-order flag (test audience), and the worker slot
Playwright sets (platform, beside TEST_WORKER_INDEX).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
MENVIRONMENT.md | 1+
Mcommon/lib/envVars.test.ts | 6++++--
Mcommon/lib/envVars.ts | 1+
Meditor/playwright.config.ts | 2++
4 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ENVIRONMENT.md b/ENVIRONMENT.md @@ -187,6 +187,7 @@ Read only by a test harness, a fake binary or a test-mode branch. Never set one | `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 | | `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 | | `E2E_BUILD_CHECKED` | — | Set by a suite's config once it has checked the start-mode build's stamp, so a worker's second load of the config does not check again. | editor/playwright.config.ts, umtool/playwright.config.ts | | `E2E_QUEUE` | on | `0` skips the machine-global e2e queue (the port check still runs). | scripts/queue-lock.mjs | | `E2E_PORT_CHECK` | on | `0` skips the pre-run check that the suite's ports are free. | scripts/queue-lock.mjs | diff --git a/common/lib/envVars.test.ts b/common/lib/envVars.test.ts @@ -21,8 +21,10 @@ const SKIP_DIRS = new Set(["node_modules", ".next", "out", "public", "test-resul // The platform's own variables: read here, documented by node, Next, a shell, // Playwright (TEST_WORKER_INDEX, which it sets in each worker process; the -// two-origin config reads it to stage only in the runner). -const PLATFORM = new Set(["CI", "NODE_ENV", "NEXT_RUNTIME", "LD_LIBRARY_PATH", "PATH", "HOME", "NODE_OPTIONS", "TEST_WORKER_INDEX"]); +// two-origin config reads it to stage only in the runner — and +// TEST_PARALLEL_INDEX, the worker's slot, which the editor suite reads to find +// its own servers and data root). +const PLATFORM = new Set(["CI", "NODE_ENV", "NEXT_RUNTIME", "LD_LIBRARY_PATH", "PATH", "HOME", "NODE_OPTIONS", "TEST_WORKER_INDEX", "TEST_PARALLEL_INDEX"]); function codeFiles(): string[] { const out: string[] = []; diff --git a/common/lib/envVars.ts b/common/lib/envVars.ts @@ -185,6 +185,7 @@ const DECLARED: EnvVarDecl[] = [ { 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: "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." }, { name: "E2E_BUILD_CHECKED", audience: "test", default: "—", readBy: "editor/playwright.config.ts, umtool/playwright.config.ts", doc: "Set by a suite's config once it has checked the start-mode build's stamp, so a worker's second load of the config does not check again." }, { name: "E2E_QUEUE", audience: "test", default: "on", readBy: "scripts/queue-lock.mjs", doc: "`0` skips the machine-global e2e queue (the port check still runs)." }, { name: "E2E_PORT_CHECK", audience: "test", default: "on", readBy: "scripts/queue-lock.mjs", doc: "`0` skips the pre-run check that the suite's ports are free." }, diff --git a/editor/playwright.config.ts b/editor/playwright.config.ts @@ -50,6 +50,8 @@ import { currentSlot } from "./e2e/testPaths"; // E2E_WORKERS how many workers, each with its own server set // (e2e/servers.ts): a number, or `auto` for what // memory allows (cap 3). Default 1 +// E2E_SERIAL_LAST set below by the runner for its workers: whether +// the @serial project runs last (a whole run) // E2E_RACK_SHOTS=1 run the /channels rack screenshot audit // E2E_FAKE_YTDLP_AUDIO_CHECK_MODE, E2E_FAKE_YTDLP_CHUNK_DELAY_MS, // E2E_FAKE_YTDLP_CORRUPT_AFTER_CHUNK, E2E_FAKE_YTDLP_CORRUPT_RUNS,