mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-10 20:46:28 +01:00
fix: resume saved user messages after execution recovery (#13270)
Preserve verified native process-stop evidence and retry saved user messages through normal continuation admission after recovery cleanup. Show the current wait reason and serialize delivery so a saved message starts one fresh turn. Validated with 410 focused tests, typecheck, build, token gates, all PR CI checks, and Greptile 5/5. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
250deab910
commit
51b0e01ead
17 files changed
+471
-95
No files matched your search
@@ -213,6 +213,21 @@ describeEmbeddedPostgres("issue queued-comment routes", () => {
|
||||
return queueRunId;
|
||||
}
|
||||
|
||||
it("projects the recovery wait reason only while the message is deferred", async () => {
|
||||
const seeded = await seedQueue();
|
||||
const executionWait = { reason: "remote_cleanup", message: "Waiting for the previous environment to stop." };
|
||||
await db.update(agentWakeupRequests).set({
|
||||
payload: sql`coalesce(${agentWakeupRequests.payload}, '{}'::jsonb) || ${JSON.stringify({ executionWait })}::jsonb`,
|
||||
}).where(eq(agentWakeupRequests.id, seeded.wakeId));
|
||||
const waiting = await request(app(seeded.companyId)).get(`/api/issues/${seeded.issueId}/queued-comments`);
|
||||
expect(waiting.status).toBe(200);
|
||||
expect(waiting.body.executionWait).toEqual(executionWait);
|
||||
await promoteQueue(seeded);
|
||||
const admitted = await request(app(seeded.companyId)).get(`/api/issues/${seeded.issueId}/queued-comments`);
|
||||
expect(admitted.status).toBe(200);
|
||||
expect(admitted.body.executionWait).toBeUndefined();
|
||||
});
|
||||
|
||||
it("returns the authoritative order, preserves full Markdown edits, and rejects stale revisions", async () => {
|
||||
const seeded = await seedQueue();
|
||||
const initial = await request(app(seeded.companyId))
|
||||
|
||||
Reference in new issue
Block a user