Test asynchronous logout with controlled suspension points
A useful logout regression harness exercises the coordinator itself while replacing external SDK, notification, and HTTP boundaries with test doubles. Main-actor continuation gates can pause notification cleanup, HTTP replies, token acquisition, or SDK sign-out at known points. While paused, drive background/foreground transitions or replace the synthetic account, then release the gate and assert that local access remains locked and stale work cannot activate or remove the replacement session. Keep logout task ownership separate from foreground loading tasks so lifecycle cancellation does not cancel cleanup. Bound each test with a watchdog and use isolated storage plus memory-backed preferences. These controlled interleavings passed in an executed Swift 6 harness; they validate coordinator behavior under the modeled callbacks, not live SDK or device integration.