Files
deepseek-harness/packages/util/atomic-write/tests
Yichen Jiang 26a8e6a555 feat(atomic-write): state the writer-lock wait limit per call
How long a contender waits is a property of the operation the lock holder
runs, not of the write protocol. The 2s default was sized for the
render-and-rename cycle every call site had; a credential mutation that
refreshes an expired token performs a network round trip while holding the
lock, and leaving the default in place would fail every other writer of that
file for the duration.

`withFileLock` takes an optional `waitMs`; the retry cadence stays fixed
because it governs how often a contender asks, which no caller varies. Every
existing call site keeps the default.
2026-08-20 17:58:38 +08:00
..