Guarantees
Delivery
Section titled “Delivery”Diagram: How a transition reaches every dispatcher. The orchestrator writes a transition to its record first. It then sends a signed notification to every instance on the run. Two instances acknowledge. The notification to the tracking instance fails. The tracking instance polls the event feed, finds the event, and catches up. Every instance reads the run and acts on its state.
1/5Written before it is sent. Cleanup opens. The orchestrator writes the transition to its record first, as event 41. A notification never announces something that is not recorded.
2/5Signed and sent. It sends a notification, signed with Standard Webhooks headers, to every instance on the run. Each carries no instructions: it says “look at this run”.
3/5One does not arrive. Two instances answer 2xx. The tracking instance’s notification is refused. It is retried with backoff, and the journal says so if it never arrives.
4/5The event feed backstops it. Every dispatcher also reads the event feed on a cadence. The tracking instance finds event 41 there, and catches up. The feed’s cursor never skips an event.
5/5Each reads the run and acts. Notifications are claim checks. Each dispatcher reads the run and acts on its state, so a duplicate, a late one, or one out of order changes nothing.
┌──────────────────────┐ ┌────────────────────────>│ parcels · east │ │ │ │ │ └──────────────────────┘ ╔═ orchestrator ═══════╗ │ ║ a transition: ╟──────────────────────┘ ┌──────────────────────┐ ║ cleanup opens ╟───────────────────────────────────────────────>│ parcels · west │ ║ ╟──────────────────────────┐ │ │ ╚═══════════╤══════════╝ │ └──────────────────────┘ │ │ │ v ┌──────────────────────┐ ┌─ its record ─────┐ │ tracking │ │ SQLite, durable │ │ │ │ seq 41 written │ └───────────┬──────────┘ └──────────────────┘ │ ^ │ └───────────────────────────────────────────────────────────────────────┘ GET /events?since=40
┌──────────────────────┐ ┌────────────────────────>│ parcels · east │ │ │ │ │ └──────────────────────┘ ╔═ orchestrator ═══════╗ │ ║ a transition: ╟──────────────────────┘ ┌──────────────────────┐ ║ cleanup opens ╟───────────────────────────────────────────────>│ parcels · west │ ║ ╟──────────────────────────┐ │ │ ╚═══════════╤══════════╝ │ └──────────────────────┘ │ │ │ v ┌──────────────────────┐ ┌─ its record ─────┐ │ tracking │ │ SQLite, durable │ │ │ │ seq 41 written │ └───────────┬──────────┘ └──────────────────┘ │ ^ │ └───────────────────────────────────────────────────────────────────────┘ GET /events?since=40
┌──────────────────────┐ ┌────────────────────────>│ parcels · east │ │ │ 2xx ✓ │ │ └──────────────────────┘ ╔═ orchestrator ═══════╗ │ ║ a transition: ╟──────────────────────┘ ┌──────────────────────┐ ║ cleanup opens ╟───────────────────────────────────────────────>│ parcels · west │ ║ ╟──────────────────────────┐ │ 2xx ✓ │ ╚═══════════╤══════════╝ │ └──────────────────────┘ │ │ │ ✕ refused v ┌──────────────────────┐ ┌─ its record ─────┐ │ tracking │ │ SQLite, durable │ │ │ │ seq 41 written │ └───────────┬──────────┘ └──────────────────┘ │ ^ │ └───────────────────────────────────────────────────────────────────────┘ GET /events?since=40
┌──────────────────────┐ ┌────────────────────────>│ parcels · east │ │ │ 2xx ✓ │ │ └──────────────────────┘ ╔═ orchestrator ═══════╗ │ ║ a transition: ╟──────────────────────┘ ┌──────────────────────┐ ║ cleanup opens ╟───────────────────────────────────────────────>│ parcels · west │ ║ ╟──────────────────────────┐ │ 2xx ✓ │ ╚═══════════╤══════════╝ │ └──────────────────────┘ │ │ │ v ┌──────────────────────┐ ┌─ its record ─────┐ │ tracking │ │ SQLite, durable │ │ caught up ✓ │ │ seq 41 written │ └───────────┬──────────┘ └──────────────────┘ │ ^ │ └───────────────────────────────────────────────────────────────────────┘ GET /events?since=40
┌──────────────────────┐ ┌────────────────────────>│ parcels · east │ │ │ cleans up its own │ │ └──────────────────────┘ ╔═ orchestrator ═══════╗ │ ║ a transition: ╟──────────────────────┘ ┌──────────────────────┐ ║ cleanup opens ╟───────────────────────────────────────────────>│ parcels · west │ ║ ╟──────────────────────────┐ │ cleans up its own │ ╚═══════════╤══════════╝ │ └──────────────────────┘ │ │ │ │ v │ ┌──────────────────────┐ ┌─ its record ─────┐ └────────────────────>│ tracking │ │ SQLite, durable │ │ cleans up its own │ │ │ └───────────┬──────────┘ └──────────────────┘ │ ^ │ └───────────────────────────────────────────────────────────────────────┘ GET /events?since=40
- Every transition is durable before it is notified. A transition and the notifications it queues commit in one transaction, and a commit is on the disk before it returns, so no dispatcher hears of something a crash could undo.
- What the orchestrator acknowledged, it keeps. A footprint report, a status or a transition answered with a 2xx survives a crash of the orchestrator’s process or node. A scale test kills it with SIGKILL at random moments under load: over 40 rounds and 62,008 acknowledged reports, nothing acknowledged was lost and the database was whole every time. (A dispatcher’s lease renewal is the one exception: renewals are written together within a second, and the restart grace covers any a crash loses.)
- Notifications are delivered at least once. They are retried, backing off exponentially with jitter, and sent again after a crash if their delivery was not recorded. After too many attempts the journal says so; an instance that has stopped reporting too is then unreachable for the run, and one still reporting is not. Never dropped silently.
- The event feed is the backstop. A dispatcher reads it on a cadence, from where it left off, and acts on whatever its notifications missed. The feed’s cursor never skips an event: events are numbered as they commit, by one writer.
- Everything is idempotent. Notifications are claim checks, and every pass reads the run afresh. A repeat changes nothing.
- A dispatcher remembers nothing it needs. What it has declared, removed or promised is in the footprint, and the dispatcher-sdk reads it back (
Unanswered), so a dispatcher restarted mid-cleanup carries on where it was, and neither removes nor reports anything twice.
These hold on these assumptions, which the orchestrator’s deployment must meet:
- One orchestrator writes its database. One replica,
Recreateon upgrade, and a volume that one pod can mount (ReadWriteOncePodwhere the cluster has it). - The volume honors fsync: a block volume, not a network file system that acknowledges writes it has not stored.
- The volume has room. The orchestrator keeps a reserve and refuses new growth below it; a write that still finds the disk full fails and rolls back, and nothing already committed is lost.
- Backups are copies of a consistent database: SQLite’s online backup, or a tool that streams the write-ahead log. A file copied under a running orchestrator is not a backup.
Coordination
Section titled “Coordination”- No zombie runs. A run whose suite stops renewing its lease is abandoned and cleaned up.
- No zombie instances. An instance whose lease lapses is unreachable, so a replica that scaled away holds no run up.
- The readiness gate fails closed. Required instances report afresh on a cadence. A stale, blocked or unreachable one fails the run, and optional ones never hold the gate.
- Rounds converge, because declarations are pure functions of the footprint.
- The gate counts a round on the footprint it saw. A round reports the footprint version it began from, so one that missed the last growth never opens the gate, however late it reports.
- Declarations are typed: a store, a locator, identities and a resolution. Fields the orchestrator does not know are ignored.
Determinism
Section titled “Determinism”- Record i is a pure function of the definition, the seed, the run and i. No random number generator is involved.
- Identities are derived per record, collision-free, and linted before any traffic.
- Mock images are pinned by digest.
- What a run created can be recomputed from its recorded streams and seeds, for as long as the definitions are kept.
Cleanup
Section titled “Cleanup”- Every footprint entry ends removed and verified, or clean by a date.
- No component touches another team’s data. Dispatchers report what their own systems created, as values and places only.
- A run passes only when every dispatcher completed its cleanup, and the journal says who did what.