daveaitel-openai
ef36d39199
Fix agent jobs finalization race and reduce status polling churn ( #14843 )
...
## Summary
- make `report_agent_job_result` atomically transition an item from
running to completed while storing `result_json`
- remove brittle finalization grace-sleep logic and make finished-item
cleanup idempotent
- replace blind fixed-interval waiting with status-subscription-based
waiting for active worker threads
- add state runtime tests for atomic completion and late-report
rejection
## Why
This addresses the race and polling concerns in #13948 by removing
timing-based correctness assumptions and reducing unnecessary status
polling churn.
## Validation
- `cd codex-rs && just fmt`
- `cd codex-rs && cargo test -p codex-state`
- `cd codex-rs && cargo test -p codex-core --test all suite::agent_jobs`
- `cd codex-rs && cargo test`
- fails in an unrelated app-server tracing test:
`message_processor::tracing_tests::thread_start_jsonrpc_span_exports_server_span_and_parents_children`
timed out waiting for response
## Notes
- This PR supersedes #14129 with the same agent-jobs fix on a clean
branch from `main`.
- The earlier PR branch was stacked on unrelated history, which made the
review diff include unrelated commits.
Fixes #13948
2026-03-17 10:40:14 -04:00
..
2026-03-16 22:01:14 -07:00
2026-03-14 22:24:13 -07:00
2026-03-12 08:16:36 -07:00
2026-03-05 13:26:48 -08:00
2026-03-16 16:48:15 -07:00
2026-03-16 16:48:15 -07:00
2026-03-16 16:48:15 -07:00
2026-03-12 16:38:04 -07:00
2026-03-16 16:48:15 -07:00
2026-03-12 08:16:36 -07:00
2026-03-16 16:48:15 -07:00
2026-03-16 16:48:15 -07:00
2026-03-16 16:48:15 -07:00
2026-03-17 12:03:07 +00:00
2026-03-16 21:52:19 -07:00
2026-03-16 16:48:15 -07:00
2026-03-16 22:39:18 -07:00
2026-03-16 16:48:15 -07:00
2026-03-12 08:16:36 -07:00
2026-03-16 16:48:15 -07:00
2026-03-17 10:40:14 -04:00
2026-03-16 16:48:15 -07:00
2026-03-12 19:22:30 -07:00
2026-03-12 19:22:30 -07:00
2026-03-14 15:38:51 -07:00
2026-03-14 15:38:51 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-14 15:38:51 -07:00
2026-03-16 16:48:15 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-14 15:38:51 -07:00
2026-03-16 16:48:15 -07:00
2026-03-13 15:27:00 -07:00
2026-03-16 16:48:15 -07:00
2026-03-15 22:56:18 -07:00
2026-03-16 21:38:07 -07:00
2026-03-16 16:48:15 -07:00
2026-03-16 21:38:07 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-16 16:48:15 -07:00
2026-03-12 08:16:36 -07:00
2026-03-16 16:48:15 -07:00
2026-03-13 12:40:24 -07:00
2026-03-16 16:48:15 -07:00
2026-03-12 00:35:21 -07:00
2026-03-16 19:30:38 +00:00
2026-03-16 19:30:38 +00:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-16 16:48:15 -07:00
2026-03-12 08:16:36 -07:00
2026-03-16 16:48:15 -07:00
2026-03-14 15:38:51 -07:00
2026-03-14 15:38:51 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 16:38:04 -07:00
2026-03-16 16:48:15 -07:00
2026-03-13 10:13:39 -07:00
2026-03-16 16:48:15 -07:00
2026-03-12 08:16:36 -07:00
2026-03-16 16:48:15 -07:00
2026-03-15 22:56:18 -07:00
2026-03-16 16:48:15 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-16 22:39:18 -07:00
2026-03-16 22:39:18 -07:00
2026-03-17 12:03:07 +00:00
2026-03-13 14:50:16 -07:00
2026-03-16 16:48:15 -07:00
2026-03-15 23:15:52 -07:00
2026-03-15 23:15:52 -07:00
2026-03-16 16:48:15 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-08 01:36:39 +00:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-13 20:12:25 -06:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-16 16:48:15 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-11 12:33:10 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-16 16:48:15 -07:00
2026-03-13 20:51:01 -07:00
2026-03-16 16:48:15 -07:00
2026-03-17 05:11:05 +00:00
2026-03-17 05:11:05 +00:00
2026-03-16 21:38:07 -07:00
2026-03-16 21:38:07 -07:00
2026-03-14 15:38:51 -07:00
2026-03-11 12:33:09 -07:00
2026-03-16 16:48:15 -07:00
2026-03-12 16:38:04 -07:00
2026-03-12 16:38:04 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-02-12 23:30:22 +00:00
2026-02-10 07:44:21 +00:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-14 13:24:43 -07:00
2026-03-16 16:48:15 -07:00
2026-02-26 18:55:34 +00:00
2026-02-10 17:03:46 -08:00
2026-03-12 08:16:36 -07:00
2026-03-16 16:48:15 -07:00
2026-03-12 08:16:36 -07:00
2026-03-16 16:48:15 -07:00
2026-03-07 02:30:21 +00:00
2026-03-12 08:16:36 -07:00
2026-03-16 16:48:15 -07:00
2026-03-13 17:29:19 +00:00
2026-03-13 17:29:19 +00:00
2026-03-12 08:16:36 -07:00
2026-03-16 16:48:15 -07:00
2026-02-25 15:20:46 -08:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-13 20:12:25 -06:00
2026-03-16 16:48:15 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-16 16:48:15 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-14 15:38:51 -07:00
2026-03-14 15:38:51 -07:00
2026-01-30 16:37:56 -08:00
2026-03-12 08:16:36 -07:00
2026-03-12 08:16:36 -07:00
2026-03-13 10:13:39 -07:00
2026-03-16 16:48:15 -07:00