#[non_exhaustive]pub enum ExplorationViolationKind {
Show 16 variants
Projection(InvariantViolation),
UnstableObligationIds {
first: Vec<String>,
second: Vec<String>,
},
NonDeterministicProjection {
first: Value,
second: Value,
},
ProjectionVariesWithRevision {
left: u64,
right: u64,
detail: String,
},
RejectedCommandMutatedState {
command: Value,
command_type: String,
},
AppliedCommandMutatedInputState {
command: Value,
command_type: String,
},
RejectedCommandApplied {
command: Value,
command_type: String,
rejection: DomainRejection,
},
CatalogedOperationDoesNotCompile {
operation: OperationKey,
},
BlockingInteractionNotBuildable {
rejection: DomainRejection,
},
BlockingInteractionNotAnswerable {
error: InteractionSpecError,
},
DeadEnd,
CaseEndsByDisappearing {
phase: Value,
outcome: Option<Value>,
},
TransitionRemovesCase {
command: Value,
command_type: String,
},
UnreachableOutcome {
outcome: Value,
},
UnserializableState,
UnserializableCommand,
}Expand description
One rule an explored state or transition broke.
The §8.4 rules about phase ownership, terminal outcomes and duplicate
obligation identifiers are reported as Self::Projection: they come from
turnframe_core::flow::check_view, which is the same check the runtime
runs in production. The other variants are exploration-only rules that need
two projections or a transition to observe.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Projection(InvariantViolation)
A projection invariant of spec §8.4 was broken.
UnstableObligationIds
Two projections of the same state produced different obligation identifiers, so an obligation cannot be addressed twice in a row.
Fields
NonDeterministicProjection
Two projections of the same state differed. Projection must be pure (I2).
ProjectionVariesWithRevision
The same state projected differently at two case revisions.
A view is a function of the state: the revision on the case reference says which state was read, and travels into the cards built from the view, but it may not change the phase, the obligations, the blocking requirement, the notices or the outcome. A projector that reads it — to hide an obligation on a fresh case, say, or to phrase a notice differently after an edit — makes the map depend on how often the case was written, which no caller can reason about.
Fields
RejectedCommandMutatedState
A refused command changed the state it was given.
Fields
AppliedCommandMutatedInputState
An applied command changed the state it was given instead of returning a new one.
Fields
RejectedCommandApplied
validate_command refused a command the model then applied. Validation
and execution disagree, so the executor would commit something the
runtime believes it blocked.
Fields
rejection: DomainRejectionWhat validation said.
CatalogedOperationDoesNotCompile
A state’s catalogue offers an operation its own compile_act does not
recognise.
The declaration is in one function and the translation in another, and nothing else relates them — so an operation added to the catalogue and forgotten in the compiler fails as far downstream as a mistake can. The catalogue offers it, the interpreter proposes it correctly with the right arguments, and the user is told his request could not be carried out, on a sentence that was understood perfectly.
Only a workflow returning
turnframe_core::error::UNKNOWN_OPERATION is reported. A refusal for
any other reason is a domain refusal and is left alone: an act whose
arguments the explorer could not invent is refused honestly, and a check
that demanded good arguments would be testing the wrong thing.
Fields
operation: OperationKeyThe operation the catalogue offered.
BlockingInteractionNotBuildable
The blocking requirement of the phase could not be turned into a card.
Fields
rejection: DomainRejectionWhy the workflow refused to build it.
BlockingInteractionNotAnswerable
The card built from the blocking requirement cannot be answered, so the phase would block its case forever (I6).
Fields
error: InteractionSpecErrorWhat is wrong with the card.
DeadEnd
A non-terminal state offers no candidate command and no blocking interaction: the conversation cannot move on from here.
CaseEndsByDisappearing
The projector gave an absent state a terminal phase or an outcome, so it describes a case that ends by disappearing.
A case’s identity outlives its content: removal is a status, never an
absence, and an absent state therefore means not yet and never no
longer. A projector that reads absence as completion is indistinguishable
from one that reads it as a case nobody has started, because the executor
returns the same None for both — so the same view has to serve a
finished case and a fresh one, and the assistant congratulates the user
and then asks them to start over. Give the terminal step a status in the
state instead, the way the traveler sample’s Deleted does.
Fields
TransitionRemovesCase
A simulated transition dropped the case: it was given a state and returned none.
The other half of Self::CaseEndsByDisappearing, seen from the model
rather than from the projector. A domain whose working document is
consumed on success — a draft that becomes a record, an application that
becomes an account — keeps the case and moves it to a terminal status;
the record it produced is a different case, in its own workflow.
Fields
UnreachableOutcome
An outcome the model declares reachable was never projected. Only
reported when the search ran to completion: see
ExplorationReport::truncated.
UnserializableState
A state could not be serialized, so it cannot be deduplicated or shown.
UnserializableCommand
A command could not be serialized, so it cannot be shown in a path.
Trait Implementations§
Source§impl Clone for ExplorationViolationKind
impl Clone for ExplorationViolationKind
Source§impl Debug for ExplorationViolationKind
impl Debug for ExplorationViolationKind
Source§impl<'de> Deserialize<'de> for ExplorationViolationKind
impl<'de> Deserialize<'de> for ExplorationViolationKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ExplorationViolationKind
impl Display for ExplorationViolationKind
impl Eq for ExplorationViolationKind
Source§impl Error for ExplorationViolationKind
impl Error for ExplorationViolationKind
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for ExplorationViolationKind
impl PartialEq for ExplorationViolationKind
Source§impl Serialize for ExplorationViolationKind
impl Serialize for ExplorationViolationKind
impl StructuralPartialEq for ExplorationViolationKind
Auto Trait Implementations§
impl Freeze for ExplorationViolationKind
impl RefUnwindSafe for ExplorationViolationKind
impl Send for ExplorationViolationKind
impl Sync for ExplorationViolationKind
impl Unpin for ExplorationViolationKind
impl UnsafeUnpin for ExplorationViolationKind
impl UnwindSafe for ExplorationViolationKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.