From 35adca22a8da170bc47ba6e4938bb9c5ffbcc2e3 Mon Sep 17 00:00:00 2001 From: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com> Date: Mon, 15 Jun 2026 17:08:22 +0200 Subject: [PATCH] =?UTF-8?q?fix(build):=20bundle=20content/=20into=20standa?= =?UTF-8?q?lone=20via=20tracing=20=E2=80=94=20stop=20/whitepaper=20500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The /whitepaper page reads content/whitepaper.md from process.cwd() at runtime. That dir was supplied by a postbuild copy (deploy-local.sh) which raced with next's standalone recreate, intermittently leaving .next/standalone/content missing → /whitepaper 500 → repeated pre-push smoke failures that blocked unrelated pushes. Add ./content/** to outputFileTracingIncludes for /whitepaper so Next bundles it into the standalone build output deterministically (no postbuild-copy race). Verified after a clean rebuild: content present in standalone, /whitepaper 200, service cwd is the live standalone. Co-Authored-By: Claude Opus 4.8 (1M context) --- next.config.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/next.config.ts b/next.config.ts index 93f870b4e..a8c9a735a 100644 --- a/next.config.ts +++ b/next.config.ts @@ -70,6 +70,13 @@ const nextConfig: NextConfig = { // isn't published to npm yet and the repo is private). Without explicit // tracing, Vercel would tree-shake the file out of the deployment bundle. "/api/agent/install": ["./packages/agent/bin/**"], + // Markdown content read at runtime via process.cwd()/content (e.g. the + // /whitepaper page). Tracing it INTO the standalone build makes it + // deterministically present at .next/standalone/content/, instead of + // relying on the postbuild deploy-local.sh copy — which raced with the + // standalone recreate and intermittently left /whitepaper 500-ing + // (ENOENT content/whitepaper.md), repeatedly failing the pre-push smoke. + "/whitepaper": ["./content/**"], // /api/agent/daemon's bash + python bundle entries are gone — Session 4 of // killing-the-bash-daemon (2026-06-11) deleted the source files and the // route now returns 410 Gone pointing at /download for Fleet Runner.