Coverage on a legacy codebase is a direction, not a number

Setting a minimum coverage threshold on a codebase at eleven percent produces either a permanently red build or a threshold set to eleven percent, and neither changes anything.

<coverage>
  <include>
    <directory suffix=".php">src</directory>
  </include>
  <exclude>
    <directory>src/Legacy</directory>
  </exclude>
</coverage>

<!-- and the rule that is actually enforceable: -->
<!-- coverage of src/ must not decrease. legacy is excluded and -->
<!-- shrinks as code moves out of it. -->

Excluding the legacy directory and requiring that the rest never regresses gives a number that means something and a target that moves in the right direction on its own. The alternative metric — coverage of the lines changed in this pull request — is better still and needs tooling most projects do not have this year. A high coverage figure on code with no assertions remains the thing to be sceptical of; coverage measures execution, not verification.