mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-27 11:20:42 +01:00
Merge commit '1c4bcff2b182c6a38d0128a25c6be217dd33f843' into codex/work-folders-base-refresh
* commit '1c4bcff2b182c6a38d0128a25c6be217dd33f843': fix(test): await issue lock before retry race assertions (#13273) fix: resume saved user messages after execution recovery (#13270)
This commit is contained in:
commit
bfa8d00c31
18 files changed
+477
-99
No files matched your search
@@ -4120,7 +4120,7 @@ function leaseDb(
|
||||
returning: () => Promise<Array<{ runId: string }>>;
|
||||
};
|
||||
result.returning = () =>
|
||||
Promise.resolve([{ runId: coordinator.runId }]);
|
||||
Promise.resolve([{ runId: coordinator.runId, nextEventSeq: 2 }]);
|
||||
return result;
|
||||
},
|
||||
};
|
||||
@@ -4163,12 +4163,20 @@ function leaseDb(
|
||||
return query;
|
||||
},
|
||||
});
|
||||
const insert = (table: unknown) => ({
|
||||
values: (values: Record<string, unknown>) => {
|
||||
updates.push({ table, values });
|
||||
return { returning: async () => [values] };
|
||||
},
|
||||
});
|
||||
const tx = {
|
||||
insert,
|
||||
execute: async () => [],
|
||||
select,
|
||||
update,
|
||||
};
|
||||
return {
|
||||
insert,
|
||||
select,
|
||||
transaction: async (operation: (transaction: Db) => Promise<unknown>) =>
|
||||
operation(tx as unknown as Db),
|
||||
@@ -6464,13 +6472,16 @@ describe("native process ownership", () => {
|
||||
highestContiguousSourceSeq: 1,
|
||||
};
|
||||
});
|
||||
state.createBackend.mockImplementationOnce((_input, options) => ({
|
||||
kind: "test",
|
||||
onSpawn: options.onSpawn,
|
||||
}));
|
||||
const updates: Array<{ table: unknown; values: Record<string, unknown> }> = [];
|
||||
state.createBackend.mockImplementationOnce((_input, options) => {
|
||||
expect(updates).toContainEqual({ table: heartbeatRunEvents, values: expect.objectContaining({
|
||||
eventType: "native.process_start_requested", runId: execution.binding.runId,
|
||||
}) });
|
||||
return { kind: "test", onSpawn: options.onSpawn };
|
||||
});
|
||||
|
||||
await executePaperclipNativeSession({
|
||||
db: leaseDb(),
|
||||
db: leaseDb(execution, {}, {}, updates),
|
||||
execution,
|
||||
runnerInstanceId: "runner",
|
||||
onSpawn,
|
||||
|
||||
Reference in new issue
Block a user