Expand description
The scenario action runner (ADR-0069 §5, §7).
Executes a scenario’s ordered actions against a
PartnerRouter: send
dispatches through the adapter, receive awaits with the action’s
deadline and applies extract into ScenarioVars, sleep uses
tokio time, and validate evaluates the matcher grammar against
the last received message or an extracted variable, or asserts a
partner’s recorded-request count (feature http).
Failure taxonomy (ADR-0069 §7), encoded by variant and named in
Display, never by message text alone:
- Verdict class — the scenario ran and the system under test
failed it:
ScenarioFailure::ReceiveTimeout,ScenarioFailure::ValidationMismatch. - Apparatus class — the scenario never got a meaningful answer:
ScenarioFailure::VarUnresolved(an unset variable is an authoring bug, bd rc-whof),ScenarioFailure::ActionTransport,ScenarioFailure::PartnerStartup,ScenarioFailure::ShutdownFailure,ScenarioFailure::LogCaptureUnavailable.
Verdict-class failures map to exit 1 at the CLI; apparatus-class failures map to exit 2, as do doc-validation failures before the runner ever runs.
Every await is bounded: receive carries the action deadline, and
send is bounded by the document’s sendDeadline, defaulting to
SEND_DEADLINE.
Structs§
- Document
Outcome - The outcome of executing a whole scenario document (ADR-0069 sections 5 and 7).
- Scenario
Vars - Mutable run state carried across actions: scenario variables set by
extract, and the last message received per endpoint forlastReceivedvalidation.
Enums§
- Scenario
Failure - Why a scenario failed (ADR-0069 §7). Verdict-class variants mean the system under test failed the scenario; apparatus-class variants mean the scenario never got a meaningful answer. The CLI maps verdict-class failures to exit 1 and apparatus-class failures to exit 2; doc validation also maps to exit 2.
- Scenario
Verdict - The outcome of a scenario that ran to completion: every action succeeded and every validation passed.
Functions§
- fill_
bind_ vars - Fills the harness bind variables into
vars(ADR-0069 §9): every wired reference withprovisioning: harnessand abindVargets its partner’s boundhost:portauthority from the router, so a scenario string can address the partner ashttp://${NAME}/path. - run_
scenario - Runs a scenario’s actions in order against the router.
- run_
scenario_ document - Executes a scenario document’s actions in order against the router, one recorded outcome per action, stopping at the first failure (the whole-document contract, library-level).