pub struct SeededCase<W: WorkflowDefinition, E: WorkflowExecutor<W>> {
pub executor: E,
pub actor: ActorContext,
pub case_ref: CaseRef,
pub first: W::Command,
pub second: W::Command,
pub refused: W::Command,
}Expand description
A fresh executor, the case seeded in it, and the commands the suite drives it with.
The suite builds every envelope itself — identifiers, idempotency keys and batch scope are derived, not supplied — so an adopter only has to say what to execute, never how to address it.
Fields§
§executor: EThe executor under test, holding exactly one case.
actor: ActorContextThe actor every envelope runs as. Its account owns the seeded case.
case_ref: CaseRefThe seeded case, at the revision the seed left it.
first: W::CommandA command that applies from the seeded state.
It must not be naturally idempotent: applying it twice has to leave a state different from applying it once (append a line, do not assign a field). A suite that used an assignment could not tell a replay from a second execution, which is the whole point of half the checks here.
second: W::CommandA command that applies after first and serializes
differently from it.
refused: W::CommandA command the domain refuses, both from the seeded state and from the
state first leaves behind.
The refusal must come from the domain — ExecutionError::Rejected —
and not from a revision or an idempotency rule, because the checks that
use it are about what a refusal leaves behind.