Expand description
Typed wrapper envelopes for duplication findings emitted by
fallow dupes --format json. Lives here (rather than in fallow-types)
because the bare findings live in fallow-core and crates/cli/src/report/dupes_grouping.rs.
Typed envelope wrappers for the duplication findings emitted by fallow dupes --format json (and the dupes block inside fallow and fallow audit).
Each wrapper flattens the bare finding via #[serde(flatten)] so the wire
shape matches the previous actions-grafted output byte-for-byte.
actions is populated at construction time via each wrapper’s
with_actions constructor and replaces the legacy inject_dupes_actions
post-pass in crates/cli/src/report/json.rs. introduced on
CloneGroupFinding carries the optional audit breadcrumb that
crates/cli/src/audit.rs::annotate_dupes_json inserts into the JSON object
via map.insert; the wrapper-level field stays None when serialized
directly from Rust and is set by the audit pass only when the clone group
was introduced relative to the merge-base.
Lives in fallow-cli rather than fallow-types because CloneFamily,
CloneGroup, and MirroredDirectory are defined in fallow-core
(crates/core/src/duplicates/types.rs) and AttributedCloneGroup is
defined in the CLI itself (crates/cli/src/report/dupes_grouping.rs);
fallow-types is the lower-level crate that neither of those reach.
Structs§
- Attributed
Clone Group Finding - Wire-shape envelope for an
AttributedCloneGroupfinding (per-bucket duplication attribution emitted underfallow dupes --group-by). Flattens the attributed group and carries the same typedCloneGroupActionarray asCloneGroupFinding; nointroducedfield becausefallow auditdoes not run on grouped output. - Clone
Family Action - Per-action wire shape attached to each
CloneFamilyFinding. Mirrors the action types previously emitted bybuild_clone_family_actions:extract-shared, oneapply-suggestionperRefactoringSuggestionon the family, and a trailingsuppress-line. - Clone
Family Finding - Wire-shape envelope for a
CloneFamilyfinding. - Clone
Group Action - Per-action wire shape attached to each
CloneGroupFindingandAttributedCloneGroupFinding. Mirrors the action types previously emitted byinject_dupes_actions::build_clone_group_actionsincrates/cli/src/report/json.rs:extract-sharedplussuppress-line. - Clone
Group Finding - Wire-shape envelope for a
CloneGroupfinding. Flattens the bare group via#[serde(flatten)]and carries a typedactionsarray plus the optional audit-modeintroducedflag. Replaces the legacy post-pass injection incrates/cli/src/report/json.rs::inject_dupes_actions. - Dupes
Report Payload - Wire-shape payload for
fallow dupes --format json(the body that flattens intocrate::output_envelope::DupesOutputand is also emitted under thedupes/duplicationkey inside the combined and audit envelopes).
Enums§
- Clone
Family Action Type - Discriminant for
CloneFamilyAction::kind. - Clone
Group Action Type - Discriminant for
CloneGroupAction::kind. Mirrors the action types emitted by the legacybuild_clone_group_actionswalker.