Skip to content

refactor!: keep streamable http state in its transport - #1205

Draft
nickcoai wants to merge 2 commits into
agent/configurable-streamable-http-parallelismfrom
agent/streamable-http-worker-refactor
Draft

refactor!: keep streamable http state in its transport#1205
nickcoai wants to merge 2 commits into
agent/configurable-streamable-http-parallelismfrom
agent/streamable-http-worker-refactor

Conversation

@nickcoai

@nickcoai nickcoai commented Aug 23, 2026

Copy link
Copy Markdown

Summary

Follow up on oxcabe's worker ownership review in #1186.

This draft is based on #1186, so its diff contains only the refactor and its tests.

  • Move http request cancellation, the control queue, and session generation into StreamableHttpClientTransport.
  • Keep the ordinary queue and worker task in WorkerTransport.
  • Leave scheduling, retries, timeouts, cancellation behavior, and wire messages unchanged.

Validation

Passed locally:

  • 21 client-only concurrency tests, including worker construction and conversion.
  • 37 selected transport tests using the non-local features from justfile.
  • 13 http unit tests and six transport doctests.
  • All-features rmcp suite: 506 unit tests, enabled integration tests, and 48 doctests passed (10 ignored), with the two exclusions below.
  • Strict all-targets, all-features clippy with -D warnings.
  • Two unchanged downstream custom-adapter integration tests.
  • Nightly formatting and diff checks.

Two existing process tests remain excluded because the sandbox blocks process-state inspection: test_tokio_child_process_drop and test_tokio_child_process_graceful_shutdown. Neither test changed.

Move cancellation registration, control sends, and session generation into
the streamable http transport wrapper. Restore the generic worker queue
and keep the existing scheduling and cancellation behavior.

Cover construction paths, queue admission, and stream ownership. Document
the worker-to-transport migration.

BREAKING CHANGE: StreamableHttpClientTransport is no longer a WorkerTransport
alias, and StreamableHttpClientWorker no longer implements Worker. Use
StreamableHttpClientTransport::spawn or spawn_with_ct for worker construction.
@github-actions github-actions Bot added T-documentation Documentation improvements T-test Testing related changes T-core Core library changes T-transport Transport layer changes labels Aug 23, 2026
Reuse the cancellation lookup and existing test client. Remove duplicate
migration guidance and overlapping constructor checks, and shorten new
comments. Keep the cancellation and stream lifetime behavior unchanged.
@github-actions github-actions Bot removed the T-documentation Documentation improvements label Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-core Core library changes T-test Testing related changes T-transport Transport layer changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant