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 <noreply@anthropic.com>
This commit is contained in:
2026-02-28 15:27:26 +01:00
parent fcd0f06536
commit eaad6b591c

View File

@@ -339,11 +339,12 @@ async def _derive_next_steps(session: AsyncSession) -> list[NextStep]:
if task.id in seen_task_ids: if task.id in seen_task_ids:
continue continue
domain_slug = await _get_domain_slug_for_workstream(from_ws, session) domain_slug = await _get_domain_slug_for_workstream(from_ws, session)
blocker_slugs = ", ".join( _blocker_slugs = []
(await session.get(Workstream, tid)).slug for tid in to_ws_ids:
for tid in to_ws_ids _ws = await session.get(Workstream, tid)
if await session.get(Workstream, tid) if _ws:
) _blocker_slugs.append(_ws.slug)
blocker_slugs = ", ".join(_blocker_slugs)
steps.append(NextStep( steps.append(NextStep(
type="dependency_cleared", type="dependency_cleared",
domain=domain_slug, domain=domain_slug,