Editor-global, bounded owner for identity-keyed asynchronous operation feedback.
Selection is deterministic: the newest active operation wins; when none are active, the newest retained terminal operation wins. Starting another operation for the same resource marks the older active operation stale.
Summary
Functions
Returns whether the correlated operation can still receive lifecycle updates.
Marks an active identity canceled.
Dismisses one retained identity; a missing identity is an identity-safe no-op.
Returns an operation by identity.
Finishes an active identity with one of the semantic terminal statuses.
Builds an empty feedback store with an explicit positive retention bound.
Applies a scheduler-authored queued transition if the identity is still active.
Records validated domain progress if the identity is still active.
Applies a running transition if the identity is still active.
Selects the newest active operation, otherwise the newest retained terminal operation.
Returns the number of retained operations.
Marks an active identity stale.
Starts an operation and returns its updated store and monotonic wire identity.
Marks an active identity timed out.
Types
@type t() :: %MingaEditor.State.OperationFeedback{ limit: pos_integer(), next_id: pos_integer(), operations: %{ optional(MingaEditor.State.Operation.id()) => MingaEditor.State.Operation.t() } }
Functions
@spec active?(t(), MingaEditor.State.Operation.id()) :: boolean()
Returns whether the correlated operation can still receive lifecycle updates.
@spec cancel(t(), MingaEditor.State.Operation.id(), String.t()) :: t()
Marks an active identity canceled.
@spec dismiss(t(), MingaEditor.State.Operation.id()) :: t()
Dismisses one retained identity; a missing identity is an identity-safe no-op.
@spec fetch(t(), MingaEditor.State.Operation.id()) :: {:ok, MingaEditor.State.Operation.t()} | :error
Returns an operation by identity.
@spec finish( t(), MingaEditor.State.Operation.id(), MingaEditor.State.Operation.terminal_status(), String.t() ) :: t()
Finishes an active identity with one of the semantic terminal statuses.
@spec new(pos_integer()) :: t()
Builds an empty feedback store with an explicit positive retention bound.
@spec queued(t(), MingaEditor.State.Operation.id(), String.t(), integer(), integer()) :: {:ok, t()} | {:error, MingaEditor.State.OperationQueue.error()}
Applies a scheduler-authored queued transition if the identity is still active.
@spec report_progress(t(), MingaEditor.State.Operation.id(), integer(), integer()) :: {:ok, t()} | {:error, MingaEditor.State.OperationProgress.error()}
Records validated domain progress if the identity is still active.
@spec running(t(), MingaEditor.State.Operation.id(), String.t()) :: t()
Applies a running transition if the identity is still active.
@spec selected(t()) :: MingaEditor.State.Operation.t() | nil
Selects the newest active operation, otherwise the newest retained terminal operation.
@spec size(t()) :: non_neg_integer()
Returns the number of retained operations.
@spec stale(t(), MingaEditor.State.Operation.id(), String.t()) :: t()
Marks an active identity stale.
@spec start( t(), MingaEditor.State.Operation.kind(), MingaEditor.State.Operation.resource(), String.t(), keyword() ) :: {t(), MingaEditor.State.Operation.t()}
Starts an operation and returns its updated store and monotonic wire identity.
@spec timeout(t(), MingaEditor.State.Operation.id(), String.t()) :: t()
Marks an active identity timed out.