steer_rejected_on_empty_prompt is flaky due to response-order race
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 90/100
Research direction
Start in crates/buzz-agent/tests/fake_llm.rs at steer_rejected_on_empty_prompt and compare its receive loop with the other response-specific tests. Run the exact cargo test command from the issue, repeating it as needed. Done means the test waits for the steer response and consistently verifies the -32602 error without depending on response order.
Written by the indexing model from the issue text.
Description
Describe the bug
In desktop-v0.5.5, buzz-agent tests can intermittently fail with:
empty steer prompt was not rejected
The implementation in crates/buzz-agent/src/lib.rs::steer_session correctly rejects an empty prompt with INVALID_PARAMS.
The race is in crates/buzz-agent/tests/fake_llm.rs::steer_rejected_on_empty_prompt. Its receive loop stops when the concurrent session/prompt response arrives, even if the steer rejection response has not yet been read:
} else if v["id"] == json!(p_id) {
break;
}
Suggested change: wait specifically for the steer response, as other tests do:
let v = h.recv_until(|v| v["id"] == json!(s_id)).await;
assert_eq!(v["error"]["code"], -32602);
This tests the intended behavior without depending on response ordering between the prompt and steer requests.
Expected behavior
It's a race condition, so it fails intermittently (3/10 times with --release -p fake_llm).
Expect tests to pass 100% of attempts.
Version and platform
0.5.5 on x86_64-linux
Additional info
I tried running the specific failing test
for i in {1..10}; do
cargo test --release -p buzz-agent --test fake_llm steer_rejected_on_empty_prompt -- --exact || break
done
and it passed 10/10 times. so the. race condition depends on other parallel factors.
- Dominant language
- Rust
- Stars
- 33.7k
- Forks
- 4.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 239
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from block/buzz
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
workflow_sink's mention parser never masks code regions — @name inside a code span wakes the agent Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 Half a day Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100