build(#286): adopt RigForge CI best practices (diff-cover patch coverage + sha256-pinned tools)#306
Merged
Merged
Conversation
…rage + sha256-pinned tools Wave 7 tooling, back-ported from RigForge. 1. Patch-coverage gate: pytest now emits Cobertura (coverage.xml) and a new `make test-patch-coverage` runs `diff-cover` requiring **>=90% coverage on changed lines** vs origin/develop — the real ratchet that stops coverage rotting at the margin (the flat 80% total floor stays as a backstop). The dashboard CI job gains fetch-depth:0 + a `git fetch origin develop` so diff-cover can diff the PR. diff-cover added to the test extra (uv.lock relocked). 2. Checksum-verified pinned CI tool installs: shellcheck (v0.11.0), shfmt (v3.13.1), and hadolint (v2.12.0) now download from upstream releases with a `sha256sum -c` check instead of the runner's preinstalled shellcheck / apt — reproducible and immune to the apt-mirror flakiness of #64. Verified: make test-dashboard (94%) + test-patch-coverage run; uv lock --check clean; ci.yml yamllint/zizmor clean. Closes #286. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #286 — the last code-quality child of Wave 7 (#279), back-porting two things RigForge does better.
1. Patch-coverage gate (
diff-cover)The flat
--cov-fail-under=80is a total floor — it lets new code ship under-tested as long as the aggregate holds, so coverage rots at the margin. Now:--cov-report=xml), andmake test-patch-coveragerunsdiff-coverrequiring ≥90% coverage on changed lines vsorigin/develop.fetch-depth: 0+git fetch origin developso diff-cover can diff the PR; it now drives the dashboard steps through the make targets (single source of truth).diff-coveradded to thetestextra (uv.lock relocked).2. Checksum-verified, pinned CI tool installs
shellcheck (v0.11.0), shfmt (v3.13.1) and hadolint (v2.12.0) now download from upstream releases with a
sha256sum -ccheck (RigForge convention) instead of the runner's preinstalled shellcheck / apt — reproducible and immune to the apt-mirror flakiness of #64. (gitleaks/uv/trivy images were already digest/version-pinned.)Verified locally
make test-dashboard(94%) +make test-patch-coveragerun clean;uv lock --checkclean; ci.yml yamllint + zizmor clean.Reference: rigforge
ci.yml+tests/coverage.sh.🤖 Generated with Claude Code