mirror of
https://github.com/openai/codex.git
synced 2026-11-05 20:10:33 +00:00
codex: narrow turn metadata propagation
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
co-authored by
Codex
parent
6e8ebdc5bc
commit
8efc728deb
@@ -279,6 +279,7 @@ use codex_state::ThreadMetadataBuilder;
|
||||
use codex_state::log_db::LogDbLayer;
|
||||
use codex_utils_json_to_toml::json_to_toml;
|
||||
use codex_utils_pty::DEFAULT_OUTPUT_BYTES_CAP;
|
||||
use std::collections::BTreeMap;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::HashSet;
|
||||
use std::ffi::OsStr;
|
||||
@@ -5974,6 +5975,13 @@ impl CodexMessageProcessor {
|
||||
.map(V2UserInput::into_core)
|
||||
.collect();
|
||||
|
||||
if let Some(metadata) = params.metadata.clone()
|
||||
&& let Err(error) = Self::set_next_turn_metadata(thread.as_ref(), metadata).await
|
||||
{
|
||||
self.outgoing.send_error(request_id, error).await;
|
||||
return;
|
||||
}
|
||||
|
||||
let has_any_overrides = params.cwd.is_some()
|
||||
|| params.approval_policy.is_some()
|
||||
|| params.approvals_reviewer.is_some()
|
||||
@@ -6018,7 +6026,6 @@ impl CodexMessageProcessor {
|
||||
Op::UserInput {
|
||||
items: mapped_items,
|
||||
final_output_json_schema: params.output_schema,
|
||||
metadata: params.metadata,
|
||||
},
|
||||
)
|
||||
.await;
|
||||
@@ -6060,6 +6067,20 @@ impl CodexMessageProcessor {
|
||||
})
|
||||
}
|
||||
|
||||
async fn set_next_turn_metadata(
|
||||
thread: &CodexThread,
|
||||
metadata: BTreeMap<String, String>,
|
||||
) -> Result<(), JSONRPCErrorError> {
|
||||
thread
|
||||
.set_next_turn_metadata(metadata)
|
||||
.await
|
||||
.map_err(|err| JSONRPCErrorError {
|
||||
code: INVALID_PARAMS_ERROR_CODE,
|
||||
message: err.to_string(),
|
||||
data: None,
|
||||
})
|
||||
}
|
||||
|
||||
async fn turn_steer(&self, request_id: ConnectionRequestId, params: TurnSteerParams) {
|
||||
let (_, thread) = match self.load_thread(¶ms.thread_id).await {
|
||||
Ok(v) => v,
|
||||
|
||||
@@ -730,6 +730,7 @@ fn start_uninitialized(args: InProcessStartArgs) -> InProcessClientHandle {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use app_test_support::create_mock_responses_server_repeating_assistant;
|
||||
use codex_app_server_protocol::ClientInfo;
|
||||
use codex_app_server_protocol::ConfigRequirementsReadResponse;
|
||||
use codex_app_server_protocol::SessionSource as ApiSessionSource;
|
||||
@@ -737,9 +738,13 @@ mod tests {
|
||||
use codex_app_server_protocol::ThreadStartResponse;
|
||||
use codex_app_server_protocol::Turn;
|
||||
use codex_app_server_protocol::TurnCompletedNotification;
|
||||
use codex_app_server_protocol::TurnStartParams;
|
||||
use codex_app_server_protocol::TurnStartResponse;
|
||||
use codex_app_server_protocol::TurnStatus;
|
||||
use codex_app_server_protocol::UserInput;
|
||||
use codex_core::config::ConfigBuilder;
|
||||
use pretty_assertions::assert_eq;
|
||||
use tempfile::TempDir;
|
||||
|
||||
async fn build_test_config() -> Config {
|
||||
match ConfigBuilder::default().build().await {
|
||||
|
||||
@@ -424,7 +424,6 @@ impl AgentControl {
|
||||
Op::UserInput {
|
||||
items,
|
||||
final_output_json_schema: None,
|
||||
metadata: None,
|
||||
},
|
||||
)
|
||||
.await;
|
||||
|
||||
@@ -372,7 +372,6 @@ async fn send_input_submits_user_message() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
metadata: None,
|
||||
},
|
||||
);
|
||||
let captured = harness
|
||||
@@ -404,7 +403,6 @@ async fn spawn_agent_creates_thread_and_sends_prompt() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
metadata: None,
|
||||
},
|
||||
);
|
||||
let captured = harness
|
||||
@@ -481,7 +479,6 @@ async fn spawn_agent_can_fork_parent_thread_history() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
metadata: None,
|
||||
},
|
||||
);
|
||||
let captured = harness
|
||||
|
||||
@@ -470,9 +470,6 @@ impl ModelClient {
|
||||
extra_headers
|
||||
}
|
||||
|
||||
fn build_session_request_headers(&self) -> ApiHeaderMap {
|
||||
self.build_subagent_headers()
|
||||
}
|
||||
/// Builds request telemetry for unary API calls (e.g., Compact endpoint).
|
||||
fn build_request_telemetry(
|
||||
session_telemetry: &SessionTelemetry,
|
||||
|
||||
@@ -717,6 +717,18 @@ impl Codex {
|
||||
.await
|
||||
}
|
||||
|
||||
pub(crate) async fn set_next_turn_metadata(
|
||||
&self,
|
||||
metadata: BTreeMap<String, String>,
|
||||
) -> ConstraintResult<()> {
|
||||
self.session
|
||||
.update_settings(SessionSettingsUpdate {
|
||||
next_turn_metadata: Some(metadata),
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub(crate) async fn agent_status(&self) -> AgentStatus {
|
||||
self.agent_status.borrow().clone()
|
||||
}
|
||||
@@ -2046,7 +2058,6 @@ impl Session {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
metadata: None,
|
||||
},
|
||||
)
|
||||
.await;
|
||||
@@ -4513,12 +4524,10 @@ mod handlers {
|
||||
Op::UserInput {
|
||||
items,
|
||||
final_output_json_schema,
|
||||
metadata,
|
||||
} => (
|
||||
items,
|
||||
SessionSettingsUpdate {
|
||||
final_output_json_schema: Some(final_output_json_schema),
|
||||
next_turn_metadata: Some(metadata.unwrap_or_default()),
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
|
||||
@@ -170,7 +170,6 @@ pub(crate) async fn run_codex_thread_one_shot(
|
||||
io.submit(Op::UserInput {
|
||||
items: input,
|
||||
final_output_json_schema,
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
|
||||
@@ -2870,7 +2870,6 @@ fn op_kind_distinguishes_turn_ops() {
|
||||
Op::UserInput {
|
||||
items: vec![],
|
||||
final_output_json_schema: None,
|
||||
metadata: None,
|
||||
}
|
||||
.kind(),
|
||||
"user_input"
|
||||
|
||||
@@ -22,6 +22,7 @@ use codex_protocol::protocol::SessionSource;
|
||||
use codex_protocol::protocol::TokenUsage;
|
||||
use codex_protocol::protocol::W3cTraceContext;
|
||||
use codex_protocol::user_input::UserInput;
|
||||
use std::collections::BTreeMap;
|
||||
use std::path::PathBuf;
|
||||
use tokio::sync::Mutex;
|
||||
use tokio::sync::watch;
|
||||
@@ -99,6 +100,13 @@ impl CodexThread {
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn set_next_turn_metadata(
|
||||
&self,
|
||||
metadata: BTreeMap<String, String>,
|
||||
) -> ConstraintResult<()> {
|
||||
self.codex.set_next_turn_metadata(metadata).await
|
||||
}
|
||||
|
||||
/// Use sparingly: this is intended to be removed soon.
|
||||
pub async fn submit_with_id(&self, sub: Submission) -> CodexResult<()> {
|
||||
self.codex.submit_with_id(sub).await
|
||||
|
||||
@@ -33,7 +33,6 @@ use crate::protocol::McpInvocation;
|
||||
use crate::protocol::McpToolCallBeginEvent;
|
||||
use crate::protocol::McpToolCallEndEvent;
|
||||
use crate::state_db;
|
||||
use crate::turn_metadata::extend_known_request_headers;
|
||||
use codex_protocol::mcp::CallToolResult;
|
||||
use codex_protocol::openai_models::InputModality;
|
||||
use codex_protocol::protocol::AskForApproval;
|
||||
|
||||
@@ -557,7 +557,6 @@ async fn send_input_accepts_structured_items() {
|
||||
},
|
||||
],
|
||||
final_output_json_schema: None,
|
||||
metadata: None,
|
||||
};
|
||||
let captured = manager
|
||||
.captured_ops()
|
||||
|
||||
@@ -614,9 +614,8 @@ async fn responses_stream_includes_parent_headers_from_turn_metadata() {
|
||||
provider,
|
||||
session_source,
|
||||
config.model_verbosity,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
/*enable_request_compression*/ false,
|
||||
/*include_timing_metrics*/ false,
|
||||
None,
|
||||
);
|
||||
let mut client_session = client.new_session();
|
||||
|
||||
@@ -51,8 +51,6 @@ async fn interrupt_long_running_tool_emits_turn_aborted() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -107,8 +105,6 @@ async fn interrupt_tool_records_history_entries() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -127,8 +123,6 @@ async fn interrupt_tool_records_history_entries() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -209,8 +203,6 @@ async fn interrupt_persists_turn_aborted_marker_in_next_request() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -229,8 +221,6 @@ async fn interrupt_persists_turn_aborted_marker_in_next_request() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@@ -277,8 +277,6 @@ async fn resume_includes_initial_messages_and_sends_prior_items() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -641,8 +639,6 @@ async fn includes_conversation_id_and_model_headers_in_request() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -691,8 +687,6 @@ async fn includes_base_instructions_override_in_request() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -745,8 +739,6 @@ async fn chatgpt_auth_sends_correct_request() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -849,8 +841,6 @@ async fn prefers_apikey_when_config_prefers_apikey_even_with_chatgpt_tokens() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -887,8 +877,6 @@ async fn includes_user_instructions_message_in_request() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -974,8 +962,6 @@ async fn includes_apps_guidance_as_developer_message_for_chatgpt_auth() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1064,8 +1050,6 @@ async fn omits_apps_guidance_for_api_key_auth_even_when_feature_enabled() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1136,8 +1120,6 @@ async fn skills_append_to_developer_message() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1189,8 +1171,6 @@ async fn includes_configured_effort_in_request() -> anyhow::Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1233,8 +1213,6 @@ async fn includes_no_effort_in_request() -> anyhow::Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1275,8 +1253,6 @@ async fn includes_default_reasoning_effort_in_request_when_defined_by_model_info
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1388,8 +1364,6 @@ async fn configured_reasoning_summary_is_sent() -> anyhow::Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1504,8 +1478,6 @@ async fn reasoning_summary_is_omitted_when_disabled() -> anyhow::Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1562,8 +1534,6 @@ async fn reasoning_summary_none_overrides_model_catalog_default() -> anyhow::Res
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1600,8 +1570,6 @@ async fn includes_default_verbosity_in_request() -> anyhow::Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1647,8 +1615,6 @@ async fn configured_verbosity_not_sent_for_models_without_support() -> anyhow::R
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1693,8 +1659,6 @@ async fn configured_verbosity_is_sent() -> anyhow::Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1744,8 +1708,6 @@ async fn includes_developer_instructions_message_in_request() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -2030,8 +1992,6 @@ async fn token_count_includes_rate_limits_snapshot() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -2197,8 +2157,6 @@ async fn usage_limit_error_emits_rate_limit_event() -> anyhow::Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.expect("submission should succeed while emitting usage limit error events");
|
||||
@@ -2273,8 +2231,6 @@ async fn context_window_error_sets_total_tokens_to_model_window() -> anyhow::Res
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -2287,8 +2243,6 @@ async fn context_window_error_sets_total_tokens_to_model_window() -> anyhow::Res
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -2371,8 +2325,6 @@ async fn incomplete_response_emits_content_filter_error_message() -> anyhow::Res
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -2471,8 +2423,6 @@ async fn azure_overrides_assign_properties_used_for_responses_url() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -2558,8 +2508,6 @@ async fn env_var_overrides_loaded_auth() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -2621,8 +2569,6 @@ async fn history_dedupes_streamed_and_final_messages_across_turns() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -2636,8 +2582,6 @@ async fn history_dedupes_streamed_and_final_messages_across_turns() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -2651,8 +2595,6 @@ async fn history_dedupes_streamed_and_final_messages_across_turns() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@@ -996,8 +996,6 @@ async fn responses_websocket_usage_limit_error_emits_rate_limit_event() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.expect("submission should succeed while emitting usage limit error events");
|
||||
@@ -1083,8 +1081,6 @@ async fn responses_websocket_invalid_request_error_with_status_is_forwarded() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.expect("submission should succeed while emitting invalid request events");
|
||||
|
||||
@@ -84,8 +84,6 @@ async fn no_collaboration_instructions_by_default() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -145,8 +143,6 @@ async fn user_input_includes_collaboration_instructions_after_override() -> Resu
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -244,8 +240,6 @@ async fn override_then_next_turn_uses_updated_collaboration_instructions() -> Re
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -368,8 +362,6 @@ async fn collaboration_mode_update_emits_new_instruction_message() -> Result<()>
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -397,8 +389,6 @@ async fn collaboration_mode_update_emits_new_instruction_message() -> Result<()>
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -455,8 +445,6 @@ async fn collaboration_mode_update_noop_does_not_append() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -484,8 +472,6 @@ async fn collaboration_mode_update_noop_does_not_append() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -544,8 +530,6 @@ async fn collaboration_mode_update_emits_new_instruction_message_when_mode_chang
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -576,8 +560,6 @@ async fn collaboration_mode_update_emits_new_instruction_message_when_mode_chang
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -637,8 +619,6 @@ async fn collaboration_mode_update_noop_does_not_append_when_mode_is_unchanged()
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -669,8 +649,6 @@ async fn collaboration_mode_update_noop_does_not_append_when_mode_is_unchanged()
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -734,8 +712,6 @@ async fn resume_replays_collaboration_instructions() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&initial.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -749,8 +725,6 @@ async fn resume_replays_collaboration_instructions() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&resumed.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -807,8 +781,6 @@ async fn empty_collaboration_instructions_are_ignored() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
|
||||
@@ -242,8 +242,6 @@ async fn summarize_context_three_requests_and_instructions() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -266,8 +264,6 @@ async fn summarize_context_three_requests_and_instructions() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -444,8 +440,6 @@ async fn manual_compact_uses_custom_prompt() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.expect("submit first user turn");
|
||||
@@ -590,8 +584,6 @@ async fn manual_compact_emits_context_compaction_items() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -755,8 +747,6 @@ async fn multiple_auto_compact_per_task_runs_after_token_limit_hit() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.expect("submit user input");
|
||||
@@ -1256,8 +1246,6 @@ async fn auto_compact_runs_after_token_limit_hit() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1271,8 +1259,6 @@ async fn auto_compact_runs_after_token_limit_hit() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1286,8 +1272,6 @@ async fn auto_compact_runs_after_token_limit_hit() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1456,8 +1440,6 @@ async fn auto_compact_emits_context_compaction_items() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1536,8 +1518,6 @@ async fn auto_compact_starts_after_turn_started() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1550,8 +1530,6 @@ async fn auto_compact_starts_after_turn_started() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1564,8 +1542,6 @@ async fn auto_compact_starts_after_turn_started() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -2053,8 +2029,6 @@ async fn auto_compact_persists_rollout_entries() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -2067,8 +2041,6 @@ async fn auto_compact_persists_rollout_entries() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -2081,8 +2053,6 @@ async fn auto_compact_persists_rollout_entries() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -2169,8 +2139,6 @@ async fn manual_compact_retries_after_context_window_error() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -2282,8 +2250,6 @@ async fn manual_compact_non_context_failure_retries_then_emits_task_error() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.expect("submit user input");
|
||||
@@ -2376,8 +2342,6 @@ async fn manual_compact_twice_preserves_latest_user_messages() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -2393,8 +2357,6 @@ async fn manual_compact_twice_preserves_latest_user_messages() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -2410,8 +2372,6 @@ async fn manual_compact_twice_preserves_latest_user_messages() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -2573,8 +2533,6 @@ async fn auto_compact_allows_multiple_attempts_when_interleaved_with_other_turn_
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -2677,8 +2635,6 @@ async fn snapshot_request_shape_mid_turn_continuation_compaction() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -2873,8 +2829,6 @@ async fn auto_compact_counts_encrypted_reasoning_before_last_user() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -2992,8 +2946,6 @@ async fn auto_compact_runs_when_reasoning_header_clears_between_turns() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -3053,8 +3005,6 @@ async fn snapshot_request_shape_pre_turn_compaction_including_incoming_user_mess
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.expect("submit user input");
|
||||
@@ -3090,8 +3040,6 @@ async fn snapshot_request_shape_pre_turn_compaction_including_incoming_user_mess
|
||||
},
|
||||
],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.expect("submit user input");
|
||||
@@ -3302,8 +3250,6 @@ async fn snapshot_request_shape_pre_turn_compaction_context_window_exceeded() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.expect("submit first user");
|
||||
@@ -3316,8 +3262,6 @@ async fn snapshot_request_shape_pre_turn_compaction_context_window_exceeded() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.expect("submit second user");
|
||||
@@ -3388,8 +3332,6 @@ async fn snapshot_request_shape_manual_compact_without_previous_user_messages()
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.expect("submit follow-up user input");
|
||||
|
||||
@@ -235,8 +235,6 @@ async fn remote_compact_replaces_history_for_followups() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -251,8 +249,6 @@ async fn remote_compact_replaces_history_for_followups() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -383,8 +379,6 @@ async fn remote_compact_runs_automatically() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -459,8 +453,6 @@ async fn remote_compact_trims_function_call_history_to_fit_context_window() -> R
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |event| matches!(event, EventMsg::TurnComplete(_))).await;
|
||||
@@ -472,8 +464,6 @@ async fn remote_compact_trims_function_call_history_to_fit_context_window() -> R
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |event| matches!(event, EventMsg::TurnComplete(_))).await;
|
||||
@@ -583,8 +573,6 @@ async fn auto_remote_compact_trims_function_call_history_to_fit_context_window()
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |event| matches!(event, EventMsg::TurnComplete(_))).await;
|
||||
@@ -596,8 +584,6 @@ async fn auto_remote_compact_trims_function_call_history_to_fit_context_window()
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |event| matches!(event, EventMsg::TurnComplete(_))).await;
|
||||
@@ -615,8 +601,6 @@ async fn auto_remote_compact_trims_function_call_history_to_fit_context_window()
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |event| matches!(event, EventMsg::TurnComplete(_))).await;
|
||||
@@ -714,8 +698,6 @@ async fn auto_remote_compact_failure_stops_agent_loop() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |event| matches!(event, EventMsg::TurnComplete(_))).await;
|
||||
@@ -727,8 +709,6 @@ async fn auto_remote_compact_failure_stops_agent_loop() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -820,8 +800,6 @@ async fn remote_compact_trim_estimate_uses_session_base_instructions() -> Result
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&baseline_codex, |event| {
|
||||
@@ -836,8 +814,6 @@ async fn remote_compact_trim_estimate_uses_session_base_instructions() -> Result
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&baseline_codex, |event| {
|
||||
@@ -923,8 +899,6 @@ async fn remote_compact_trim_estimate_uses_session_base_instructions() -> Result
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&override_codex, |event| {
|
||||
@@ -939,8 +913,6 @@ async fn remote_compact_trim_estimate_uses_session_base_instructions() -> Result
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&override_codex, |event| {
|
||||
@@ -1009,8 +981,6 @@ async fn remote_manual_compact_emits_context_compaction_items() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |event| matches!(event, EventMsg::TurnComplete(_))).await;
|
||||
@@ -1089,8 +1059,6 @@ async fn remote_manual_compact_failure_emits_task_error_event() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |event| matches!(event, EventMsg::TurnComplete(_))).await;
|
||||
@@ -1173,8 +1141,6 @@ async fn remote_compact_persists_replacement_history_in_rollout() -> Result<()>
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -1316,8 +1282,6 @@ async fn remote_compact_and_resume_refresh_stale_developer_instructions() -> Res
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&initial.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -1333,8 +1297,6 @@ async fn remote_compact_and_resume_refresh_stale_developer_instructions() -> Res
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&initial.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -1357,8 +1319,6 @@ async fn remote_compact_and_resume_refresh_stale_developer_instructions() -> Res
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&resumed.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -1453,8 +1413,6 @@ async fn remote_compact_refreshes_stale_developer_instructions_without_resume()
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -1469,8 +1427,6 @@ async fn remote_compact_refreshes_stale_developer_instructions_without_resume()
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -1540,8 +1496,6 @@ async fn snapshot_request_shape_remote_pre_turn_compaction_restates_realtime_sta
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -1553,8 +1507,6 @@ async fn snapshot_request_shape_remote_pre_turn_compaction_restates_realtime_sta
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -1619,8 +1571,6 @@ async fn remote_request_uses_custom_experimental_realtime_start_instructions() -
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -1679,8 +1629,6 @@ async fn snapshot_request_shape_remote_pre_turn_compaction_restates_realtime_end
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -1694,8 +1642,6 @@ async fn snapshot_request_shape_remote_pre_turn_compaction_restates_realtime_end
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -1768,8 +1714,6 @@ async fn snapshot_request_shape_remote_manual_compact_restates_realtime_start()
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -1784,8 +1728,6 @@ async fn snapshot_request_shape_remote_manual_compact_restates_realtime_start()
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -1866,8 +1808,6 @@ async fn snapshot_request_shape_remote_mid_turn_compaction_does_not_restate_real
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -1881,8 +1821,6 @@ async fn snapshot_request_shape_remote_mid_turn_compaction_does_not_restate_real
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -1971,8 +1909,6 @@ async fn snapshot_request_shape_remote_compact_resume_restates_realtime_end() ->
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&initial.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -2000,8 +1936,6 @@ async fn snapshot_request_shape_remote_compact_resume_restates_realtime_end() ->
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&resumed.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -2095,8 +2029,6 @@ async fn snapshot_request_shape_remote_pre_turn_compaction_including_incoming_us
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -2181,8 +2113,6 @@ async fn snapshot_request_shape_remote_pre_turn_compaction_strips_incoming_model
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -2209,8 +2139,6 @@ async fn snapshot_request_shape_remote_pre_turn_compaction_strips_incoming_model
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -2327,8 +2255,6 @@ async fn snapshot_request_shape_remote_pre_turn_compaction_context_window_exceed
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -2340,8 +2266,6 @@ async fn snapshot_request_shape_remote_pre_turn_compaction_context_window_exceed
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
let error_message = wait_for_event_match(&codex, |event| match event {
|
||||
@@ -2424,8 +2348,6 @@ async fn snapshot_request_shape_remote_mid_turn_continuation_compaction() -> Res
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -2501,8 +2423,6 @@ async fn snapshot_request_shape_remote_mid_turn_compaction_summary_only_reinject
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -2586,8 +2506,6 @@ async fn snapshot_request_shape_remote_mid_turn_compaction_multi_summary_reinjec
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -2602,8 +2520,6 @@ async fn snapshot_request_shape_remote_mid_turn_compaction_multi_summary_reinjec
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -2683,8 +2599,6 @@ async fn snapshot_request_shape_remote_manual_compact_without_previous_user_mess
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
|
||||
@@ -651,8 +651,6 @@ async fn user_turn(conversation: &Arc<CodexThread>, text: &str) {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.expect("submit user turn");
|
||||
|
||||
@@ -52,8 +52,6 @@ async fn fork_thread_twice_drops_to_first_message() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@@ -60,8 +60,6 @@ async fn user_message_item_is_emitted() -> anyhow::Result<()> {
|
||||
.submit(Op::UserInput {
|
||||
items: vec![expected_input.clone()],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -118,8 +116,6 @@ async fn assistant_message_item_is_emitted() -> anyhow::Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -178,8 +174,6 @@ async fn reasoning_item_is_emitted() -> anyhow::Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -239,8 +233,6 @@ async fn web_search_item_is_emitted() -> anyhow::Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -296,8 +288,6 @@ async fn image_generation_call_event_is_emitted() -> anyhow::Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -351,8 +341,6 @@ async fn image_generation_call_event_is_emitted_when_image_save_fails() -> anyho
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -406,8 +394,6 @@ async fn agent_message_content_delta_has_item_metadata() -> anyhow::Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -1050,8 +1036,6 @@ async fn reasoning_content_delta_has_item_metadata() -> anyhow::Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -1111,8 +1095,6 @@ async fn reasoning_raw_content_delta_respects_flag() -> anyhow::Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
|
||||
@@ -318,8 +318,6 @@ async fn snapshot_model_visible_layout_resume_with_personality_change() -> Resul
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |event| matches!(event, EventMsg::TurnComplete(_))).await;
|
||||
@@ -418,8 +416,6 @@ async fn snapshot_model_visible_layout_resume_override_matches_rollout_model() -
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |event| matches!(event, EventMsg::TurnComplete(_))).await;
|
||||
@@ -465,8 +461,6 @@ async fn snapshot_model_visible_layout_resume_override_matches_rollout_model() -
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&resumed.codex, |event| {
|
||||
|
||||
@@ -107,8 +107,6 @@ async fn responses_api_emits_api_request_event() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -152,8 +150,6 @@ async fn process_sse_emits_tracing_for_output_item() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -197,8 +193,6 @@ async fn process_sse_emits_failed_event_on_parse_error() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -243,8 +237,6 @@ async fn process_sse_records_failed_event_when_stream_closes_without_completed()
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -309,8 +301,6 @@ async fn process_sse_failed_event_records_response_error_message() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -373,8 +363,6 @@ async fn process_sse_failed_event_logs_parse_error() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -424,8 +412,6 @@ async fn process_sse_failed_event_logs_missing_error() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -484,8 +470,6 @@ async fn process_sse_failed_event_logs_response_completed_parse_error() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -538,8 +522,6 @@ async fn process_sse_emits_completed_telemetry() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -612,8 +594,6 @@ async fn handle_responses_span_records_response_kind_and_tool_name() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -698,8 +678,6 @@ async fn record_responses_sets_span_fields_for_response_events() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -784,8 +762,6 @@ async fn handle_response_item_records_tool_result_for_custom_tool_call() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -859,8 +835,6 @@ async fn handle_response_item_records_tool_result_for_function_call() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -944,8 +918,6 @@ async fn handle_response_item_records_tool_result_for_local_shell_missing_ids()
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1013,8 +985,6 @@ async fn handle_response_item_records_tool_result_for_local_shell_call() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1123,8 +1093,6 @@ async fn handle_container_exec_autoapprove_from_config_records_tool_decision() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1176,8 +1144,6 @@ async fn handle_container_exec_user_approved_records_tool_decision() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1244,8 +1210,6 @@ async fn handle_container_exec_user_approved_for_session_records_tool_decision()
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1312,8 +1276,6 @@ async fn handle_sandbox_error_user_approves_retry_records_tool_decision() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1380,8 +1342,6 @@ async fn handle_container_exec_user_denies_records_tool_decision() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1448,8 +1408,6 @@ async fn handle_sandbox_error_user_approves_for_session_records_tool_decision()
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -1517,8 +1475,6 @@ async fn handle_sandbox_error_user_denies_records_tool_decision() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@@ -104,8 +104,6 @@ async fn injected_user_input_triggers_follow_up_request_with_deltas() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -122,8 +120,6 @@ async fn injected_user_input_triggers_follow_up_request_with_deltas() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@@ -66,8 +66,6 @@ async fn permissions_message_sent_once_on_start() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -109,8 +107,6 @@ async fn permissions_message_added_on_override_change() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -138,8 +134,6 @@ async fn permissions_message_added_on_override_change() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -187,8 +181,6 @@ async fn permissions_message_not_added_when_no_change() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -200,8 +192,6 @@ async fn permissions_message_not_added_when_no_change() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -260,8 +250,6 @@ async fn resume_replays_permissions_messages() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&initial.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -291,8 +279,6 @@ async fn resume_replays_permissions_messages() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&initial.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -306,8 +292,6 @@ async fn resume_replays_permissions_messages() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&resumed.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -367,8 +351,6 @@ async fn resume_and_fork_append_permissions_messages() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&initial.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -398,8 +380,6 @@ async fn resume_and_fork_append_permissions_messages() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&initial.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -421,8 +401,6 @@ async fn resume_and_fork_append_permissions_messages() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&resumed.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -451,8 +429,6 @@ async fn resume_and_fork_append_permissions_messages() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&forked.thread, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -507,8 +483,6 @@ async fn permissions_message_includes_writable_roots() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
|
||||
@@ -213,8 +213,6 @@ async fn capability_sections_render_in_developer_message_in_order() -> Result<()
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -290,8 +288,6 @@ async fn explicit_plugin_mentions_inject_plugin_guidance() -> Result<()> {
|
||||
path: format!("plugin://{SAMPLE_PLUGIN_CONFIG_NAME}"),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -364,8 +360,6 @@ async fn explicit_plugin_mentions_track_plugin_used_analytics() -> Result<()> {
|
||||
path: format!("plugin://{SAMPLE_PLUGIN_CONFIG_NAME}"),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
|
||||
@@ -151,8 +151,6 @@ async fn prompt_tools_are_consistent_across_requests() -> anyhow::Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -164,8 +162,6 @@ async fn prompt_tools_are_consistent_across_requests() -> anyhow::Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -251,8 +247,6 @@ async fn gpt_5_tools_without_apply_patch_append_apply_patch_instructions() -> an
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -264,8 +258,6 @@ async fn gpt_5_tools_without_apply_patch_append_apply_patch_instructions() -> an
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -328,8 +320,6 @@ async fn prefixes_context_and_instructions_once_and_consistently_across_requests
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -341,8 +331,6 @@ async fn prefixes_context_and_instructions_once_and_consistently_across_requests
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -424,8 +412,6 @@ async fn overrides_turn_context_but_keeps_cached_prefix_and_key_constant() -> an
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -462,8 +448,6 @@ async fn overrides_turn_context_but_keeps_cached_prefix_and_key_constant() -> an
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
@@ -546,8 +530,6 @@ async fn override_before_first_turn_emits_environment_context() -> anyhow::Resul
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -699,8 +681,6 @@ async fn per_turn_overrides_keep_cached_prefix_and_key_constant() -> anyhow::Res
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
|
||||
@@ -46,8 +46,6 @@ async fn quota_exceeded_emits_single_error_event() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@@ -2036,8 +2036,6 @@ async fn inbound_handoff_request_steers_active_turn() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
|
||||
@@ -45,8 +45,6 @@ async fn request_body_is_zstd_compressed_for_codex_backend_when_enabled() -> any
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -94,8 +92,6 @@ async fn request_body_is_not_compressed_for_api_key_auth_even_when_enabled() ->
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
|
||||
@@ -91,8 +91,6 @@ async fn resume_includes_initial_messages_from_rollout_events() -> Result<()> {
|
||||
text_elements: text_elements.clone(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -178,8 +176,6 @@ async fn resume_includes_initial_messages_from_reasoning_events() -> Result<()>
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -269,8 +265,6 @@ async fn resume_switches_models_preserves_base_instructions() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |event| matches!(event, EventMsg::TurnComplete(_))).await;
|
||||
@@ -311,8 +305,6 @@ async fn resume_switches_models_preserves_base_instructions() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&resumed.codex, |event| {
|
||||
@@ -328,8 +320,6 @@ async fn resume_switches_models_preserves_base_instructions() -> Result<()> {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&resumed.codex, |event| {
|
||||
@@ -400,8 +390,6 @@ async fn resume_model_switch_is_not_duplicated_after_pre_turn_override() -> Resu
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |event| matches!(event, EventMsg::TurnComplete(_))).await;
|
||||
@@ -445,8 +433,6 @@ async fn resume_model_switch_is_not_duplicated_after_pre_turn_override() -> Resu
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&resumed.codex, |event| {
|
||||
|
||||
@@ -717,8 +717,6 @@ async fn review_history_surfaces_in_parent_session() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@@ -380,8 +380,6 @@ async fn tool_search_returns_deferred_tools_without_follow_up_tool_injection() -
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
|
||||
|
||||
@@ -97,8 +97,6 @@ async fn continue_after_stream_error() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -118,8 +116,6 @@ async fn continue_after_stream_error() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@@ -81,8 +81,6 @@ async fn retries_on_early_close() {
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@@ -62,8 +62,6 @@ mv "${tmp_path}" "${payload_path}""#,
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
final_output_json_schema: None,
|
||||
|
||||
metadata: None,
|
||||
})
|
||||
.await?;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
//! Uses a SQ (Submission Queue) / EQ (Event Queue) pattern to asynchronously communicate
|
||||
//! between user and agent.
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::HashSet;
|
||||
use std::ffi::OsStr;
|
||||
@@ -239,9 +238,6 @@ pub enum Op {
|
||||
/// Optional JSON Schema used to constrain the final assistant message for this turn.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
final_output_json_schema: Option<Value>,
|
||||
/// Optional metadata attached only to this turn.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
metadata: Option<BTreeMap<String, String>>,
|
||||
},
|
||||
|
||||
/// Similar to [`Op::UserInput`], but contains additional context required
|
||||
@@ -4260,7 +4256,6 @@ mod tests {
|
||||
let op = Op::UserInput {
|
||||
items: Vec::new(),
|
||||
final_output_json_schema: None,
|
||||
metadata: None,
|
||||
};
|
||||
|
||||
let json_op = serde_json::to_value(op)?;
|
||||
@@ -4278,7 +4273,6 @@ mod tests {
|
||||
Op::UserInput {
|
||||
items: Vec::new(),
|
||||
final_output_json_schema: None,
|
||||
metadata: None,
|
||||
}
|
||||
);
|
||||
|
||||
@@ -4298,7 +4292,6 @@ mod tests {
|
||||
let op = Op::UserInput {
|
||||
items: Vec::new(),
|
||||
final_output_json_schema: Some(schema.clone()),
|
||||
metadata: None,
|
||||
};
|
||||
|
||||
let json_op = serde_json::to_value(op)?;
|
||||
|
||||
Reference in New Issue
Block a user