Skip to content

Commit 1176180

Browse files
committed
Persist agent task state and stabilize CI
1 parent c66f085 commit 1176180

File tree

24 files changed

+238
-82
lines changed

24 files changed

+238
-82
lines changed

codex-rs/Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codex-rs/app-server-protocol/src/protocol/thread_history.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,9 @@ impl ThreadHistoryBuilder {
218218
RolloutItem::EventMsg(event) => self.handle_event(event),
219219
RolloutItem::Compacted(payload) => self.handle_compacted(payload),
220220
RolloutItem::ResponseItem(item) => self.handle_response_item(item),
221-
RolloutItem::TurnContext(_) | RolloutItem::SessionMeta(_) => {}
221+
RolloutItem::TurnContext(_)
222+
| RolloutItem::SessionMeta(_)
223+
| RolloutItem::SessionState(_) => {}
222224
}
223225
}
224226

codex-rs/app-server/tests/suite/v2/client_metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use std::path::Path;
1818
use tempfile::TempDir;
1919
use tokio::time::timeout;
2020

21-
const DEFAULT_READ_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(10);
21+
const DEFAULT_READ_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(20);
2222

2323
#[tokio::test]
2424
async fn turn_start_forwards_client_metadata_to_responses_request_v2() -> Result<()> {

codex-rs/app-server/tests/suite/v2/collaboration_mode_list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use pretty_assertions::assert_eq;
2121
use tempfile::TempDir;
2222
use tokio::time::timeout;
2323

24-
const DEFAULT_TIMEOUT: Duration = Duration::from_secs(10);
24+
const DEFAULT_TIMEOUT: Duration = Duration::from_secs(20);
2525

2626
/// Confirms the server returns the default collaboration mode presets in a stable order.
2727
#[tokio::test]

codex-rs/app-server/tests/suite/v2/connection_handling_websocket.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ use tokio_tungstenite::tungstenite::http::HeaderValue;
4747
use tokio_tungstenite::tungstenite::http::header::AUTHORIZATION;
4848
use tokio_tungstenite::tungstenite::http::header::ORIGIN;
4949

50-
pub(super) const DEFAULT_READ_TIMEOUT: Duration = Duration::from_secs(10);
50+
pub(super) const DEFAULT_READ_TIMEOUT: Duration = Duration::from_secs(20);
5151

5252
pub(super) type WsClient = WebSocketStream<MaybeTlsStream<tokio::net::TcpStream>>;
5353
type HmacSha256 = Hmac<Sha256>;

codex-rs/app-server/tests/suite/v2/initialize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use std::time::Duration;
2424
use tempfile::TempDir;
2525
use tokio::time::timeout;
2626

27-
const DEFAULT_READ_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(10);
27+
const DEFAULT_READ_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(20);
2828

2929
#[tokio::test]
3030
async fn initialize_uses_client_info_name_as_originator() -> Result<()> {

codex-rs/app-server/tests/suite/v2/realtime_conversation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ use wiremock::matchers::method;
6969
use wiremock::matchers::path;
7070
use wiremock::matchers::path_regex;
7171

72-
const DEFAULT_TIMEOUT: Duration = Duration::from_secs(10);
72+
const DEFAULT_TIMEOUT: Duration = Duration::from_secs(20);
7373
const STARTUP_CONTEXT_HEADER: &str = "Startup context from Codex.";
7474
const V2_STEERING_ACKNOWLEDGEMENT: &str =
7575
"This was sent to steer the previous background agent task.";
@@ -1574,7 +1574,7 @@ async fn webrtc_v2_tool_call_delegated_turn_can_execute_shell_tool() -> Result<(
15741574
create_shell_command_sse_response(
15751575
realtime_tool_ok_command(),
15761576
/*workdir*/ None,
1577-
Some(5000),
1577+
Some(10_000),
15781578
"shell_call",
15791579
)?,
15801580
create_final_assistant_message_sse_response("shell tool finished")?,

codex-rs/core/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ codex-shell-escalation = { workspace = true }
147147
assert_cmd = { workspace = true }
148148
assert_matches = { workspace = true }
149149
codex-arg0 = { workspace = true }
150-
codex-keyring-store = { workspace = true }
151150
codex-otel = { workspace = true }
152151
codex-utils-cargo-bin = { workspace = true }
153152
core_test_support = { workspace = true }

codex-rs/core/src/agent/control.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ fn keep_forked_rollout_item(item: &RolloutItem) -> bool {
116116
| ResponseItem::Compaction { .. }
117117
| ResponseItem::Other,
118118
) => false,
119+
RolloutItem::SessionState(_) => false,
119120
RolloutItem::Compacted(_)
120121
| RolloutItem::EventMsg(_)
121122
| RolloutItem::SessionMeta(_)

codex-rs/core/src/agent/control_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ async fn wait_for_subagent_notification(parent_thread: &Arc<CodexThread>) -> boo
186186
sleep(Duration::from_millis(25)).await;
187187
}
188188
};
189-
timeout(Duration::from_secs(2), wait).await.is_ok()
189+
timeout(Duration::from_secs(5), wait).await.is_ok()
190190
}
191191

192192
async fn persist_thread_for_tree_resume(thread: &Arc<CodexThread>, message: &str) {

0 commit comments

Comments
 (0)