Architecture

How Rebase maps run types to Cloud Run execution infrastructure.

The Rebase control plane owns workspace scoping, source snapshots, immutable target versions, run records, and SDK polling. Execution is routed by run_type: user code selects quick, quick_shared, or long, and the platform maps that intent to concrete Cloud Run infrastructure. The resolved path is recorded on each run as the internal execution_backend field.

Rebase workflow and function backend architecture

Function and model runs dispatch directly from the API layer. quick invokes a private isolated Cloud Run service — one service per function, one tagged revision per immutable version — synchronously, so the service is warm after the first call. quick_shared invokes the shared Cloud Run runner service with no per-function provisioning. long starts one Cloud Run Job execution per run.

Workflow runs remain Prefect-backed. Rebase runs a self-hosted Prefect API on Cloud Run; the SDK compiles step calls into a stored step_graph, and the runner executes that graph as Prefect tasks, writing StepRun records as each node starts and completes. For quick workflows, a warm Cloud Run service worker picks up manual runs; for long workflows (and all scheduled runs), a worker creates one Cloud Run Job per run.

All execution paths are Cloud Run. The former Modal, GKE-Prefect, and Prefect Cloud routes have been removed.