feat(studio): recover matching Nitro sources and persist import phases
CI / check (push) Successful in 2m5s
CI / deploy (push) Successful in 1m8s
CI / publish-container (push) Successful in 1m4s

This commit is contained in:
Simo committed 2026-09-11 10:22:06 +02:00
1 parent 00e33623f7
commit 13bd3695cb
45 files changed
+903 -28

No files matched your search

+33
View File
@@ -242,3 +242,36 @@ it("attaches recovery files only to safe failed items and preserves retry histor
s.retry(original.id, 4, { chair: randomUUID() }),
).rejects.toThrow("latest retry");
});
it("clears old source provenance and phase when creating a retry", async () => {
const s = await store();
const original: ImportJob = {
...job(),
state: "completed",
items: [
{
id: 1,
classname: "chair",
name: "Chair",
description: "",
type: "flooritem",
revision: 1,
category: "other",
state: "failed",
phase: "converting",
phaseStartedAt: new Date().toISOString(),
sourceAttempt: "Old source",
recoveredSource: {
sourceId: "old",
sourceName: "Old source",
revision: 1,
},
},
],
};
await s.create(original);
const child = await s.retry(original.id, 4);
expect(child?.items[0].phase).toBeUndefined();
expect(child?.items[0].recoveredSource).toBeUndefined();
expect(child?.items[0].sourceAttempt).toBeUndefined();
});