Skip to content

ci: publish Go coverage badge + GitHub Code Quality PR comments (#133) - #334

Merged
EricAndrechek merged 1 commit into
mainfrom
code-cov
Jun 10, 2026
Merged

ci: publish Go coverage badge + GitHub Code Quality PR comments (#133)#334
EricAndrechek merged 1 commit into
mainfrom
code-cov

Conversation

@EricAndrechek

Copy link
Copy Markdown
Member

Summary

Resolves #133 — coverage publishing now the repo is public. Self-hosted, no third-party SaaS (chosen over Codecov/Coveralls for supply-chain posture, Codecov's ownership churn, and the "two official numbers" problem — full rationale in the issue thread). The coverage gate is unchanged: make cov's thresholds in .testcoverage.yml stay the only merge gate. Everything here is publishing and is non-gating.

1. Go coverage README badge (self-hosted)

  • New cov badge subcommand (scripts/cov/main.go) emits a shields.io endpoint JSON for the merged Go total using the exact number the gate computes (same .testcoverage.yml excludes) — the badge can never disagree with the gate.
  • A new non-gating badge job (main-push only, the sole holder of contents:write, off a trusted-main checkout) publishes it to an orphan badges branch via scripts/ci/publish-badge.sh. The README reads it over raw.githubusercontent.com.

2. PR drop comments (GitHub Code Quality — native/first-party)

  • The coverage job converts the merged Go profile to Cobertura (go tool gocover-cobertura, a new pinned tool dep; -ignore-dirs mirrors the YAML's global excludes) and uploads via actions/upload-code-coverage (code-quality: write). The github-code-quality[bot] posts the aggregate + per-file diff-vs-main comment.
  • continue-on-error, so this public-preview feature can never red CI. Fork PRs skip it (no code-quality token, per GitHub's own guard). Code Quality is enabled on the repo (Settings → Code quality).

Notes

  • Cold start: the first main run after merge seeds the badge (creates the badges branch) and the Code Quality baseline; PRs opened after that get the bot comment.
  • actionlint doesn't recognize the preview code-quality scope yet → suppressed narrowly in .github/actionlint.yaml (a genuine scope typo still fails).
  • SDK/TS coverage stays gated but isn't published yet — a small follow-up (language: javascript upload + a second badge JSON).

Validation

  • Local make ci green (all Go suites + merged + ts-total gates).
  • actionlint / shellcheck / markdownlint / golangci / misspell / go build / go mod tidy clean.
  • scripts/ci/publish-badge.sh simulated end-to-end against a bare remote (orphan-create → no-op-on-unchanged → fast-forward-update; caught + fixed a macOS install -D portability bug before it could bite CI).
  • Pre-push reviewers (code + docs) → ship_it.
  • ⚠️ Only a live run can prove the actual Code Quality upload + bot comment + badge render — I'll watch the first runs after merge.

Closes #133.

🤖 Generated with Claude Code

Resolve #133's coverage-reporting decision now the repo is public —
self-hosted, no third-party SaaS:

- README badge: a `cov badge` subcommand emits a shields.io endpoint JSON
  for the merged Go total (the exact number `make cov` gates); a new
  non-gating `badge` job publishes it to an orphan `badges` branch (sole
  holder of contents:write, main-push only) via scripts/ci/publish-badge.sh.
  README reads it over raw.githubusercontent.com.
- PR drop comments: GitHub Code Quality (native, first-party). The coverage
  job converts the merged Go profile to Cobertura (go tool gocover-cobertura,
  excludes mirrored from .testcoverage.yml) and uploads via
  actions/upload-code-coverage; the github-code-quality[bot] posts the
  aggregate + per-file diff-vs-main comment. continue-on-error so this
  public-preview feature never reds CI; fork PRs skip.

Gating is unchanged — `make cov`'s thresholds stay the only merge gate.
actionlint doesn't know the preview `code-quality` scope yet, suppressed
narrowly in .github/actionlint.yaml.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@EricAndrechek, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 9 minutes and 54 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ebcef0df-a13a-45a2-a23f-5a381cc55ea4

📥 Commits

Reviewing files that changed from the base of the PR and between 74b2c81 and 0bf1c2f.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (11)
  • .github/actionlint.yaml
  • .github/workflows/README.md
  • .github/workflows/ci.yml
  • .testcoverage.yml
  • AGENTS.md
  • CHANGELOG.md
  • README.md
  • docs/src/content/docs/development.md
  • go.mod
  • scripts/ci/publish-badge.sh
  • scripts/cov/main.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch code-cov
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch code-cov

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code go Pull requests that update go code area/docs Documentation, site/, README area/infra CI, build, deploy, Docker, release labels Jun 10, 2026
@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown

📚 Docs preview is livehttps://a6ae2994-wavehouse-docs.wave-rf.workers.dev

@github-code-quality

github-code-quality Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: Go

Go

The overall coverage in the code-cov branch is 89%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main code-cov 0bf1c2f +/-
internal/api/router.go 99%
internal/policy/policy.go 98%
internal/discov...ry/discovery.go 98%
internal/api/ingest.go 96%
internal/ingest/worker.go 95%
internal/query/builder.go 95%
internal/api/query.go 89%
internal/pipes/pipes.go 84%
internal/api/cl...ckhouse_exec.go 82%
cmd/wavehouse/main.go 68%

Updated June 10, 2026 22:43 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@EricAndrechek
EricAndrechek marked this pull request as ready for review June 10, 2026 22:40
@EricAndrechek
EricAndrechek requested review from a team and taitelee June 10, 2026 22:40
@EricAndrechek
EricAndrechek merged commit acd921e into main Jun 10, 2026
34 checks passed
@EricAndrechek
EricAndrechek deleted the code-cov branch June 10, 2026 22:48
@github-project-automation github-project-automation Bot moved this from Backlog to Done in WaveHouse Task Board Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation, site/, README area/infra CI, build, deploy, Docker, release dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code go Pull requests that update go code

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

tracking: re-evaluate coverage reporting / badge after OSS launch

1 participant