pub struct ExecutionContract {
pub format_version: u32,
pub kind: EffectKind,
pub remote_idempotency: bool,
pub verification: VerificationContract,
pub handler_version: String,
pub adapter: Option<String>,
pub require_approval: bool,
pub automatic_retry: bool,
pub max_attempts: u32,
}Expand description
Immutable execution assumptions recorded before the first attempt.
Contracts are compared before replay, lease acquisition, or execution.
Retry delays and timeouts are incidental configuration; the lifetime
attempt ceiling is safety relevant and must remain unchanged on reattach.
Changing code while retaining handler_version asserts that its external
semantics are compatible with this contract.
Fields§
§format_version: u32Contract representation version. Currently 1.
kind: EffectKindWhat repeating the external operation does.
remote_idempotency: boolThe application attests remote deduplication of the stable key.
verification: VerificationContractHow the runtime may interpret a remote lookup.
handler_version: StringApplication-defined semantic version, not a crate release version.
adapter: Option<String>Optional trusted provider or adapter identity; never a credential.
require_approval: boolA human decision is required before the first attempt.
automatic_retry: boolRisk policy permits automatic retries.
max_attempts: u32Lifetime attempt ceiling, including the initial attempt.
Implementations§
Source§impl ExecutionContract
impl ExecutionContract
Sourcepub fn new(kind: EffectKind, max_attempts: u32) -> Self
pub fn new(kind: EffectKind, max_attempts: u32) -> Self
Conservative assumptions for an unverified irreversible or reversible operation, with the specified lifetime retry budget.