Skip to content
CAI
Software that uses CAICheck a score

mizrael/OpenSleigh

56.4

Adequate · 21 September 2026

5.4k

lines of production code

C#

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

OpenSleigh is a .NET framework for building distributed saga-based workflows, providing a message bus for orchestrating long-running processes across microservices. It supports multiple transport backends, including RabbitMQ, Kafka, and in-memory providers, alongside persistence layers for SQL Server, PostgreSQL, and MongoDB. The system includes built-in outbox patterns for reliable message delivery, state querying capabilities, and comprehensive tooling for testing and monitoring saga lifecycles.

How it got here

2020–2021 — Persistence and transport expansion

30 changes.

This period focused on expanding the framework's capabilities by adding new persistence providers (MongoDB, SQL, PostgreSQL, SQL Server) and transport layers (Kafka, RabbitMQ refactoring). The team also modernized the codebase by removing legacy abstractions, cleaning up samples, and upgrading to .NET 10.

2022–2023 — core infrastructure and in-memory implementation

14 changes.

This period focused on establishing the foundational architecture for the OpenSleigh framework, introducing core saga management, dependency injection, and the outbox pattern for reliable messaging. Significant effort was directed toward implementing in-memory persistence and transport layers to support lightweight testing and development scenarios. The work was complemented by comprehensive end-to-end and integration tests covering various saga patterns and database providers.

2025–2026 — saga state reporting and query API

12 changes.

This period focused on implementing a comprehensive saga state reporting system, introducing a new RESTful API for querying and filtering saga instances. The work included adding the core query interfaces, in-memory and SQL-based implementations, and extensive unit tests to validate the functionality. Additionally, sample applications were created to demonstrate the new reporting capabilities alongside existing microservices and Blazor integration features.

Features

Add E-Commerce sample application

Added a new e-commerce sample application that demonstrates coordinating multiple microservices. The sample includes an API for placing orders, an orchestrator to manage the order saga, and separate services for inventory, payment, shipping, and notifications. It also provides configuration files, Docker Compose setup for PostgreSQL and RabbitMQ, and a solution file to run all services together.

samples/OpenSleigh.Samples.ECommerce · high confidence

Add PizzaTracker sample demonstrating saga state query API

A new PizzaTracker sample application has been added to showcase the saga state query API and reporting endpoints. The sample implements a multi-step pizza order saga (PlaceOrder → PreparePizza → BakePizza → QualityCheck → SendOutForDelivery → ConfirmDelivery) and exposes REST endpoints to place orders and query saga states. Users can retrieve all saga instances, filter by completion status, paginate results, query by instance ID or correlation ID, and list registered saga types via the /opensleigh/sagas endpoints.

samples/OpenSleigh.Samples.PizzaTracker · high confidence

Add PostgreSQL persistence support for the outbox pattern

Users can now configure the application to use PostgreSQL as the persistence provider for the outbox mechanism. This change introduces a new \PostgreSQLOutboxRepository\ implementation and the corresponding \UsePostgreSqlPersistence\ extension method, allowing the system to store and process outbox messages using PostgreSQL's \SKIP LOCKED\ for concurrency control.

src/OpenSleigh.Persistence.PostgreSQL · high confidence

Add Sample1 sample application demonstrating saga patterns

The Sample1 sample application is introduced, providing a complete, runnable example of the OpenSleigh framework. It includes message definitions, a stateless saga, and a saga with stateful persistence, all configured via dependency injection and in-memory transport/persistence. The sample demonstrates how to host the message bus, publish messages, and handle saga lifecycles, serving as a reference implementation for users.

samples/OpenSleigh.Samples.Sample1 · high confidence

Add saga state query API and reporting module

A new query API for saga state reporting has been introduced, allowing users to retrieve saga instance information by instance ID, correlation ID, or via a paginated list with optional filtering. The update includes the ISagaStateQuery interface with methods GetByInstanceIdAsync, GetByCorrelationIdAsync, and GetAllAsync, alongside supporting types: SagaInstanceInfo (containing instance details, state data, and processed messages), SagaQueryFilter (for filtering by saga type and completion status), PagedResult (for pagination), and ProcessedMessageInfo. This enables programmatic inspection of saga lifecycles and state.

src/OpenSleigh/Queries · high confidence

Added Bootstrap 5.3.3 grid and utility CSS to the sample application

The sample application now includes the full Bootstrap 5.3.3 grid system and utility classes, enabling responsive layout and flexbox-based styling for the Blazor sample. This adds the CSS files \bootstrap-grid.css\ and its source map, providing container, row, column, and spacing utilities to the wwwroot/lib/bootstrap directory.

samples/OpenSleigh.Samples.Blazor/OpenSleigh.Samples.Blazor/wwwroot · high confidence

Added MongoDB persistence support for outbox and saga state

Introduced a new MongoDB persistence provider for OpenSleigh, enabling message outbox and saga state management via MongoDB. This includes the \MongoOutboxRepository\ for reliable message delivery, \MongoSagaStateRepository\ for saga state management, and \MongoSagaStateQuery\ for querying saga instances. The implementation registers these services via \UseMongoPersistence\ and utilizes the \DbContext\ to manage collections and indexes for \OutboxMessage\ and \SagaState\ entities.

src/OpenSleigh.Persistence.Mongo · high confidence

Added in-memory messaging implementation

Introduced new classes for in-memory message handling: InMemoryPublisher, InMemorySubscriber, and InMemorySubscriberOptions, along with a ChannelReader extension for batched reads. This provides a lightweight, in-memory transport for testing and development scenarios.

src/OpenSleigh.InMemory/Messaging · high confidence

Added in-memory outbox repository for message persistence

Introduced an in-memory implementation of the outbox pattern via the new InMemoryOutboxRepository class. This component stores message envelopes in a concurrent dictionary, ensuring duplicate messages are detected and rejected during the append operation, while also providing methods to read pending messages and delete them after processing.

src/OpenSleigh.InMemory/Outbox · high confidence

Added in-memory persistence and transport for OpenSleigh

Introduced an in-memory implementation for saga state persistence and message transport, enabling lightweight testing and development scenarios without external dependencies. The new \OpenSleigh.InMemory\ package provides \UseInMemoryPersistence\ and \UseInMemoryTransport\ extension methods to configure the bus, along with supporting classes like \InMemorySagaStateRepository\ and \InMemoryTransactionManager\.

src/OpenSleigh.InMemory · high confidence

Added serialization and type resolution utilities

The OpenSleigh library now includes new utility components for data handling and type management. A new ISerializer interface and a corresponding JsonSerializer implementation are provided to handle object serialization and deserialization using System.Text.Json. Additionally, a TypeResolver class and its interface have been moved from the core project to the Utils namespace, with an updated Resolve method signature that accepts a throwOnError flag. These utilities support the broader saga and transport mechanisms by providing standardized serialization and type resolution capabilities.

src/OpenSleigh/Utils · high confidence

Introduce Kafka transport implementation for OpenSleigh

Added a new Kafka transport layer to OpenSleigh, including the \KafkaPublisher\ for sending messages, \KafkaMessageSubscriber\ for consuming them, and supporting infrastructure such as \ConsumerBuilderFactory\, \GuidDeserializer\, and \QueueReferenceFactory\. This enables the application to publish and subscribe to Kafka topics using the Confluent.Kafka client, with automatic topic creation and dead-letter queue support.

src/OpenSleigh.Transport.Kafka · high confidence

Introduce default transport layer for message handling

Added a new default transport implementation in the OpenSleigh.Transport namespace, providing the core infrastructure for message processing. This includes the DefaultMessageBus for publishing messages to the outbox, a MessageProcessor to route and dispatch messages to saga handlers, and supporting interfaces and classes such as IMessageContext, IHandleMessage, and IdempotentMessageExtensions. This change establishes the default behavior for how messages are processed and dispatched within the application.

src/OpenSleigh/Transport · high confidence

Introduced outbox pattern for reliable message publishing

Added the core outbox implementation including the OutboxBackgroundService, OutboxProcessor, and MessageEnvelope classes. This introduces a background service that periodically processes pending messages from the outbox, ensuring reliable delivery by publishing messages and then deleting them from the outbox store. The implementation includes transaction management for safe message processing and supports idempotency keys for message deduplication.

src/OpenSleigh/Outbox · high confidence

Introduces core saga management and dependency injection infrastructure

Adds the foundational components for managing distributed sagas, including the \IBusConfigurator\ and \ServiceCollectionExtensions\ for registering saga types and outbox processors via dependency injection. The update introduces key interfaces and implementations such as \ISagaExecutionService\ for orchestrating saga state and message processing, \SagaInstance\ and \NoOpSagaInstance\ for tracking execution context, and \SagaDescriptor\ for mapping message types to sagas. Additionally, it provides the \IHostExtensions\ to trigger infrastructure setup and moves the \LockException\ to the main namespace.

src/OpenSleigh · high confidence

New Blazor sample for triggering and monitoring Sagas via SignalR

A new Blazor sample application has been added to demonstrate triggering a Saga from a Blazor frontend using SignalR. The sample includes a main page where users can start a saga and receive real-time progress notifications, a SignalR hub to handle saga initiation, and a saga that processes steps and sends updates back to the client. The project is configured with Razor components, SignalR, and in-memory transport/persistence for demonstration purposes.

samples/OpenSleigh.Samples.Blazor · high confidence

New OpenSleigh Reporting API for querying saga state

A new reporting module has been added to expose saga state data via a set of RESTful endpoints. Users can now list, search, and retrieve saga instances by instance ID or correlation ID, as well as list registered message types. The module registers an \ISagaStateQuery\ service and maps routes under the default prefix \/opensleigh\. On .NET 9+, OpenAPI metadata is automatically included. The endpoints are designed to be secured with authentication and authorization middleware.

src/OpenSleigh.Reporting · high confidence

New SQL persistence layer for saga state and outbox

A new SQL persistence implementation is introduced, providing storage for saga state, outbox messages, and processed message tracking. This includes the \SqlSagaStateRepository\ for managing saga lifecycles and locking, \SqlOutboxRepository\ for reliable message delivery, and \SqlSagaStateQuery\ for reporting and querying saga instances. The implementation uses Entity Framework Core to map entities like \SagaState\ and \OutboxMessage\ to database tables, supporting features such as optimistic concurrency control and idempotent message processing.

src/OpenSleigh.Persistence.SQL · high confidence

SQL Server persistence with outbox query hints

Added SQL Server persistence support for the OpenSleigh framework, including the MSSqlOutboxRepository and SqlBusConfiguratorExtensions for DI registration. The implementation introduces a QueryHintInterceptor that automatically appends SQL Server table hints (UpdLock, ReadPast) to outbox queries to improve concurrency and reduce locking, while also registering duplicate key detection for handling message idempotency.

src/OpenSleigh.Persistence.SQLServer · high confidence

Sample2 introduces a new API and refactored worker for saga orchestration

The Sample2 area now includes a new ASP.NET Core API project (OpenSleigh.Samples.Sample2.API) that exposes a REST endpoint to trigger saga workflows, alongside a refactored worker project (OpenSleigh.Samples.Sample2.Worker) that implements the underlying saga logic. The worker has been restructured to use the new message-based saga model (IStartedBy/IHandleMessage) instead of the previous console-based setup, and configuration has been updated to connect to MongoDB and RabbitMQ with specific virtual hosts and connection strings.

samples/OpenSleigh.Samples.Sample2 · high confidence

Removals

Removed ParentSaga sample implementation

The ParentSaga class and its associated state and message types have been removed from the console sample project. This eliminates the example demonstrating a parent-child saga orchestration pattern.

samples/OpenSleigh.Samples.Console · high confidence

Removed in-memory persistence implementations

The in-memory persistence components for the OpenSleigh framework have been removed. This includes the InMemoryPublisher, InMemorySubscriber, InMemorySagaStateRepository, InMemoryUnitOfWork, and InMemoryTransaction classes, along with their associated configuration extensions. Users relying on the in-memory implementations for testing or development will need to switch to a different persistence strategy.

src/OpenSleigh.Persistence.InMemory · high confidence

Removed legacy core abstractions and implementations

The \OpenSleigh.Core\ project has removed a large set of legacy interfaces and classes, including \IMessage\, \IMessageBus\, \ISaga\, \SagaRunner\, and related persistence abstractions. This cleanup eliminates unused or obsolete components from the core library, simplifying the API surface and reducing maintenance overhead for users relying on this package.

src/OpenSleigh.Core · high confidence

Behavioural changes

Add benchmarks for dispatch overhead and saga instance creation

Added new benchmark suites measuring the performance of dynamic dispatch versus cached wrapper dispatch, as well as the overhead of creating saga instances. The \DynamicDispatchBenchmarks\ file was removed and replaced with \DynamicDispatchBenchmarks.cs\ (which actually contains \DispatchOverheadBenchmarks\ and \SagaInstanceCreationBenchmarks\), providing detailed metrics on method execution times and memory allocation for direct, dynamic, and wrapper-based approaches.

benchmarks · high confidence

OpenSleigh v3.1.0 release: multiple saga starters, critical bug fixes, and .NET 10 support

This release introduces the ability for sagas to be initiated by multiple message types, enabling more flexible workflow orchestration. Five critical bugs were fixed: lock query filtering in SQL repositories to prevent data corruption, exception masking in retry logic to improve debugging, removal of a duplicate RabbitMQ event handler, a static semaphore bottleneck in the SQL outbox, and missing cancellation token propagation for graceful shutdowns. The project now targets .NET 8, 9, and 10, and all OpenSleigh NuGet packages have been updated to version 3.1.0.

(repo-wide) · high confidence

Refactored RabbitMQ transport architecture with channel pooling and simplified message parsing

The RabbitMQ transport implementation has been refactored to use a dedicated \ChannelFactory\ for managing publish and consume channels with thread-safe pooling, replacing the previous per-message or per-saga channel creation. The generic \RabbitPublisher\<TM\>\ and \RabbitSubscriber\<TM\>\ classes have been replaced with non-generic \RabbitPublisher\ and \RabbitMessageSubscriber\ implementations that operate on \MessageEnvelope\ objects. The old \IEncoder\/\IDecoder\ abstraction and \MessageParser\ have been removed in favor of direct \ISerializer\ usage and a new \RabbitMessageParser\ that extracts headers directly. Additionally, the \IBusConfiguratorExtensions\ now registers these new services, and the \QueueReferenceFactory\ has been updated to support custom naming policies via a \QueueReferencesCreator\ delegate.

src/OpenSleigh.Transport.RabbitMQ · high confidence

Removal of samples directory artifacts

The \samples\ directory has been cleaned up by removing the \.dockerignore\ file and the \OpenSleigh.Samples.sln\ solution file. This removes the sample project structure and associated configuration files from the repository.

samples · high confidence

Removed legacy saga configuration API

The legacy saga configuration API has been removed from the dependency injection setup. Specifically, the \BusConfigurator\ class and its associated interfaces (\IBusConfigurator\, \ISagaConfigurator\, \ISagaStateFactory\, \ISagaTypeResolver\) and their implementations (\LambdaSagaStateFactory\, \SagaTypeResolver\, \ServiceCollectionExtensions\) have been deleted. This change simplifies the service registration process by removing the previous builder pattern for configuring sagas.

src/OpenSleigh.Core/DependencyInjection · high confidence

Removed obsolete exception classes from the core library

The following exception classes have been removed from the OpenSleigh.Core.Exceptions namespace: ConsumerNotFoundException, MessageException, SagaNotFoundException, and StateCreationException. This change eliminates unused or deprecated error types from the core library.

src/OpenSleigh.Core/Exceptions · high confidence

Solution file restructured with new projects and build configurations

The solution file was updated to include new projects such as OpenSleigh, OpenSleigh.InMemory, OpenSleigh.Samples, and various persistence and transport modules. Additionally, the Visual Studio version was updated from 16 to 18, and new build configurations for x64 and x86 architectures were added.

src · medium confidence

Test coverage

Add unit tests for saga state query and endpoint validation; Added Kafka test fixture for integration testing; Added MongoDB test fixture for persistence tests; Added RabbitMQ test fixture for integration tests; Added SQL persistence integration tests; Added SQL persistence test fixtures; Added end-to-end test suite for OpenSleigh; Added end-to-end tests for the SQL+RabbitMQ integration; Added end-to-end tests for various saga patterns; Added initial test suite for MongoDB persistence; Added integration tests for MongoDB persistence; Added integration tests for PostgreSQL and SQL Server persistence; Added integration tests for RabbitMQ message subscriber and publisher; Added integration tests for SQL persistence of outbox and saga state; Added test configuration and global usings for RabbitMQ transport tests; Added test infrastructure for Kafka transport; Added test infrastructure for SQL, PostgreSQL, MongoDB, RabbitMQ, and Kafka; Added tests for in-memory saga state query functionality; Added unit tests for RabbitMQ transport components; Added unit tests for SqlSagaStateQuery; Added unit tests for core messaging and saga execution components; Added unit tests for the Kafka transport implementation; Added unit tests for the Outbox subsystem; Added unit tests for transport layer components; Removed obsolete test files and dummy saga implementations.

Dependencies

Upgrade to .NET 10 and update dependencies

The project has been upgraded to target .NET 10, with all NuGet package references updated to their latest compatible versions. This includes updating Microsoft.Extensions packages to 10.0.3, xUnit to 2.9.3, NSubstitute to 5.3.0, and other testing and utility libraries. The build system now supports multiple target frameworks (net8.0, net9.0, and net10.0) where applicable, and the documentation site dependencies (Jekyll, just-the-docs) have been updated.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 54 → 56 (+2.3)
  • Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 81 → 74 (-7.3)
  • Architecture 75 → 75 (+0.4)
  • Maturity 57 → 59 (+1.9)
  • Readiness 43 → 44 (+1.4)
  • Security 60 → 71 (+10.5)
  • Performance 88 → 88 (+0.0)

Resolved (23)

  • Bounded contexts not declared
  • Change coupling: ChannelFactory.cs ↔ RabbitMessageSubscriber.cs (src/OpenSleigh.Transport.RabbitMQ/ChannelFactory.cs)
  • Change coupling: KafkaMessageParser.cs ↔ QueueReferenceFactory.cs (src/OpenSleigh.Transport.Kafka/KafkaMessageParser.cs)
  • Change coupling: SagaState.cs ↔ SqlOutboxRepository.cs (src/OpenSleigh.Persistence.SQL/Entities/SagaState.cs)
  • Coverage not measured — analyzer environment
  • Duplicated block (12 lines × 2) (src/OpenSleigh.Persistence.SQL/SqlSagaStateRepository.cs)
  • Duplicated block (18 lines × 2) (src/OpenSleigh.Persistence.SQL/SqlSagaStateRepository.cs)
  • Duplicated block (19 lines × 2) (src/OpenSleigh.Persistence.SQL/Entities/OutboxMessage.cs)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • LLM evaluation failed
  • …and 3 more

New (87)

  • Ambiguous entry points for saga processing. ISagaRunner and ISagaExecutionService both expose methods to start processing a saga for a message. BeginProcessingAsync suggests initialization, while ProcessAsync suggests execution. It is unclear if they are interchangeable, if one is a higher-level wrapper, or if they serve different lifecycle stages (e.g., cold start vs. warm resume).
  • CoverageExclusion (src/OpenSleigh.InMemory/InMemoryBusConfiguratorExtensions.cs)
  • CoverageExclusion (src/OpenSleigh.Persistence.Mongo/MongoBusConfiguratorExtensions.cs)
  • CoverageExclusion (src/OpenSleigh.Persistence.Mongo/MongoConfiguration.cs)
  • CoverageExclusion (src/OpenSleigh.Persistence.Mongo/MongoSagaStateRepository.cs)
  • CoverageExclusion (src/OpenSleigh.Persistence.PostgreSQL/SqlBusConfiguratorExtensions.cs)
  • CoverageExclusion (src/OpenSleigh.Persistence.SQL/SagaDbContext.cs)
  • CoverageExclusion (src/OpenSleigh.Persistence.SQL/SqlConfiguration.cs)
  • CoverageExclusion (src/OpenSleigh.Persistence.SQL/SqlOutboxRepository.cs)
  • CoverageExclusion (src/OpenSleigh.Persistence.SQL/SqlSagaStateRepository.cs)
  • CoverageExclusion (src/OpenSleigh.Persistence.SQLServer/QueryHintInterceptor.cs)
  • CoverageExclusion (src/OpenSleigh.Persistence.SQLServer/SqlBusConfiguratorExtensions.cs)
  • CoverageExclusion (src/OpenSleigh.Transport.Kafka/IBusConfiguratorExtensions.cs)
  • CoverageExclusion (src/OpenSleigh.Transport.Kafka/IBusConfiguratorExtensions.cs)
  • CoverageExclusion (src/OpenSleigh.Transport.Kafka/KafkaInfrastructureCreator.cs)
  • CoverageExclusion (src/OpenSleigh.Transport.RabbitMQ/IBusConfiguratorExtensions.cs)
  • CoverageExclusion (src/OpenSleigh.Transport.RabbitMQ/RabbitConfiguration.cs)
  • CoverageExclusion (src/OpenSleigh/DependencyInjection/BusConfigurator.cs)
  • CoverageExclusion (src/OpenSleigh/DependencyInjection/IHostExtensions.cs)
  • CoverageExclusion (src/OpenSleigh/DependencyInjection/ServiceCollectionExtensions.cs)
  • …and 67 more

API surface

  • Unchanged — 2 HTTP endpoints

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

mizrael/OpenSleigh was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 6c5ea27d1d1b061ad2eb98236b4d7910ac2bdfb9 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-28e75b8e3254.