The runtime is its own append-only write-ahead log — the system-of-record for execution. The open kernel ships in-memory/JSONL, embedded DuckDB and shared Postgres backends behind one interface (event_backends.py); evidence rows persisted to the Historical Evidence Plane are content-addressed and re-verifiable. Hash-chained tamper-evidence of the kernel log itself is not part of the open store.
Because every state is a fold of the append-only log, a mission replays to the same terminal state from its ledger — that is crash recovery (a terminal mission’s outcome is restored on rehydrate, v0.3.23). Replay is evidence-pinned (v0.2.x): a mission binds to a ContextEpoch, and rehydrate() is exact replay — it reproduces the sealed plan pinned to the original evidence and verifies the plan fingerprint + epoch, failing closed on drift (it reconstructs/verifies the decision, it does not re-fire side effects). Planning against current evidence is the separate, explicit re_evaluate(). Authority is restored, never invented: a log that never recorded what the mission was permitted to do raises instead of replaying as a wildcard. Decision inputs are recorded as keys + a SHA-256 digest by default (values stay out of the ledger; rehydrate(inputs=...) must re-supply them and is verified against the digest; merged to main in commit 5832699, after the v0.3.27 tag).
No second engine to operate, sync state with, or reason about.
The cockpit reads and writes straight through the /missions API.
MISSION RUNTIME5/11
Plan -> compile -> graph
One compiler, three sources — human, application & the Discovery Runtime — all compile through this same path; no privileged back door.
The compiler binds each step to a capability by Context Runtime resolution, not a direct registry reach.
The graph is lowered into parallel waves the way a query optimizer schedules a query — each wave releasing only the maximal safe set, so resource conflicts serialize with a reason — a JSON-serializable plan, inspectable & backend-independent.
The active planner enumerates bounded alternatives, simulates and scores them; a policy-promoted plan or routing choice is consumed at plan selection and recorded on the plan (PlanSelected.promoted_choice). Model-selection promotions are recommend-only: the runtime has no model-tier selection point yet.
A launcher that already knows its capability can pin it with ExplicitCapabilityPlanner; Mission.inputs are delivered to that node, and the app-kit launcher refuses a plan that would bind a different side-effecting capability than the one selected (v0.3.26–v0.3.27).
MISSION RUNTIME6/11
Simulation gate before side effects
Every plan is simulated before it runs: expected cost, success probability, latency and approvals are projected from capability metadata and current belief, with no side effects.
The gate is where a bad plan is caught cheaply, before it touches the world.
The projection is attached to the plan, and drives choosing among candidate revisions.
A plan whose projected cost or approvals exceed the mission budget never runs — it replans or escalates. Side-effecting steps are then gated by approval, not by a per-step dry run.
MISSION RUNTIME7/11
World state and belief fusion
The runtime writes mission and world state as it executes.
Belief fusion resolves each world-state key to a fused belief with confidence.
Conflicting sources are surfaced, not silently averaged away.
State estimation is a resolution the runtime asks the Context Runtime to answer.
MISSION RUNTIME8/11
Policy and human decision
Approval is a two-phase-commit gate on side effects — a node is prepared, not committed, until a human approves.
Human approval is captured as an event — approval-as-code, replayable. Over HTTP, approvals reach operators as HMAC-signed, short-lived, replay-guarded, input-bound tokens (an approval for one invoice or amount cannot be reused for another; unset secret fails closed), and client-supplied approval markers are stripped (APPROVAL_TOKENS.md, v0.3.26).
Gates are computed from the node, world, mission, and graph together.
Governance is part of planning, not enforcement bolted on after.
MISSION RUNTIME9/11
Evidence and saga compensation
Every step attaches evidence — verification is CHECK constraints reproduced from an independent source: what was checked, observed & decided. Verification fails closed: one shared classifier rejects a result that carries any failure indicator (error status, staged / pending approval, HTTP ≥400, ok/success false) or whose declared output reads back falsey, so a mission cannot go green with no side effect (v0.3.26). Evidence identity (a versioned, content-addressed EvidenceRef) is carried across the Discovery→Mission boundary and survives rehydration, so replay resolves the exact evidence a decision used.
On failure a saga runs compensating actions to unwind completed steps.
Compensation fires on execution failure and when a human rejects a gate: committed upstream side effects are unwound in reverse order. It is reported honestly — an undo that staged, errored or raised is recorded as NodeCompensationFailed, and the outcome carries compensation_incomplete and the nodes whose effects remain (v0.3.26).
A failed mission leaves a clean, auditable trail & a reversed world; concurrent work is scheduled safely — independent nodes run in parallel, nodes that touch the same resource key serialize (each hold carrying an auditable reason such as 'resource_key=k8s:cluster:prod at limit 1'), and provider fan-out is bounded. The kernel also exposes two seams for an overlay: a pre-dispatch node-admission check (deny-by-default gates before any operator runs) and a per-node metering hook (v0.3.24).
MISSION RUNTIME10/11
Python, Go, and Kotlin/JVM at parity
The kernel exists in Python (reference) and Go (go/mission), held to the same behavior; a Kotlin/JVM port for Apache Spark / Databricks is described in whitepaper v9 and is not in the public repository.
The Go port carries the P0-P11 planes and the v6 template set. Newer Python-kernel features — ContextEpoch-pinned rehydrate, signed approval tokens, compensation-failure reporting, digest-only input recording — are not yet in the Go port.
Three implementations are a forcing function that keeps the contracts honest.
The safe-concurrency contract — resource/conflict keys, the maximal-safe wave, and per-decision scheduler EXPLAIN — is conformance-tested identically in Python and Go; the Go port now also executes each wave in parallel (not just Python).
Per-node EXPLAIN lives in Python's HTTP surface; the Go port is a library kernel.
deploy_app · teardown_app · cost_audit — DevOps as governed missions.
Same outcomes, dependency shape, value hints, and approval gates across the Python and Go implementations (Go lacks the extra Python-only templates such as sky_deploy).
Sidekick is the supervisor that drives these through the kernel.