mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
aa46f2debf
This is phase 1 of a 4 phase stack: 1. **Add protocol and host crates for new IPC code mode implementation** 2. Create the new standalone binary 3. Create a new IPC `CodeModeSessionProvider` to use new binary 4. Remove v8 from core and only use IPC provider ## Add protocol and host crates for new IPC code mode implementation Establish a clean process boundary without changing the existing in-process behavior. - Add the codex-code-mode-protocol crate for shared session, runtime, response, and tool-definition types. - Move protocol-facing code out of the V8-backed implementation. - Add a buildable codex-code-mode-host crate as the foundation for the standalone process. - Keep the existing in-process runtime as the active implementation.
20 lines
590 B
Rust
20 lines
590 B
Rust
use pretty_assertions::assert_eq;
|
|
use tokio::sync::oneshot;
|
|
|
|
use super::CellId;
|
|
use super::StartedCell;
|
|
|
|
#[tokio::test]
|
|
async fn started_cell_preserves_remote_initial_response_errors() {
|
|
let (response_tx, response_rx) = oneshot::channel();
|
|
response_tx
|
|
.send(Err("remote runtime failed".to_string()))
|
|
.expect("initial response receiver should be open");
|
|
let started = StartedCell::from_result_receiver(CellId::new("1".to_string()), response_rx);
|
|
|
|
assert_eq!(
|
|
started.initial_response().await,
|
|
Err("remote runtime failed".to_string())
|
|
);
|
|
}
|