DraftStage

sealed class DraftStage

One step in a Draft dataflow graph.

Every stage carries an opId — the symbolic name of the operation it references — and a coordinationKind that tags whether the step is safe to apply without coordination (CoordinationKind.Free) or requires a consensus round (CoordinationKind.Coordinated).

The sealed hierarchy encodes the structural rules of CALM:

No op is ever invoked here. Stages store only symbolic references; execution is the responsibility of the E-5 runtime.

See also

Inheritors

Types

Link copied to clipboard
data class BatchedEmbroider(val opIds: List<OpId>) : DraftStage

Two or more independent Embroider stages at the same dependency level fused into a single consensus round by the G3 consolidateEmbroideries rewrite (in :kuilt-warp-planning).

Link copied to clipboard
data class Embroider(val opId: OpId) : DraftStage

The terminal coordination stage — the single "embroidery" step that requires global agreement.

Link copied to clipboard
data class Filter(val opId: OpId) : DraftStage

A monotone filter stage — retains elements satisfying a predicate.

Link copied to clipboard
data class FusedFilter(val opIds: List<OpId>) : DraftStage

Two or more adjacent Filter stages fused into a single pipeline unit by the E-2 optimizer.

Link copied to clipboard
data class FusedMap(val opIds: List<OpId>) : DraftStage

Two or more adjacent Map stages fused into a single pipeline unit by the E-2 optimizer.

Link copied to clipboard
data class Map(val opId: OpId) : DraftStage

A monotone transform stage — maps each element to a new value.

Link copied to clipboard
data class Source(val opId: OpId) : DraftStage

A source stage — the entry point of a Draft pipeline.

Properties

Link copied to clipboard

Whether this stage requires coordination to apply correctly.

Link copied to clipboard
abstract val opId: OpId

The symbolic name of the operation this stage references. Code never moves; only names do.