refactor(publish): collapse pending_review/unknown task states into failed
Treat ambiguous terminal states as failures end-to-end: server normalizes unknown desktop task completions and views to failed, drops the pending_review aggregate branch, and remaps pending_review to failed in publish record conversion. admin-web removes the pending_review status option from article list filters, pushes pending_review through the failed tone, and folds lingering publishing/pending entries under the publishing bucket. desktop-client relabels unknown as 发送失败 in PublishManagement/TasksView, rewrites the scaffold adapter result to a proper failed error envelope, and sanitises legacy scaffold-only error messages to a user-friendly note. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1002,7 +1002,7 @@ function buildScaffoldResult(
|
||||
detail: string,
|
||||
): AdapterExecutionResult {
|
||||
return {
|
||||
status: "unknown",
|
||||
status: "failed",
|
||||
payload: {
|
||||
...adapterPayload,
|
||||
runtime_mode: "desktop-scaffold",
|
||||
@@ -1010,11 +1010,11 @@ function buildScaffoldResult(
|
||||
task_platform: task.platform,
|
||||
},
|
||||
error: {
|
||||
code: "desktop_task_scaffold_only",
|
||||
message: "desktop runtime adapter is scaffold-only and requires later reconcile",
|
||||
code: "desktop_task_adapter_missing",
|
||||
message: "desktop runtime adapter is not implemented for this platform",
|
||||
detail,
|
||||
},
|
||||
summary: `${task.title} 已被 desktop runtime 消费,但当前 adapter 仍是 scaffold,仅回写 unknown 供后续 reconcile。`,
|
||||
summary: `${task.title} 执行失败:当前平台的 desktop 发布适配器尚未实现。`,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1237,7 +1237,7 @@ function summaryFromTaskStatus(status: RuntimeTaskStatus): string {
|
||||
case "aborted":
|
||||
return "任务已被取消。";
|
||||
default:
|
||||
return "任务进入 unknown/reconcile 分支,等待进一步确认。";
|
||||
return "任务执行异常,已按失败处理。";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user