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
{{ message }}
Repository navigation
memory: file-lock test "keeps a lock held longer than staleMs fresh" is flaky on a slow runner #5680
src/memory/__tests__/file-lock.test.ts › withFileLock › "keeps a lock held longer than staleMs fresh, so it is not broken" fails intermittently. It expects the event order [long start, long end, waiter] and sometimes gets [long start, waiter, long end], i.e. the waiter acquired the lock while the long holder still held it.
Once locally during a memory coverage run (did not recur in 12 further runs).
Expected
Either the lock's heartbeat keeps a long-held lock fresh on a slow runner, or the test's timing does not depend on scheduler luck. AGENTS.md forbids test retries, so the fix is to make the test (or the heartbeat) deterministic, not to retry it. Related earlier fix of a sibling race in the same file: #5634.
Acceptance
The test passes deterministically under load (e.g. a loop of the file under --sequence.concurrent / CPU contention) and in CI.
Activity