What
Expand unit-test coverage of src/http/websocket_server.cpp from 39.9% line / 19.7% branch to >= 80% line / >= 70% branch (per coverage.yml).
This file is a new target identified in the 2026-04-26 re-measurement; no prior narrow test-expansion sub-issue exists for it.
Why
Where
- File:
src/http/websocket_server.cpp (~308 lcov-executable lines)
- Tests: extend
tests/test_messaging_ws_server.cpp and tests/test_websocket_facade.cpp
- Coverage workflow:
.github/workflows/coverage.yml
How
Technical Approach
- Read
websocket_server.cpp / websocket_server.h to enumerate frame handlers and error branches.
- Use the 2026-04-26 lcov report for uncovered lines/branches.
- Add tests for:
- Handshake failures (bad Sec-WebSocket-Key, unsupported version, missing headers)
- Frame validation errors (oversized payload, masked/unmasked policy mismatch, fragmented control frames)
- Close-handshake state transitions and abnormal closures
- Ping/Pong timeout handling and back-pressure on send
- Use the in-process loopback transport; no real network.
Acceptance Criteria
Part of #953
What
Expand unit-test coverage of
src/http/websocket_server.cppfrom 39.9% line / 19.7% branch to >= 80% line / >= 70% branch (percoverage.yml).This file is a new target identified in the 2026-04-26 re-measurement; no prior narrow test-expansion sub-issue exists for it.
Why
Part of #953— project-wide coverage push to 80%/70%.Where
src/http/websocket_server.cpp(~308 lcov-executable lines)tests/test_messaging_ws_server.cppandtests/test_websocket_facade.cpp.github/workflows/coverage.ymlHow
Technical Approach
websocket_server.cpp/websocket_server.hto enumerate frame handlers and error branches.Acceptance Criteria
src/http/websocket_server.cppline coverage >= 80%src/http/websocket_server.cppbranch coverage >= 70%Part of #953