Skip to main content

Module eval

Module eval 

Source
Expand description

The evaluation cycle: find due, claim, invoke, ingest, start, release.

One invocation performs the whole cycle and exits. Nothing stays resident. Losing a claim race is a no-op exit, not an error — that is the steady state when several nodes share a heartbeat.

§Why correctness does not rest on the lease

A lease deduplicates “who is working right now”. But the thing that actually needs deduplicating — a firing of trigger T for item I — has a natural identity, so the run id is derived from it. areev run start already refuses a duplicate run id, so two evaluators racing produce one run and one recorded skip, with no lease consulted at all: no duration to guess, no fencing token to compare, no clock-skew window.

The lease then does one narrower job: stopping two nodes from both making the same expensive, side-effecting connector call. Losing it can cost a wasted API call; it can never cause a missed or duplicated firing. That is the risk profile a lease should carry.

Structs§

EvalOptions
Knobs for one evaluation pass.
EvalReport
What one evaluation pass did. Shaped like loop run’s report for symmetry.
Evaluator
Evaluates triggers against one memory.
TriggerStatus
One trigger considered, for --dry-run and status.

Enums§

StartResult
What starting a run did.

Constants§

TRIGGER_NS
Namespace for trigger firing records. Alongside the runtime’s own agent:harness, so operational journalling stays out of user namespaces.

Traits§

RunStarter
Starts the workflow a trigger is bound to.

Functions§

run_id_for
The run id for one firing of one item.
trigger_name
The declaration’s human label, if it has one.