fix(orchestrator): 失败任务不再携带 result - #548
Merged
huyanxius merged 2 commits intoAug 22, 2026
Merged
Conversation
PromptRejected 路径原先先 update_result 再标 failed,导致 SSE 发出 status=failed 且 result 非空,触发前端合同校验弹窗。新增 fail_task 统一清空 result/result_type,并在措辞门禁与兜底失败路径中使用。
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
✅ 此 PR 已关联 issue,之前的提醒已自动标记为已解决。 |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Review结论
已审阅固定提交范围 86f8cd397ae074cd2cc32c6580101eeb56250ca7...7b9a6811a22848829209cd579f6681ead1a21bd4,覆盖 task_repo 的失败状态契约、动作/图片执行器失败路径及新增编排测试。当前改动将失败任务统一清空 result/result_type,避免 status=failed 携带结果;调用方的事务回滚与扣费解冻流程保持一致,未发现达到发布标准的正确性、可靠性或兼容性问题。
验证:
pytest tests/test_generation_orchestration.py::test_action_task_prompt_rejected_leaves_no_result tests/test_generation_orchestration.py::test_fail_task_clears_stale_result tests/test_generation_orchestration.py::test_action_task_marks_failed_on_error(3 passed)ruff check(3 个变更文件通过)git diff --check(通过)
经 Chat Gateway 按 lint 标准改写 custom 动作描述,失败时回退原文; 措辞门禁与拒绝逻辑保持不变。
huyanxius
self-requested a review
August 22, 2026 16:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PromptRejected分支先调用update_result()(会把任务标为completed并写入 result),再调用update_status(FAILED)且未清空 result,SSE 最终发出status=failed+result≠null,触发前端合同校验。task_repo.fail_task(),失败时统一清空result/result_type;PromptRejected与兜底失败路径改走该函数。Test plan
pytest tests/test_generation_orchestration.py::test_action_task_prompt_rejected_leaves_no_resultpytest tests/test_generation_orchestration.py::test_fail_task_clears_stale_resultpytest tests/test_generation_orchestration.py::test_action_task_marks_failed_on_errorClose bug:画布节点中,调用生成角色动作节点,出现非完成任务不应该携带result #545