Skip to content

build(#286): adopt RigForge CI best practices (diff-cover patch coverage + sha256-pinned tools)#306

Merged
VijitSingh97 merged 1 commit into
developfrom
claude/286-ci-best-practices
Jun 18, 2026
Merged

build(#286): adopt RigForge CI best practices (diff-cover patch coverage + sha256-pinned tools)#306
VijitSingh97 merged 1 commit into
developfrom
claude/286-ci-best-practices

Conversation

@VijitSingh97

Copy link
Copy Markdown
Collaborator

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=80 is a total floor — it lets new code ship under-tested as long as the aggregate holds, so coverage rots at the margin. Now:

  • pytest emits Cobertura (--cov-report=xml), and make test-patch-coverage runs diff-cover requiring ≥90% coverage on changed lines vs origin/develop.
  • The dashboard CI job gets fetch-depth: 0 + git fetch origin develop so diff-cover can diff the PR; it now drives the dashboard steps through the make targets (single source of truth).
  • The 80% total floor stays as a backstop. 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 (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-coverage run clean; uv lock --check clean; ci.yml yamllint + zizmor clean.

Reference: rigforge ci.yml + tests/coverage.sh.

🤖 Generated with Claude Code

…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>
@VijitSingh97 VijitSingh97 merged commit fc85b28 into develop Jun 18, 2026
16 checks passed
@VijitSingh97 VijitSingh97 deleted the claude/286-ci-best-practices branch June 18, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tooling: adopt RigForge's CI best practices (diff-cover patch coverage + checksum-verified pinned tool installs)

1 participant