mirror of
https://github.com/openai/codex.git
synced 2026-09-16 12:13:30 +00:00
Add gRPC-backed code-mode sessions (#38041)
## What changed - Add `GrpcCodeModeSessionProvider` for opening code-mode sessions over HTTP/2 or an existing `tonic` channel. - Support execution, waiting, termination, per-session limits, cell-closure callbacks, and graceful shutdown over the gRPC protocol. - Bound transport waits and error messages, validate host identifiers and responses, and clean up abandoned executions and observers. ## Testing - Add end-to-end TCP tests covering session persistence, cancellation, concurrent waits, shutdown, cell cleanup, and independent yield limits. - Add unit coverage for protocol conversion, deadlines, and session lifecycle state. GitOrigin-RevId: d4729ce608ad4b42a99744b07e1f230e46cb24ec
This commit is contained in:
committed by
copyberry
parent
b2543af02b
commit
1e557a554e
@@ -32,7 +32,7 @@ use crate::NoopCodeModeSessionDelegate;
|
||||
|
||||
mod connection;
|
||||
|
||||
type ShutdownResultReceiver = watch::Receiver<Option<Result<(), String>>>;
|
||||
pub(crate) type ShutdownResultReceiver = watch::Receiver<Option<Result<(), String>>>;
|
||||
|
||||
/// Creates code-mode sessions backed by one lazily spawned process host.
|
||||
pub struct ProcessOwnedCodeModeSessionProvider {
|
||||
@@ -547,7 +547,7 @@ enum ShutdownAction {
|
||||
Close(SessionBinding),
|
||||
}
|
||||
|
||||
async fn wait_for_watch<T>(
|
||||
pub(crate) async fn wait_for_watch<T>(
|
||||
mut result_rx: watch::Receiver<Option<Result<T, String>>>,
|
||||
) -> Result<T, String>
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user