Skip to main content

Module handler

Module handler 

Source
Expand description

Handlers and retry policies (02 §10).

Handlers are explicit strategies mounted on state-machine hooks; they yield dispositions, never data-flow outputs (spine R10). Retry mounts at exactly two places: StepBase.retry (act phase, same attempt, new callId) and HandlerAction::Retry (whole-step re-entry from acting, independent budget) — there is structurally no third place.

Structs§

BackoffSchedule
Exponential backoff schedule (inline object in the baseline).
HandlerBinding
A handler mounted on a hook.
RetryPolicy
Retry policy. Applies to the act phase only (spine §6.5 mount point 1); each retry mints a new callId and a new actionIntent WAL record.

Enums§

BackoffMs
Backoff declaration: a plain number of milliseconds, or an exponential schedule. Numbers use serde_json::Number so integers round-trip canonically (02 §12.1 rule 4).
HandlerAction
The disposition produced by a handler; kind values are the closed Disposition enum: retry | continue | escalate | abort | repair (spine A.4). No variant carries outputs — error paths cannot enter the data flow (spine R10). Note on closedness: #[schemars(deny_unknown_fields)] closes each variant object in the generated schema (baseline parity); serde’s internally-tagged deserialization is lenient about unknown fields at runtime — the schema stays authoritative.