huskies: merge 757

This commit is contained in:
dave
2026-04-27 23:31:57 +00:00
parent dffa05d703
commit 7ee542dd1e
7 changed files with 571 additions and 177 deletions
@@ -88,16 +88,23 @@ async fn mergemaster_blocks_and_sends_story_blocked_when_no_commits_ahead() {
"story should remain in content store — not removed"
);
// A StoryBlocked event must have been emitted (triggers chat failure notice,
// not the success 🎉 emoji).
// A StoryBlocked event must be emitted by the background merge task.
// The deterministic merge pipeline runs asynchronously, so poll with a
// timeout instead of a non-blocking try_recv().
let mut got_blocked = false;
while let Ok(evt) = rx.try_recv() {
if let WatcherEvent::StoryBlocked { story_id, .. } = &evt
&& story_id == "9919_story_no_commits"
{
got_blocked = true;
let deadline = tokio::time::Instant::now() + std::time::Duration::from_secs(5);
while tokio::time::Instant::now() < deadline {
while let Ok(evt) = rx.try_recv() {
if let WatcherEvent::StoryBlocked { story_id, .. } = &evt
&& story_id == "9919_story_no_commits"
{
got_blocked = true;
}
}
if got_blocked {
break;
}
tokio::time::sleep(std::time::Duration::from_millis(50)).await;
}
assert!(
got_blocked,