Skip to content

OSS Determinism Sweep

github-actions[bot] edited this page Dec 2, 2026 · 6 revisions

OSS Determinism Sweep

To evaluate the speed, precision, and real-world coverage of Faultline.Analyzers (FL0001–FL0007), Faultline.Tool (dotnet fl audit), and Faultline.Rewriter, we ran an automated sweep across six .NET repositories spanning resilience, distributed consensus (Raft), messaging, embedded storage, safety primitives, and JSON parsing (2,599 C# source files, ~9.7 seconds total, 0 crashes).

Analyzer Audit Results (dotnet fl audit)

Repository Scope Files Time Warnings (FL0001–FL0004, FL0006) Info (FL0005, FL0007) Total
Polly (App-vNext/Polly) src/ 415 1.57s 0 0 0
DotNext (dotnet/dotNext) src/ 1,199 3.50s 33 63 96
NATS.Net (nats-io/nats.net) src/ 284 1.21s 0 32 32
LiteDB (mbdavid/LiteDB) LiteDB/ 500 1.50s 55 0 55
Ferrous (bradwestness/Ferrous) src/ 144 1.13s 0 1 1
Celly.Json (bradwestness/Celly.Json) src/ 57 0.81s 0 0 0
Total 2,599 9.72s 88 96 184

Key Takeaways

  • Fast, zero-config scanning: dotnet fl audit averages ~270 files/second without requiring NuGet restore or modifying target projects.
  • High signal on hard escapes (FL0001–FL0004, FL0006): Every flagged new Thread, Thread.Sleep, P/Invoke (e.g., LiteDB's OS file-locking interop), and GC.Collect/finalizer is a genuine determinism boundary.
  • Zero false build breaks on FL0005 & FL0007: Because FL0005 (unsafe) and FL0007 (ConfigureAwait(false)) default to Info, high-performance libraries like NATS.Net and Ferrous build with 0 warnings under <TreatWarningsAsErrors>true</TreatWarningsAsErrors> while still surfacing advisories (configurable via .editorconfig).
  • Polly, NATS.Net, Ferrous, and Celly.Json have zero FL* warnings across 900 production files.

BCL Interception Coverage

Scanning all 2,599 files for non-deterministic BCL API call sites shows 721 / 721 call sites covered (100.0%) by Faultline.Rewriter:

Repository Covered / Total Coverage Key Intercepted APIs
Polly 46 / 46 100.0% Task.Delay, Random/Guid, DateTime, Task.Run, CTS, HttpClient
DotNext 433 / 433 100.0% Random/Guid/RNG, Task.Run, Task.Delay, Task.Factory.StartNew, File.*, FileStream, Socket/TcpClient/TcpListener, CTS, DateTime
NATS.Net 73 / 73 100.0% Task.Run, System.Threading.Timer, Task.Delay, CTS, Stopwatch, Random/Guid, DateTime, File.*, Socket, PeriodicTimer
LiteDB 120 / 120 100.0% File.*, DateTime, FileStream, Random/Guid, Stopwatch, System.Threading.Timer, CTS, Task.Delay
Ferrous 47 / 47 100.0% File.*, Task.Run, DateTime, Random/Guid, Stopwatch, Task.Delay
Celly.Json 2 / 2 100.0% Stopwatch
Total 721 / 721 100.0% All tracked BCL non-determinism categories intercepted

Clone this wiki locally