fabric/graph/fork
Observable membership and outcomes of structured graph forks. Ordinals identify members within a parent activation; equal inputs retain distinct members. A failed member does not discard settled sibling results.
Types
A settled definite failure that the parent node can route on. Detailed member evidence remains in the parent snapshot and child records.
pub type Failure {
Failure(member: Int, reason: String)
}
Constructors
-
Failure(member: Int, reason: String)
pub type Progress {
Active
Uncertain(evidence: String)
Succeeded(output: String)
Failed(reason: String)
Cancelled
}
Constructors
-
Active -
Uncertain(evidence: String) -
Succeeded(output: String) -
Failed(reason: String) -
CancelledOnly use after the child has no unresolved effects.
pub type Reference {
Reference(occurrence: Occurrence, member: Int)
}
Constructors
-
Reference(occurrence: Occurrence, member: Int)
pub type Request {
Request(definition: run.DefinitionId, input: String)
}
Constructors
-
Request(definition: run.DefinitionId, input: String)
Data for the owning graph record. List position is the member ordinal; there is no second set of indices that can disagree with that order.
pub type Snapshot {
Snapshot(
occurrence: Occurrence,
max_members: Int,
concurrency: Int,
members: List(Member),
stop: option.Option(Cause),
)
}
Constructors
-
Snapshot( occurrence: Occurrence, max_members: Int, concurrency: Int, members: List(Member), stop: option.Option(Cause), )
Values
pub fn result_codec(
success: codec.Codec(output),
) -> codec.Codec(Result(output, Failure))
Codec for a typed fork result, including its explicit failure alternative.
The JSON is {"tag": "ok", "value": output} or
{"tag": "error", "value": [member, reason]}.