Generic coverage gate failure

The test step completed, but the job failed because measured coverage fell below an enforced minimum.

coverage-gate-failure medium confidence test

Matched signals

  • coverage threshold
  • minimum coverage
  • global coverage threshold
  • does not meet global threshold
  • total coverage below
  • coverage requirement not met
  • lines below threshold
  • branches below threshold

Generic coverage gate failure

What this failure means

The test step completed, but the job failed because measured coverage fell below an enforced minimum. This is a quality policy failure rather than a crash in the test runner itself.

Symptoms

Faultline looks for one or more of these log fragments:

coverage threshold
minimum coverage
global coverage threshold
does not meet global threshold
total coverage below
coverage requirement not met
lines below threshold
branches below threshold

Diagnosis

The test step completed, but the job failed because measured coverage fell below an enforced minimum. This is a quality policy failure rather than a crash in the test runner itself.

Fix steps

  1. Find exactly which files or packages dropped below the threshold:

    # Go — sort by coverage percentage ascending:
    go test ./... -coverprofile=coverage.out
    go tool cover -func=coverage.out | sort -k3 -n | head -20
    
    # JavaScript:
    npm test -- --coverage --coverageReporters=text 2>&1 | grep -v "100 |"
    
  2. Add focused tests for the newly introduced or changed code paths before considering any threshold reduction.

  3. If generated or non-critical files are inflating the denominator, exclude them explicitly in the coverage configuration rather than hand-tuning the target percentage.

  4. Re-run the same coverage command locally to confirm the failure is reproducible outside CI before writing new tests.

Validation

  • go test ./... -cover or npm test -- --coverage
  • Confirm the reported total percentage meets or exceeds the gate threshold.

Why it matters

Coverage gates usually fail after new code paths are added without tests, when generated or low-value files start counting toward coverage, or when the threshold is raised without first improving the test suite.

Prevention

  • Keep coverage exclusions explicit and version-controlled so threshold drift is intentional.
  • Raise coverage targets gradually and only after the test suite can sustain them.
  • Track coverage changes in pull requests so regressions are visible before the merge queue.

Try it locally

go test ./... -cover
npm test -- --coverage
go test ./... -cover
npm test -- --coverage

How Faultline detects it

Use faultline explain coverage-gate-failure to see the full playbook.

faultline analyze build.log
faultline explain coverage-gate-failure

Generated from playbooks/bundled/log/test/coverage-gate-failure.yaml. Do not edit directly.

Try it on your own failed log

$ faultline analyze failed.log
Want this across every CI run? Faultline Teams tracks recurring failures across all your repos and surfaces patterns in a shared dashboard.