The two effectful operations of the bootstrap, each behind an injected seam so every branch is reachable in-process.
The seams are not indirection for its own sake: without them the fail-loudly
branches are reachable only by spawning a subprocess or installing an
archive, which under minimum_coverage: 100 forces machine-coupled tests
into the coverage run — and a flaky coverage gate is how a suite gets tagged
out and then silently stops running.
Both defaults are literals in the function head rather than captures or named
private functions. &default_runner/2 would leave defp default_runner/2
permanently uncovered, and a closure default costs an uncovered line the
ignore budget cannot absorb.
Summary
Types
The injected seam ensure_task_available!/2 calls instead of Mix.Task.get/1 directly, for the same reason runner/0 is injected.
The injected seam cmd!/3 calls instead of System.cmd/3 directly, so a failure branch is reachable in-process.
Functions
Runs mix ARGS in cd, raising with the captured output on any non-zero exit.
Asserts a generator task is reachable.
Types
The injected seam ensure_task_available!/2 calls instead of Mix.Task.get/1 directly, for the same reason runner/0 is injected.
The injected seam cmd!/3 calls instead of System.cmd/3 directly, so a failure branch is reachable in-process.
Functions
Runs mix ARGS in cd, raising with the captured output on any non-zero exit.
Asserts a generator task is reachable.
Must be called BEFORE any dependency work: mix deps.compile prunes every
archive off the code path, after which this returns nil for an archive that
is still installed on disk.