Skip to main content

DuplicationOutput

Type Alias DuplicationOutput 

Source
pub type DuplicationOutput = DupesOutput<DupesReportPayload, DuplicationGroup>;
Expand description

Concrete duplication output contract returned by typed programmatic runs.

Aliased Type§

pub struct DuplicationOutput {
Show 16 fields pub schema_version: SchemaVersion, pub version: ToolVersion, pub elapsed_ms: ElapsedMs, pub report: DupesReportPayload, pub clone_groups_shown: usize, pub clone_groups_omitted: usize, pub clone_families_shown: usize, pub clone_families_omitted: usize, pub grouped_by: Option<GroupByMode>, pub total_issues: Option<usize>, pub groups: Option<Vec<DuplicationGroup>>, pub baseline_staleness: Option<BaselineStaleness>, pub gate_outcomes: Option<GateOutcomes>, pub meta: Option<Meta>, pub workspace_diagnostics: Vec<WorkspaceDiagnostic>, pub next_steps: Vec<NextStep>,
}

Fields§

§schema_version: SchemaVersion

Duplication output schema version.

§version: ToolVersion

Fallow CLI version that produced this output.

§elapsed_ms: ElapsedMs

Wall-clock analysis duration in milliseconds.

§report: DupesReportPayload

Duplication report body, flattened into the envelope root.

§clone_groups_shown: usize

Number of clone groups carried in clone_groups[].

§clone_groups_omitted: usize

Number of scoped-corpus clone groups withheld from clone_groups[] by a presentation cap such as --top. 0 on an untruncated run, so clone_groups_shown + clone_groups_omitted == stats.clone_groups always holds and stats keeps describing the whole measured corpus.

§clone_families_shown: usize

Number of clone families carried in clone_families[].

§clone_families_omitted: usize

Number of scoped-corpus clone families withheld from clone_families[] by a presentation cap such as --top, which rebuilds the families from the groups that survived the cap. 0 on an untruncated run, so clone_families_shown + clone_families_omitted == stats.clone_families always holds and stats keeps describing the whole measured corpus.

§grouped_by: Option<GroupByMode>

Grouping mode when --group-by was passed.

§total_issues: Option<usize>

Total finding count across all groups; present only in grouped output.

§groups: Option<Vec<DuplicationGroup>>

Grouped findings; present only in grouped output.

§baseline_staleness: Option<BaselineStaleness>

This run’s view of the loaded baseline, present only in baseline runs. Carries the staleness counts, the advisory verdict and gate_trips, the same boolean --fail-on-stale-baseline exits on, so a CI integration reads one field instead of restating the rule. Read change_scoped before dividing matched_entries by baseline_entries: a narrowed run can report matched_entries: 0 on a healthy baseline.

§gate_outcomes: Option<GateOutcomes>

Every gate this run ARMED, keyed by name, absent when it armed none. Each entry is the same rule that decides the exit code, so a CI integration reads the verdict instead of guessing from a process status it usually cannot see. A gate fails the build when status is fail AND enforced is true. Armed, not evaluated: fallow’s default severity rules fail a run with no flag at all, so an absent object means “no gate was asked for”, never “nothing failed”. See [crate::GateOutcomes].

§meta: Option<Meta>

_meta block with metric / rule definitions, emitted when --explain is passed (always present in MCP responses).

§workspace_diagnostics: Vec<WorkspaceDiagnostic>

Workspace-discovery and source-discovery diagnostics for the run (issue #473). See CheckOutput::workspace_diagnostics for the full contract; the same list is repeated on each top-level command’s envelope so single-command consumers see it without having to look at a separate top-level field. A standalone fallow dupes run has no dead-code analyze pass, so the two analysis-stage kinds never appear here.

§next_steps: Vec<NextStep>

Read-only follow-up commands computed from this run’s findings. See CheckOutput::next_steps for the contract.