Skip to main content

Module impact

Module impact 

Source
Expand description

Fallow Impact: a local, opt-in value report.

Impact answers “what did fallow do for you?” rather than “what is wrong now?”. v1 is deliberately thin and honest. It renders three things:

  1. Surfacing: how many issues fallow is currently showing you.
  2. Trend: whether the issue count is moving the right way between recorded runs.
  3. Containment: how many times a pre-commit gate run blocked then cleared.

Everything lives locally in a single rolling file at .fallow/impact.json (gitignored). Writes are best-effort and NEVER affect the exit code of any command: a corrupt or unwritable store degrades to “no history”, never an error.

v1.5 adds per-finding attribution on top: it credits genuinely RESOLVED findings (code removed or refactored) and never counts a fallow-ignore suppression as a win. It tells the two apart by capturing the present suppression state each run and diffing a per-file frontier against the files audit re-analyzed; a finding that merely moved (within a file, or to another file even across separate commits) is not counted as resolved. Attribution is a local-developer signal: it accrues where .fallow/impact.json persists across runs, not in ephemeral CI runners.

Structs§

AttributionInput
CloneInput
One clone group’s identity for a run: its content fingerprint plus the absolute paths of its instances. Built by collect_clone_findings.
ContainmentEvent
A blocked-then-cleared containment: fallow stopped a commit until it was fixed.
FileFrontier
The last-known per-finding state of one file: the findings it carried and the suppression kinds present in it, captured the last time audit re-analyzed it.
FindingInput
One finding’s identity inputs for a run, in absolute-path form. Built by the collect_dead_code_findings / collect_complexity_findings helpers from the typed audit results, or by tests directly.
FrontierFinding
One recorded finding’s line-independent identity inside a FileFrontier.
ImpactCounts
Per-category issue counts captured at a recorded run.
ImpactRecord
One recorded audit run.
ImpactReport
The rendered impact report, derived purely from the store (no analysis run).
ImpactStore
The rolling impact store, persisted to .fallow/impact.json.
PendingContainment
A pre-commit gate run that blocked (verdict fail) and is awaiting a clean run.
ResolutionEvent
A genuinely-resolved finding, recorded for the recent-resolutions display.
TrendSummary
A computed trend between the two most recent records.

Enums§

ImpactReportSchemaVersion
Wire-version discriminator for ImpactReport. Independent from the global SchemaVersion (the impact report versions on its own cadence) and from the on-disk STORE_SCHEMA_VERSION (the persisted store shape versions separately). Serializes as a string const so JSON consumers can switch on it, matching the other independently-versioned envelopes (e.g. CoverageAnalyzeSchemaVersion).
ImpactTrendDirection
Direction of a count trend between two recorded runs.
Scope
Everything the per-finding attribution pass needs for one recorded run.

Functions§

build_report
collect_clone_findings
Collect clone-group identities (fingerprint, instance paths) from a duplication report. The fingerprint is content-derived (dup:<hash>), so it is stable across pure relocation.
collect_complexity_findings
Collect line-independent complexity finding identities (path, function name) from a health report. The function name is line-independent, so a function moving within its file keeps the same identity.
collect_dead_code_findings
Collect line-independent dead-code finding identities from an analysis result.
disable
Disable Impact tracking. Retains existing history. Returns whether it was newly disabled (false if already off).
enable
Enable Impact tracking. Returns whether it was newly enabled (false if already on).
load
Load the store. A missing file is the normal “not enabled yet” case and returns a default silently. A present-but-unparsable file is surfaced with a one-line warning (rather than silently disabling tracking) and then degrades to a default; the corrupt file is left on disk untouched, and because record_audit_run no-ops on a disabled store it is never overwritten, so re-running fallow impact enable is a deliberate reset.
record_audit_run
Record an audit run into the rolling store. No-op when tracking is disabled or the store cannot be read. Best-effort throughout; never returns an error.
record_combined_run
Record a whole-project combined run into the project track. No-op when tracking is disabled or the store cannot be read. Best-effort throughout; never returns an error and never affects the command’s exit code or output.
render_human
Render the report as human-readable text.
render_json
Render the report as JSON.
render_markdown
Render the report as Markdown (paste-ready for a PR description or standup).