Merge remote-tracking branch 'origin/master' into fix/exact-detail-blocker-attention

This commit is contained in:
Engineer 2026-09-11 17:35:48 -05:00
commit 1a6f1dd0d6
1 changed files with 6 additions and 4 deletions

View File

@ -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,