From eaad6b591c2bce18415a51525f0a753b7b924cd5 Mon Sep 17 00:00:00 2001 From: tegwick Date: Sat, 28 Feb 2026 15:27:26 +0100 Subject: [PATCH] fix(state-hub): repair await-in-generator in _derive_next_steps str.join() is synchronous and cannot consume a generator that uses await. Build the blocker slugs list with an explicit async for loop instead. Co-Authored-By: Claude Sonnet 4.6 --- api/routers/state.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/api/routers/state.py b/api/routers/state.py index 28ab4c2..215305b 100644 --- a/api/routers/state.py +++ b/api/routers/state.py @@ -339,11 +339,12 @@ async def _derive_next_steps(session: AsyncSession) -> list[NextStep]: if task.id in seen_task_ids: continue domain_slug = await _get_domain_slug_for_workstream(from_ws, session) - blocker_slugs = ", ".join( - (await session.get(Workstream, tid)).slug - for tid in to_ws_ids - if await session.get(Workstream, tid) - ) + _blocker_slugs = [] + for tid in to_ws_ids: + _ws = await session.get(Workstream, tid) + if _ws: + _blocker_slugs.append(_ws.slug) + blocker_slugs = ", ".join(_blocker_slugs) steps.append(NextStep( type="dependency_cleared", domain=domain_slug,