fix(extraction): block stale multipart runs in v2.0.66
Resolve complete child multipart selections as a single extraction set and report missing or incomplete local parts precisely. Stop manual, hybrid, and normal automatic extraction before invoking a backend when persisted completion no longer matches disk state, while retaining the explicit startup recovery path for intentionally cleaned sources. Keep never-started parent package statuses empty without hiding real retry or lifecycle activity, and stabilize the visual pointer test against its existing readiness budget.
This commit is contained in:
@@ -46,6 +46,70 @@ function row(items: DownloadItem[], overrides: Partial<PackageEntry> = {}): Down
|
||||
}
|
||||
|
||||
describe("download package presentation", () => {
|
||||
it("keeps the status empty for an over-package that has never started", () => {
|
||||
const presentation = buildPackagePresentation(row([
|
||||
item("queued", "Wartet", {
|
||||
status: "queued",
|
||||
attempts: 0,
|
||||
retries: 0,
|
||||
downloadedBytes: 0,
|
||||
progressPercent: 0
|
||||
})
|
||||
], {
|
||||
status: "queued",
|
||||
downloadStartedAt: 0,
|
||||
downloadCompletedAt: 0,
|
||||
downloadEndedAt: 0,
|
||||
postProcessQueuedAt: 0,
|
||||
postProcessStartedAt: 0,
|
||||
postProcessCompletedAt: 0,
|
||||
terminalAt: 0
|
||||
}));
|
||||
|
||||
expect(presentation.status).toBe("");
|
||||
});
|
||||
|
||||
it("keeps the status empty for a disabled never-started over-package", () => {
|
||||
const presentation = buildPackagePresentation(row([
|
||||
item("queued", "Paket gestoppt", {
|
||||
status: "queued",
|
||||
attempts: 0,
|
||||
retries: 0,
|
||||
downloadedBytes: 0,
|
||||
progressPercent: 0
|
||||
})
|
||||
], { status: "paused", enabled: false }));
|
||||
|
||||
expect(presentation.status).toBe("");
|
||||
});
|
||||
|
||||
it("keeps retry activity visible when an older queued package lacks lifecycle timestamps", () => {
|
||||
const presentation = buildPackagePresentation(row([
|
||||
item("queued", "Link-Umwandlung erneut, Versuch 1/...", {
|
||||
status: "queued",
|
||||
attempts: 1,
|
||||
retries: 1,
|
||||
downloadedBytes: 0,
|
||||
progressPercent: 0
|
||||
})
|
||||
], { status: "queued", downloadStartedAt: 0 }));
|
||||
|
||||
expect(presentation.status).toBe("Link-Umwandlung erneut");
|
||||
});
|
||||
|
||||
it("keeps a queued status visible after the over-package has started once", () => {
|
||||
const presentation = buildPackagePresentation(row([
|
||||
item("queued", "Link-Umwandlung erneut, Versuch 1/...", {
|
||||
status: "queued",
|
||||
retries: 1,
|
||||
downloadedBytes: 0,
|
||||
progressPercent: 0
|
||||
})
|
||||
], { status: "queued", downloadStartedAt: 1 }));
|
||||
|
||||
expect(presentation.status).toBe("Link-Umwandlung erneut");
|
||||
});
|
||||
|
||||
it("reserves 90 percent for completed downloads and 10 percent for extraction", () => {
|
||||
expect(buildPackagePresentation(row([
|
||||
item("a", "Entpack-Fehler: Passwort"),
|
||||
|
||||
Reference in New Issue
Block a user