Your question is Debug Combine Login Timeout. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Debug a login flow where updating a @Published property (passwordAttempts) in AuthenticationManager triggered view redraws that interfered with a Combine verification timeout publisher.
Asked in the Technical Assessment (90-min Debugging Test) stage. Task #3 of Speechify's 90-minute screen-shared GitHub repository test.
Implement a login verifier that starts a verification request and fails it if a timeout publisher fires first. Updating passwordAttempts must not cancel, restart, or duplicate the in-flight verification pipeline.
events: a list of login events in chronological order, each event is one of:
("attempt", username, password)("verify_success", username)("verify_failure", username)("timeout", username)Return the final state for each username as a dictionary with:
status: one of "idle", "verifying", "success", "failure", "timeout"passwordAttempts: integer count of failed attemptsdef process_login_events(events):