Skip to content

Raise StreamClosedError for evicted streams - #1323

Open
AG0708 wants to merge 1 commit into
python-hyper:masterfrom
AG0708:codex/1175-closed-stream-error
Open

Raise StreamClosedError for evicted streams#1323
AG0708 wants to merge 1 commit into
python-hyper:masterfrom
AG0708:codex/1175-closed-stream-error

Conversation

@AG0708

@AG0708 AG0708 commented Aug 12, 2026

Copy link
Copy Markdown

Summary

  • recognize stream IDs retained in the closed-stream cache before treating them as new streams
  • raise StreamClosedError when sending headers on an evicted reset stream
  • preserve connection-level ProtocolError precedence after the connection is closed

Testing

  • uv run pytest (1,663 passed, 100% statement and branch coverage)
  • uv run ruff check src
  • strict mypy
  • git diff --check

Fixes #1175.

Implementation and tests were developed with OpenAI Codex assistance and reviewed against the reported failure path and repository contribution requirements.

Recognize stream IDs retained in the closed-stream cache before treating them as new streams. Preserve connection-state validation so connection-level protocol errors still take precedence.

Signed-off-by: Abhinav Gorrepati <gorrepatiabhinav1@gmail.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant