Follow the deploy pipeline
Move commits through queue, build, gate, migrations, and Cello deploy.
Move through each pipeline step
- Queue behind the host’s single build semaphore (sized at half the CPUs); there is no per-owner or per-plan priority.
- Check out the commit into the app’s work directory with
checkout --force clean -ffdx -e node_modules. - Run
bun install(with--frozen-lockfilewhen a lockfile is present), skipped on matchingpackage.json/bun.lockhashes; each step times out after 120 s. A frozen install that fails withlockfile had changesretries once without the flag in the same sandbox; the new or regenerated lockfile is committed back after a passing build and gate (step 5b below). Any other install failure (an unknown package, the network) fails the deploy with its own output and commits nothing. - Run
bun run build; wrangler validation rejects unknown config keys by name (full list: Accepted config keys). - Pass the moderation gate; nothing uploads before it passes.
5b. Commit the install’s new or regenerated
bun.lockback to the app’s repo asOuter platform(Add bun.lockfor a missing lockfile,Refresh bun.lockfor a stale one, both with(package.json changed)), so the next build installs frozen and reproducibly. The lockfile is committed only after a passing build and gate; previews and deploys that fail before that never touch main, while a later migrate or upload failure keeps the (valid) lockfile commit. The commit never fails the deploy; a moved head or an unreadable lockfile just leaves it to the next deploy. - Apply D1 migrations scoped by key: before upload when the live version declares every database being migrated, otherwise upload, wake, confirm the fleet adopted the new version over
POST /reload(bounded at 60 s), then migrate. A fleet that never reports the new version fails the deploy at the migrate step without runningcello d1. - Deploy with Cello, then poll fleet health; a failed step or health check keeps the previous version serving.
- Expect wiped worktrees: sleep, failed builds, and deletes remove everything except
node_modules.
Watch a deploy to its terminal state
- Watch
commitmove fromqueuedthrough terminal states. - Set
OUTER_TOOL_WAIT_S(default 50 s) as the status wait; past it expectbuildingand poll withdeploy_status wait: true. - Read outcomes as
success,failed(step plus error plus ≤8 KiB tail plus structureddiagnosticsparsed from tsc, oxlint, Vite/esbuild andbun testoutput), orblocked(gate findings).
Add or remove a dependency
Edit only package.json (add the package, bump or drop the version) and run the normal stage/check/ship flow — never hand-write bun.lock. A repo with no lockfile gets one created and committed; a stale one is refreshed the same way. check refreshes in the sandbox and reports lockfile_refreshed: true; shipping then deploys it and the platform commits the lockfile after the build and gate pass. A refresh that fails (an unknown package) fails the step with the package named, so read the error and fix package.json.
bun.lock reads through read_files, by path or by listing the tree. It stays out of search_code results unless include_generated: true, and out of the open_app tree — that is noise filtering, not access control.
Verify without deploying
check {app} runs install, build, typecheck (bun x tsc --noEmit when the template has tsconfig), lint (oxlint when present) and bun test over the staged draft in the build sandbox. It never deploys, never spends a code change, and charges build minutes. It returns pass/fail with the same structured diagnostics a failed deploy carries.
For the person-side walkthrough, see How deploys work.