Skip to content

Complete SSE streaming coverage and fix StreamHandle cancel join - #151

Merged
MisterVVP merged 2 commits into
dev-add-coverage-and-production-streaming-examplesfrom
dev-complete-remaining-sse-streaming-coverage
Jul 15, 2026
Merged

MisterVVP merged 2 commits into
dev-add-coverage-and-production-streaming-examplesfrom
dev-complete-remaining-sse-streaming-coverage

Conversation

@MisterVVP

@MisterVVP MisterVVP commented Jul 15, 2026 •

Copy link
Copy Markdown
Owner

Motivation

  • Close remaining SSE streaming test gaps by adding subscribe and cancellation scenarios for HTTP+JSON and JSON-RPC using production default transports.
  • Add deterministic low-level libcurl streaming tests to validate metadata/chunk ordering, fragmentation, cancellation, timeout, and handler-failure propagation.
  • Harden StreamHandle lifecycle semantics so cancellation from observer callbacks cannot deadlock the worker thread.

Description

  • Extend the C++ SUT functional script to run send, subscribe, and cancel flows for both HTTP+JSON and JSON-RPC against the TCK SUT using HttpJsonTransport::CreateDefault(...) and JsonRpcTransport::CreateDefault(...) (modified scripts/run_cpp_sut_streaming_functional.sh).
  • Fix a self-join defect in StreamHandle::Cancel() by skipping join() when Cancel() is invoked on the worker thread itself (change in src/client/client.cpp).
  • Add/extend interop and unit tests: JSON-RPC streaming-envelope negative cases and incomplete final SSE behavior (tests/interop/http_streaming_gap_test.cpp), low-level libcurl StreamRequest coverage including fragmentation, metadata-before-chunk, handler failures, timeout and connection failure (tests/unit/http_client_test.cpp), and StreamHandle lifecycle edge cases including cancellation-from-OnEvent and no-callbacks-after-cancel (tests/unit/stream_handle_lifecycle_test.cpp).
  • Improve the interop client to support seeding a non-terminal task, subscribing, driving a terminal update, and verifying cancellation behavior in a deterministic way (tests/interop/http_sse_interop_client.cpp).

Testing

  • Ran formatter and full build: clang-format --dry-run --Werror ... and cmake / cmake --build; build succeeded.
  • Ran targeted unit and integration checks: ./build/tests/http_client_test --gtest_filter='*Stream*', ./build/tests/stream_handle_lifecycle_test, and the new http_streaming_gap_test; all added/modified tests passed locally.
  • Exercised HTTP SSE interop scenarios and C++ SUT matrix end-to-end: ./scripts/run_http_sse_interop.sh and ./scripts/run_cpp_sut_streaming_functional.sh, which started tck_sut and validated send, subscribe, and cancellation for both transports.
  • Executed repository validation: ./scripts/verify_changes.sh (format, build, tests, targeted clang-tidy fixes applied to touched test files); the verification run completed with tests passing after fixing readability issues in the touched tests.

@MisterVVP MisterVVP added the codex Automatic label added by codex agent. Should not be used label Jul 15, 2026 — with ChatGPT Codex Connector
@MisterVVP MisterVVP added AI agent AI agent contribution and removed codex Automatic label added by codex agent. Should not be used labels Jul 15, 2026
@MisterVVP MisterVVP self-assigned this Jul 15, 2026
@MisterVVP
MisterVVP merged commit 8170638 into dev-add-coverage-and-production-streaming-examples Jul 15, 2026
15 checks passed
@MisterVVP
MisterVVP deleted the dev-complete-remaining-sse-streaming-coverage branch July 15, 2026 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI agent AI agent contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant