chore(coverage): close every reachable coverage gap in lib - #933
Conversation
PR SummaryLow Risk Overview Production tweaks (dead code only): New / expanded tests guard real edge paths: Finch (invalid Reviewed by Cursor Bugbot for commit 30d0fe9. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a489671. Configure here.
e07f178 to
37bc7be
Compare
… attributes These branches guard mock lookup through a registered ancestor, global mock replacement, and a malformed env, none of which had a test pinning them. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Each one is shadowed by a total set of preceding clauses, so it could never run and kept its module below full coverage while looking like live code. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Every one of these lines is a path a caller can reach, so leaving them unexercised meant a regression in them would ship silently. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Everything in lib/ except the adapter implementations is now exercised, so a regression in these paths fails the suite instead of shipping quietly. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
The connection reuse guard compares scheme, host and port, and none of the three was pinned down on its own before, so a dropped comparison would have gone unnoticed. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
gun 1 names the tls options differently and reports a richer close reason, so the assertions had to stop assuming the gun 2 shapes. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
A nil url made the Logger emit a chardata truncation error in place of the summary line, which left the assertions unable to tell a skipped attribute from a lost log line. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
37bc7be to
30d0fe9
Compare

lib/was 96.3%, and every uncovered line was a branch a caller can reach. An untested branch is a branch a regression can break silently, so the suite was not actually guarding them.{:data_error, _}that OTP 24 through 28 never raise.sem_conv.exhad anextract_port/1clause forscheme: "https"with a non-integer port.URI.parse/1always fills the scheme default port, verified across eleven URL shapes includinghttps://host:/p,https://host:abc/pandhttps://host:-1/p, all of which yield443.test.exhad a catch-allencode!/2. Its only call site passes the literal"application/json", and the twoapplication/jsonclauses are total.mock.exhad araise otherfallback inagent_set/1.start_supervised/2returns only{:ok, pid}or{:error, {:already_started, pid}}there, so the clause was both dead and latently broken:raiseon a tuple raisesArgumentErroraboutraise/1rather than the intended error.Multipart.headers/1always returns one, soList.keytake/3can never miss.max_retries: 0shortcut inretry.exchanges nothing observable, becauseput_retry_count_opt/2is already a no-op atretries: 0.