gobridge

0004 — Single-use runtime lifecycle and terminal wedge

Status: accepted Date: 2026-07-03 Deciders: GoBridge core

Context

A runtime instance owns transports, stores, and route runners. Restarting a stopped instance in place would have to reset every one of those, and any missed reset leaks a goroutine, a connection, or a stale lease. The file-based deployment also swaps configuration by replacing the runtime instance, which raises a harder question: what happens when the swap fails and recovery to the previous runtime also fails? The process is then holding no working runtime and cannot build one.

Health checks make this concrete. If /live returns 200 while the process holds no functioning runtime, the orchestrator keeps routing traffic to a task that can never serve it. The failure must be visible to the orchestrator so it restarts the task.

Decision

A runtime is single-use, and a wedged bootstrap is terminal — the process exits and /live fails closed.

Consequences

Rejected alternatives