fix(organize): stop pending sidecars when replaying failed main files

This commit is contained in:
root committed 2026-10-13 15:38:51 +08:00
1 parent b306d27d08
commit 09a4c9fc1e
2 files changed
+48 -1

No files matched your search

@@ -166,7 +166,10 @@ export async function executeRecord(
.orderBy("ordinal")
.execute();
const planned = new Map(frozen.organize.files.map((f) => [f.src, f]));
const failedMains = new Set<string>();
// 主文件的失败可能已在上次执行提交;重放也要阻止随行文件脱离主文件继续搬运。
const failedMains = new Set(
files.filter((f) => f.role === "main" && f.status === "failed").map((f) => f.source_path),
);
/** 本轮 TIMEOUT/IO 类失败、留待任务重试的文件(结果不入账本,文件结果保持 running) */
const deferred: {
src: string;