fallow_output/audit_weakening.rs
1//! Audit weakening-signal output contracts.
2
3use serde::Serialize;
4
5/// The category of a single weakening signal.
6#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]
7#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
8#[serde(rename_all = "kebab-case")]
9pub enum WeakeningKind {
10 /// A test was removed or skipped.
11 TestWeakened,
12 /// A coverage or quality threshold was lowered.
13 ThresholdLowered,
14 /// A suppression was added.
15 SuppressionAdded,
16 /// A security check or step was removed from CI.
17 SecurityCheckRemoved,
18}
19
20/// One weakening signal: a category, the file it was detected in, and a short
21/// human-readable evidence string. Reviewer-private; never gates.
22#[derive(Debug, Clone, Serialize)]
23#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
24pub struct WeakeningSignal {
25 /// What kind of guardrail was weakened.
26 pub kind: WeakeningKind,
27 /// Root-relative path of the changed file the signal was detected in.
28 pub file: String,
29 /// Short evidence string (e.g. the offending token or the threshold delta).
30 pub evidence: String,
31}