# collab: Add request stream support \(\#56455\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/592727b892870cc3d92c186e9aa0a0cfbab2754d)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 592727b892870cc3d92c186e9aa0a0cfbab2754d

Requested commit: 592727b892870cc3d92c186e9aa0a0cfbab2754d

Commit: 592727b892870cc3d92c186e9aa0a0cfbab2754d

Tree: 88714aee28d332d358a849cf21bac4e438f14fea

Author: Anthony Eid

Committer: GitHub

## Message

```
collab: Add request stream support (#56455)

Adds streaming RPC forwarding to collab so guests can call
`GetInitialGraphData` and `SearchCommits` against a remote host project.
Previously these requests had no forwarder registered on the server and
would fail when invoked by a guest.

This mirrors the existing single-response forwarding pattern with new
analogues:
- `StreamResponse<R>` + `MessageContext::forward_request_stream`
- `Server::add_request_stream_handler`
- `forward_read_only_project_stream_request`, registered for both
messages

Also hardens both the unary and stream handlers to send
`respond_with_error` when a handler returns `Ok` without sending/ending
a response, so the client doesn't hang waiting for a reply that will
never arrive.

I added git graph collab integration tests for this as well. 


Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #55954

Release Notes:

- N/A
```

## Parents

- [917c6984834a2b6c08fd169520393b5187e33dda](https://git.cafe/gitcafe/zed/commit/917c6984834a2b6c08fd169520393b5187e33dda?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/592727b892870cc3d92c186e9aa0a0cfbab2754d?format=markdown)
