story-kit: create 122_story_test_coverage_http_ws_rs
This commit is contained in:
@@ -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
|
||||||
Reference in New Issue
Block a user