From d673c2696e905c82a2c80ac415e68b598e79d074 Mon Sep 17 00:00:00 2001 From: Dave Date: Mon, 23 Feb 2026 23:43:17 +0000 Subject: [PATCH] story-kit: create 122_story_test_coverage_http_ws_rs --- .../122_story_test_coverage_http_ws_rs.md | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .story_kit/work/1_upcoming/122_story_test_coverage_http_ws_rs.md diff --git a/.story_kit/work/1_upcoming/122_story_test_coverage_http_ws_rs.md b/.story_kit/work/1_upcoming/122_story_test_coverage_http_ws_rs.md new file mode 100644 index 0000000..df40bbd --- /dev/null +++ b/.story_kit/work/1_upcoming/122_story_test_coverage_http_ws_rs.md @@ -0,0 +1,27 @@ +--- +name: "Add test coverage for http/ws.rs (0% -> 50%+)" +--- + +# Story 122: Add test coverage for http/ws.rs + +Currently at 0% line coverage (160 lines). This is the WebSocket handler that powers the real-time UI — pipeline state pushes, chat streaming, permission requests, and reconciliation progress. + +## What to test + +- WebSocket message parsing (incoming WsRequest variants) +- Pipeline state serialization to WsResponse +- Message routing (chat, cancel, permission_response) +- Connection lifecycle (open, close, reconnect handling server-side) +- Broadcast channel subscription and message delivery + +## Notes + +- May need to set up a test server context or mock the broadcast channel +- Focus on the message handling logic rather than actual WebSocket transport +- Test the serialization/deserialization of all WsResponse variants + +## Acceptance Criteria + +- [ ] Line coverage for `http/ws.rs` reaches 50%+ +- [ ] Tests pass with `cargo test` +- [ ] `cargo clippy` clean