Guard resumed session reconciliation

This commit is contained in:
Eric Bailey
2026-08-31 17:24:07 -05:00
parent d16352df9f
commit c951542dec
3 changed files with 116 additions and 3 deletions
+3 -1
View File
@@ -17,7 +17,9 @@ What changed relative to `main`:
**Severity: Medium**
`resumeSession` (`index.tsx:509-591`) checks `signal.aborted` and the account entry before dispatching `switched-to-account`. After `await store.dispatch(...)` at line 542, however, it performs follow-up dispatches without rechecking either:
**Status: Resolved.** `resumeSession` now rechecks both its abort signal and bundle identity after the awaited persistence commit. Focused tests cover logout and same-account cross-tab bundle replacement while that write is pending.
`resumeSession` (`index.tsx:509-591`) originally checked `signal.aborted` and the account entry before dispatching `switched-to-account`. After `await store.dispatch(...)` at line 542, however, it performed follow-up dispatches without rechecking either:
- `index.tsx:560-566`: `synced-accounts` with the potentially stale `committedSession`.
- `index.tsx:568-579`: `replaced-current-bundle` with a newly built, armed bundle.