Repository navigation
test: 100% coverage and CI gate - #22
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings the adapter library package to 100.0% statement coverage and wires a hard CI gate that fails below 100%.
Coverage
.)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)regeneratescover.outwith the same command CI uses (unit +-tags integration,REDIS_HOSTenv) and runs.github/scripts/check_coverage.sh, which parses thetotalline ofgo tool cover -funcand 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 toDefaultMaxBodyBytes.URLScheme: TLS requests resolvehttps;URLReplaceScheme("")returns the full URL untouched;Method("")defaults toGET.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;Closeforwards 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,staticcheckand the full unit + integration suite (redis-backed) are green.No issue referenced (repo does not use the issue tracker for these).