diff --git a/.github/workflows/e2e-live.yml b/.github/workflows/e2e-live.yml
index db21560de..a2df0cd05 100644
--- a/.github/workflows/e2e-live.yml
+++ b/.github/workflows/e2e-live.yml
@@ -138,6 +138,7 @@ jobs:
e2e/preview-scheme.spec.ts
e2e/preview-head-assets.spec.ts
e2e/preview-injection-leak.spec.ts
+ e2e/preview-entry-script.spec.ts
# Container suites, one worker: each Tier-2 case holds a live-preview
# container, prod caps those at 5 *globally* (Sandbox max_instances), and
diff --git a/runner/docs/adr/0033-mcp-service-auth-for-headless-demo-creation.md b/runner/docs/adr/0033-mcp-service-auth-for-headless-demo-creation.md
index b2e480b2b..f36bde7d3 100644
--- a/runner/docs/adr/0033-mcp-service-auth-for-headless-demo-creation.md
+++ b/runner/docs/adr/0033-mcp-service-auth-for-headless-demo-creation.md
@@ -51,6 +51,13 @@ right price for a narrow feature.
refused, `/package.json` required, and caps of 50 files / 256 KB. Offending payloads are
**refused, not filtered** — quietly dropping files would build something the caller did
not write.
+- **The payload has to be able to render**, not just to install. Two request-only gates
+ sit before the budget gate, so a doomed payload never costs a container boot: the
+ manifest must declare the binary its build command invokes (`validateBuildToolchain`,
+ Sentry DEMOS-31), and the framework's HTML entry must load a module
+ (`validateHtmlEntry`, DEV-2741). A document with no ``;
+}
+
+/**
+ * Add the missing entry `\n`,
+ );
+ // Everything else is handed back untouched.
+ assert.equal(body.files["/index.js"], "console.log(1)");
+});
+
+test("the repair is written back, so the next read does not redo it", async () => {
+ const { env, artifacts } = makeEnv([demoRow({ framework: "javascript" })], [], blankSource());
+ await worker.fetch(sourceRequest("abc123"), env, ctx);
+ const stored = artifacts.puts.filter((p) => p.key === "demos/abc123/__source.json");
+ assert.equal(stored.length, 1, "the repair is persisted once");
+ assert.match(JSON.parse(stored[0].value).files["/index.html"], /