Skip to content

test(buzz-agent): wait for steer response in steer_rejected_on_empty_prompt - #5005

Open
santhiprakash wants to merge 1 commit into
block:mainfrom
santhiprakash:fix-steer-empty-prompt-race
Open

test(buzz-agent): wait for steer response in steer_rejected_on_empty_prompt#5005
santhiprakash wants to merge 1 commit into
block:mainfrom
santhiprakash:fix-steer-empty-prompt-race

Conversation

@santhiprakash

@santhiprakash santhiprakash commented Aug 6, 2026

Copy link
Copy Markdown

Summary

steer_rejected_on_empty_prompt was flaky because its receive loop stopped as soon as the session/prompt response arrived, even if the session/steer rejection had not yet been read. This made the test fail whenever the prompt response was delivered before the steer rejection.

Wait specifically for the steer response (matching the pattern already used by steer_rejected_when_no_active_run and steer_rejected_on_run_id_mismatch) so the assertion no longer depends on response ordering.

Related issue

Fixes #4939

Testing

  • cargo test -p buzz-agent --test fake_llm -- steer_rejected_on_empty_prompt passed 10/10 times after the change.
  • The targeted debug build also compiles with no new warnings.

…prompt

Signed-off-by: Santhi Prakash <b.santhiprakash@gmail.com>
@santhiprakash
santhiprakash requested a review from a team as a code owner August 6, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

steer_rejected_on_empty_prompt is flaky due to response-order race

1 participant