Merge remote-tracking branch 'origin/master' into fix/exact-detail-blocker-attention
This commit is contained in:
commit
1a6f1dd0d6
|
|
@ -319,8 +319,10 @@ describeEmbeddedPostgres("run-dispatch postgres adapter", () => {
|
|||
.set({ assigneeAgentId: newAssigneeAgentId })
|
||||
.where(eq(issues.id, issueId));
|
||||
});
|
||||
await locked;
|
||||
return transaction;
|
||||
// Await lock acquisition before starting the competing operation. Keep
|
||||
// completion separate so setup does not wait for that operation to finish.
|
||||
await Promise.race([locked, transaction]);
|
||||
return { done: transaction };
|
||||
}
|
||||
|
||||
describe("evaluateScheduledRetryGate", () => {
|
||||
|
|
@ -572,7 +574,7 @@ describeEmbeddedPostgres("run-dispatch postgres adapter", () => {
|
|||
contextSnapshot: { issueId, wakeReason: "issue_assigned" },
|
||||
});
|
||||
|
||||
const holderDone = reassignIssueAndLockRunOnceAConcurrentWaiterBlocks(
|
||||
const { done: holderDone } = await reassignIssueAndLockRunOnceAConcurrentWaiterBlocks(
|
||||
issueId,
|
||||
runId,
|
||||
replacementAgentId,
|
||||
|
|
@ -733,7 +735,7 @@ describeEmbeddedPostgres("run-dispatch postgres adapter", () => {
|
|||
// Acquire the issue row lock first and hold it until it observes a
|
||||
// concurrent `for update` waiter — the promote call below — proving
|
||||
// this is a real block, not a race the assertion got lucky on.
|
||||
const holderDone = reassignIssueAndLockRunOnceAConcurrentWaiterBlocks(
|
||||
const { done: holderDone } = await reassignIssueAndLockRunOnceAConcurrentWaiterBlocks(
|
||||
issueId,
|
||||
runId,
|
||||
newAgentId,
|
||||
|
|
|
|||
Loading…
Reference in New Issue