You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From PR #34's round-5 review (raised there as out-of-scope for that PR; filed here so it has its own tracked fix):
The install path returns the iOS load future without awaiting it, so the single-flight guard's finally clears _checkInFlight as soon as the load hits its first suspension — the returned future is chained after the finally runs (the standard "use return await inside a try block" case). Consequences:
A concurrent full check can run while the first load is still in flight — the exact scenario the guard's own rationale says it exists to prevent (a second load of the same payload throws on iOS, and its rollback would revert the copy the first call just loaded successfully).
Fix shape: return await at the install-path return so the guard is held across the load. This changes when the guard releases, so it deserves its own PR with tests covering: concurrent check during a slow load (guard held → loser stamps), and the rollback-during-load hazard above.
Review context: #34 (round-5 comment, "Separately, and not a request for this PR").
From PR #34's round-5 review (raised there as out-of-scope for that PR; filed here so it has its own tracked fix):
The install path returns the iOS load future without awaiting it, so the single-flight guard's
finallyclears_checkInFlightas soon as the load hits its first suspension — the returned future is chained after the finally runs (the standard "usereturn awaitinside a try block" case). Consequences:Fix shape:
return awaitat the install-path return so the guard is held across the load. This changes when the guard releases, so it deserves its own PR with tests covering: concurrent check during a slow load (guard held → loser stamps), and the rollback-during-load hazard above.Review context: #34 (round-5 comment, "Separately, and not a request for this PR").