fallow health. Static analysis can tell you which exports have no references and which files are not test-reachable. Production coverage answers a different question: which functions actually executed when your deployed app handled real traffic.
What it tells you
When production coverage is enabled, fallow merges runtime evidence into the existing health report and assigns each function a per-finding verdict combining the static reachability signal with observed production invocations:| Verdict | Meaning |
|---|---|
safe_to_delete | Statically unused AND V8 tracked AND zero invocations. The strongest delete signal fallow emits. |
review_required | Statically used but never invoked in production. Needs a human look — could be seasonal, error-path-only, or legitimately dead. |
low_traffic | Invoked in production, but below the configured --low-traffic-threshold ratio of total trace count (spec default 0.1%). Effectively dead for the observed period. |
coverage_unavailable | V8 could not track the function (lazy-parsed, worker-thread isolate, dynamic eval, or the source map did not resolve). Advisory, not a dead-code signal. |
active | Invoked in production above the low-traffic threshold — not dead. |
unknown | Forward-compat sentinel returned by newer sidecars. Rare. |
| Output | Meaning |
|---|---|
verdict | Overall report status: clean, cold-code-detected, hot-path-changes-needed, license-expired-grace, or unknown. |
summary | Aggregate counts (functions_tracked, functions_hit, functions_unhit, functions_untracked, coverage_percent) plus trace_count, period_days, deployments_seen. |
findings | Cold or unresolved functions with a stable id (fallow:prod:<hash>), line, per-finding verdict, confidence, supporting evidence, and machine-readable actions. |
hot_paths | The busiest runtime functions with a stable id, line, invocations, and percentile rank. |
watermark | Trial/license grace marker applied when paid-feature access is in warning mode. |
warnings | Non-fatal merge diagnostics, for example partial source-map remapping. |
Confidence thresholds
Two flags tune how aggressively fallow applies verdicts:| Flag | Default | Effect |
|---|---|---|
--min-observation-volume <N> | 5000 | Minimum total trace volume before the sidecar is allowed to emit high-confidence safe_to_delete or review_required verdicts. Below this threshold, confidence is capped at medium to protect against overconfident verdicts on new or low-traffic services. |
--low-traffic-threshold <RATIO> | 0.001 | Fraction of trace_count below which an invoked function is classified low_traffic rather than active. Expressed as a decimal (0.001 = 0.1%). |
Static coverage vs runtime coverage
These three surfaces live side by side insidefallow health, but they answer different questions:
| Surface | Flag | Input | Answers | Paid |
|---|---|---|---|---|
| Static reachability gaps | --coverage-gaps | none | Which runtime files and exports have no transitive test path? | no |
| Exact CRAP scoring | --coverage | Istanbul JSON | How covered is each function for CRAP calculation? | no |
| Runtime production coverage | --production-coverage | V8 directory, V8 JSON file, or Istanbul JSON | Which functions actually ran, which stayed cold, and which hot paths changed? | yes |
--coverage-gaps when you want to find untested code. Use --coverage when you want better CRAP scores. Use --production-coverage when you want runtime evidence about real execution paths.
Accepted input
fallow health --production-coverage <path> accepts:
| Input | Example |
|---|---|
| V8 dump directory | ./coverage created with NODE_V8_COVERAGE=./coverage |
| Single V8 JSON file | ./coverage/12345.json |
| Single Istanbul coverage map JSON file | ./coverage/coverage-final.json |
source-map-cache, fallow remaps supported source-map URLs before analysis, including file paths, relative paths, webpack://..., and vite://.... Unsupported virtual schemes fall back safely to raw V8 handling instead of failing the whole run.
First-run workflow
The intended first-run path is:- Start a trial or activate a license with
fallow license. - Run
fallow coverage setup. - Follow the generated recipe in
docs/collect-coverage.md. - Re-run
fallow coverage setuporfallow health --production-coverage <path>once coverage exists.
fallow coverage setup is resumable. It checks license state, installs or locates fallow-cov, writes a framework-specific collection recipe, detects an existing coverage artifact when present, and then hands off into fallow health --production-coverage.
Review changed code
Production coverage becomes especially useful during change review:hot-path-changes-needed. That gives PR review a stronger signal than static complexity alone.
Trial and watermark behavior
Production coverage is a paid feature with a trial flow. Verification is offline against a compiled-in Ed25519 public key; onlyfallow license activate --trial and fallow license refresh require network access.
If a license is expired but still inside the grace window, fallow keeps the analysis available but annotates the output with a watermark. Once the hard-fail window is exceeded, paid features are blocked until the license is refreshed.
See also
fallow health
Runtime coverage merges into the standard health report and output formats.
License commands
Start a trial, inspect license status, refresh, or deactivate a local token.