Skip to content

ci: merge unit + integration coverage (credit the real-cluster I/O seams) - #273

Merged
saadqbal merged 1 commit into
developfrom
test/ci-coverage-merge
Jul 14, 2026
Merged

ci: merge unit + integration coverage (credit the real-cluster I/O seams)#273
saadqbal merged 1 commit into
developfrom
test/ci-coverage-merge

Conversation

@LukasWodka

@LukasWodkaLukasWodka commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

The integration suite already exercises the real-cluster seams that are 0%% in the unit suite by designcluster.NewClientset, push.SPDYExecutor.Exec, submit.PortForwardJobsManager, cluster.DiscoverInClusterClient — but go test -cover (unit only) never credits them, so submit/cluster read artificially low. This merges unit + integration coverage into one honest picture.

Three targets, built-in go tool covdata (no external merger):

  • make cover — honest own-coverage per package (no-coverpkg, so no transitive cross-package inflation).
  • make cover-integration — the integration suite under -coverpkg (credits the internal packages its tests run); also the integration gate.
  • make cover-merge — unions both, prints per-package + overall.

Wired into e2e.yml's kind job.

Test plan

  • make ci green; unit half verified locally (own-coverage matches baseline: cluster 78.5, submit 80.4, ui 74.7).
  • This PR carries the e2e label so the kind job runs cover-integration + cover-merge and prints the merged numbers (the integration half can't run without a cluster).

🤖 Generated with Claude Code


Note

Low Risk
Changes are limited to CI workflow, Makefile coverage targets, and gitignore/clean; no application or security-sensitive runtime code is modified.

Overview
CI and tooling now produce a merged unit∪integration coverage picture so packages like submit and cluster get credit for real-cluster paths that unit tests intentionally mock.

The kind e2e job replaces a single make test-integration step with make cover, make cover-integration, and make cover-merge. Integration still gates the job because cover-integration runs the tagged suite and fails on test errors, while also writing coverage with -coverpkg.

The Makefile adds those three targets: unit run uses per-package coverage (no -coverpkg); integration writes to separate dirs under .coverdata; merge uses go tool covdata plus go tool cover -func for per-package and total output. .gitignore ignores .coverdata/ and scratch-cov/; make clean removes $(COVERDIR).

Reviewed by Cursor Bugbot for commit 7a18911. Bugbot is set up for automated code reviews on this repo. Configure here.

…ount
The integration suite already exercises the real-cluster seams that are 0% in the
unit suite by design — cluster.NewClientset, push.SPDYExecutor.Exec,
submit.PortForwardJobsManager, cluster.DiscoverInClusterClient — but `go test
-cover` (unit only) never credits them, so submit/cluster read artificially low.
Add three targets using the built-in `go tool covdata` (no external merger):
- `cover` — honest own-coverage per package (NO -coverpkg, so no
transitive cross-package inflation).
- `cover-integration`— the integration suite under -coverpkg, so it credits the
internal packages its tests exercise; also the test gate.
- `cover-merge` — unions both data dirs, prints per-package + overall.
Wire all three into e2e.yml's kind job. Verified locally for the unit half
(own-coverage matches baseline: cluster 78.5, submit 80.4, ui 74.7); the
integration half runs on kind in CI — this PR carries the `e2e` label to
exercise it.
make ci green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@LukasWodkaLukasWodka added the e2e Run the kind e2e integration suite on this PR label Jul 14, 2026
@LukasWodkaLukasWodka self-assigned this Jul 14, 2026
@LukasWodka

Copy link
Copy Markdown
ContributorAuthor

bugbot run

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 7a18911. Configure here.

@LukasWodka

Copy link
Copy Markdown
ContributorAuthor

👋 Heads-up — Code review queue is at 36 / 30

Above the WIP limit. The team convention is to review existing PRs before opening new work.

Open PRs currently in Code review (oldest first):

  • averaging-service#181 — feat(weights): normalize-on-read — mixed cycles average instead of rejecting (SEC-03 §8 step 2) · author: @shujaatTracebloc · no reviewer assigned
  • averaging-service#182 — feat(weights): averaging writes SafeTensors (TF + PyTorch) — SEC-03 §8 step 4 · author: @shujaatTracebloc · no reviewer assigned
  • backend#1079 — feat(global_meta): edge dataset_meta exposure + attributes contract at ingest (#924 G4a) · author: @divyasinghds · no reviewer assigned
  • backend#1086 — docs(rfc): SafeTensors weight-format migration — SEC-03 Phase 1 (RFC 0004) · author: @shujaatTracebloc · no reviewer assigned
  • backend#1093 — chore(deps): bump django from 5.2.14 to 5.2.15 · author: @dependabot · no reviewer assigned
  • backend#1095 — feat(experiment): configurable preprocessing knobs incl. tabular scaler — RFC 0003 L1 + L1b (#1094) · author: @LukasWodka · no reviewer assigned
  • backend#1100 — fix(boot): pin SDK install to tracebloc==0.11.2, drop 404 dev line (#1098) · author: @LukasWodka · reviewer: @saqlainsyed007
  • backend#1104 — perf(experiments): remove in-request completion sweep from status ping (part 2/2, #984) · author: @aptracebloc · no reviewer assigned
  • cli#266 — main - > enhance CLI features and tests · author: @saadqbal · no reviewer assigned
  • cli#268 — test: coverage wave 2 — utility packages toward 95% · author: @LukasWodka · no reviewer assigned

Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.)

@saadqbalsaadqbal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Ran make cover + make cover-merge locally — the -test.gocoverdir + go tool covdata merge works and prints a per-package + overall total, and cover-merge gracefully handles whichever data dirs exist. Importantly the integration gate isn't weakened: cover-integration is still go test -tags integration, so it fails the job on any test failure. Merging the suites to credit the 0%-by-design cluster-I/O seams is the right call. Clean.

@saadqbal
saadqbal merged commit 0580c4c into developJul 14, 2026
25 checks passed
@saadqbal
saadqbal deleted the test/ci-coverage-merge branch July 14, 2026 10:44
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2eRun the kind e2e integration suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@LukasWodka@saadqbal