Skip to content

Commit 3adba9a

Browse files
committed
test(run-store): assert the legacy store is untouched when completing a NEW batch item
Broadens the batch-item misroute regression guard: completing a NEW-resident item must update #new and leave #legacy with zero matching rows.
1 parent 62247f4 commit 3adba9a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

internal-packages/run-store/src/runOpsStore.batchItemMisroute.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ describe("run-ops split — completing a batch item routes by the batch id, not
8888
expect(result.count).toBe(1);
8989
const onNew = await prisma17.batchTaskRunItem.findUnique({ where: { id: item.id } });
9090
expect(onNew?.status).toBe("COMPLETED");
91+
// Legacy was never touched: no phantom/double-routed item update on #legacy.
92+
expect(await prisma14.batchTaskRunItem.count({ where: { batchTaskRunId: batchId } })).toBe(0);
9193
}
9294
);
9395
});

0 commit comments

Comments
 (0)