Skip to main content

Module health_types

Module health_types 

Source
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§

CloneSiblingEvidence
A duplicate-code sibling referenced in target evidence.
ComplexityViolation
Inner complexity-violation payload.
ComponentRollup
ContributingFactor
A contributing factor that triggered or strengthened a recommendation.
ContributorEntry
CoverageGapSummary
Aggregate coverage-gap counters for the current analysis scope.
CoverageGaps
Static test coverage gaps derived from the module graph. Shows runtime files and exports with no test dependency path.
CoverageIntelligenceAction
Machine-actionable next step for a coverage-intelligence finding.
CoverageIntelligenceEvidence
Compact evidence values that led to a recommendation.
CoverageIntelligenceFinding
One combined coverage-intelligence finding.
CoverageIntelligenceReport
Combined coverage, runtime, complexity, and change-scope verdicts.
CoverageIntelligenceSummary
Aggregate metadata for coverage-intelligence output.
CssAnalyticsReport
Structural CSS analytics surfaced by fallow health --css.
CssAnalyticsSummary
Project-wide CSS analytics aggregates across every analyzed stylesheet (including stylesheets with no notable rule, which are not listed individually).
CssBlockOccurrence
One occurrence of a duplicate declaration block.
CssCandidateAction
A read-only verification step attached to a CSS cleanup candidate.
CssDuplicateBlock
A group of style rules across the project that share an identical declaration block: a copy-paste consolidation candidate (fallow’s duplication signal applied to CSS). Only blocks of 4+ declarations appearing in 2+ rules are reported, so the signal stays a strong copy-paste indicator rather than flagging legitimately-repeated small blocks.
CssFileAnalytics
Per-stylesheet CSS analytics.
CssNotationConsistency
A design-token notation-consistency candidate: the distinct notations used across the codebase for one value axis (today, length units on font-size), with a per-notation distinct-value count. Emitted only above a floor, since mixing notations for one axis is a “no single source of truth” smell. Advisory: the action is “standardize on one notation”, not a single search.
CssNotationCount
One notation bucket and the count of distinct values authored in it.
DirectCallerEvidence
A direct importer referenced in target evidence.
DirectCallerSymbolEvidence
Symbol details for a direct importer.
EvidenceFunction
A function referenced in target evidence.
FileHealthScore
Per-file health score combining complexity, coupling, and dead code metrics.
HealthActionContext
Construction-time context for HealthFinding::with_actions.
HealthActionOptions
Options controlling how the action builder populates actions.
HealthActionsMeta
Auditable breadcrumb recording when health-finding suppress-line action hints were omitted from the report.
HealthConfiguredThresholds
Threshold values configured by a single override entry.
HealthEffectiveThresholds
Resolved thresholds used to evaluate a health finding.
HealthFinding
Wire envelope for a single complexity finding.
HealthGroup
A health report scoped to a single group.
HealthGrouping
Wrapper carrying the resolver mode label alongside the partitioned groups.
HealthReport
Result of complexity analysis for reporting.
HealthScore
HealthScorePenalties
Per-component penalty breakdown for the health score.
HealthSummary
Summary statistics for the health report.
HealthTimings
Detailed timing breakdown for the health pipeline.
HealthTrend
Trend comparison between the current run and a previous snapshot. Shows per-metric deltas with directional indicators.
HotspotEntry
A hotspot: a file that is both complex and frequently changing.
HotspotFinding
Wire envelope for a single hotspot entry.
HotspotSummary
LargeFunctionEntry
A function exceeding the very-high-risk size threshold (>60 LOC).
OwnershipMetrics
ReactHookProfile
Per-component React hook profile derived from the cached hook_uses IR at the health layer. Descriptive context that refines the bare ComplexityViolation::react_hook_count headline with a per-kind breakdown and the maximum useEffect dependency-array arity.
RefactoringTarget
RefactoringTargetFinding
Wire envelope for a single refactoring target.
RenderFanInTopComponent
One located high-fan-in React/Preact component for the descriptive top_render_fan_in blast-radius list on VitalSigns.
RiskProfile
Risk profile: percentage of functions in each risk bin.
RuntimeCoverageAction
Suggested follow-up action for a runtime coverage finding.
RuntimeCoverageBlastRadiusEntry
RuntimeCoverageCaptureQuality
Quality-of-capture signals emitted by the sidecar so the CLI can explain short-window captures honestly instead of letting users blame the tool.
RuntimeCoverageEvidence
Supporting evidence for a finding (mirrors fallow_cov_protocol::Evidence).
RuntimeCoverageFinding
RuntimeCoverageHotPath
RuntimeCoverageImportanceEntry
RuntimeCoverageMessage
RuntimeCoverageReport
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.
RuntimeCoverageSummary
Summary block mirroring fallow_cov_protocol::Summary (0.3 shape).
ScopedUnusedClasses
A Vue SFC’s <style scoped> classes that appear nowhere else in the component (cleanup candidates).
TailwindArbitraryValue
A distinct Tailwind arbitrary-value utility token used in markup, with its total use count and first location (a design-token-bypass candidate).
TargetEvidence
Evidence linking a target back to specific analysis data.
TargetThresholds
Adaptive thresholds used for refactoring target scoring.
ThresholdOverrideMetrics
Current complexity metrics for a matched threshold override entry.
ThresholdOverrideState
Report entry describing whether a threshold override is active, stale, or no longer matching any analyzed file or function.
TrendCount
Raw numerator/denominator for a percentage metric.
TrendMetric
A single metric’s trend between two snapshots.
TrendPoint
A reference to a snapshot used in trend comparison.
UndefinedKeyframes
An animation reference (animation / animation-name) to a @keyframes name that is defined in no stylesheet anywhere in the project (the “used-but-undefined” direction). Usually a typo or a removed animation; occasionally a @keyframes defined in CSS-in-JS the CSS parser never sees.
UnreferencedCssClass
A global CSS class defined in a plain .css/.scss rule whose literal name is referenced by no in-project markup (the CSS analogue of an unused export). A heavily-gated candidate, never a gated finding: the class may be applied from an HTML email, server template, CMS, or Markdown the parser never sees.
UnreferencedKeyframes
A @keyframes defined in a stylesheet but referenced by no animation in any stylesheet (cleanup candidate).
UnresolvedClassReference
A static class / className token in markup that matches no CSS class defined anywhere in the project but is one edit away from a class that IS defined (a likely typo or stale rename). The CSS analogue of an unresolved import. A candidate, never a gated finding: the token could be defined in CSS-in-JS or an external stylesheet the parser never sees.
UntestedExport
Runtime export that no test-reachable module references.
UntestedExportFinding
Wire-shape envelope for an UntestedExport finding. Same pattern as UntestedFileFinding: flattens the bare finding and carries a typed actions array computed at construction time.
UntestedFile
Runtime code that no test dependency path reaches.
UntestedFileFinding
Wire-shape envelope for an UntestedFile finding. Carries the bare UntestedFile flattened in plus a typed actions array. The action vec is computed at construction time using a project-root-relative path so descriptions match strip_root_prefix’s post-pass output on the inner path field. Schemars derives the merged shape natively; this retires the augment_finding_definition graft for UntestedFile.
UnusedAtRule
An unused CSS at-rule entity (an @property registration with no var() reference, or an @layer declaration never populated), located by its first definition. A cleanup candidate, never a gated finding.
UnusedFontFace
An @font-face family declared in a stylesheet but referenced by no font-family anywhere in the project: a dead web-font payload. A cleanup candidate (the family could be applied from inline styles or JavaScript).
UnusedThemeToken
A Tailwind v4 @theme design token defined in a stylesheet whose generated utility, var() reads, and arbitrary-value references appear nowhere in the project: a dead design token (the unused-export of the token era). A candidate, never a gated finding: the token could be consumed by a Tailwind plugin, a published design-system surface, or a non-CSS-aware build step the scan cannot see (those cases are gated out before this is emitted).
VitalSigns
Project-wide vital signs — a fixed set of metrics for trend tracking.
VitalSignsCounts
Raw counts backing the vital signs percentages.
VitalSignsSnapshot
A point-in-time snapshot of project vital signs, persisted to disk.

Enums§

Confidence
Confidence level for a refactoring recommendation.
ContributorIdentifierFormat
CoverageIntelligenceConfidence
Confidence in the joined evidence and resulting recommendation.
CoverageIntelligenceMatchConfidence
Confidence tier for the cross-surface evidence match.
CoverageIntelligenceRecommendation
Recommended action family for a combined finding.
CoverageIntelligenceSchemaVersion
Coverage-intelligence JSON contract version. Scoped to the coverage_intelligence block and independent of the top-level fallow JSON schema_version.
CoverageIntelligenceSignal
Ordered evidence signals behind a coverage-intelligence finding.
CoverageIntelligenceVerdict
Headline verdict for the combined coverage-intelligence report.
CoverageModel
Coverage model used for CRAP score computation.
CoverageSource
Provenance of a CRAP finding’s coverage signal.
CoverageSourceConsistency
Whether CRAP findings in the report used one coverage-source kind or a mix.
CoverageTier
Coverage tier classification for CRAP findings.
CssCandidateActionType
Discriminant for CssCandidateAction::kind.
EffortEstimate
A ranked refactoring recommendation for a file.
ExceededThreshold
Which complexity threshold was exceeded.
FindingSeverity
Severity tier indicating how far a function exceeds complexity thresholds.
OwnershipState
RecommendationCategory
Category of refactoring recommendation.
RuntimeCoverageConfidence
Confidence level for a runtime coverage finding.
RuntimeCoverageDataSource
Runtime coverage source used to produce the summary.
RuntimeCoverageReportVerdict
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 see RuntimeCoverageReport::signals. The verdict promotes hot-path-touched above cold-code-detected in PR-review context (when the CLI was given a change-scope: --diff-file or --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-detected remains primary.
RuntimeCoverageRiskBand
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.
RuntimeCoverageSchemaVersion
Runtime coverage JSON contract version. This is scoped to the runtime_coverage block and is independent of the top-level fallow JSON schema_version.
RuntimeCoverageSignal
Discrete signal captured during runtime-coverage post-processing. verdict collapses to one summary value; signals enumerates 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.
RuntimeCoverageVerdict
Protocol-level per-function runtime coverage verdict derived from the decision table in fallow-cov-protocol. The CLI’s runtime_coverage.findings array omits active entries even though the underlying enum still includes it.
RuntimeCoverageWatermark
License or trial watermark applied to runtime coverage output.
ThresholdOverrideStatus
Lifecycle state for a configured threshold override.
ThresholdSource
Source for a finding’s effective thresholds.
TrendDirection
Direction of a metric’s change, semantically (improving/declining/stable).
UnusedAtRuleKind
Discriminant for UnusedAtRule::kind.

Constants§

COGNITIVE_EXTRACTION_THRESHOLD
DEFAULT_COGNITIVE_CRITICAL
DEFAULT_COGNITIVE_HIGH
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_HIGH
HEALTH_SCORE_FORMULA_VERSION
HOTSPOT_SCORE_THRESHOLD
MI_DENSITY_MIN_LINES
Minimum lines of code for full complexity density weight in the MI formula.
SNAPSHOT_SCHEMA_VERSION
Current snapshot schema version. Independent of the report’s SCHEMA_VERSION. v2: Added score and grade fields. v3: Added coverage_model field. 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: Added total_loc to 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. v9: Added render fan-in concentration (p95_render_fan_in, render_fan_in_high_pct, max_render_fan_in), the component-graph analogue of module fan-in / coupling concentration. Additive optional fields (matches the v4 precedent that added coupling concentration).

Functions§

build_health_finding_actions
Compute the typed actions list 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.
summarize_coverage_source_consistency
Summarise the coverage-source provenance attached to CRAP findings.