Skip to content

transport: receive server delivery envelopes - #151

Draft
sandersonstabo wants to merge 5 commits into
agent/engine-owner-p4f-stream-driver-3a531a2from
agent/e5-delivery-receiver-2841d2d
Draft

transport: receive server delivery envelopes#151
sandersonstabo wants to merge 5 commits into
agent/engine-owner-p4f-stream-driver-3a531a2from
agent/e5-delivery-receiver-2841d2d

Conversation

@sandersonstabo

@sandersonstabo sandersonstabo commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • receive and validate one server-initiated unidirectional delivery stream
  • expose delivery envelopes through a cancellation-safe DeliveryReceiver
  • stop the stream on receiver drop and report DeliveryLost on transport loss
  • cover framing, shutdown, cancellation, protocol rejection, and mid-frame loss behavior

Stack

Depends on #150. This is the next leaf in managed stack #121.

Verification

  • focused client-session test: 32/32 passed
  • real root Clippy build: passed with fresh transport/client marker
  • root format test: passed
  • exact HEAD, owned-file hashes, clean-status, and Bazel shutdown guards passed

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Adds a server-initiated delivery stream receiver to the transport client so sessions can consume delivery envelopes over a dedicated unidirectional stream.

  • Adds ClientSession::take_delivery() and a consuming DeliveryReceiver that reads bounded envelopes, checks cancellation, and stops the stream on drop.
  • Maps all stream, framing, and cancellation failures to a payload-free DeliveryLost, leaving the session owner usable for ordinary requests.
  • A second delivery take is a terminal ClientSessionError::DeliveryAlreadyTaken and closes the session.
  • Re-exports DeliveryReceiver and DeliveryLost from the transport crate.

Written for commit a7eb4af. Summary will update on new commits.

Review in cubic

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