Table of Contents

Hosting

A thin Microsoft.Extensions.DependencyInjection integration seam: extension methods that register the engine's top-level singletons (resource registry, allocator, epoch manager, timer, watchdog, paged MMF, database engine) and bind their option types via IOptions<T>, giving an application a single canonical chain to bootstrap a working DatabaseEngine. Singleton/Scoped/Transient twins let test and tooling hosts scope an engine instance per DI scope, an injectable IWalFileIO seam swaps the WAL's disk backend for an in-memory one, and small conveniences (AddTyphonProfiler, EnsureFileDeleted) round out startup/teardown for tests and tooling.

๐Ÿ”ฌ Recommended: Hosting doesn't have its own in-depth-overview chapter โ€” read in-depth-overview/01-foundation.md ยง9 (Chapter 01: Foundation, alongside the primitives it wires up) first to understand the overall design and concepts behind this category, before diving into the specific features below.

Public Features

Feature Summary Status Level
DI Engine Bootstrap Chain Add*() extension methods on IServiceCollection that register and wire the engine's top-level singletons into a working DatabaseEngine โœ… Implemented ๐ŸŸข Start Here
ย ย โ†ณ Singleton/Scoped/Transient Lifetime Variants Every Add* with a lifetime choice ships as Add.../AddScoped.../AddTransient... twins sharing one factory delegate โœ… Implemented ๐Ÿ”ต Core
Engine Options Configuration Surface IOptions<T>-based configuration for engine services, set via configure delegates on each Add*() DI call โœ… Implemented ๐Ÿ”ต Core
ย ย โ†ณ Options Validation Hooks AddOptions<T>().Validate(...) is wired on every options type but its predicate is a no-op stub today; ResourceOptions.Validate() / PagedMMFOptions.IsValid are the real, directly-callable fail-fast checks ๐Ÿšง Partial ๐ŸŸฃ Advanced
Database Seeding TyphonOptions.Seed(revision, tx => โ€ฆ) registers revision-stepped, crash-safe seed steps applied automatically at engine open โ€” a fresh database runs them all, an existing one catches up on new ones; DatabaseEngine.IsNewlyCreated is the low-level primitive โœ… Implemented ๐ŸŸข Start Here
Clean-Slate Database File Deletion EnsureFileDeleted<TO>(IServiceProvider) resolves IOptions<TO> in a fresh scope and deletes the backing database file it points at โ€” the supported way to start test/tooling runs from a clean slate โœ… Implemented ๐Ÿ”ต Core
Profiler Launch Override Hook AddTyphonProfiler(Func<ProfilerLaunchConfig,ProfilerLaunchConfig>) lets a host adjust the profiler launch config (resolved from typhon.telemetry.json + env) in code, e.g. to layer CLI args on top; zero-code default self-wiring is unaffected if not called โœ… Implemented ๐ŸŸฃ Advanced

Internal Features

Feature Summary Status
Pluggable WAL I/O Backend (IWalFileIO seam) AddDatabaseEngine resolves an optional internal IWalFileIO from the container so tests/benchmarks can register InMemoryWalFileIO and run the full WAL + checkpoint pipeline with zero disk I/O; production falls back to the disk-backed WalFileIO โ€” the interface and both implementations are internal, not reachable from application code โœ… Implemented