commit 6426e30ebe8eef316fc631af5eb05b92c0c9492f
parent e89a360e943897413544f213f266e72e5bce0c9d
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Tue, 6 Oct 2026 13:01:51 -0400
e2e: setup and teardown drop an export/out link into test-transcripts (a build stage's, left dangling by resetData, failed a bare export next build)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
3 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/editor/e2e/exportOutLink.ts b/editor/e2e/exportOutLink.ts
@@ -0,0 +1,25 @@
+// export/out AFTER A RUN (release 18 S4). A site's or the hub's build stage
+// points the checkout's `export/out` at the bundle it built — in this suite a
+// bundle under `editor/test-transcripts/.export-builds/<id>/out`, which the
+// next resetData deletes. A link left dangling there makes a bare `next build`
+// of the export app fail on `stat export/out` (ENOENT) — the export build gate,
+// e2e:2origin. So the suite removes the link it made, at teardown and again at
+// setup (a killed run never tears down). Only a link INTO test-transcripts is
+// touched: a real directory, or a link to a real bundle, is the checkout's.
+
+import { lstat, readlink, rm } from "node:fs/promises";
+import path from "node:path";
+import { fileURLToPath } from "node:url";
+
+const editorDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
+const exportOut = path.resolve(editorDir, "..", "export", "out");
+const testTranscripts = path.join(editorDir, "test-transcripts");
+
+export async function dropTestExportOutLink(when: "setup" | "teardown"): Promise<void> {
+ const st = await lstat(exportOut).catch(() => null);
+ if (!st?.isSymbolicLink()) return;
+ const target = path.resolve(path.dirname(exportOut), await readlink(exportOut));
+ if (target !== testTranscripts && !target.startsWith(`${testTranscripts}${path.sep}`)) return;
+ await rm(exportOut, { force: true });
+ console.log(`[e2e ${when}] removed export/out → ${path.relative(editorDir, target)} (a test bundle)`);
+}
diff --git a/editor/e2e/globalSetup.ts b/editor/e2e/globalSetup.ts
@@ -10,8 +10,10 @@
// So this cannot clear a stale dev server ahead of the new one booting — it only
// reaps fixture children, which is what actually eats the CPU.
+import { dropTestExportOutLink } from "./exportOutLink";
import { sweepFixtureProcesses } from "./fixtureProcs";
export default async function globalSetup() {
await sweepFixtureProcesses("setup");
+ await dropTestExportOutLink("setup");
}
diff --git a/editor/e2e/globalTeardown.ts b/editor/e2e/globalTeardown.ts
@@ -10,8 +10,10 @@
//
// Anything reaped here is logged as a regression, not as routine cleanup.
+import { dropTestExportOutLink } from "./exportOutLink";
import { sweepFixtureProcesses } from "./fixtureProcs";
export default async function globalTeardown() {
await sweepFixtureProcesses("teardown");
+ await dropTestExportOutLink("teardown");
}