merge: fix/c-acquisition
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
commit
0f22902c17
5 files changed
+614
-24
No files matched your search
@@ -12,7 +12,7 @@ import { completeDownload, createE2E, type E2E, pgAvailable, seedBase, waitFor }
|
||||
// E9 连续更新剧集(W5-C,对照 MP 缺集 − note 与批量下载):全部经真实任务引擎 + outbox 中继。
|
||||
// 季共 3 集(mock TMDB),新作品策略按 once 订阅。E01 还在下载(Slot 忙)时 E02、E03 与 E02 的另一个版本先后到达:
|
||||
// · E02/E03 与在途的 E01 单元不相交 → 各自得到计划并同时下载(Slot×单元预留),不再因 slot_busy 丢集;
|
||||
// · E02 另一版本与在途 E02 单元冲突 → 延后(slot_deferral),计划结束后重评时已覆盖,不重复下载;
|
||||
// · E02 另一版本与在途 E02 单元冲突 → 延后(候选评估 deferred;订阅接收即完成后延后行清掉),不重复下载;
|
||||
// · refreshMetadata(编排循环按周期入队)把 TMDB 季集数写进季单元 → 三集全部入库后 once 订阅完成并写历史。
|
||||
|
||||
const hasPg = await pgAvailable();
|
||||
@@ -216,14 +216,24 @@ describe.skipIf(!hasPg)("E9 连续更新剧集:Slot 忙时到达的集全部入
|
||||
60_000,
|
||||
"另一版本识别",
|
||||
);
|
||||
// 三集都被下载器接收后 once 订阅即完成,完成时延后行随之清掉;以候选评估记录为准
|
||||
await waitFor(
|
||||
async () =>
|
||||
e.db
|
||||
.selectFrom("slot_deferral")
|
||||
.selectAll()
|
||||
.where("slot_id", "=", slotId)
|
||||
.where("source_release_id", "=", loserRel.id)
|
||||
.executeTakeFirst(),
|
||||
(
|
||||
await e.db
|
||||
.selectFrom("artifact")
|
||||
.select("content")
|
||||
.where("title", "=", "candidate_evaluation")
|
||||
.where("subject_id", "=", slotId)
|
||||
.execute()
|
||||
).find((r) => {
|
||||
const c = r.content as { sourceReleaseId: string; decision: string; reasons: string[] };
|
||||
return (
|
||||
c.sourceReleaseId === loserRel.id &&
|
||||
c.decision === "deferred" &&
|
||||
c.reasons.includes("deferred:units_inflight")
|
||||
);
|
||||
}),
|
||||
60_000,
|
||||
"另一版本延后",
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user