commit 21d7d994ba6f967835c2b307883c756922f35c53
parent 389d36a6823de18af82805718eb6c59b63ca9cec
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 (750c0ba1) 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:
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[] = [];