How Do I Define Reliability Policies?
Reliability policy expresses operational intent in the language. Attach it to the boundary that needs the guarantee: a capability, effect, outcome, event, or lifecycle.
Attach Retry To An Idempotent Boundary
The compiler requires retry semantics to be paired with idempotency for the governed effect. That keeps the model honest about whether retrying is safe.
language dcl 0.9
actor Customer is human
effect SubmitOrder is invocation
policy OrderSubmissionReliability {
family reliability
retry {
attempts 3
}
idempotency required
}
shape OrderSubmissionInput {
orderId: Uuid required
}
capability SubmitCustomerOrder {
intent OrderSubmissionInput from Customer
outcomes {
OrderSubmitted
SubmissionDeferred
}
effect SubmitOrder
policies {
OrderSubmissionReliability governs effect SubmitOrder
}
when {
SubmitOrder unresolved then SubmissionDeferred
otherwise then OrderSubmitted
}
}