ValueRef) are how the Conseqa DSL declares where data comes from. You use them in requirement keys, idempotency key propagation, transaction commit keys, effect execution derivations, transaction output provenance, and branch conditions. Every value reference has two parts: a source that identifies the origin of the data, and a path that identifies a field within that source’s schema.
Value references describe data flow in a way the verifier can analyze. They do not compute values at runtime — they declare logical provenance so the verifier can determine whether derived values are stable across retries.
Structure of a value reference
AValueRef always has two fields:
ValueSource
required
A qualified source identifier. Written either as a
kind:id shorthand string or as a map with kind and id keys.FieldPath
required
A field path relative to the source’s schema. Written as a dotted string (
order_id, customer.id) or as a YAML sequence ([customer, id]). See Field paths.The seven source kinds
input
References a field in the current invocation’s input payload. Use this to read from the request body or subscription message that triggered the operation.
input reference is scoped to invocations of the declaring operation. You cannot reference another operation’s input. The reference is observable from the moment the invocation begins, but it is not automatically replay-stable: whether a field is stable across retries depends on whether the input’s declared identity pins it — see Replay stability.
effect
References a field in the payload of a declared PublicationEffect or RequestEffect. Use this in idempotency_key_propagation to name the target fields in the outbound payload.
effect reference names a field in the declared schema of the effect’s payload. It does not mean the effect has already executed — it establishes value lineage. External effects have no inspectable payload schema and cannot be referenced this way; their results are accessed through effect_result_ok or effect_result_err instead.
transaction_output
References a field of a transaction output: a typed value a transaction deliberately exported into the operation’s control.
transaction_output reference is valid only at program points where the output is definitely available — that is, established or recovered by a transaction on every path reaching the reference site. The verifier enforces this as a structural rule. How the value survives a retry depends on the establishing transaction: natural replayability (route A) or an explicit deduplicated_by commit (route B).
A
transaction_output reference does not imply independent durable storage. The output’s values reach a retry through reconstruction (naturally replayable transaction with a deterministic derivation) or recovery (keyed commit retaining the artifact). The source kind alone says nothing about which route applies.state_machine_subject
References a field on the persistent object governed by the identified state machine subject.
object). state_machine_subject is not scope-restricted — any operation may reference any state machine’s subject fields. However, mutable subject state is not automatically replay-stable. In V1, state machine subject fields are always treated as unknown for replay-stability purposes.
transaction_read
References a field observed by a named read step earlier in the same transaction execution. This source kind is restricted to the transaction that produced the read result.
transaction_read results are transaction-local. They do not become available to later transactions or program steps, and they cannot be exported across the transaction boundary through a value reference alone — only through a establish_transaction_output step. In V1, a provenance chain that reaches a transaction_read also prevents natural transaction replayability.
effect_result_ok
References a field of the Ok payload of a bound effect result. Available only inside the ok arm of a match_result on that result binding.
execute_effect or execute_effect_intent step. The path resolves against the effect contract’s ok schema. effect_result_ok is an operation-local observation — not a transaction artifact — and does not survive the join after the match_result.
effect_result_err
References a field of the Err payload of a bound effect result. Available only inside the err arm of a match_result on that result binding.
err schema. Like effect_result_ok, this source is arm-local and does not survive the join after the match.
Source kinds at a glance
Field paths
A field path identifies a nested value relative to a source schema.customer.id).
Derivation
ADerivation declares how values are produced. The DSL provides two forms:
Derivation
The model provides no fact about how the values are produced. Always declare this explicitly — never omit the
values field on a step.Derivation
The produced values are a deterministic function solely of the declared source values in
from. This does not assert that those sources are replay-stable; replay stability is established separately by the verifier.execute_effectsteps (valuesfield)establish_effect_intenttransaction steps (valuesfield)establish_transaction_outputtransaction steps (valuesfield)returnoutcome (outcome.valuesfield)transitioneffect values (effect_valuesderivations)
deterministic derivation combined with replay-stable provenance roots produces a replay-deterministic value — one that is stable across retries within the same logical class.
Replay stability
The verifier determines whether each value reference is replay-stable relative to a governing key. A reference is stable if every attempt in the same logical class evaluates it to the same logical value. The V1 rules establish stability through these routes:- Key components — every component of the governing key is replay-stable by definition (class membership requires equality).
- Literals — literal values in branch conditions are always stable.
- Identified triggering payload — when the triggering input declares a keyed identity whose fields are fully pinned by the governing key, every field of that input’s payload is stable.
- Recovered artifacts — transaction outputs and effect intents established by a
deduplicated_bytransaction whose key components are all stable are stable (route B recovery). - Reconstructed artifacts — transaction outputs and effect intents established by a naturally replayable transaction, with a replay-deterministic derivation, are stable (route A reconstruction).
- Effect results —
effect_result_ok/effect_result_errreferences are stable per variant under specific conditions: for a request result, when the instance is class-fixed and the target provesresult: replay_consistent; for a deduplicated external result, when the key is stable and the variant is terminal. - Congruence — a value produced by
deterministic { from: [...] }with all stable roots inherits stability.
SelectorValue: literals and references in conditions
Branch conditions useSelectorValue for the equals field of an eq condition. A SelectorValue is either:
- a plain scalar — parsed as a literal value, which is always replay-stable;
- a map — parsed as a
ValueRef, referencing another modeled value.
equals is stable using the same replay-stability rules. A branch whose equals is an unstable value reference is not established to replay, and is reported as an obstacle for idempotency and result-replay analysis.
Real examples from the fixtures
Input references in an idempotency key:effect_result_err inside a match_result err arm:
transaction_read inside a transaction body:
effect_result_ok inside a transaction’s effect_values (video streaming):
Effects
How value references are used in effect idempotency keys and propagation
Program Control
How derivations and conditions appear in program steps