Archilyzer · Source

archilyzer

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

commit c27a60171d686ff5c5b56e34b86a830163c006cd
parent 70fb243432629c2ae172af8c1cbd3ad78a3a918d
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Mon, 28 Sep 2026 12:45:42 -0400

common: envVars.test counts TEST_WORKER_INDEX as Playwright's own variable

The 2origin stage guard (95b12f02) reads it, and "every variable the code
reads is declared" failed on it. It is not ours to declare: Playwright sets
it in each worker process and documents it, like node's NODE_ENV or a CI's
CI, so it joins the PLATFORM set rather than envVars.ts (whose test
audience is E2E_-prefixed and declared in a playwright config).

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

Diffstat:
Mcommon/lib/envVars.test.ts | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/common/lib/envVars.test.ts b/common/lib/envVars.test.ts @@ -19,8 +19,10 @@ const REPO = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", ". const CODE_ROOTS = ["common", "editor", "export", "homepage", "mcp/src", "scripts"]; const SKIP_DIRS = new Set(["node_modules", ".next", "out", "public", "test-results", "blob-report", "test-transcripts"]); -// The platform's own variables: read here, documented by node, Next, a shell. -const PLATFORM = new Set(["CI", "NODE_ENV", "NEXT_RUNTIME", "LD_LIBRARY_PATH", "PATH", "HOME", "NODE_OPTIONS"]); +// 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"]); function codeFiles(): string[] { const out: string[] = [];