The committed triage file, .juggernaut.triage.json (design notes §7.4): claims that a
mutant is equivalent (no test can tell it from the original), each with its reason,
who made it and the hash of the mutated function when it was made.
A claim's state against a run (state/3):
:lapsed- the function's hash changed (or the function is gone): the claim no longer says anything and the mutant runs;:unacked- a claim on core code that no human has acknowledged: the mutant runs and the claim is surfaced in the summary;:applies- the mutant isequivalent, not run and not scored.
The file is sorted by key and pretty-printed with keys in a fixed order, so a claim's diff reads well in review. A claim made again for the same mutant replaces the old one and drops its acknowledgement.
Summary
Functions
triage with the claim on key acknowledged by name at at.
triage with a claim that mutant is equivalent, for reason, by by (or nil), at
at (an ISO 8601 string), resting on the mutated function's current function_hash.
The triage of a run's mutants: an equivalent result for each mutant whose claim
applies, and one claim map per claimed mutant of the run (id, core, acked,
state, reason, by), as the summary shows them. hash gives a mutant's current
function hash (function_hash/2).
The file's text: entries sorted by key, keys in a fixed order, 2-space indent.
The triage file's name, relative to the project root.
The entry query names (a short id, its hash part, a unique prefix or the key).
The current hash of mutant's function in the project at root (nil when its file
cannot be read), memoised per file in cache (a map; pass the returned one on).
The current hash, in file of the project at root, of the function a mutant key (or
a claim's key) names; as function_hash/3.
The triage file of the project at root.
The triage of the project at root: empty when there is no file.
triage without the claim on key.
The state of entry given the mutated function's current hash (nil when the function
is gone) and whether the mutant is core now (see the module doc).
Writes triage to the project at root (sorted, pretty-printed, atomic).
Types
Functions
triage with the claim on key acknowledged by name at at.
@spec claim( t(), Juggernaut.Mutant.t(), String.t(), String.t(), String.t() | nil, String.t() ) :: t()
triage with a claim that mutant is equivalent, for reason, by by (or nil), at
at (an ISO 8601 string), resting on the mutated function's current function_hash.
@spec classify(t(), [Juggernaut.Mutant.t()], (Juggernaut.Mutant.t() -> String.t() | nil)) :: %{ results: [Juggernaut.Result.t()], claims: [map()] }
The triage of a run's mutants: an equivalent result for each mutant whose claim
applies, and one claim map per claimed mutant of the run (id, core, acked,
state, reason, by), as the summary shows them. hash gives a mutant's current
function hash (function_hash/2).
The file's text: entries sorted by key, keys in a fixed order, 2-space indent.
@spec file_name() :: String.t()
The triage file's name, relative to the project root.
@spec find(t(), String.t()) :: {:ok, entry()} | {:error, Juggernaut.Error.t()}
The entry query names (a short id, its hash part, a unique prefix or the key).
@spec function_hash(Path.t(), Juggernaut.Mutant.t(), map()) :: {String.t() | nil, map()}
The current hash of mutant's function in the project at root (nil when its file
cannot be read), memoised per file in cache (a map; pass the returned one on).
The current hash, in file of the project at root, of the function a mutant key (or
a claim's key) names; as function_hash/3.
The triage file of the project at root.
@spec read(Path.t()) :: {:ok, t()} | {:error, Juggernaut.Error.t()}
The triage of the project at root: empty when there is no file.
triage without the claim on key.
The state of entry given the mutated function's current hash (nil when the function
is gone) and whether the mutant is core now (see the module doc).
@spec write(Path.t(), t()) :: :ok | {:error, Juggernaut.Error.t()}
Writes triage to the project at root (sorted, pretty-printed, atomic).