Uh oh!
There was an error while loading. Please reload this page.
fix(mothership): key resumes by orchestration id - #3771
Conversation
PR SummaryMedium Risk Overview Adds Written by Cursor Bugbot for commit bce6fde. Configure here. |
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR fixes a bug in the async tool continuation claim system where multiple concurrent requests sharing the same The fix introduces Key changes:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant R1 as Request A (runId: X)
participant R2 as Request B (runId: X)
participant DB as Async Tool DB
Note over R1,R2: Before fix — shared runId means shared workerID
R1->>DB: claimCompletedAsyncToolCall(toolCallId, "runId:X")
DB-->>R1: claimed ✓
R2->>DB: claimCompletedAsyncToolCall(toolCallId, "runId:X")
DB-->>R2: already claimed — but claimedBy === resumeWorkerId ⚠️
Note over R2: alreadyClaimedByWorker=true (wrong!)
Note over R1,R2: After fix — each invocation gets unique UUID
R1->>DB: claimCompletedAsyncToolCall(toolCallId, "sim-resume:uuid-1")
DB-->>R1: claimed ✓
R2->>DB: claimCompletedAsyncToolCall(toolCallId, "sim-resume:uuid-2")
DB-->>R2: claim contention → retry / backoff
Note over R2: missingToolCallIds path — correct behaviour
Reviews (1): Last reviewed commit: "Merge branch 'staging' into fix/mothersh..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Use orchestration associated id instead of run id to prevent duplicate resume callers.
Type of Change
Testing
Tested manually
Checklist