program field of an operation defines its explicit control flow as an ordered block of steps. Every step in the program describes a causal action, running an inline transaction, executing an inline effect, making a decision, and every reachable path through the program ends at an explicit terminal. There are no loops; the program structure is acyclic by construction.
Transactions and direct effect contracts live inside the program at the step that executes them. There is no operation-level registry to reference back into. A retry traverses the same declared control from the first step. What the retry re-encounters at each transaction or effect step is judged by the replay and idempotency rules the verifier applies to that step.
Program structure
The program is a nested block ofOperationStep values. Decision steps, match_result and branch, each open two sub-blocks (arms), and the verifier analyzes every path through the complete tree.
Step kinds
transaction
Declares and executes one inline atomic transaction at this point in the program. On re-encounter with a keyed commit, resolves the prior Commit(operation, T.id, K) and restores its artifacts instead of executing the body again.
Id
required
Stable logical ID for this inline transaction. Identifies the inline declaration itself (used for keyed commit identity, diagnostics, and proof evidence). Must be unique across all inline transactions in the operation.
Id | null
required
The transactional state boundary.
null only when the transaction performs no application object access and exists solely to produce framework artifacts.string
required
The isolation guarantee:
unspecified, read_committed, snapshot, or serializable.object
required
Keyed commit deduplication contract:
unspecified, not_deduplicated, or deduplicated_by { key }.list[TransactionStep]
required
Ordered transaction body (reads, writes, inserts, deletes, locks, transitions, effect-intent establishments, transaction-output establishments). See Transactions.
idempotency: { kind: deduplicated_by, key: ... }, if a prior commit exists for the same evaluated key, this step resolves that commit and restores all artifacts it retained, transaction outputs and effect intents, without executing the transaction body again. For a transaction without a keyed commit, the body executes.
execute_effect
Declares one inline effect contract and executes it directly at this point in the program.
Id
required
Stable identifier for this inline effect site. Used as
ValueSource::Effect(effect_id) in idempotency-key propagation and other value lineage. Must be unique across inline operation-owned effect sites within the operation.Effect
required
The inline effect contract: a publication, request, or external effect declared in full at this site. See Effects.
Derivation
required
Declares the provenance of the complete outgoing effect payload. Either
kind: unspecified (unknown provenance, declared explicitly) or kind: deterministic with a from list of value references. See Value References.Id
Binds the effect’s synchronous result observation under this name. Only valid for result-bearing effects (request and external effects with a declared
result). Publications have no result and must not declare bind. Omit when you deliberately ignore the result.values derivation are evaluated in the operation-level value context immediately before this step. They may not reference transaction_read bindings, which are local to the transaction that produced them.
execute_effect_intent
Executes an already-established effect intent. The values were fixed when the intent was established; this step runs that fixed instance without recomputing anything.
Id
required
The intent binding to execute. Must have been established by an
establish_effect_intent or by a transition step’s effect_intents map on every path reaching this step (definite availability).Id
Optional result binding, following the same rules as for
execute_effect.match_result
Destructures a bound effect result into its ok and err arms. Use this step to branch on the outcome of a request or external effect; do not use branch for this purpose.
Id
required
The result binding to destructure. Must be bound by an
execute_effect or execute_effect_intent step on every path reaching this step.OperationBlock
required
The block to execute when the result is
Ok. Inside this block, effect_result_ok:<result> is available as a value source.OperationBlock
required
The block to execute when the result is
Err. Inside this block, effect_result_err:<result> is available as a value source.effect_result_ok and effect_result_err do not survive the join after the match. If data from the result must be available after the match, export it through a transaction output inside the arm.
branch
An ordinary control decision over modeled values. Executes the then block when the condition holds; optionally executes the otherwise block when it does not.
Condition
required
The predicate to evaluate. One of four forms, see Conditions below.
OperationBlock
required
The block to execute when the condition holds.
OperationBlock
The block to execute when the condition does not hold. If absent, the branch falls through to the following step. A
branch without otherwise does not terminate its path, the validation rule requires every reachable path to end at a terminal.Conditions
eq, and, and not are deterministic functions of their references. unspecified is never deterministic. A condition is deterministic only when every component is, a single unspecified anywhere in an and or not makes the whole condition unspecified.
For eq, the equals field accepts either a plain scalar literal or a value reference map:
return
Terminates a request-driven execution by constructing the named request input’s declared result. Only valid for operations with a request input; subscription-driven operations use complete.
Id
required
The operation-owned request input whose result contract to return. Must be a
kind: request input.string
required
Either
ok (constructs the input’s ok schema payload) or err (constructs the err schema payload).Derivation
required
Provenance of the result payload. Use
kind: unspecified when provenance is unknown; never omit this field.complete
Terminates an execution that returns nothing. Natural for subscription-driven operations.
complete takes no parameters. Every reachable path in a subscription-driven operation must end at a complete step.
Validation rules
The verifier enforces these structural rules before any replay analysis:- Every reachable path ends at a terminal. A
returnorcompletemust be reachable from every branch. Abranchwithoutotherwiseis not a valid terminal for its path. - No step follows a terminal. Steps after
returnorcompletein the same block are unreachable and reported as errors. - IDs are unique within the operation. Duplicate
Transaction.id, duplicate inlineeffect_id, and duplicate binding IDs are rejected. - Bindings have exactly one producer and are definitely available at every consumer. A transaction output, an effect intent, or an effect result may only be consumed at a program point where a producer has bound it on every falling-through path reaching that point.
- Transaction reads never leave their transaction. A
transaction_readbinding is visible only inside the transaction that produced it. - Variant scope is respected.
effect_result_ok:<r>is valid only inside theokarm of amatch_resultonr;effect_result_err:<r>only inside theerrarm. - Return targets request inputs.
return.requestmust name akind: requestinput of the operation.
Step location notation
Steps carry no location IDs of their own. Diagnostics, proofs, and the visualizer identify steps by their location: a dot-separated sequence of one-based positions and arm names.
When a proof or an obstacle is reported at a location, the same location notation appears in the JSON report’s
evidence and summary fields and in the visualization. StepLocation names the site’s position in the program; keyed commit identity for a transaction is anchored on its id, not on StepLocation.
Decision replay
When the verifier analyzes idempotency or result-replay requirements, it must establish that every decision on the path replays, that every attempt in the same logical class takes the same arm. A decision replays when:- for
branch: the condition is deterministic (nounspecifiedanywhere) and every value reference it observes is replay-stable, or - for
match_result: the matched result is replay-stable.
Complete example: transcode operation
The following program from the video streaming fixture shows amatch_result decision and three inline transactions used across the two arms:
Effects
How to declare inline effect contracts at execution and establishment sites
Value References
How to write values derivations and condition roots in program steps