Mutare.Report.HarnessDiagnostic (mutare v0.3.1)

Copy Markdown View Source

Compact diagnostics for mutants that ended as :harness_error.

The runner already captures the raw mix test output, but the final reports need a short, stable summary rather than an entire suite log. This module is the shared presentation layer for human, JSON, live, and abort messages.

This module formats the diagnostic. Mutare.Sandbox.Command.Output parses Mix's output: salient_line/1 selects the line to show, and boot_failure?/1 identifies the known boot crash.

Summary

Functions

Return a site-prefixed diagnostic line suitable for multi-error summaries.

Return a one-line diagnostic for a harness-errored result.

Functions

line(result)

@spec line(Mutare.Result.t()) :: String.t()

Return a site-prefixed diagnostic line suitable for multi-error summaries.

summary(result)

@spec summary(Mutare.Result.t()) :: String.t()

Return a one-line diagnostic for a harness-errored result.

Includes the exit status when known plus the output's salient line (Mutare.Sandbox.Command.Output.salient_line/1), truncated. The known self-erasing boot crash gets a cause-specific summary because its output is explicitly not useful for recovering the original exception.