feat: complete T-534 generated reset enhancements

This commit is contained in:
chengma
2026-07-06 20:35:47 +08:00
parent 46995b301d
commit 71f8beae57
9 changed files with 488 additions and 63 deletions
+5 -1
View File
@@ -247,7 +247,11 @@ def generation_needs(task, generate_cover=False):
return {"title": False, "cover": False}
if stage not in {"collected", "generated"}:
return {"title": False, "cover": False}
if stage == "generated" and _task_attempt_count(task, "apply_attempts") > 0:
if (
stage == "generated"
and status == "failed"
and _task_attempt_count(task, "apply_attempts") > 0
):
return {"title": False, "cover": False}
needs_title = not _has_generated_title(task)
needs_cover = bool(generate_cover) and not _has_generated_cover(task)