Skip to content

test: 100% coverage and CI gate - #22

Merged
rennf93 merged 3 commits into
masterfrom
test/coverage-100
Sep 30, 2026
Merged

rennf93 merged 3 commits into
masterfrom
test/coverage-100

Conversation

@rennf93

@rennf93 rennf93 commented Sep 28, 2026

Copy link
Copy Markdown
Member

Summary

Brings the adapter library package to 100.0% statement coverage and wires a hard CI gate that fails below 100%.

Coverage

scope before after
library package (.) 90.3% 100.0%

The coverprofile is scoped to the library package; examples/ are runnable sample apps (main packages, no coverage harness) and are excluded from the gate, matching the engine's own conformance-split convention.

Gate mechanics: the CI step after go test (integration, redis) regenerates cover.out with the same command CI uses (unit + -tags integration, REDIS_HOST env) and runs .github/scripts/check_coverage.sh, which parses the total line of go tool cover -func and exits 1 below 100.0%.

Newly covered branches (coverage_test.go)

  • WithLogger: installing a provided logger, observed via the fail-closed malfunction report (built on a nil-pipeline engine, the same seam as the existing logger test).
  • newBodyCapture: scan flag on with a non-positive inspect budget still disables capture.
  • newRequestShim: nil request body skips the replay wrapper; non-positive body budget falls back to DefaultMaxBodyBytes.
  • URLScheme: TLS requests resolve https; URLReplaceScheme("") returns the full URL untouched; Method("") defaults to GET.
  • ReadBodyPrefix: negative bounds clamp to zero; over-budget reads cap at the configured budget; follow-up reads extend contiguously.
  • fillCacheLocked: non-EOF read errors surface (error-injecting reader); a (0, nil) read stops the fill without spinning.
  • replayBody: zero-length replay reads are a no-op; Close forwards to the original body and tolerates having none.

No production code changed. One pre-existing staticcheck finding on master (S1021 in reachability_test.go) was fixed so the repo stays at zero findings; gofmt, go vet, staticcheck and the full unit + integration suite (redis-backed) are green.

No issue referenced (repo does not use the issue tracker for these).

@rennf93 rennf93 added the no-issue Chore or dependency PR that does not need an issue label Sep 28, 2026
@github-actions github-actions Bot added tests Test suite changes ci GitHub Actions workflows labels Sep 28, 2026
@rennf93
rennf93 merged commit 2afd61c into master Sep 30, 2026
15 checks passed
@rennf93
rennf93 deleted the test/coverage-100 branch October 9, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci GitHub Actions workflows no-issue Chore or dependency PR that does not need an issue tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant