Skip to content

Preserve flow-control windows when rejecting local increments - #1335

Open
adenzhou1350 wants to merge 1 commit into
python-hyper:masterfrom
adenzhou1350:codex/preserve-rejected-local-window
Open

adenzhou1350 wants to merge 1 commit into
python-hyper:masterfrom
adenzhou1350:codex/preserve-rejected-local-window

Conversation

@adenzhou1350

Copy link
Copy Markdown

WindowManager.window_opened() updates the window before checking its upper bound. A rejected local H2Connection.increment_flow_control_window() therefore leaves the window above the limit even though no WINDOW_UPDATE was emitted. A subsequent valid increment then also fails.

Check the proposed size before assigning it. Add public-API regressions for both connection and stream windows, including a valid update after the rejected one. The limit and exception type are unchanged; this concerns local API rejection, not the separate inbound WINDOW_UPDATE handling.

Validation on Windows CPython 3.12:

  • Both new cases fail on the original implementation.
  • Full suite: 1,664 passed, with 100% line and branch coverage.
  • Changed production file passes Ruff checks; no new test-file lint diagnostics.

The all-version tox matrix and Linux h2spec were not run locally. AI-assisted implementation, independently exercised against the unchanged baseline.

Signed-off-by: Xucheng Zhou <aden1350@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant