test(agent): wait for steer rejection, not prompt reply, in steer_rejected_on_empty_prompt - #5292
Chessing234 wants to merge 2 commits into
Conversation
c0e5ae9 to
335c382
Compare
…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>
335c382 to
20d3bda
Compare
wesbillman
left a comment
There was a problem hiding this comment.
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.
|
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. |
2e86d40 to
c2e9ddc
Compare
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>
c2e9ddc to
7def387
Compare
|
dropped the unused p_id; the test only waits on the steer rejection now. |
|
unused p_id is gone. @block/buzz-oss-team could you take another look |
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