Summary
tests/test_http2_state_machine_completion.py fails in isolation with multiple TypeError exceptions caused by None values in HTTP/2 limits/settings used by the handler state.
Reproduction
uv run python -m unittest -v tests.test_http2_state_machine_completion
Current result
- Ran: 13 tests
- Errors: 10
- Passes: 3
Representative error signatures
1) Frame header check
TypeError: '>' not supported between instances of 'int' and 'NoneType'
Location:
src/tigrcorn/protocols/http2/handler.py:291
- expression:
frame.length > self.state.local_settings[0x5]
2) New remote stream validation
TypeError: '>=' not supported between instances of 'int' and 'NoneType'
Location:
src/tigrcorn/protocols/http2/handler.py:366
- expression:
self.streams.active_remote_stream_count() >= self.state.max_concurrent_streams
3) Header fragment size check
TypeError: '>' not supported between instances of 'int' and 'NoneType'
Location:
src/tigrcorn/protocols/http2/handler.py:373
- expression:
next_size > self.config.http.http2_max_headers_size
Failing test cases
test_client_push_promise_is_rejected
test_continuation_does_not_interpret_end_stream_flag
test_first_frame_after_preface_must_be_settings
test_goaway_last_stream_id_must_not_increase
test_max_concurrent_streams_are_enforced
test_new_stream_after_peer_goaway_is_rejected
test_priority_self_dependency_is_rejected
test_stream_receive_flow_control_overflow_is_rejected
test_window_update_is_thresholded_not_immediate
test_window_update_on_closed_stream_is_ignored
Expected behavior
Handler/config state should be initialized with concrete HTTP/2 defaults before comparisons, or checks should guard None and raise protocol/config errors instead of raw TypeError.
Acceptance criteria
uv run python -m unittest -v tests.test_http2_state_machine_completion completes without TypeError errors.
- Failing scenarios either pass or fail with explicit protocol/config exceptions aligned with test intent.
Summary
tests/test_http2_state_machine_completion.pyfails in isolation with multipleTypeErrorexceptions caused byNonevalues in HTTP/2 limits/settings used by the handler state.Reproduction
Current result
Representative error signatures
1) Frame header check
Location:
src/tigrcorn/protocols/http2/handler.py:291frame.length > self.state.local_settings[0x5]2) New remote stream validation
Location:
src/tigrcorn/protocols/http2/handler.py:366self.streams.active_remote_stream_count() >= self.state.max_concurrent_streams3) Header fragment size check
Location:
src/tigrcorn/protocols/http2/handler.py:373next_size > self.config.http.http2_max_headers_sizeFailing test cases
test_client_push_promise_is_rejectedtest_continuation_does_not_interpret_end_stream_flagtest_first_frame_after_preface_must_be_settingstest_goaway_last_stream_id_must_not_increasetest_max_concurrent_streams_are_enforcedtest_new_stream_after_peer_goaway_is_rejectedtest_priority_self_dependency_is_rejectedtest_stream_receive_flow_control_overflow_is_rejectedtest_window_update_is_thresholded_not_immediatetest_window_update_on_closed_stream_is_ignoredExpected behavior
Handler/config state should be initialized with concrete HTTP/2 defaults before comparisons, or checks should guard
Noneand raise protocol/config errors instead of rawTypeError.Acceptance criteria
uv run python -m unittest -v tests.test_http2_state_machine_completioncompletes withoutTypeErrorerrors.