Expand description
shigoto-gate — typed precondition Gate trait + standard gates.
Spec: theory/SHIGOTO.md §III.9. Gates are PURE — they evaluate
against the scheduler snapshot without IO. IO-dependent gating is
itself a Job that produces a typed fact a downstream gate checks.
Structs§
- AllUpstreams
Terminal AllUpstreamsTerminal— every direct DAG predecessor has reached a terminal phase ({Succeeded, Skipped, Deadlettered}). The scheduler implicitly applies this gate to enforce DAG edge semantics; consumers don’t normally register it explicitly.- Gate
Context - Everything a Gate needs to make its decision: the job in question,
the FSM snapshot (every other job’s phase), the DAG (so gates
like
AllUpstreamsTerminalcan ask about predecessors). - Operator
Approved OperatorApproved— pass iff an external operator has flipped a pre-arranged flag. The flag itself lives in the consumer’s state store; this gate is a thin wrapper that holds anArc<AtomicBool>or similar. v0.1 ships with aClosurevariant that takes aFn() -> boolfor tests + ad-hoc cases.
Enums§
Traits§
- Gate
- One typed precondition. Pure — no IO. Gate impls that “need” IO are antipatterns; the right shape is a Job that emits a typed fact and a downstream gate that checks the fact.
Functions§
- reduce
- Reduce a cohort of Gate outcomes to one
GateAggregatethat the FSMadvance()consumes. Worst-outcome wins: any Skip → Skipped; no Skip but any Wait → SomeWaiting; otherwise → AllPassed. The first Skip’s reason is preserved.