Cover every reachable branch - #6
Merged
Merged
Conversation
Raises coverage from 93.1% to 99.0% with tests only; the implementation is unchanged. The upstream error paths are driven through receiving middleware on the fake server, the shared-config read errors through a path whose parent is a file, and the session race through a gate that holds a connect open while another session is published for the same profile. The remaining three statements cannot be reached: json.Marshal cannot fail on a []string or on a map json.Unmarshal just produced, and SignHTTP's only error source is an HMAC write. The checks stay, so the codecov floor becomes 99% with no slack rather than a rounded-down 100%. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
winebarrel
enabled auto-merge
August 9, 2026 04:06
auto-merge was automatically disabled
August 9, 2026 04:07
Repository rule violations found
winebarrel
enabled auto-merge
August 9, 2026 04:07
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6 +/- ##
==========================================
+ Coverage 91.12% 98.38% +7.25%
==========================================
Files 5 5
Lines 372 372
==========================================
+ Hits 339 366 +27
+ Misses 19 3 -16
+ Partials 14 3 -11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Codecov counts lines and reports 98.38%, where `go tool cover` counts statements and reports 99.0%. The 99% target was set from the wrong number, so the check failed on a fully covered tree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Coverage goes from 93.1% to 99.0%, with tests only.
codecov.yml's floor moves from 90% to 99% with no threshold slack. The implementation is untouched.What the new tests reach
Profiles()open error, config and credentials fileslist_profileserror resultwrapToolschema errorInputSchemacannot be marshalleddiscoverToolsprofile-listing errortools/listfailureinputSchemais not an objectServerOptions{PageSize: 1}and two toolsconnectCtxwith no base contextRunover stdiogo teststdin is/dev/null, so the client is at EOF andRunreturns after servingdrainBodyread errorGetBodyon a bodyless requestWhy 99% and not 100%
Three statements cannot be reached from a test:
json.Marshalonmap[string]any{"profiles": []string}json.Marshalon a mapjson.Unmarshaljust produced -- JSON has no NaN or Inf, so the round trip cannot failSignHTTP's error, whose only source in aws-sdk-go-v2 v1.43.4 isbuildSignature-> HMAC, which does not failDropping those checks to reach a round number would be worse than the number, and Codecov has no line-level ignore -- only paths. So the target is 99% with
threshold: 0%: the real ceiling, gated exactly.