1016 B
1016 B
Prompt
The user requested that generic _web_bs reconnect fixes and tests be separated from the Binance backend patch. The review also required tests to exercise the real reconnect task hierarchy, cite the previous faulty branches, and consistently name trio in code prose.
Generated code
git diff HEAD~1..HEAD -- piker/data/_web_bs.py
Ensures handled handshake failures immediately restart the reconnect loop and lets structured cancellation bypass shielded error throttling.
git diff HEAD~1..HEAD -- tests/test_websocket.py
Adds deterministic scheduler-real regressions for handshake startup timeouts, immediate rejection retries, and cancellation propagation.
Verification output
- Generic and Binance targeted tests:
9 passed in 0.06s. - Ruff passes for all four changed Python files.
git diff --checkpasses.- No live network probe was run.