Check reference

Read coverage against the right requirement set

A coverage percentage is meaningful only when its report, implementation links and requirement scope agree. coverage_threshold checks that recorded coverage meets project policy.

Check the report before changing the threshold

Proof evaluates stored requirement coverage against project.checks.coverage_threshold.threshold, whose default is 80. Coverage can be imported from supported reports and linked through implementation traces. Environment assumptions are not implementation-bearing requirements. A low score may indicate untested code, but it can also come from a missing report or a wrong implementation target. Inspect the named requirement before changing policy.

Illustrative example: an uncovered timeout branch

A requirement links to a function that handles success and timeout. Its tests exercise success; the imported profile leaves the timeout path uncovered. Adding an unrelated test elsewhere will not repair that evidence. Write a test that reaches timeout and asserts the promised result, regenerate the profile, then import it.

go test -coverprofile=coverage.out ./internal/gateway
proof coverage link coverage.out --format go-cover
proof audit --check coverage_threshold --verbose

The package path is an example. Use the package that owns the linked code and preserve the actual run's revision and environment.

Keep baseline scope explicit

A full audit includes the repository backlog. Baseline scope focuses on new or semantically changed requirements relative to the captured workflow baseline. A clean baseline result therefore does not mean every old requirement meets the threshold. If auto-linking is enabled, the configured test command must write the configured report path; Proof does not add a coverage-output flag to that command for you.

Coverage is one piece of evidence

Line or branch coverage describes execution reach. It does not establish condition independence, the strength of an assertion, or the completeness of the requirement. MC/DC and witness checks answer different questions. Keep the report format visible, especially when importing LCOV. To enforce this check at merge, preserve the command's exit status and require the corresponding CI status under the repository's merge policy.

Follow the evidence

Inspect one uncovered requirement and rerun the test that should exercise its missing behavior.

Review one coverage finding. Bring the requirement, linked code and coverage report so we can distinguish missing test behavior from missing or mis-scoped evidence.

Translation coverage · Code MC/DC in Go