fix(extraction): make manual archive workflows deterministic

Scope selected item runs and stop mutations precisely, attach hybrid work to the active run, retain password progress, and report finalization with real percentages.

Drain stale post-processing before manual extraction, allow package and child extraction with open siblings, retry nonterminal hybrid archive attempts, and replace misleading aggregate retry counts with actionable conversion status.
This commit is contained in:
Sucukdeluxe
2026-08-23 01:21:45 +02:00
parent bffefe0130
commit b8a7c24954
12 changed files with 682 additions and 225 deletions
+21
View File
@@ -0,0 +1,21 @@
import { describe, expect, it } from "vitest";
import * as extractorModule from "../src/main/extractor";
describe("extractor password progress", () => {
it("retains the active password attempt across pulse and percentage updates", () => {
const merge = (extractorModule as Record<string, unknown>).mergeExtractPasswordProgress as ((
current: Record<string, unknown> | undefined,
update: Record<string, unknown> | undefined
) => Record<string, unknown> | undefined) | undefined;
expect(merge).toBeTypeOf("function");
if (!merge) return;
const secondAttempt = { passwordAttempt: 2, passwordTotal: 7 };
expect(merge(undefined, secondAttempt)).toEqual(secondAttempt);
expect(merge(secondAttempt, undefined)).toEqual(secondAttempt);
expect(merge(secondAttempt, { passwordAttempt: 3, passwordTotal: 7 })).toEqual({
passwordAttempt: 3,
passwordTotal: 7
});
});
});