Skip to content

Commit 3ccada3

Browse files
author
Test
committed
test: preserve run context for stale lock patch
1 parent 0578c52 commit 3ccada3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

server/src/__tests__/issue-stale-execution-lock-routes.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,9 +487,13 @@ describeEmbeddedPostgres("stale issue execution lock routes", () => {
487487
executionAgentNameKey: "codexcoder",
488488
executionLockedAt: new Date(Date.now() - 10 * 60 * 1000),
489489
});
490+
await db.update(heartbeatRuns)
491+
.set({ contextSnapshot: { issueId } })
492+
.where(eq(heartbeatRuns.id, currentRunId));
490493

491494
const res = await request(createApp(agentActor(companyId, agentId, currentRunId)))
492495
.patch(`/api/issues/${issueId}`)
496+
.set("X-Paperclip-Run-Id", currentRunId)
493497
.send({ title: "Recovered TTL stale checkout lock" });
494498

495499
expect(res.status, JSON.stringify(res.body)).toBe(200);

0 commit comments

Comments
 (0)