Uh oh!
There was an error while loading. Please reload this page.
fix(oauth): follower last-chance read after poll deadline - #4718
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Reviewed by Cursor Bugbot for commit f3120cf. Configure here. |
Greptile SummaryAdds a single last-chance
Confidence Score: 5/5Safe to merge — the change is a minimal, well-tested addition that only runs in the already-failing timeout path. The logic addition is three lines in a clearly understood function with no branching risk. The new test is correctly structured to isolate the last-chance block (third call is definitively post-deadline), and the existing 13 tests continue to cover all other paths. No data is mutated; the worst outcome on any failure is returning null — the same value as before this change. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant F as Follower
participant DB as onFollower (DB read)
F->>F: acquireLock → false
F->>F: "deadline = now + maxWaitMs"
loop "while Date.now() < deadline"
F->>F: sleep(pollIntervalMs)
F->>DB: onFollower()
DB-->>F: null (leader not done yet)
end
Note over F: Loop exits (deadline passed)
F->>DB: onFollower() [last-chance]
DB-->>F: value (leader just finished)
F-->>F: return value
Reviews (2): Last reviewed commit: "test(oauth): exercise last-chance read i..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
waleedlatif1
commented
May 22, 2026
waleedlatif1
commented
May 22, 2026
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit f3120cf. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Type of Change
Testing
follower does a final read after timeout to catch a just-finished leaderinlib/concurrency/__tests__/leader-lock.test.tsChecklist