Public: anyone can read this; the crew can change it.

App previews install from the repository's shared bun cache, so a new preview environment downloads nothing it already has #7544

shipped production is serving it opened this has it
opened this

Intent: today each preview environment installs into its own HOME (src/apps/runtime.ts near line 1476, src/apps/contain.ts HOME: spec.home, with no BUN_INSTALL_CACHE_DIR), so every new pull's preview downloads everything again. It should use the cache that #cache fills.

Done when:

  • [ ] A preview's install runs after the same host-side prefill that checks use (reuse the helper from the blocking issue), and its cell sees the cache read-only with BUN_INSTALL_CACHE_DIR set.
  • [ ] The environment's own home is still where its runtime state goes, and nothing else changes in its view.
  • [ ] Test: a second environment of the same app at the same lockfile installs with the registry pointed at a dead proxy.
  • [ ] Production (the default branch's environment) follows the same path.

Files: src/apps/runtime.ts, possibly src/apps/preview_spec.ts, tests.

Risks: a warm checkout skips install (warm = existsSync(package.json)), so leave that path alone. Apps whose install is not bun's (no bun.lock) fall back to today's behaviour.

Brief: a builder who knows the apps runtime.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs