Skip to content

Raise Sonar new-code coverage above 80% - #971

Merged
justcoding121 merged 7 commits into
developfrom
feature/raise-new-code-coverage
Aug 3, 2026
Merged

Raise Sonar new-code coverage above 80%#971
justcoding121 merged 7 commits into
developfrom
feature/raise-new-code-coverage

Conversation

@justcoding121

Copy link
Copy Markdown
Owner

Summary

  • Exclude examples/ and benchmarks/ from Sonar coverage denominator
  • Add HTTP/3 codec, QUIC pool, transparent e2e, and H1/H2/H3 bridge integration tests
  • Fix real bugs found by those tests (H3 request URI/body, H1→H3 body buffering, TCP fallback BodyAvailable/Locked, empty :authority placeholder)
  • Chip remaining library gaps: SVCB backoff/coalesce, compression chain, cert disk-cache misses, WebSocketFrameWriter

Test plan

  • Unit tests (HTTP/3 codecs, QuicConnectionPool, SVCB, compression, certs, WebSocket writer)
  • Integration: Http3Transparent / Http3Bridge (gated on MsQuic)
  • CI + SonarCloud new-code coverage > 80% on this PR

justcoding121 and others added 7 commits August 2, 2026 17:26
Demo and BenchmarkDotNet projects inflate uncovered new-code lines without exercising the proxy library. Keep them out of the coverage denominator so the quality gate reflects product code.

Co-authored-by: Cursor <cursoragent@cursor.com>
Accept Stream for frame/varint/QPACK I/O so MemoryStream unit tests can exercise encode/decode, SETTINGS round-trip, encoder-stream instructions, and endpoint/exception models without MsQuic.

Co-authored-by: Cursor <cursoragent@cursor.com>
Inject IQuicConnectionFactory so pool share/invalidate/warmup/drain can be unit-tested without MsQuic. Also covers GetCacheKey and upstream-proxy rejection.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add QuicHttp3 origin/client helpers and gated transparent proxy integration tests. Fixes: populate SessionEventArgs.Request (was discarded), honour ServerCertificateValidationCallback on H3→H3 connect, and send synthetic Ok() bodies when IsBodyRead is unset.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add cross-version HTTP/3 bridge integration tests and fix H1 body buffering before Locked, H3 origin-form URI storage, TCP fallback BodyAvailable/Locked response reads.

Co-authored-by: Cursor <cursoragent@cursor.com>
… writer

Cover UdpSvcbDnsResolver neg/transient cache and resolver backoff, CompressionUtil stacked decompress, disk-cache miss/corrupt PFX, WebSocketFrameWriter, and Http2OriginGoAwayException contract.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the unfinished abc.abc placeholder with an InvalidOperationException so a missing authority cannot invent a host.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Aug 2, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

@justcoding121
justcoding121 merged commit 3b63095 into develop Aug 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant