Files
ForgeFlow/docs/COVERAGE_POLICY.md
T

1.3 KiB

Coverage policy

ForgeFlow treats coverage as release evidence, not as a target to game. npm run coverage enforces 75% statements, 75% lines, 75% functions and 60% branches globally.

The July 2026 hardening pass raised the measured baseline from 69.74% statements/lines, 68.82% functions and 55.38% branches to at least 78% statements/lines, 79% functions and 60% branches. The requested 65% global branch target was investigated but is not used as the release gate yet. Node/V8 discovers additional branch counters when previously unexecuted functions become covered; the denominator grew from 2,537 to more than 3,100 while the new tests added hundreds of asserted branches. Raising the number by excluding command builders, platform guards or error adapters would make the result look better without increasing deployment safety.

The 60% global gate is therefore paired with scenario-level evidence for the critical boundaries: deploy-key rollback, deployment verification, Gitea authentication and redirects, SSH host identity and output limits, inventory reconciliation, stale plans, configuration recovery, release integrity and updater failure modes. New code must not reduce the global baseline. A future increase to 65% should come from additional asserted failure scenarios, not ignore comments or source exclusions.