Runtime semantics

Deterministic Execution

Determinism is enforced by protocol boundaries, content identity, and ledger folding.

Deterministic Execution

OpenThymos treats determinism as a runtime property. A run may begin with a stochastic provider, but after an intent is emitted the runtime path is explicit, typed, and recorded.

Deterministic Region

The deterministic region begins at intent admission and ends at ledger commit.

Inside this region, the runtime controls:

The runtime does not ask the model whether authority is valid.

Non-Deterministic Inputs

The following inputs can be non-deterministic:

OpenThymos admits these inputs only at defined boundaries. Once an observation, approval, rejection, or commit is written to the ledger, replay uses the stored record.

Content Identity

Protocol objects derive identity from canonical serialized content. This gives the runtime stable names for:

If two inputs produce the same canonical payload, they produce the same content identity. If content changes, identity changes.

Compiler Determinism

For a fixed (Intent, Writ, World, ToolRegistry, PolicyEngine, CompileContext), the compiler must produce the same result:

Compiler determinism requires stable tool schemas, stable policy ordering, and stable budget estimates for the same input.

Tool Determinism

Tools may observe external systems. The runtime therefore records tool observations and structured deltas. Replay of a completed run does not re-call the tool. It applies the committed delta.

For tools that must support deterministic dry-run verification, the tool contract should expose a deterministic simulator. That simulator is outside the minimum replay guarantee.

Ledger Determinism

The ledger imposes deterministic ordering through sequence numbers and parent links. A valid trajectory has one ordered path from root to head. Branches and delegations create explicit ledger entries rather than implicit side channels.

World Folding

World state is computed by folding commit deltas in sequence order:

World_0 = empty
World_n = apply(World_n-1, Commit_n.delta)

The fold is deterministic when deltas are deterministic and conflict checks are stable. A compare-and-swap conflict during folding is an invariant failure.

Deterministic Execution Guarantees