Skip to main content

Module workloop

Module workloop 

Source
Expand description

Workloop vocabulary: arming, invariants, tolerance, health, alarms, hatch identity. Workloop domain vocabulary: arming, invariants, tolerance, health, alarms, and the hatch dedupe identity.

A workloop is the perpetual-work document kind: its completion is an incident, its header declares invariants with tolerances, and its cadence is an engine-side dead-man switch. This module carries the pure vocabulary the engine, stores, and surfaces share; the engine-side services live in the aion crate.

Structs§

CarryContract
The carry a workloop threads from one generation to the next, and the DEFAULTS that seed generation 1 (R-carry).
HealthSample
One health sample recorded against a loop invariant (R3.3).
InvariantAlarm
A raised invariant alarm — the payload of crate::Event::InvariantUnconfirmed, carried as one value so the health engine, the Recorder, and the trigger layer all speak the same record.
InvariantSpec
One declared invariant (R2.1): a name, the type of its current-state record, its tolerance, and the routes that confirm it (R3.3).
ToleranceSpec
Declared tolerance for one invariant (R2.3): tolerates N consecutive unhealthy samples and/or unconfirmed for duration D.
WorkloopArming
How a workloop is armed (R2.4): every <duration> (cadence) and/or on <signal> (triggered), one construct family. A loop with neither is a declaration error, refused by the constructors.
WorkloopSpec
The declared shape of one workloop, as the engine takes it: arming, invariants, and the retention window — all REQUIRED parameters, refused when absent or degenerate (the estate rule: no assumed defaults).

Enums§

AlarmCause
Cause carried on the ONE alarm path (design brief R4.2).
HealthStatus
Health verdict of one sample against one invariant.
WorkloopSpecError
Errors refusing an invalid workloop declaration at the engine boundary.

Constants§

WORKFLOW_KIND_ATTRIBUTE
Search attribute name that records a run’s document kind on the listing surface.
WORKLOOP_KIND
The WORKFLOW_KIND_ATTRIBUTE value recorded for workloop runs.

Functions§

hatch_workflow_id
Derives the deterministic workflow id for a hatch (R13.1 mandatory dedupe).
workflow_kind
The run’s document kind, projected from recorded history.
workflow_kind_from_attributes
The run’s document kind, projected from an already-folded search-attribute map (the same map crate::search_attributes_from_events produces).