-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Bug: Step2 environment setup can hang indefinitely when prepare fails or graph nodes have no labels #335
Copy link
Copy link
Open
Description
Summary
On March 25, 2026, Step2 environment setup can get stuck at 配置生成中,开始轮询等待... instead of surfacing a failure state.
In my reproduction, the backend had already failed, but the frontend kept polling and never showed a clear error.
Reproduction
- Start the project normally.
- Create a project and upload source material.
- Finish ontology / graph generation.
- Enter Step2 environment setup.
- Observe the log sequence stops around:
✓ 准备工作已完成正在加载已有配置数据...已加载 0 个Agent人设配置生成中,开始轮询等待...
Actual Behavior
- The UI keeps waiting in Step2.
- No actionable failure message is shown.
- The flow looks like an infinite loading state from the user perspective.
Expected Behavior
- If simulation prepare has failed, Step2 should stop polling and display the real failure reason.
- The task status, simulation state, and realtime polling APIs should stay consistent.
Additional Findings
In the reproduced case:
state.jsonhad already becomestatus=failed- the error was:
没有找到符合条件的实体,请检查图谱是否正确构建 - the frontend still entered config polling instead of exiting with an error
There also seems to be a second trigger condition:
- some generated graph nodes had
labels: [] - entity filtering then returned 0 usable entities
- this caused prepare to fail downstream
Why this matters
This is difficult for end users to diagnose because the visible symptom is just "stuck loading", while the backend has already failed.
Suggested direction
- Treat failed prepare state as terminal in the frontend polling flow
- Ensure prepare task status and simulation state cannot diverge
- Consider a fallback or clearer validation when graph nodes have empty labels and entity filtering would produce 0 results
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels