mirror of
https://github.com/openai/codex.git
synced 2026-10-16 16:58:46 +00:00
Stabilize the realtime steering timeline test (#52923)
The initial user item seals realtime transcript segments, so starting speech before it completes can split the segment under test. Wait for its `item/completed` notification and assert that it is a `ThreadItem::UserMessage` before triggering speech, so only the steering under test can split that segment. GitOrigin-RevId: 932443f4a0d6c4284cf95f44e64912506769a180
This commit is contained in:
committed by
copyberry
parent
806d9732c9
commit
be9060ff96
@@ -1273,6 +1273,16 @@ async fn realtime_timeline_splits_accepted_steering_and_persists_promoted_artifa
|
||||
.read_notification::<TurnStartedNotification>("turn/started")
|
||||
.await?;
|
||||
|
||||
// The initial user item also seals realtime transcript segments. Wait for
|
||||
// it before speaking so only the steering under test can split this segment.
|
||||
let initial_message = harness
|
||||
.read_notification::<ItemCompletedNotification>("item/completed")
|
||||
.await?;
|
||||
assert!(matches!(
|
||||
initial_message.item,
|
||||
ThreadItem::UserMessage { .. }
|
||||
));
|
||||
|
||||
harness
|
||||
.append_text(harness.thread_id.clone(), "Trigger speech")
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user