fallow icon indicating copy to clipboard operation
fallow copied to clipboard

Add actionable-only output for audit

Open Fidasek009 opened this issue 3 weeks ago • 1 comments

Problem

Changed-code health checks produce too much non-actionable output for coding agents, even with --quiet.

We configure a CRAP limit of 6 for general logic and 30 for React files:

{
  "health": {
    "maxCrap": 6,
    "thresholdOverrides": [
      {
        "files": ["apps/web/**/*.tsx", "apps/widget/**/*.tsx", "packages/ui/**/*.tsx"],
        "maxCrap": 30
      }
    ]
  },
  "audit": {
    "gate": "new-only"
  }
}

Running this command with a coverage map configured:

fallow audit --only health --base origin/main --format compact --quiet

prints over 100 threshold-override records, including stale and active records for functions that need no change. It also prints aggregate metrics and unchanged inherited complexity findings. These bury the findings the agent should address.

Proposed solution

Provide a native actionable-only output mode for audit that:

  • Shows introduced and worsened findings relevant to the configured policy.
  • Omits unchanged inherited findings, aggregate metrics, and routine threshold-override bookkeeping.
  • Preserves configuration errors, analysis failures, and warnings about incomplete analysis.
  • Keeps gate semantics and exit codes unchanged.

Keep complete diagnostics available in the existing report modes.

Alternatives considered

  • --quiet suppresses progress but not these report sections.
  • Human output caps the override table but still includes non-actionable context.
  • GitHub annotations omit the override records but still emit unchanged inherited findings.
  • External filtering requires shell plumbing to preserve the analysis exit status and couples consumers to report text. A native option would avoid that.

How did you run fallow?

Through a coding agent (CLI, MCP server or skill)

Agent behavior

The agent runs the audit command above after collecting unit-test coverage. It expects findings that need attention in the current change, but receives a long list of threshold-override diagnostics and inherited findings instead.

Fidasek009 avatar Nov 13 '26 14:11 Fidasek009

In v3.44.0, fallow audit --quiet prints only the actionable part of the human, compact and markdown reports (npm install [email protected]).

For fallow audit --only health --base origin/main --format compact --quiet, --quiet keeps introduced and worsened findings, configuration errors, analysis failures and warnings about incomplete analysis. It drops unchanged inherited findings, aggregate metrics, and the stale and active records of health.thresholdOverrides. The insufficient and no_match records stay, because they need action.

The verdict, the exit code and the JSON, SARIF, CodeClimate, review and GitHub formats do not change. For the complete report, run without --quiet or use --format json.

BartWaardenburg avatar Nov 19 '26 09:11 BartWaardenburg