Report Schemas¶
Mutarust can write JSON and HTML files after a completed mutation run. A report is written only when a command option or configuration field enables it. A baseline update does not write these reports.
| File | Enable with |
|---|---|
report.json |
json_output: true |
mutarust-summary.json |
--logger-summary-json |
mutarust-report.html |
html_output: true |
mutarust-agentic.json |
--logger-agentic-json |
mutarust-gitlab.json |
--logger-gitlab |
GitHub Actions warnings use --logger-github. They print to standard output.
They do not write a file.
See the command guide and the configuration guide for how to enable each report.
Full report: report.json¶
Enable with json_output: true in a configuration file:
{
"metadata": {
"version": "0.2.1",
"hasCoverage": false,
"oneMutant": false
},
"stats": {
"totalMutantsCount": 2,
"killedCount": 1,
"notCoveredCount": 0,
"escapedCount": 1,
"errorCount": 0,
"skippedCount": 0,
"msi": 0.5,
"coveredCodeMsi": 0.0
},
"mutatorStats": [
{
"name": "conditional/bool-literal",
"killed": 1,
"escaped": 1,
"skipped": 0,
"total": 2
}
],
"escaped": [
{
"id": "4582b234c128077507b7558eb62c337e",
"blacklistChecksum": "2dc2c146da136da396da6529a670b07e",
"mutator": {
"mutatorName": "conditional/bool-literal",
"originalFilePath": "checked/src/lib.rs",
"originalStartLine": 2
},
"diff": "--- checked/src/lib.rs\n+++ checked/src/lib.rs\n@@ -2,1 +2,1 @@\n-pub fn unchecked() -> bool { let value = true; value }\n+pub fn unchecked() -> bool { let value = false; value }\n"
}
],
"killed": [
{
"id": "c2b28e81b2cc0af0ff4a6a1225106223",
"blacklistChecksum": "c056b4a14386291b011db5e4053d8e58",
"mutator": {
"mutatorName": "conditional/bool-literal",
"originalFilePath": "checked/src/lib.rs",
"originalStartLine": 1
},
"diff": "--- checked/src/lib.rs\n+++ checked/src/lib.rs\n@@ -1,1 +1,1 @@\n-pub fn checked() -> bool { let value = true; value }\n+pub fn checked() -> bool { let value = false; value }\n"
}
],
"errored": []
}
| Field | Type | Description |
|---|---|---|
metadata.version |
string | Mutarust package version |
metadata.hasCoverage |
boolean | True when normal coverage shaped the run |
metadata.oneMutant |
boolean | True when --run-mutant-id selected one mutant |
stats |
object | Same fields as the compact summary |
mutatorStats |
array | Per-mutator counts for tested mutants; omitted when empty. The killed field counts killed and errored mutants, as in Mutago. |
escaped |
array | Escaped mutants |
killed |
array | Killed mutants |
skipped |
array | Skipped mutants; omitted when empty |
errored |
array | Errored mutants |
notCovered |
array | Not-covered mutants; omitted when empty |
generated |
array | Generated mutants from dry-run or no-exec; omitted when empty |
*.id |
string | Stable mutant ID |
*.blacklistChecksum |
string | Blacklist checksum; put it in a --blacklist file to accept this mutant |
*.mutator.mutatorName |
string | Mutator name |
*.mutator.originalFilePath |
string | Repository-relative source path |
*.mutator.originalStartLine |
integer | One-based source line of the mutation |
*.diff |
string | Unified source diff |
*.processOutput |
string | Optional error detail; omitted when absent |
Score fields use a ratio from zero to one. Source paths use / separators.
Documented report forms¶
| Form | Shape |
|---|---|
| Empty run | All counts are zero. escaped, killed, and errored are empty arrays. Optional arrays are omitted. |
| Coverage run | metadata.hasCoverage is true. notCovered lists uncovered mutants when any exist. coveredCodeMsi uses covered mutants only. |
| One-mutant run | metadata.oneMutant is true. Arrays hold only the selected mutant. |
| Dry-run or no-exec | Results appear in generated. Tested-state arrays stay empty. |
| Baseline update | No JSON report is written. |
Published JSON Schema: schema/report.schema.json.
Compact summary: mutarust-summary.json¶
Enable with --logger-summary-json:
{
"totalMutantsCount": 2,
"killedCount": 1,
"notCoveredCount": 0,
"escapedCount": 1,
"errorCount": 0,
"skippedCount": 0,
"msi": 0.5,
"coveredCodeMsi": 0.0
}
| Field | Type | Description |
|---|---|---|
totalMutantsCount |
integer | Total mutants in the run |
killedCount |
integer | Killed mutants |
notCoveredCount |
integer | Not-covered mutants |
escapedCount |
integer | Escaped mutants |
errorCount |
integer | Errored mutants |
skippedCount |
integer | Skipped mutants |
msi |
number | Mutation score from zero to one |
coveredCodeMsi |
number | Covered-code mutation score from zero to one |
Use this file for badges and dashboards. msi and coveredCodeMsi are ratios
from zero to one, not percentages from zero to 100.
Published JSON Schema: schema/summary.schema.json.
HTML report: mutarust-report.html¶
Enable with html_output: true in a configuration file:
The file is self-contained. It uses only inlined CSS and JavaScript. It does not load assets from an external repository or network host.
The report shows:
- Run counts for total, killed, escaped, errored, not-covered, and skipped mutants
- Total mutation score and covered-code mutation score as percentages
- A per-mutator result table
- Escaped-mutant evidence grouped by source file, with stable mutant IDs, blacklist checksums, and unified diffs
An empty run still writes a valid HTML file with zero counts and the text
No escaped mutants.
Agent-ready report: mutarust-agentic.json¶
Enable with --logger-agentic-json:
{
"generated_at": "2026-08-02T22:00:00Z",
"msi": 0.5,
"escaped_count": 1,
"reminder": "A mutant is an example of how this code could be wrong — it's not a script for the test. Don't assert on the mutant directly. Instead ask: if this code were buggy, what would a caller of the public API observe go wrong? Write a test for that.",
"mutants": [
{
"id": "4582b234c128077507b7558eb62c337e",
"file": "checked/src/lib.rs",
"line": 2,
"mutator": "conditional/bool-literal",
"description": "Changes: `pub fn unchecked() -> bool { let value = true; value }` → `pub fn unchecked() -> bool { let value = false; value }`",
"kill_hint": "Think about what a caller would observe if this flag were wrong. Write a test that drives the code via its public API with both values and asserts the different outcomes that a correct caller should see",
"diff": "--- checked/src/lib.rs\n+++ checked/src/lib.rs\n@@ -2,1 +2,1 @@\n-pub fn unchecked() -> bool { let value = true; value }\n+pub fn unchecked() -> bool { let value = false; value }\n",
"context_start_line": 1,
"context_lines": [
"pub fn checked() -> bool { let value = true; value }",
"pub fn unchecked() -> bool { let value = true; value }"
],
"test_files": [
"checked/tests/mutation.rs"
]
}
]
}
| Field | Type | Description |
|---|---|---|
generated_at |
string | RFC 3339 generation time |
msi |
number | Mutation score from zero to one |
escaped_count |
integer | Escaped mutant count |
reminder |
string | Interpretation reminder for agents |
mutants[].id |
string | Stable mutant ID |
mutants[].file |
string | Repository-relative source path |
mutants[].line |
integer | One-based source line of the mutation |
mutants[].mutator |
string | Mutator name |
mutants[].diff |
string | Unified source diff |
mutants[].context_start_line |
integer | One-based line of context_lines[0] |
mutants[].context_lines |
array | Nearby source lines |
mutants[].test_files |
array | Nearby test file paths |
mutants[].description |
string | Plain-language description of the change |
mutants[].kill_hint |
string | Hint for a test that can kill the mutant |
An empty run writes escaped_count zero and an empty mutants array. Each
escaped mutant always includes description, kill_hint,
context_start_line, context_lines, and test_files. Missing source context
or nearby tests use an empty list and context_start_line zero.
Published JSON Schema: schema/agentic.schema.json.
GitHub Actions warnings¶
Enable with --logger-github:
Mutarust prints one GitHub Actions warning for each escaped mutant:
::warning file=checked/src/lib.rs,line=2,title=Mutant escaped (conditional/bool-literal)::Escaped mutation at checked/src/lib.rs:2 — add a test to kill it
Source names are repository-relative. Line numbers are one-based. Special characters in annotation properties and messages use the GitHub Actions percent escapes. A run with no escaped mutants prints no warnings.
GitLab Code Quality report: mutarust-gitlab.json¶
Enable with --logger-gitlab:
[
{
"type": "issue",
"check_name": "conditional/bool-literal",
"description": "Escaped mutant (conditional/bool-literal) at checked/src/lib.rs:2 — no test kills this mutation",
"severity": "minor",
"fingerprint": "4582b234c128077507b7558eb62c337e",
"location": {
"path": "checked/src/lib.rs",
"lines": {
"begin": 2
}
}
}
]
| Field | Type | Description |
|---|---|---|
type |
string | Always issue |
check_name |
string | Stable mutator name |
description |
string | Escaped-mutant description |
severity |
string | Always minor |
fingerprint |
string | Stable mutant ID |
location.path |
string | Repository-relative source path |
location.lines.begin |
integer | One-based source line of the mutation |
An empty run writes an empty JSON array. Configure the file as a GitLab
artifacts:reports:codequality path so merge requests show the findings.
Published JSON Schema: schema/gitlab.schema.json.