Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Update tests for history and hook API changes (#34403)

Charlie Marshec3140db1297
diff --git a/codex-rs/core/src/context_manager/history_tests.rs b/codex-rs/core/src/context_manager/history_tests.rs
index 027bdee1a7..37d0cda789 100644
--- a/codex-rs/core/src/context_manager/history_tests.rs
+++ b/codex-rs/core/src/context_manager/history_tests.rs
@@ -2120,8 +2120,8 @@ fn record_items_omits_audio_that_exceeds_the_output_budget() {
history.record_items([&item], TruncationPolicy::Tokens(50));
assert_eq!(
- history.items,
- vec![ResponseItem::FunctionCallOutput {
+ history.raw_items(),
+ &[ResponseItem::FunctionCallOutput {
id: None,
call_id: "call-audio".to_string(),
output: FunctionCallOutputPayload {
diff --git a/codex-rs/hooks/src/engine/command_runner_tests.rs b/codex-rs/hooks/src/engine/command_runner_tests.rs
index ddd26d52b5..a8999d885e 100644
--- a/codex-rs/hooks/src/engine/command_runner_tests.rs
+++ b/codex-rs/hooks/src/engine/command_runner_tests.rs
@@ -30,6 +30,7 @@ async fn cmd_shell_runs_quoted_hook_command_path() {
command: format!(r#""{}" notify"#, hook_path.display()),
timeout_sec: 10,
status_message: None,
+ additional_context_limit: Default::default(),
source_path,
source: HookSource::User,
display_order: 0,