Fix CI regressions in requirements tests PR

This commit is contained in:
daniel-oai
2026-03-02 19:08:36 -08:00
parent c37c81e761
commit 8cf4a1a7d2
3 changed files with 20 additions and 14 deletions

View File

@@ -5458,6 +5458,10 @@ impl CodexMessageProcessor {
match turn_id {
Ok(turn_id) => {
self.thread_watch_manager
.note_turn_started(&params.thread_id)
.await;
let turn = Turn {
id: turn_id.clone(),
items: vec![],

View File

@@ -422,14 +422,13 @@ async fn responses_stream_includes_turn_metadata_header_for_git_workspace_e2e()
"https://github.com/openai/codex.git",
]);
let expected_head = String::from_utf8(run_git(&["rev-parse", "HEAD"]).stdout)
.expect("git rev-parse output should be valid UTF-8")
.trim()
.to_string();
let expected_origin = String::from_utf8(run_git(&["remote", "get-url", "origin"]).stdout)
.expect("git remote get-url output should be valid UTF-8")
.trim()
.to_string();
let expected_head = codex_core::git_info::get_head_commit_hash(cwd)
.await
.expect("production git helper should read HEAD");
let expected_origin = codex_core::git_info::get_git_remote_urls_assume_git_repo(cwd)
.await
.and_then(|remotes| remotes.get("origin").cloned())
.expect("production git helper should read origin");
let first_response = responses::sse(vec![
responses::ev_response_created("resp-2"),

View File

@@ -4,6 +4,7 @@ use std::io;
use std::io::Write;
use std::net::Shutdown;
use std::path::Path;
use std::sync::Arc;
use std::thread;
use anyhow::Context;
@@ -18,16 +19,17 @@ use uds_windows::UnixStream;
/// Connects to the Unix Domain Socket at `socket_path` and relays data between
/// standard input/output and the socket.
pub fn run(socket_path: &Path) -> anyhow::Result<()> {
let mut stream = UnixStream::connect(socket_path)
.with_context(|| format!("failed to connect to socket at {}", socket_path.display()))?;
let stream =
Arc::new(UnixStream::connect(socket_path).with_context(|| {
format!("failed to connect to socket at {}", socket_path.display())
})?);
let mut reader = stream
.try_clone()
.context("failed to clone socket for reading")?;
let reader = Arc::clone(&stream);
let stdout_thread = thread::spawn(move || -> io::Result<()> {
let stdout = io::stdout();
let mut handle = stdout.lock();
let mut reader = &*reader;
io::copy(&mut reader, &mut handle)?;
handle.flush()?;
Ok(())
@@ -36,7 +38,8 @@ pub fn run(socket_path: &Path) -> anyhow::Result<()> {
let stdin = io::stdin();
{
let mut handle = stdin.lock();
io::copy(&mut handle, &mut stream).context("failed to copy data from stdin to socket")?;
let mut writer = &*stream;
io::copy(&mut handle, &mut writer).context("failed to copy data from stdin to socket")?;
}
stream