fix(build): bundle content/ into standalone via tracing — stop /whitepaper 500

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) <noreply@anthropic.com>
This commit is contained in:
Mao NakamotoandClaude Opus 4.8 committed 2026-06-15 17:08:22 +02:00
1 parent 30f31a88fb
commit 35adca22a8
1 file changed
+7
+7
View File
@@ -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.