Skip to content

Task · atlas-api

Fix flaky auth session tests

temperedBalanced mode · Approved & temperedSimulated demo task

Original prompt

The auth session tests fail intermittently in CI. Find the cause and make them deterministic.

What happened

Reproduced the flake as clock skew in token-expiry assertions. Froze time with fake timers, removed three sleep() calls, ran the suite 50× with zero failures.

Timeline highlights

  1. Reproduced flake: clock skew in token expiry
  2. vi.useFakeTimers() replaced wall-clock sleeps
  3. Suite ran 50× — 0 failures

Numbers

Started
2026-07-08
Duration
41 min
Files changed
2
Lines
+38 −62
Tests added
1
Human interventions
1
Replans
0

Project memory used

← Back to dashboard