fix(turbo): hash local env inputs #40

Merged
vince merged 1 commit from codex/turbo-env-inputs into main 2026-06-20 07:52:40 +02:00
Owner

Summary

Accounts for local .env* files in cacheable Turbo task hashes for the Vite web build and Storybook build.

Why

Turborepo does not load .env files itself, but Vite/Storybook can. Without .env* in task inputs, local env file changes can leave cacheable build artifacts stale.

Changes

  • Adds inputs: ["$TURBO_DEFAULT$", ".env*"] to build.
  • Adds the same input set to build-storybook.
  • Adds a workspace boundary test covering the cache-input invariant.

Testing

  • Red/green: bun run --cwd apps/web test:unit src/lib/workspace-boundary.test.ts
  • Turbo dry-run hash probe with temporary apps/web/.env.local showed the web build hash changed and .env.local appeared in inputs.
  • bun run test:qa
  • bun run db:check
  • git diff --check
  • podman build -f apps/web/Containerfile -t localhost/dimensionlab-website:codex-env-inputs .
  • Runtime smoke for the rebuilt image served / and /api/dashboard.

Notes

Follows the official Turborepo environment variable guidance for .env file hashing.

## Summary Accounts for local `.env*` files in cacheable Turbo task hashes for the Vite web build and Storybook build. ## Why Turborepo does not load `.env` files itself, but Vite/Storybook can. Without `.env*` in task inputs, local env file changes can leave cacheable build artifacts stale. ## Changes - Adds `inputs: ["$TURBO_DEFAULT$", ".env*"]` to `build`. - Adds the same input set to `build-storybook`. - Adds a workspace boundary test covering the cache-input invariant. ## Testing - Red/green: `bun run --cwd apps/web test:unit src/lib/workspace-boundary.test.ts` - Turbo dry-run hash probe with temporary `apps/web/.env.local` showed the web build hash changed and `.env.local` appeared in inputs. - `bun run test:qa` - `bun run db:check` - `git diff --check` - `podman build -f apps/web/Containerfile -t localhost/dimensionlab-website:codex-env-inputs .` - Runtime smoke for the rebuilt image served `/` and `/api/dashboard`. ## Notes Follows the official Turborepo environment variable guidance for `.env` file hashing.
vince added 1 commit 2026-06-20 07:49:50 +02:00
vince merged commit 021f2cf20e into main 2026-06-20 07:52:40 +02:00
Sign in to join this conversation.
No description provided.