Faultline API Reference

Faultline API Reference

API reference generated by dotnet fe doc — 55 public type(s).

Faultline.Analyzers

TypeKindSummary
NonDeterminismAnalyzerclassRoslyn analyzer flagging non-deterministic escapes that cannot be safely virtualized by IL rewriting inside Faultline deterministic simulations.

Faultline.AspNetCore

TypeKindSummary
FaultlineKestrelExtensionsclassExtension methods for wiring Faultline's virtual network transport into ASP.NET Core / Kestrel.
SimConnectionContextclassKestrel ConnectionContext backed by a Faultline in-memory SimStream.
SimConnectionListenerclassKestrel IConnectionListener accepting incoming SimStream connections from a Faultline SimListener.
SimConnectionListenerFactoryclassKestrel IConnectionListenerFactory that binds endpoints onto a Faultline SimHost's virtual network instead of real OS sockets.

Faultline

TypeKindSummary
ChromeTraceArgsrecord
ChromeTraceDocumentrecord
ChromeTraceEventrecord
SimClockclassVirtual TimeProvider backed by SimEngine's discrete-event clock, with optional per-host static clock offset and linear ppm drift rate.
SimContextclassAmbient simulation context flowing automatically across async/await boundaries via AsyncLocal<T>.
SimDeadlockExceptionclassThrown when the simulation has no ready continuations and no pending timed events, yet the scenario task has not completed.
SimEngineclassSingle-threaded discrete-event simulation engine driving virtual time, deterministic task scheduling, and deadlock/timeout detection.
SimExceptionclassBase exception for simulation failures, always carrying the reproduction seed and virtual time.
SimHostclassRepresents a virtual node/host executing inside a SimWorld, with its own virtual clock, deterministic PRNG, virtual network endpoints, and crash/restart lifecycle.
SimRandomclassA deterministic, cross-platform pseudo-random number generator backed by Xoshiro256** seeded via SplitMix64. Produces identical sequences across .NET versions and operating systems.
SimSchedulingPolicyenum
SimTimeoutExceptionclassThrown when the simulation exceeds its configured maximum virtual duration or step budget.
SimTraceclassRecords a bounded deterministic timeline of simulation events for post-mortem failure diagnostics and structured JSON / Chrome Trace (Perfetto) export.
SimTraceEntryrecord struct
SimWorldclassTop-level entry point for running deterministic simulations in Faultline.
SimWorldOptionsrecord

Faultline.Interception

TypeKindSummary
FaultlineRewrittenAttributeclassApplied to assemblies that have been instrumented by the Faultline IL rewriter to ensure rewriting is idempotent across incremental builds.
SimFileHooksclassInterception targets for File and FileStream APIs. Routes file reads, writes, streams, existence checks, and deletes to SimHost.FileSystem when executing inside a Faultline simulation, or passes through to the real OS filesystem outside.
SimNetworkHooksclassInterception targets for .NET networking and HTTP clients. Routes HttpClient and SocketsHttpHandler traffic over SimNetwork when running inside a Faultline simulation.
SimRandomHooksclassInterception targets for BCL randomness and GUID generation APIs.
SimSchedulerHooksclassInterception targets for BCL task scheduling and ThreadPool queueing APIs.
SimSocketHooksclassInterception targets for raw Socket TCP client/server operations. Routes Socket bind, listen, accept, connect, send, and receive calls over SimNetwork when running inside a Faultline simulation.
SimTcpHooksclassInterception targets for TcpClient and TcpListener. Routes TCP connections and listeners over SimNetwork when executing inside a Faultline simulation without opening OS sockets.
SimTimeHooksclassInterception targets for BCL time and timer APIs. When running outside a Faultline simulation, calls transparently pass through to the real BCL.
SimTimerHooksclassInterception targets for Timer. Schedules timer callbacks deterministically on SimEngine when running inside a Faultline simulation without activating real OS timer threads.

Faultline.Network

TypeKindSummary
SimDatagramrecord struct
SimHttpMessageHandlerclassA 100% deterministic, single-threaded HTTP/1.1 HttpMessageHandler that executes requests directly over SimNetwork and SimStream without spawning background ThreadPool connection-pool threads or real wall-clock timers.
SimLinkConfigclassPer-link network simulation parameters between two virtual hosts.
SimListenerclassVirtual TCP listener bound to a (SimHost, port) endpoint on SimNetwork.
SimNetworkclassIn-memory virtual network router supporting per-link latency, packet drop rates, symmetric/asymmetric partitions, and deterministic connection delivery.
SimNetworkStreamclassVirtual NetworkStream backed by a Faultline SimStream. Enables unmodified TcpClient code to read and write over SimNetwork.
SimStreamclassFull-duplex in-memory Stream backed by SimEngine's discrete-event clock and SimNetwork's latency, partition, and crash-reset semantics.
SimUdpSocketclassVirtual UDP datagram socket bound to a (SimHost, port) endpoint on SimNetwork. Supports independent per-datagram latency (allowing out-of-order delivery), drops, duplication, and bandwidth limits.

Faultline.Rewriter

TypeKindSummary
AssemblyRewriterclassRewrites compiled .NET assemblies using AsmResolver to redirect non-deterministic BCL calls (time, randomness, task scheduling) into Faultline's deterministic simulation hooks.
DefaultRewriteRulesclass
RewriteResultrecord
RewriteRulerecord
RewriterCliclass

Faultline.Storage

TypeKindSummary
SimDiskConfigclassConfiguration for simulated disk I/O latency and crash-fault behavior on a SimFileSystem.
SimFileStreamclassVirtual FileStream backed by a host's SimFileSystem. Preserves buffered vs. fsync durability semantics without touching the real OS filesystem.
SimFileSystemclassPer-host in-memory virtual filesystem with explicit fsync durability semantics. Flushed files survive SimHost.Crash and SimHost.Restart; unflushed writes are discarded (or partially torn when SimDiskConfig.TornWriteProbability > 0).

Faultline.Testing

TypeKindSummary
SimRunFailureExceptionclassThrown when a simulation fails during SimRunner.Explore or SimRunner.Replay, including the exact reproduction seed and trailing simulation trace.
SimRunnerclassMulti-seed exploration, single-seed replay, and determinism assertion helpers for Faultline tests.
SimSeedsAttributeclassxUnit DataAttribute that supplies deterministic ulong seeds to a [Theory] simulation test—either a range of seeds for exploration or specific seeds for replay.

Faultline.Tool

TypeKindSummary
AuditCommandclass
AuditFindingrecord
AuditReportrecord
FaultlineCliclass
FuzzCommandclass
InspectCommandclass