From a364d0358c29666abe78787a77ebdfdb520f3109 Mon Sep 17 00:00:00 2001 From: Friel Date: Thu, 2 Apr 2026 02:33:50 +0000 Subject: [PATCH] test(core,exec): align fork replay and resume expectations --- .../core/src/codex/rollout_reconstruction_tests.rs | 14 +++++--------- codex-rs/exec/tests/suite/resume.rs | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/codex-rs/core/src/codex/rollout_reconstruction_tests.rs b/codex-rs/core/src/codex/rollout_reconstruction_tests.rs index e068a5d5ca..7743b7da58 100644 --- a/codex-rs/core/src/codex/rollout_reconstruction_tests.rs +++ b/codex-rs/core/src/codex/rollout_reconstruction_tests.rs @@ -204,16 +204,12 @@ async fn record_initial_history_forked_materializes_fork_reference_rollout_items .record_initial_history(InitialHistory::Forked(rollout_items)) .await; - let reconstruction_turn = session.new_default_turn().await; - let mut expected = vec![user_message("first user"), assistant_message("first reply")]; - expected.extend( - session - .build_initial_context(reconstruction_turn.as_ref()) - .await, - ); - let history = session.state.lock().await.clone_history(); - assert_eq!(expected, history.raw_items()); + assert_eq!( + vec![user_message("first user"), assistant_message("first reply")], + history.raw_items() + ); + assert!(session.reference_context_item().await.is_none()); } #[tokio::test] diff --git a/codex-rs/exec/tests/suite/resume.rs b/codex-rs/exec/tests/suite/resume.rs index a85183620e..20542f5b12 100644 --- a/codex-rs/exec/tests/suite/resume.rs +++ b/codex-rs/exec/tests/suite/resume.rs @@ -147,9 +147,9 @@ fn exec_resume_last_appends_to_existing_file() -> anyhow::Result<()> { .arg("--skip-git-repo-check") .arg("-C") .arg(&repo_root) - .arg(&prompt2) .arg("resume") .arg("--last") + .arg(&prompt2) .assert() .success();