feat!: gate changed-line coverage and commit messages on pull requests #96

Merged
cjournois merged 1 commit from feat/diff-coverage into main 2026-11-09 13:03:05 +00:00
Collaborator

Total coverage alone lets a PR add untested code to a well-covered unit; the AE pipeline already gates the lines a change touches.

  • On a PR, a gated unit's changed instrumented lines must meet min_coverage, read from coverage/lcov.info (nested <dir>/coverage/lcov.info too). Under 20 such lines is reported, not gated; a failure lists the uncovered file:line.
  • A gated unit with no lcov report fails on every event.
  • A PR whose commits are not Conventional Commits fails, naming the commit (git-cliff strict mode, the release's own cliff.toml); merged here from #98.
  • The secret scan and the diff share one merge-base fetch (pr_merge_base in lib.sh).

Verified: just lint test (520 bats) green; targeted mutants of the diff logic all killed; a real tabula-api diff over current main matched 33/33 changed lines against its bun lcov.
Breaking: every gated unit's test-coverage must write coverage/lcov.info — the consumer PRs (library#260, resume#145, ergon#139, games#90, janus#114, recall#192, tabula#162, telos#246, dramble-manager#1334) do this.

Session: 60ac4614-d609-4e43-a004-27bdaf30476c

Total coverage alone lets a PR add untested code to a well-covered unit; the AE pipeline already gates the lines a change touches. - On a PR, a gated unit's changed instrumented lines must meet `min_coverage`, read from `coverage/lcov.info` (nested `<dir>/coverage/lcov.info` too). Under 20 such lines is reported, not gated; a failure lists the uncovered `file:line`. - A gated unit with no lcov report fails on every event. - A PR whose commits are not Conventional Commits fails, naming the commit (git-cliff strict mode, the release's own cliff.toml); merged here from #98. - The secret scan and the diff share one merge-base fetch (`pr_merge_base` in lib.sh). Verified: `just lint test` (520 bats) green; targeted mutants of the diff logic all killed; a real tabula-api diff over current main matched 33/33 changed lines against its bun lcov. Breaking: every gated unit's `test-coverage` must write `coverage/lcov.info` — the consumer PRs (library#260, resume#145, ergon#139, games#90, janus#114, recall#192, tabula#162, telos#246, dramble-manager#1334) do this. Session: 60ac4614-d609-4e43-a004-27bdaf30476c
feat!: gate changed-line coverage on pull requests
All checks were successful
ci: reusable-pipeline / CI Pipeline (pull_request) Successful in 42s
66b258467e
Ports the AE pipeline's diff coverage: the instrumented lines a PR changes in a unit must meet its min_coverage, read from coverage/lcov.info.
The secret scan's merge-base lookup moves to lib.sh, so both steps share one fetch.

BREAKING CHANGE: a unit with min_coverage above 0 must write coverage/lcov.info from test-coverage (docs/components/unit.md#changed-line-coverage).

Session: 60ac4614-d609-4e43-a004-27bdaf30476c
bot-claude force-pushed feat/diff-coverage from 66b258467e
All checks were successful
ci: reusable-pipeline / CI Pipeline (pull_request) Successful in 42s
to d3ba700638
All checks were successful
ci: reusable-pipeline / CI Pipeline (pull_request) Successful in 47s
2026-11-09 12:31:31 +00:00
Compare
bot-claude changed title from WIP: feat!: gate changed-line coverage on pull requests to feat!: gate changed-line coverage on pull requests 2026-11-09 12:42:12 +00:00
feat: fail a pull request whose commits are not Conventional Commits
All checks were successful
ci: reusable-pipeline / CI Pipeline (pull_request) Successful in 50s
4d4e9b818d
git-cliff silently drops a commit it cannot parse, so it vanished from the changelog and the version bump; strict mode now names it on the PR instead.

Session: 60ac4614-d609-4e43-a004-27bdaf30476c
bot-claude force-pushed feat/diff-coverage from 4d4e9b818d
All checks were successful
ci: reusable-pipeline / CI Pipeline (pull_request) Successful in 50s
to 96d54a0299
All checks were successful
ci: reusable-pipeline / CI Pipeline (pull_request) Successful in 5m18s
ci: reusable-pipeline / CI Pipeline (push) Successful in 1m7s
2026-11-09 12:56:30 +00:00
Compare
bot-claude changed title from feat!: gate changed-line coverage on pull requests to feat!: gate changed-line coverage and commit messages on pull requests 2026-11-09 12:56:33 +00:00
cjournois deleted branch feat/diff-coverage 2026-11-09 13:03:05 +00:00
Sign in to join this conversation.
No reviewers
No labels
needs-human
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cjournois/reusable-pipeline!96
No description provided.