pub struct Entry {
pub tool: String,
pub stratum: String,
pub verdict: Option<String>,
pub note: String,
pub k1: Option<bool>,
pub k2: Option<bool>,
pub k3: Option<bool>,
pub include_reason: Option<String>,
}Expand description
One entry in a verdict file: a sampled tool, its drawn stratum, and —
once reviewed — a verdict plus an optional note. verdict: None is the
“pending” state; every command that touches the file treats absence of a
verdict as “not yet reviewed”, never as an implicit skip.
Fields§
§tool: StringThe tool name as found on PATH (or supplied via --tools).
stratum: StringThe parse-status label this tool had when it was drawn — recorded at
draw time, not recomputed later, so a tool whose parse changes
between sample and review (a grammar fix landing mid-session)
still reports against the stratum it was actually drawn from.
verdict: Option<String>"correct" / "incomplete" / "wrong" / "skip", or absent while
pending. Stored as a plain string (not an enum) so a hand-edited
verdict file with an unrecognized word fails loudly at the point of
use (parse_verdict_word) rather than silently at deserialization.
note: StringThe reviewer’s free-text note. Becomes an [xfail] reason for a
wrong/incomplete fixture (xtask::audit::cmd_fixtures).
k1: Option<bool>K1 pre-tag: the GCC-family single-dash-long-option parser defect
(short.is_some() && long.is_none() && value_name.is_some()).
Computed once, at sample time, by xtask::audit::k1_signature;
displayed and overridden here (k1=true/k1=false anywhere in a
verdict line or note, via extract_tag_override) exactly the same
way regardless of whether the reviewing tool is xtask audit review
or mandible --review. Some(true) when the tool’s tree contains at
least one matching flag, None when it contains none — never
Some(false), since there is no “confirmed not K1” state worth
asserting for a tool that never exhibited the shape at all.
k2: Option<bool>K2 pre-tag: the existence detector’s own tokenizer gap
(xtask::existence’s line_start_words only considers each line’s
first token, so a multi-column or comma-separated
applet/subcommand list reports every column after the first as
“fabricated” even though it’s right there in the raw text).
Computed once, at sample time, by xtask::audit::k2_signature.
Some(true) when every subcommand-kind existence fabrication for
this tool is explained by the known tokenizer gap, Some(false)
when at least one is not (worth a real look), None when the tool
has no subcommand-kind fabrications to judge at all.
k3: Option<bool>K3 pre-tag: “subcommand help was never fetched, so this node is
a bare stub.” Two distinct causes produce it, both computed once at
sample time by xtask::audit::k3_signature from the same
single-pass snapshot K1/K2 use, and both should tag:
- the attestation gate refused to probe a subcommand because its
name came from a native/cobra artifact rather than a recognized
--helpheading (git-lfs: 36 nodes, 34 suspects, statussuspicious, every subcommand a cobra stub — and, unlike an ordinary un-recursed node that just hasn’t been fetched yet, this shape is structurally permanent: the gate refuses it live, in the TUI, exactly as it does here); - the tool’s subcommands simply carry no flags because their own
help was never fetched (
openssl: 151 subcommands, zero flags anywhere in the extracted tree, root included).
Without this, a reviewer re-derives the same “still empty, still not
this tool’s fault” verdict once per subcommand. Some(true) when the
tool’s snapshot shows at least one of the two shapes, None
otherwise — the same “no Some(false)” convention as K1, since
there is nothing to assert-not for a tool that shows neither shape.
include_reason: Option<String>Some(reason) when this entry was force-included in the sample
outside the normal stratified draw (see xtask::audit::cmd_sample’s
force_include parameter). None for an entry drawn by the
ordinary stratified sample.
Implementations§
Source§impl Entry
impl Entry
Sourcepub fn missing_required_note(&self) -> bool
pub fn missing_required_note(&self) -> bool
True when this entry’s note is obligatory but missing or blank — a
wrong/incomplete verdict with nothing recorded about what was
wrong. See verdict_requires_note.
Sourcepub fn needs_attention(&self) -> bool
pub fn needs_attention(&self) -> bool
True when a review session should still stop at this entry: no verdict yet, or a verdict whose obligatory note never got written.