fix: resume transient original-job collection and guard probe input

This commit is contained in:
Wenxin Duan
2026-09-15 01:29:13 +08:00
parent cc80265bb2
commit 2ad089d68a
7 changed files with 133 additions and 16 deletions
@@ -30,4 +30,12 @@ describe("bounded pinned HTTPS media transfer", () => {
response.status = 200; response.type = "text/html"; await expect(imageVideoTransfer("https://cdn.example/video")).rejects.toThrow();
response.type = "video/mp4"; await expect(imageVideoTransfer("https://cdn.example/video", { maxBytes: 2 })).rejects.toThrow();
});
it("marks temporary HTTP download failures retryable but redirect and content failures permanent", async () => {
response.status = 503; response.type = "video/mp4";
await expect(imageVideoTransfer("https://cdn.example/video")).rejects.toMatchObject({ code: "I2V_TRANSFER_TRANSIENT" });
response.status = 302;
await expect(imageVideoTransfer("https://cdn.example/video")).rejects.toMatchObject({ code: "I2V_TRANSFER_REJECTED" });
response.status = 200; response.type = "text/html";
await expect(imageVideoTransfer("https://cdn.example/video")).rejects.toMatchObject({ code: "I2V_TRANSFER_REJECTED" });
});
});