Oi. Dispatch. Drafting
(oi v0.7.0)
Copy Markdown
Temporary result store for a single dispatch pass.
Holds computed outputs keyed by Orchid io_key (e.g. "pred_step|result"),
which is already globally unique. Workers read dependencies from here;
the dispatcher merges per-stage deltas back after each barrier.
Summary
Functions
merge single delta(%{io_key => Orchid.Param}).
Project keys from memory. Distinguishes "missing" from "value is nil": missing keys return an error, nil values are returned as-is.
Types
@type io_key() :: Orchid.Step.io_key()
@type t() :: %Oi.Dispatch.Drafting{ interventions: %{required(io_key()) => term()}, memory: %{required(io_key()) => Orchid.Param.t()} }
Functions
@spec fetch(t(), io_key()) :: {:ok, Orchid.Param.t()} | {:error, :not_found}
@spec new() :: t()
@spec new(%{required(io_key()) => Orchid.Param.t()}) :: t()
@spec put(t(), %{required(io_key()) => Orchid.Param.t()}) :: t()
merge single delta(%{io_key => Orchid.Param}).
@spec resolve_many(t(), [io_key()]) :: {:ok, %{required(io_key()) => Orchid.Param.t()}} | {:error, {:unresolved, [io_key()]}}
Project keys from memory. Distinguishes "missing" from "value is nil": missing keys return an error, nil values are returned as-is.
@spec take(t(), [io_key()]) :: %{required(io_key()) => Orchid.Param.t()}