Files
orca/cloud/apps/sandbox-control/image/env
Neil e70317fa7c perf(cloud): warm pool per hot environment build; smoke-boot builds; clearer GitHub failures (#54)
Follow-up to #49 (W1 environment builds), control plane only.

- **Warm pool per hot environment build** (`pool.ts`): alongside the golden pool, keep 1 ready VM booted from the active build of each environment that was used or built in the last 2 hours (standard size, at most 20 builds). A create from that environment claims it. Pool deletes never remove the image a VM booted from.
- **Smoke-boot every build before activating it**: orcad must answer on the new image. If the install script broke Orca, that build fails as `smoke_failed` and never reaches a workspace. The boot also takes the first-boot cost so users don't.
- **Prelude**: skips the fetch when the build is already on the requested branch, because Orca fetches the base right before `worktree add`.
- **GitHub token errors**: a minting error now fails the build as `github_unavailable` (step clone). Before, it cloned anonymously and failed with a misleading 404, seen live.

Evidence: shared dev preview alias, private repo, sequential, n=12.

| Create → orcad ready | p50 | p95 |
|---|---|---|
| Before | 4.99 s | 6.71 s |
| After | 3.76 s | 5.67 s |

The only sample above 3.9 s was the first one, which missed the pool while it was cold. Pool hits put the VM phase at 0.25 s. Tests: 221 pass, plus typecheck.
2026-11-09 06:08:11 -08:00
..
2026-11-09 05:45:23 -08:00
2026-11-09 05:45:23 -08:00