You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expand unit-test coverage on src/protocols/quic/connection.cpp from the current 62.6% line / 34.4% branch baseline (develop @ fc52441, coverage run 25620254919) to ≥80% line AND ≥70% branch. This is the single largest remaining branch-coverage gap in the repository (655 unhit branches in this file alone, accounting for roughly 1.8pp of the ecosystem-wide branch deficit).
Test addition (no src/ behavioural change beyond optionally adding a friend/test-injection hook, gated by NETWORK_ENABLE_TEST_INJECTION)
Why
connection.cpp is the QUIC connection state machine and contains the largest dispatcher in the QUIC stack. Its branches are concentrated in process_packet / handle_frame / state-transition guards — exactly the surface most likely to hide regressions during Result<T> migration or API stabilization.
src/internal/protocols/quic/connection.h — may need friend class QuicConnectionTestAccess; (or per-test friend) gated by NETWORK_ENABLE_TEST_INJECTION
tests/support/ — possibly extend mock_quic_peer_loop or add a quic_connection_test_access.h parallel to the existing http2_client_test_access.h
tests/unit/quic_connection_branch_test.cpp (new) — branch-focused TEST_F set
tests/unit/quic_connection_* (existing 185 cases across quic_connection_test.cpp, quic_connection_extended_test.cpp, quic_connection_id_test.cpp, etc.) — extend where appropriate, do not delete
How
Approach
Read the current branch-coverage HTML for connection.cpp from the latest coverage artifact (coverage_html/protocols/quic/connection.cpp.gcov.html) to identify which branches are missing. Do not guess.
Negative-assertion tests that overlap with happy-path early-failure branches will contribute 0pp. Each TEST_F must target a branch NOT already exercised by the existing 185 connection-test cases — verify by inspecting the gcov report before adding the case.
Verification
Run the coverage workflow locally with cmake --preset coverage + cmake --build build/coverage --target coverage and inspect the per-file HTML before opening the PR.
After merge, link the coverage workflow run ID to this issue and post a closure comment with the measured delta.
Notes
size/L is acceptable here: this file is the largest single-file gap and breaking it into smaller pieces risks the "0pp trap" via overlapping TEST_F. Land the whole branch-uplift as one PR.
What
Expand unit-test coverage on
src/protocols/quic/connection.cppfrom the current 62.6% line / 34.4% branch baseline (develop @fc52441, coverage run 25620254919) to ≥80% line AND ≥70% branch. This is the single largest remaining branch-coverage gap in the repository (655 unhit branches in this file alone, accounting for roughly 1.8pp of the ecosystem-wide branch deficit).Part of #953.
Change Type
src/behavioural change beyond optionally adding a friend/test-injection hook, gated byNETWORK_ENABLE_TEST_INJECTION)Why
connection.cppis the QUIC connection state machine and contains the largest dispatcher in the QUIC stack. Its branches are concentrated inprocess_packet/handle_frame/ state-transition guards — exactly the surface most likely to hide regressions during Result<T> migration or API stabilization.Where
src/protocols/quic/connection.cpp(1584 physical LOC, 716 TU-instrumented lines)src/internal/protocols/quic/connection.h— may needfriend class QuicConnectionTestAccess;(or per-test friend) gated byNETWORK_ENABLE_TEST_INJECTIONtests/support/— possibly extendmock_quic_peer_loopor add aquic_connection_test_access.hparallel to the existinghttp2_client_test_access.htests/unit/quic_connection_branch_test.cpp(new) — branch-focused TEST_F settests/unit/quic_connection_*(existing 185 cases acrossquic_connection_test.cpp,quic_connection_extended_test.cpp,quic_connection_id_test.cpp, etc.) — extend where appropriate, do not deleteHow
Approach
connection.cppfrom the latest coverage artifact (coverage_html/protocols/quic/connection.cpp.gcov.html) to identify which branches are missing. Do not guess.process_packet, (d) reordering / out-of-window cases, (e) flow-control violations.process_packetorhandle_frame, add a friend declaration gated byNETWORK_ENABLE_TEST_INJECTION(same pattern as PR infra(test): pivot to friend-injected process_frame for hermetic dispatcher coverage (Round 6, Part of #1106, #953) #1115 /quic_server_probe). Otherwise drive the existing public API directly.wait_for(3s)under coverage instrumentation — see PR docs(coverage): diagnose http2_client 0pp coverage delta after Round 1+2+3 (#1110) #1111 diagnosis).frame_injector.connection_stategetter, public statistics, callback invocation), NOT just no-crash.Acceptance Criteria
src/protocols/quic/connection.cppline ≥ 80% AND branch ≥ 70%.wait_forbudget violations introduced).src/behavioural change — only additivefrienddeclaration (test-only, gated by macro) is permitted.Closes #<this-issue-number>keyword in PR body; PR targetsdevelop.Anti-criteria (lessons from Round 1–6)
Verification
cmake --preset coverage+cmake --build build/coverage --target coverageand inspect the per-file HTML before opening the PR.Notes