Skip to content

test(agent): wait for steer rejection, not prompt reply, in steer_rejected_on_empty_prompt - #5292

Open
Chessing234 wants to merge 2 commits into
block:mainfrom
Chessing234:fix/steer-empty-prompt-flaky-4939
Open

Chessing234 wants to merge 2 commits into
block:mainfrom
Chessing234:fix/steer-empty-prompt-flaky-4939

Conversation

@Chessing234

@Chessing234 Chessing234 commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

steer_rejected_on_empty_prompt was flaky (3/10 with --release) because its
receive loop broke as soon as the session/prompt response arrived, even if the
steer rejection had not yet been read. When the prompt reply won the race the
loop exited before the steer response surfaced, failing the assertion.

Drop the prompt-response break and only stop when the steer rejection is read,
so the test asserts the intended behavior independent of response ordering.

Closes #4939

@Chessing234
Chessing234 requested a review from a team as a code owner August 8, 2026 06:07
@Chessing234
Chessing234 force-pushed the fix/steer-empty-prompt-flaky-4939 branch from c0e5ae9 to 335c382 Compare August 8, 2026 13:56
ravarora2
ravarora2 previously approved these changes Aug 11, 2026

@ravarora2 ravarora2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

…ected_on_empty_prompt

steer_rejected_on_empty_prompt was flaky (3/10 with --release) because its
receive loop broke as soon as the session/prompt response arrived, even if the
steer rejection had not yet been read. When the prompt reply won the race the
loop exited before the steer response surfaced, failing the assertion.

Drop the prompt-response break and only stop when the steer rejection is read,
so the test asserts the intended behavior independent of response ordering.

Closes block#4939

Signed-off-by: Taksh <takshkothari09@gmail.com>
@ravarora2
ravarora2 force-pushed the fix/steer-empty-prompt-flaky-4939 branch from 335c382 to 20d3bda Compare August 11, 2026 16:59

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewing on Wes B\u2019s behalf.

The race fix leaves p_id unused after removing the prompt-response branch. This is a merge blocker because the repository treats warnings as errors: the PR\u2019s Rust Lint and Windows Rust jobs both fail at crates/buzz-agent/tests/fake_llm.rs:1431 with unused variable: p_id (-D warnings). Please remove the binding (while still awaiting h.send(...)) or otherwise consume it, then rerun CI.

@Chessing234

Copy link
Copy Markdown
Contributor Author

good catch, that binding was left over from the removed branch. dropped it, the prompt is still sent and awaited so the run the steer targets still starts. ci running.

@Chessing234
Chessing234 force-pushed the fix/steer-empty-prompt-flaky-4939 branch 2 times, most recently from 2e86d40 to c2e9ddc Compare August 11, 2026 23:44
The steer-rejection rework stopped reading the session/prompt response, so
the p_id binding it produced was unused. The crate builds with -D warnings,
so that failed Rust Lint and Windows Rust. Send the prompt without binding
its id; the request is still awaited because it starts the run the steer
targets.

Signed-off-by: Taksh <takshkothari09@gmail.com>
@Chessing234
Chessing234 force-pushed the fix/steer-empty-prompt-flaky-4939 branch from c2e9ddc to 7def387 Compare August 11, 2026 23:45
@Chessing234

Copy link
Copy Markdown
Contributor Author

dropped the unused p_id; the test only waits on the steer rejection now.

@Chessing234

Copy link
Copy Markdown
Contributor Author

unused p_id is gone. @block/buzz-oss-team could you take another look

This branch has not been deployed

No deployments
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

3 participants