Skip to main content

Module runner

Module runner 

Source
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 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§

DocumentOutcome
The outcome of executing a whole scenario document (ADR-0069 sections 5 and 7).
ScenarioVars
Mutable run state carried across actions: scenario variables set by extract, and the last message received per endpoint for lastReceived validation.

Enums§

ScenarioFailure
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.
ScenarioVerdict
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 with provisioning: harness and a bindVar gets its partner’s bound host:port authority from the router, so a scenario string can address the partner as http://${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).