feat(status): default legacy batches to normal

This commit is contained in:
chengma
2026-07-20 09:41:55 +08:00
parent 00c695d035
commit d687c833e0
17 changed files with 205 additions and 991 deletions
-8
View File
@@ -138,7 +138,6 @@ def build_apply_plan(tasks, update_mode) -> dict:
STATUS_UNLISTED: [],
STATUS_REVIEWING: [],
STATUS_UNKNOWN: [],
"unverified": [],
}
normal_candidates = []
for task in base_candidates:
@@ -146,8 +145,6 @@ def build_apply_plan(tasks, update_mode) -> dict:
status_counts[status] += 1
if status == STATUS_NORMAL:
normal_candidates.append(task)
elif status == STATUS_UNKNOWN and not _has_status_snapshot(task):
status_excluded["unverified"].append(task)
else:
status_excluded[status].append(task)
@@ -177,7 +174,6 @@ def build_apply_plan(tasks, update_mode) -> dict:
"unlisted": status_excluded[STATUS_UNLISTED],
"reviewing": status_excluded[STATUS_REVIEWING],
"unknown": status_excluded[STATUS_UNKNOWN],
"unverified": status_excluded["unverified"],
"missing_title": missing_title,
"missing_cover": missing_cover,
"status_scope_excluded": status_excluded_count,
@@ -243,10 +239,6 @@ def _task_status(task) -> str:
return normalize_status(_task_value(task, "product_status"))
def _has_status_snapshot(task) -> bool:
return bool(str(_task_value(task, "product_status") or "").strip())
def _task_value(task, name, default=None):
if isinstance(task, dict):
return task.get(name, default)