dbb126a5d2
LeanOptimizerTests runs Parallelizable(ParallelScope.Children). The LeanOptimizer constructor reads 'optimization-update-interval' from the shared global Config, while TrackEstimation writes it via Config.Set. The underlying config store is not thread-safe, so a write racing a concurrent read could corrupt its internal state and throw (e.g. ArgumentOutOfRangeException), failing random tests in the fixture. Serialize the construction-time config reads against that write with a fixture lock: construct the optimizer through a CreateOptimizer helper that takes the lock, and take the same lock around the Config.Set call. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>