Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion apps/app/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", ".env*"],
"outputs": [".next/**", "!.next/cache/**", "!.next/dev/**"],
"env": ["NEXT_PUBLIC_API_URL", "NEXT_PUBLIC_AUTH_URL"],
"env": [
"API_URL",

@cubic-dev-ai cubic-dev-ai Bot Sep 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This fix re-declares the root env values by hand instead of merging them, so it stays fragile. Per the Turborepo docs, a per-package turbo.json array field like env completely replaces the root value by default; the documented way to append to the inherited list is the $TURBO_EXTENDS$ microsyntax as the first element. Because this change hardcodes API_URL/APP_URL/NEXT_PUBLIC_API_URL (already in the root build.env) plus NEXT_PUBLIC_AUTH_URL, the next variable added to the root build.env is silently dropped from the app build again — the exact failure class this PR claims to fix. Replace the hardcoded list with $TURBO_EXTENDS$ so future root additions propagate automatically.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/app/turbo.json, line 10:

<comment>This fix re-declares the root env values by hand instead of merging them, so it stays fragile. Per the Turborepo docs, a per-package `turbo.json` array field like `env` completely replaces the root value by default; the documented way to append to the inherited list is the `$TURBO_EXTENDS$` microsyntax as the first element. Because this change hardcodes API_URL/APP_URL/NEXT_PUBLIC_API_URL (already in the root `build.env`) plus NEXT_PUBLIC_AUTH_URL, the next variable added to the root `build.env` is silently dropped from the app build again — the exact failure class this PR claims to fix. Replace the hardcoded list with `$TURBO_EXTENDS$` so future root additions propagate automatically.</comment>

<file context>
@@ -6,7 +6,12 @@
 			"outputs": [".next/**", "!.next/cache/**", "!.next/dev/**"],
-			"env": ["NEXT_PUBLIC_API_URL", "NEXT_PUBLIC_AUTH_URL"],
+			"env": [
+				"API_URL",
+				"APP_URL",
+				"NEXT_PUBLIC_API_URL",
</file context>
Fix with cubic

"APP_URL",
"NEXT_PUBLIC_API_URL",
"NEXT_PUBLIC_AUTH_URL"
],
"passThroughEnv": [
"AGENT_BRIDGE_SECRET",
"AGENT_URL",
Expand Down