Expand description
Health / complexity analysis report types. Health / complexity analysis report types.
Separated from the health command module so that report formatters
(which are compiled as part of both the lib and bin targets) can
reference these types without pulling in binary-only dependencies.
Structs§
- Complexity
Violation - Inner complexity-violation payload, wrapped by
HealthFinding. - Component
Rollup - Per-component breakdown attached to a synthetic
<component>HealthFinding. SeeComplexityViolation::component_rollupfor the owning-finding contract; the wrapper flattens the inner type’scomponent_rollupfield onto its own wire shape. - Contributing
Factor - A contributing factor that triggered or strengthened a recommendation.
- Contributor
Entry - Per-author contribution summary. The identifier is rendered per the configured ownership.emailMode (handle, hash, or raw); the format field discriminates the three so type-aware consumers can branch without re-parsing.
- Coverage
GapSummary - Aggregate coverage-gap counters for the current analysis scope.
- Coverage
Gaps - Static test coverage gaps derived from the module graph. Shows runtime files and exports with no test dependency path.
- Evidence
Function - A function referenced in target evidence.
- File
Health Score - Per-file health score combining complexity, coupling, and dead code metrics.
- Health
Action Context - Construction-time context for
HealthFinding::with_actions. - Health
Action Options - Options controlling how the action builder populates a health finding’s
actionsarray. - Health
Actions Meta - Auditable breadcrumb recording when health-finding
suppress-lineaction hints were omitted from the report. - Health
Finding - Wire envelope for a single complexity finding.
- Health
Group - A health report scoped to a single group.
- Health
Grouping - Wrapper carrying the resolver mode label alongside the partitioned groups.
- Health
Report - Result of complexity analysis for reporting.
- Health
Score - Project-level health score. Score = 100 minus available penalties from dead code, complexity, maintainability, hotspots, unused deps, circular deps, unit size, coupling, and duplication. Missing metrics do not penalize; –score computes the score and duplication penalty, while churn-backed hotspot penalties require hotspot analysis (–hotspots, or –targets with –score).
- Health
Score Penalties - Per-component penalty breakdown for the health score.
- Health
Summary - Summary statistics for the health report.
- Health
Timings - Detailed timing breakdown for the health pipeline.
- Health
Trend - Trend comparison between the current run and a previous snapshot. Shows per-metric deltas with directional indicators.
- Hotspot
Entry - A hotspot: a file that is both complex and frequently changing.
- Hotspot
Finding - Wire envelope for a single hotspot entry.
- Hotspot
Summary - Summary statistics for hotspot analysis.
- Large
Function Entry - A function exceeding the very-high-risk size threshold (>60 LOC).
- Ownership
Metrics - Per-file ownership signals attached to hotspot entries when the user
passes
--ownership. All fields are derived from git history and the repository’s CODEOWNERS file (if any). - Refactoring
Target - Refactoring
Target Finding - Wire envelope for a single refactoring target.
- Risk
Profile - Risk profile: percentage of functions in each risk bin.
- Runtime
Coverage Action - Suggested follow-up action for a runtime coverage finding.
- Runtime
Coverage Blast Radius Entry - Runtime
Coverage Capture Quality - Quality-of-capture signals emitted by the sidecar so the CLI can explain short-window captures honestly instead of letting users blame the tool.
- Runtime
Coverage Evidence - Supporting evidence for a finding (mirrors
fallow_cov_protocol::Evidence). - Runtime
Coverage Finding - Runtime
Coverage HotPath - Runtime
Coverage Importance Entry - Runtime
Coverage Message - Runtime
Coverage Report - Runtime coverage findings merged into the health report or emitted by
fallow coverage analyze. Present in health output when –runtime-coverage is used. Shape mirrors the runtime coverage JSON contract; cloud mode fetches runtime facts explicitly and merges them locally with AST/static analysis. - Runtime
Coverage Summary - Summary block mirroring
fallow_cov_protocol::Summary(0.3 shape). - Target
Evidence - Evidence linking a target back to specific analysis data.
- Target
Thresholds - Adaptive thresholds used for refactoring target scoring.
- Trend
Count - Raw numerator/denominator for a percentage metric.
- Trend
Metric - A single metric’s trend between two snapshots.
- Trend
Point - A reference to a snapshot used in trend comparison.
- Untested
Export - Runtime export that no test-reachable module references.
- Untested
Export Finding - Wire-shape envelope for an
UntestedExportfinding. Same pattern asUntestedFileFinding: flattens the bare finding and carries a typedactionsarray computed at construction time. - Untested
File - Runtime code that no test dependency path reaches.
- Untested
File Finding - Wire-shape envelope for an
UntestedFilefinding. Carries the bareUntestedFileflattened in plus a typedactionsarray. The action vec is computed at construction time using a project-root-relative path so descriptions matchstrip_root_prefix’s post-pass output on the innerpathfield. Schemars derives the merged shape natively; this retires theaugment_finding_definitiongraft forUntestedFile. - Vital
Signs - Project-wide vital signs — a fixed set of metrics for trend tracking.
- Vital
Signs Counts - Raw counts backing the vital signs percentages.
- Vital
Signs Snapshot - A point-in-time snapshot of project vital signs, persisted to disk.
Enums§
- Confidence
- Confidence level for a refactoring recommendation.
- Contributor
Identifier Format - Format discriminator for
ContributorEntry::identifier. - Coverage
Model - Coverage model used for CRAP score computation.
- Coverage
Source - Provenance of a CRAP finding’s coverage signal.
- Coverage
Tier - Coverage tier classification for CRAP findings.
- Effort
Estimate - A ranked refactoring recommendation for a file.
- Exceeded
Threshold - Which complexity threshold was exceeded.
- Finding
Severity - Severity tier indicating how far a function exceeds complexity thresholds.
- Recommendation
Category - Category of refactoring recommendation.
- Runtime
Coverage Confidence - Confidence level for a runtime coverage finding.
- Runtime
Coverage Data Source - Runtime coverage source used to produce the summary.
- Runtime
Coverage Report Verdict - Top-level verdict for the whole runtime-coverage report. Mirrors
fallow_cov_protocol::ReportVerdict. The verdict is the SINGLE most actionable finding; for the full set of findings seeRuntimeCoverageReport::signals. The verdict promoteshot-path-touchedabovecold-code-detectedin PR-review context (when the CLI was given a change-scope:--diff-fileor--changed-since) because the touched-hot-path is event-tied to the current diff and reviewers need it to be the top-line signal. In standalone analysis (no change scope),cold-code-detectedremains primary. - Runtime
Coverage Risk Band - Blast-radius risk band. The current thresholds are high at >=20 static callers or >=1,000,000 traffic-weighted caller reach; medium at >=5 callers or >=50,000 weighted reach; low otherwise.
- Runtime
Coverage Schema Version - Runtime coverage JSON contract version. This is scoped to the
runtime_coverageblock and is independent of the top-level fallow JSONschema_version. - Runtime
Coverage Signal - Discrete signal captured during runtime-coverage post-processing.
verdictcollapses to one summary value;signalsenumerates ALL findings the report carries so JSON consumers, CI dashboards, and agents can reason about them independently of the headline. Order is stable: severity-descending so the first entry mirrors a sensible non-PR-context verdict. - Runtime
Coverage Verdict - Protocol-level per-function runtime coverage verdict derived from the
decision table in fallow-cov-protocol. The CLI’s
runtime_coverage.findingsarray omitsactiveentries even though the underlying enum still includes it. - Runtime
Coverage Watermark - License or trial watermark applied to runtime coverage output.
- Trend
Direction - Direction of a metric’s change, semantically (improving/declining/stable).
Constants§
- COGNITIVE_
EXTRACTION_ THRESHOLD - Cognitive complexity threshold above which a function is flagged for extraction.
- DEFAULT_
COGNITIVE_ CRITICAL - Default cognitive complexity threshold for “critical” severity.
- DEFAULT_
COGNITIVE_ HIGH - Default cognitive complexity threshold for “high” severity (warning tier).
- DEFAULT_
CRAP_ CRITICAL - CRAP score threshold for “critical” severity. CC=10 untested gives 110, CC=12 untested gives 156; 100 lands between the two and flags genuinely dangerous combinations of high complexity and low coverage.
- DEFAULT_
CRAP_ HIGH - CRAP score threshold for “high” severity. CC=7 untested -> 56, CC=10 -> 110.
- DEFAULT_
CYCLOMATIC_ CRITICAL - Default cyclomatic complexity threshold for “critical” severity.
- DEFAULT_
CYCLOMATIC_ HIGH - Default cyclomatic complexity threshold for “high” severity (warning tier).
- HEALTH_
SCORE_ FORMULA_ VERSION - Project-level health score: a single 0–100 number with letter grade.
- HOTSPOT_
SCORE_ THRESHOLD - Hotspot score threshold for counting a file as a hotspot in vital signs.
- MI_
DENSITY_ MIN_ LINES - Minimum lines of code for full complexity density weight in the MI formula. Files smaller than this get a proportional dampening factor to prevent density from dominating the score on trivially small files.
- SNAPSHOT_
SCHEMA_ VERSION - Current snapshot schema version. Independent of the report’s SCHEMA_VERSION.
v2: Added
scoreandgradefields. v3: Addedcoverage_modelfield. v4: Added risk profiles (unit_size_profile,unit_interfacing_profile) and coupling concentration (p95_fan_in,coupling_high_pct). v5: Added duplication penalty to health score formula. v6: Addedtotal_locto vital signs (always computed from parsed modules). v7: MI formula dampening for small files (values change for files < 50 lines). v8: Added scale-invariant tail/density metrics for health score calibration.
Functions§
- build_
health_ finding_ actions - Compute the typed
actionslist for a complexity finding. - compute_
finding_ severity - Compute the severity tier for a complexity finding.
- letter_
grade - Map a numeric score (0–100) to a letter grade.