Foundry.Context.ScenarioExtractor (Foundry v0.4.0)

Copy Markdown View Source

Extracts Studio scenarios from executable test source.

Real test and property bodies are the source of truth. @scenario metadata is optional and may refine category, compliance links, labels, or graph focus for traced steps, but it never creates a scenario on its own.

Summary

Functions

The scenarios only. Kept because most callers want nothing else.

The whole ExTracer.Report -- scenarios, coverage, performance, warnings.

Functions

extract(project_root, nodes, opts \\ [])

The scenarios only. Kept because most callers want nothing else.

extract_report(project_root, nodes, opts \\ [])

The whole ExTracer.Report -- scenarios, coverage, performance, warnings.

⚠️ Coverage is computed here, against the target project, and this is the only place it can be. ADR-036 runs this inside the target as a mix task, so a report the Studio computes in its own VM describes the Studio's repository. MEASURED 2026-09-03: the Studio's coverage panel read "105 nodes still have no scenario coverage" while pointed at Axonn -- 105 is Foundry's own node count. Foundry.Context.ProjectContext therefore carries this report's coverage across the subprocess boundary rather than letting the Studio recompute it.