fix(housekeeping): restore people partial compatibility

This commit is contained in:
Simo committed 2026-08-29 21:03:43 +02:00
1 parent fcd1dfd96e
commit a6a288d9ff
6 files changed
+412 -11

No files matched your search

+43
View File
@@ -54,3 +54,46 @@ it("keeps one ACL check while delegating a positive bulk adjustment", async () =
{ userIds: [7, 8], amount: 25, type: "credits" },
);
});
it("keeps the pre-Task12 positive-adjust result when currency RCON throws after the database commit", async () => {
execute.mockResolvedValueOnce({
ok: true,
data: {
before: { completed: 0, total: 1, failedIds: [] },
after: {
completed: 1,
total: 1,
failedIds: [],
externalSyncFailures: [
{
userId: 7,
reason:
"Database applied; emulator sync failed. Do not retry automatically.",
},
],
},
completion: {
status: "partial",
external: "failed",
audit: "persisted",
},
},
correlationId: "legacy-positive-adjust",
completion: {
status: "partial",
external: "failed",
audit: "persisted",
},
});
await expect(
bulkAdjustCurrency({ userIds: [7], amount: 25, type: "credits" }),
).resolves.toEqual({
ok: true,
data: {
adjusted: 0,
total: 1,
failedIds: [{ userId: 7, reason: "Database error" }],
},
});
});