rhan-oai
bb536d65bd
[codex-analytics] prevent stale guardian events from satisfying reused reviews ( #20080 )
...
## Why
Reused Guardian review trunks can still have older child-turn events
queued when a later review starts. The review waiter currently accepts
the first terminal event it sees from the shared child session, so a
stale `TurnComplete` can be attributed to the new review. That produces
impossible analytics combinations such as non-null TTFT with sub-10 ms
completion latency and zero token deltas on `trunk_reused` reviews.
## What changed
- Preserve the child turn id returned by the Guardian review
`Op::UserTurn` submission.
- Restrict Guardian review waiting to events correlated with that
submitted child turn.
- Restrict timeout/abort draining to terminal events for the same child
turn.
- Add regression coverage for stale prior-turn completions, stale
prior-turn errors, and interrupt draining in
`codex-rs/core/src/guardian/review_session.rs`.
## Verification
- `cargo test -p codex-core guardian::review_session::tests::`
- `cargo clippy -p codex-core --tests -- -D warnings`
History
..
2026-04-29 11:21:06 -07:00
2026-04-21 10:22:36 -07:00
2026-04-07 00:32:41 +00:00
2026-04-29 15:40:03 -07:00
2026-04-28 13:03:28 +02:00
2026-04-27 18:48:57 -07:00
2026-04-29 18:26:39 -07:00
2026-04-29 23:39:57 +00:00
2026-04-26 22:11:49 -07:00
2026-04-29 19:13:57 +00:00
2026-04-28 11:41:32 -07:00
2026-04-28 11:41:32 -07:00
2026-04-29 17:22:41 -07:00
2026-04-29 19:13:57 +00:00
2026-03-24 18:10:53 -07:00
2026-04-24 17:49:29 -07:00
2026-04-26 15:10:53 -07:00
2026-04-07 21:20:22 +00:00
2026-04-26 15:30:40 -07:00
2026-04-26 17:18:09 -07:00
2026-04-27 18:48:57 -07:00
2026-04-21 15:37:12 -07:00
2026-04-27 21:58:29 +00:00
2026-04-28 21:11:17 +00:00
2026-04-28 21:11:17 +00:00
2026-04-23 13:28:12 -07:00
2026-04-27 19:29:19 +00:00
2026-04-29 11:44:55 -07:00
2026-03-12 08:16:36 -07:00
2026-04-01 23:06:24 -07:00
2026-03-27 19:00:44 -07:00
2026-03-12 08:16:36 -07:00
2026-04-27 18:48:57 -07:00
2026-04-26 17:18:09 -07:00
2026-04-27 18:48:57 -07:00
2026-04-29 00:19:34 +00:00
2026-04-28 20:05:18 -07:00
2026-03-12 00:35:21 -07:00
2026-04-28 20:05:18 -07:00
2026-04-26 17:18:09 -07:00
2026-04-20 22:39:17 -07:00
2026-04-26 15:10:53 -07:00
2026-04-26 15:10:53 -07:00
2026-04-27 16:50:10 -07:00
2026-04-26 17:43:32 -07:00
2026-04-29 19:13:57 +00:00
2026-04-29 19:13:57 +00:00
2026-04-20 11:23:00 +01:00
2026-04-20 11:23:00 +01:00
2025-09-24 14:29:51 -07:00
2026-01-08 15:07:30 +00:00
2026-04-17 00:51:21 +00:00
2026-04-28 08:46:13 -07:00
2026-04-28 14:17:18 -07:00
2026-04-28 13:03:28 +02:00
2026-04-28 19:43:44 -07:00
2026-04-29 22:58:08 +00:00
2026-04-23 17:14:02 -07:00
2026-04-26 15:06:42 -07:00
2026-03-27 19:00:44 -07:00
2026-04-29 15:40:03 -07:00
2026-04-29 15:40:03 -07:00
2026-04-26 13:29:54 -07:00
2026-04-17 18:34:06 +08:00
2026-04-21 14:30:55 -07:00
2026-04-27 16:01:05 +02:00
2026-03-25 11:05:35 -07:00
2026-03-27 19:00:44 -07:00
2026-04-14 14:26:10 -07:00
2026-04-02 23:00:02 -07:00
2026-04-09 10:53:06 -07:00
2026-03-27 19:00:44 -07:00
2026-04-27 03:18:57 +00:00
2026-04-24 17:49:29 -07:00
2026-04-13 10:26:51 -07:00
2026-04-15 11:34:27 -07:00
2026-04-22 06:10:09 -04:00
2026-04-29 17:22:41 -07:00
2026-04-26 17:18:09 -07:00
2026-04-23 10:17:09 -07:00
2026-04-20 14:04:09 -07:00
2026-04-20 15:43:20 -07:00
2026-04-16 14:30:57 -07:00
2026-04-01 23:06:24 -07:00
2026-04-14 14:26:10 -07:00
2026-04-28 13:03:28 +02:00
2026-04-27 13:41:27 -07:00
2026-04-26 15:30:40 -07:00
2026-04-26 13:29:54 -07:00
2026-04-26 13:29:54 -07:00
2026-04-20 22:39:17 -07:00
2026-04-03 00:33:34 -07:00
2026-04-17 16:18:53 +00:00
2026-02-10 17:03:46 -08:00
2026-04-14 14:26:10 -07:00
2026-04-20 15:15:05 +01:00
2026-03-27 19:00:44 -07:00
2026-04-02 13:47:10 -07:00
2026-04-14 15:40:40 -07:00
2026-04-21 10:22:36 -07:00
2026-04-14 14:26:10 -07:00
2026-04-07 08:03:35 -07:00
2026-04-26 17:18:09 -07:00
2026-04-27 16:01:05 +02:00
2026-04-29 17:22:41 -07:00
2026-04-29 17:22:41 -07:00
2026-04-29 17:22:41 -07:00
2026-04-26 17:18:09 -07:00
2026-04-13 23:11:49 -07:00
2026-03-12 08:16:36 -07:00
2026-04-01 23:06:24 -07:00
2026-04-29 15:35:33 -07:00
2026-04-29 15:35:33 -07:00
2026-04-28 16:36:59 +00:00
2026-04-28 16:36:59 +00:00
2026-04-15 21:48:05 +00:00
2026-04-20 22:39:17 -07:00
2026-04-20 22:39:17 -07:00
2026-04-20 10:27:01 -07:00
2026-04-03 00:33:34 -07:00
2026-01-30 16:37:56 -08:00
2026-04-01 23:06:24 -07:00
2026-04-01 23:06:24 -07:00
2026-04-08 08:42:18 -07:00
2026-04-08 08:42:18 -07:00