mirror of
https://github.com/openai/codex.git
synced 2026-11-05 16:29:31 +00:00
Wait for patch events before reading shell snapshots (#36757)
## What changed Move shell snapshot validation in the intercepted `apply_patch` test until after the turn completes and its patch lifecycle events have been collected. GitOrigin-RevId: 1c16bcfcc97f09165c4a2eb2d15f4059a14b2a99
This commit is contained in:
1 parent
7750465934
commit
c39d3e99d5
1 file changed
+4
-4
@@ -608,10 +608,6 @@ async fn shell_command_snapshot_still_intercepts_apply_patch() -> Result<()> {
|
||||
})
|
||||
.await?;
|
||||
|
||||
let snapshot_path = wait_for_snapshot(&codex_home).await?;
|
||||
let snapshot_content = fs::read_to_string(&snapshot_path).await?;
|
||||
assert_posix_snapshot_sections(&snapshot_content);
|
||||
|
||||
let mut saw_patch_begin = false;
|
||||
let mut patch_end = None;
|
||||
wait_for_event(&codex, |ev| match ev {
|
||||
@@ -628,6 +624,10 @@ async fn shell_command_snapshot_still_intercepts_apply_patch() -> Result<()> {
|
||||
})
|
||||
.await;
|
||||
|
||||
let snapshot_path = wait_for_snapshot(&codex_home).await?;
|
||||
let snapshot_content = fs::read_to_string(&snapshot_path).await?;
|
||||
assert_posix_snapshot_sections(&snapshot_content);
|
||||
|
||||
assert!(
|
||||
saw_patch_begin,
|
||||
"expected apply_patch to emit PatchApplyBegin"
|
||||
|
||||
Reference in new issue
Block a user