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
After three rounds of expanding tests/unit/http2_client_branch_test.cpp with substrate-driven TEST_F (PR #1108 added 6, PR #1109 added 7 — 13 total), the per-file coverage on src/protocols/http2/http2_client.cpp is still 18.75% line / 9.91% branch (108/576 LH/LF, 97/979 BRH/BRF — byte-identical between b4692fe and d537864). Both Round 2 and Round 3 produced exactly 0pp delta on the production source file. Diagnose this before any further TEST_F work.
The 0pp pattern strongly suggests a measurement or build-system issue, not a test-quality issue. Adding more TEST_F without root-causing this would repeat Round 3's symptom.
Confirm whether the 7 Round-3 dispatcher TEST_F (ServerPingFrameDrivesHandlePingAndKeepsConnectionAlive, ServerPingAckFrameIsAbsorbedSilently, ServerGoawayFrameFlipsConnectionStateToDisconnected, ServerWindowUpdateOnConnectionStreamExpandsWindow, ServerWindowUpdateOnUnknownStreamIsSilentlyIgnored, ServerRstStreamOnUnknownStreamIsSilentlyIgnored, ServerUnknownFrameTypeIsHandledWithoutCrashing) actually executed under coverage instrumentation in run [25464342500] (grep the Run tests step stdout for each TEST_F name).
If they did NOT execute, identify which CMake/macro mechanism excluded them (likely NETWORK_COVERAGE_BUILD over-scoping) and submit a fix PR scoped only to the two flaky TEST_F. Re-run coverage workflow on the fix and re-measure.
If they DID execute but produced 0pp, run gcov locally against http2_client.cpp.gcda from a baseline-only run and a baseline+new-TEST_F run, diff the resulting .gcov files line-by-line, and document which lines are net-newly-hit (or confirm the empty set).
Verify the lcov filter pipeline does not silently drop a second production-source SF for http2_client.cpp (raw coverage.info had 2 SFs; the second is the test file, but confirm no other --remove rule strips a second production compile unit).
Output: a one-page diagnostic note in docs/coverage/http2_client_round-4-diagnosis.md (or a comment on this issue) capturing which hypothesis is correct and the proposed fix.
Out of scope
Adding more TEST_F (a separate Round 5 sub-issue will be opened only after diagnosis is complete).
Changes to src/protocols/http2/http2_client.cpp itself.
CMake NETWORK_COVERAGE_BUILD over-scoping — highest probability, easiest to verify, biggest blast radius. If the macro is set on the test target rather than around the two specific TEST_F, the 7 new dispatcher TEST_F never reach the coverage binary.
Hit-line overlap with baseline ConnectCompletesSettingsExchangeWithMockPeer — medium probability. If true, the new tests are valuable for behavior-correctness but coverage-redundant; a different mock_h2_server_peer mode would be needed to drive truly-uncovered branches.
lcov filter dropping a second production compile unit — low probability after the SF-count check, but a final sanity pass on --remove/--extract rules is cheap.
Test plan for reviewers
After the fix PR (assuming hypothesis 1 lands):
gh run list --repo kcenon/network_system --branch develop --workflow "Code Coverage" --limit 1
# Expect: post-fix run shows http2_client.cpp line/branch coverage moved from 18.75/9.91% upward
What
After three rounds of expanding
tests/unit/http2_client_branch_test.cppwith substrate-driven TEST_F (PR #1108 added 6, PR #1109 added 7 — 13 total), the per-file coverage onsrc/protocols/http2/http2_client.cppis still 18.75% line / 9.91% branch (108/576 LH/LF, 97/979 BRH/BRF — byte-identical between b4692fe and d537864). Both Round 2 and Round 3 produced exactly 0pp delta on the production source file. Diagnose this before any further TEST_F work.Why
http2_client.cpp. Current shortfall is -41.25pp / -30.09pp despite 13 new TEST_F.http2_client.cpp(the single largest contributor to the gap) is stuck at 18.75%.Where
tests/CMakeLists.txtNETWORK_COVERAGE_BUILDmacro definition site — verify scope (target vs per-TEST_F)tests/unit/http2_client_branch_test.cppcmake/Coverage.cmake(or equivalent)--remove/--extractfilter rules.github/workflows/code-coverage.ymlHow
Acceptance criteria
ServerPingFrameDrivesHandlePingAndKeepsConnectionAlive,ServerPingAckFrameIsAbsorbedSilently,ServerGoawayFrameFlipsConnectionStateToDisconnected,ServerWindowUpdateOnConnectionStreamExpandsWindow,ServerWindowUpdateOnUnknownStreamIsSilentlyIgnored,ServerRstStreamOnUnknownStreamIsSilentlyIgnored,ServerUnknownFrameTypeIsHandledWithoutCrashing) actually executed under coverage instrumentation in run [25464342500] (grep theRun testsstep stdout for each TEST_F name).NETWORK_COVERAGE_BUILDover-scoping) and submit a fix PR scoped only to the two flaky TEST_F. Re-run coverage workflow on the fix and re-measure.http2_client.cpp.gcdafrom a baseline-only run and a baseline+new-TEST_F run, diff the resulting.gcovfiles line-by-line, and document which lines are net-newly-hit (or confirm the empty set).http2_client.cpp(rawcoverage.infohad 2 SFs; the second is the test file, but confirm no other--removerule strips a second production compile unit).docs/coverage/http2_client_round-4-diagnosis.md(or a comment on this issue) capturing which hypothesis is correct and the proposed fix.Out of scope
src/protocols/http2/http2_client.cppitself.Hypotheses to investigate (priority order)
NETWORK_COVERAGE_BUILDover-scoping — highest probability, easiest to verify, biggest blast radius. If the macro is set on the test target rather than around the two specific TEST_F, the 7 new dispatcher TEST_F never reach the coverage binary.ConnectCompletesSettingsExchangeWithMockPeer— medium probability. If true, the new tests are valuable for behavior-correctness but coverage-redundant; a different mock_h2_server_peer mode would be needed to drive truly-uncovered branches.--remove/--extractrules is cheap.Test plan for reviewers
After the fix PR (assuming hypothesis 1 lands):
Related
frame_injector+mock_h2_server_peer)