Repository navigation
Closed
Labels
Description
Context
As part of unblocking #57, PR #66 lowered the CI-enforced unit-test coverage threshold from 70% → 60% (in .github/workflows/ci.yml + Makefile) because:
mainhas been hovering at ~62% for months; the 70% bar was aspirational and was blocking theTestcheck.make coverage(viagotestsum) includes packages with no_test.gofiles (internal/dedupe,internal/mq,internal/observability,internal/testutil) which pull the measured total down to 54.7% even though the packages that have tests sit around 64.9% — hence the need to configure.testcoverage.ymlwithexclude.pathsfor the untested packages so the threshold reflects reality.
AGENTS.md documents 70% as the minimum; this issue tracks getting back there.
Work to get back to 70%
Weakest packages (from go tool cover -func):
internal/api(~59%) —stream_sse.go,stream_ws.go,structured_query.goHandle()paths are large and uncovered. A fakejetstream.JetStream+ in-memory hub would unlock these.internal/pipes(~61%) —Store.refresh+loadFromDirectoryrequire a real NATS KV to test; add tests using the embedded NATS test harness.internal/discovery(~71%) —Refreshneeds a ClickHouse-driver fake to exercise thesystem.columnsquery and type-mapping branches.internal/policy(~59%) —Store.WatchKV-watch loop and error branches uncovered.internal/dedupe,internal/mq,internal/observability— currently excluded from the measured total via.testcoverage.yml. Add basic tests for theEmbedded/Distributeddedup constructors, the NATS publish / subscribe paths, and the observability provider wiring, then drop the exclusions.
Acceptance
- Total unit-test coverage (with
.testcoverage.ymlexclusions removed) ≥ 70% — the barAGENTS.mdactually states. - Revert the temporary threshold drop in
.github/workflows/ci.ymlandMakefile(threshold-total: 70,COVERAGE_THRESHOLD := 70). - Delete
.testcoverage.yml(or at least theexclude.pathssection for packages that now have tests). - CHANGELOG entry under
[Unreleased]→### Changeddocumenting the revert.
References
- ci: fix main's broken CI and restore full ruleset gating #57 — the parent issue whose PR (fix(ci): sweep errcheck, resolve hub and ingest test failures #66) introduced the interim 60% threshold
- fix(ci): sweep errcheck, resolve hub and ingest test failures #66 — the PR that added the temporary exclusions and
.testcoverage.yml AGENTS.md— project coverage policy (70% min, 80% aspirational)
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fix(ci): configure coverage exclusions, clean up debug prints (#67)
fix: address Copilot re-review findings + docs consistency sync
test: restore 70% coverage threshold with new package tests (#79)
chore: claude code native improvements (#147)