Problem/Motivation
The GitLab CI template's coverage job reports line coverage but enforces nothing: coverage can silently fall with every merge and only a human reading job output would notice. The project's convention (CONTRIBUTING.md) aims for ~90%; a hard floor below that would catch regressions without making the target itself a gate.
Steps to reproduce
Merge a change that adds substantial untested code: the coverage job still passes, the percentage just drops.
Proposed resolution
Extend the coverage job in .gitlab-ci.yml (keeping the drupal.org template include intact) with a final step that parses the total line coverage from the PHPUnit output and exits non-zero below a threshold. Proposed: hard floor 80%, with ~90% remaining the soft target — a floor you never touch and a target you aim for are different tools.
One caution belongs in the record: hard coverage gates can incent assertion-free "coverage tests" that keep the number green while test quality falls. The mitigation is reviewing what tests assert, not what they touch — the floor only guards against forgetting tests entirely.
Also worth documenting for contributors: code exercised only through BrowserTestBase requests runs in the web-server process and is invisible to coverage collection — kernel tests are what make the number truthful.
Remaining tasks
Issue fork site_doctor-3608633
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
amangrover90 commentedComment #6
amangrover90 commented