Commit c9f7c88
authored
fix: restore live event submit path for apply patch tests (#20108)
## Summary
This fixes the CI regression introduced by
[#20040](openai/codex#20040).
That PR migrated several `apply_patch_cli` tests from direct
`codex.submit(Op::UserTurn { ... })` calls to `harness.submit(...)`.
`harness.submit()` waits for `TurnComplete` before returning, which
drains the same event stream that these tests use to assert `TurnDiff`,
`PatchApplyUpdated`, and related live events. The regressed tests then
timed out waiting for events that had already been consumed.
This change restores a no-wait submit path for the event-observing
`apply_patch_cli` tests so they can watch the turn stream directly
again.
## What Changed
- added a local `submit_without_wait(...)` helper in
`codex-rs/core/tests/suite/apply_patch_cli.rs`
- switched the `apply_patch_cli` tests that assert live turn events back
to that helper
- left the profile-backed `harness.submit(...)` migration in place for
tests that only care about final filesystem or tool output state
## Why macOS Looked Green
In the failing run
[25084487331](https://github.com/openai/codex/actions/runs/25084487331),
`//codex-rs/core:core-all-test` was cached on macOS, so the regressed
tests were not rerun there. The Linux GNU, Linux MUSL, and Windows Bazel
jobs reran the target and exposed the failure.
## Verification
- `cargo test -p codex-core apply_patch_ -- --nocapture`
- previously failing local cases now pass again:
- `apply_patch_cli_move_without_content_change_has_no_turn_diff`
- `apply_patch_turn_diff_for_rename_with_content_change`
- `apply_patch_aggregates_diff_across_multiple_tool_calls`1 parent f8fe96d commit c9f7c88
1 file changed
Lines changed: 39 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
60 | 91 | | |
61 | 92 | | |
62 | 93 | | |
| |||
361 | 392 | | |
362 | 393 | | |
363 | 394 | | |
364 | | - | |
| 395 | + | |
365 | 396 | | |
366 | 397 | | |
367 | 398 | | |
| |||
969 | 1000 | | |
970 | 1001 | | |
971 | 1002 | | |
972 | | - | |
| 1003 | + | |
973 | 1004 | | |
974 | 1005 | | |
975 | 1006 | | |
| |||
1047 | 1078 | | |
1048 | 1079 | | |
1049 | 1080 | | |
1050 | | - | |
| 1081 | + | |
1051 | 1082 | | |
1052 | 1083 | | |
1053 | 1084 | | |
| |||
1112 | 1143 | | |
1113 | 1144 | | |
1114 | 1145 | | |
1115 | | - | |
| 1146 | + | |
1116 | 1147 | | |
1117 | 1148 | | |
1118 | 1149 | | |
| |||
1248 | 1279 | | |
1249 | 1280 | | |
1250 | 1281 | | |
1251 | | - | |
| 1282 | + | |
1252 | 1283 | | |
1253 | 1284 | | |
1254 | 1285 | | |
| |||
1296 | 1327 | | |
1297 | 1328 | | |
1298 | 1329 | | |
1299 | | - | |
| 1330 | + | |
1300 | 1331 | | |
1301 | 1332 | | |
1302 | 1333 | | |
| |||
1353 | 1384 | | |
1354 | 1385 | | |
1355 | 1386 | | |
1356 | | - | |
| 1387 | + | |
1357 | 1388 | | |
1358 | 1389 | | |
1359 | 1390 | | |
| |||
1410 | 1441 | | |
1411 | 1442 | | |
1412 | 1443 | | |
1413 | | - | |
| 1444 | + | |
1414 | 1445 | | |
1415 | 1446 | | |
1416 | 1447 | | |
| |||
0 commit comments