feat: add idle timeout for StreamableHTTP sessions (#1994)

This commit is contained in:
Felix Weinberger 2026-02-18 10:34:18 +00:00 • committed by GitHub
commit 23a615783e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,6 +24,11 @@ This document contains critical information about working with this codebase. Fo
- Coverage: test edge cases and errors
- New features require tests
- Bug fixes require regression tests
- Avoid `anyio.sleep()` with a fixed duration to wait for async operations. Instead:
- Use `anyio.Event` — set it in the callback/handler, `await event.wait()` in the test
- For stream messages, use `await stream.receive()` instead of `sleep()` + `receive_nowait()`
- Exception: `sleep()` is appropriate when testing time-based features (e.g., timeouts)
- Wrap indefinite waits (`event.wait()`, `stream.receive()`) in `anyio.fail_after(5)` to prevent hangs
- For commits fixing bugs or adding features based on user reports add: