dosubot[bot] commented on issue #360: URL: https://github.com/apache/hugegraph-ai/issues/360#issuecomment-4633734372
<!-- Answer --> Good catch — this bug is confirmed. The `schedule_stream_flow` function is missing a `return` (or `return` after the final `yield`) at the end of the `if pipeline is None` block, so execution falls through into the second `try` block and runs the pipeline again [[1]](https://github.com/apache/hugegraph-ai/blob/4dd6a1642f203406403539ef0d96d7d378dfbaef/hugegraph-llm/src/hugegraph_llm/flows/scheduler.py#L143-L179). The synchronous counterpart `schedule_flow` correctly uses an explicit `return res` at the end of its `if pipeline is None` branch [[2]](https://github.com/apache/hugegraph-ai/blob/4dd6a1642f203406403539ef0d96d7d378dfbaef/hugegraph-llm/src/hugegraph_llm/flows/scheduler.py#L106-L141), which prevents the same issue. **Fix:** Add a `return` after the `yield` loop in the `if pipeline is None` branch (after `manager.add(pipeline)`) to stop execution from falling through into the reuse path below. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fhugegraph-ai).* --- Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fhugegraph-ai). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fhugegraph-ai&message_id=d6d0df40-f862-47e0-ad35-0ca2ad5a5b36) [](https://github.dosu.com/apache/hugegraph-ai?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fhugegraph-ai) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fhugegraph-ai) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
