pub fn parse_scenario_document(
path: &Path,
) -> Result<ScenarioDocument, DocError>Expand description
Parses and validates a scenario document. Validation order:
(a) the path carries a reserved test-document suffix; (b) the text
deserializes; (c) a non-empty scenario: section exists; (d) no
unit-tier section coexists with it; (e) exactly one route source
is declared, and it is not inline (routes cannot boot in v1, so
the defect fails at load instead of at boot);
(f) each action converts (single-key dispatch, deadlines, durations,
endpoint provisioning, expectation grammar, the direct:-only
expectReply gate) with action-index errors; (g) each partners
entry converts (script grammar, response status range) with
entry-key errors; (h) no env key collides with a declared
bindVar; (i) each partner validate target URI equals a harness
endpoint reference declared by the scenario’s own send/receive
actions, or self-declares the reference: an object-form
provisioning: harness target whose http URI a partners: entry
names. The optional inbound: section converts
between (g) and (h): grammar in every build, activation
demand-gated behind http (ADR-0069 §8). (j) The optional
logs: block converts (clause grammar: contains markers,
load-compiled regex, the noLevelAbove level set) with
clause-naming load errors.