Cloud Development Environment Platform  ·  View 14 of 21  ·  Runtime

Prebuild Pipeline

How a create becomes a restore, and what makes a cached environment safe to trust.

Editable source SVG draw.io All views
Trigger Push to a branch Definition change Per-tenant rate limit fan-out cap Resolve Pin image digest Hash lockfiles validity predicate Build Clone Install dependencies through the proxy post-create Capture Snapshot after post-create the artefact Index as valid (repo, rev, lock) Serve Warm pool popular pairs Create = restore p95 ≤ 25 s Rebase onto newer commit Retire Garbage-collect superseded Inline build fallback p95 ≤ 4 min no valid prebuild pre-start Prebuild Pipeline — Making a Start a Restore External / third party Decision point Application we own Data store Risk / gap failure / alternate event / async Validity is a predicate over digest, definition revision and lockfile hash — never an age. A stale prebuild is worse than a slow start. v 1.0 · owner Platform Architecture · date 2026-10

Decisions

  • The prebuild artefact is a snapshot taken after the post-create step, rebased onto newer commits, which is what keeps a create at 25 seconds rather than four minutes (ADR-07).
  • Fan-out is rate-limited per tenant: prebuilding every branch of every active repository is the easiest way to spend a fleet on environments nobody opens.
  • A cache miss is visible, not silent: the requester is told which path was taken and what it cost in start latency.

Assumptions

  • Create from a valid prebuild p95 ≤ 25 s; from a warm pool p95 ≤ 3 s; inline build p95 ≤ 4 min with progress from the first second.
  • The most recent valid prebuild per active branch is retained; superseded ones are collected.

Risks

  • A silently stale prebuild produces a workspace that differs from CI, which is worse than a slow start and much harder to debug — hence a predicate rather than a heuristic.
  • Rebasing a post-create snapshot onto a newer commit is correct until a dependency change makes it wrong; the lockfile hash is the only thing standing between the two cases.