pub fn resolve_scenario_includes(
scenarios: &mut HashMap<String, Vec<ScenarioNode>>,
) -> Result<(), String>Expand description
Resolve every IncludedScenario { name, children: [] } node
produced by [parse_scenario_nodes] into one whose children
hold a clone of the referenced scenario’s resolved nodes.
Two failure modes are surfaced as parse errors:
- Unknown scenario name —
scenario: foowhere noscenarios.fooexists. - Cycle —
AincludesBwhich (transitively) includesA. The error names the full cycle path so the operator can fix the offending edge.
Resolution is depth-first with memoization so each scenario
is resolved at most once regardless of how many places
reference it. After this pass the workload model carries no
unresolved IncludedScenario nodes; downstream consumers
(scope tree, executor, runner) can treat the variant as a
fully-formed wrapper scope.