Skip to content
CAI
Software that uses CAICheck a score

si-informational-systems/Rosetta

57.4

Adequate · 31 October 2026

4.4k

lines of production code

F#

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Added MongoDB state-based aggregate repository

A new MongoDB implementation of the state-based aggregate repository has been added, allowing aggregates to be persisted as documents in pluralized collections. This component handles retrieving aggregate states by ID and version, and stores updated states using upsert operations, providing the underlying persistence mechanism for state-based projections.

SI.Rosetta.Aggregates.MongoDB · high confidence

Added ObjectComparer for deep object comparison in test kits

The SI.Rosetta.TestKit.ObjectComparer module introduces a new utility for performing deep comparisons between two objects of the same type. This tool recursively inspects primitive types, strings, DateTime values, collections, and complex objects (including their public properties and fields), while explicitly handling circular references to prevent infinite recursion. It returns an empty string if objects are equal or a detailed report of all differences found, supporting the new aggregates and projections test kits.

SI.Rosetta.TestKit.ObjectComparer · high confidence

Added RavenDB document store initialization logic

The persistence layer now includes a factory module that constructs and initializes a RavenDB DocumentStore. This implementation handles configuration parsing for server URLs, database names, and optional client certificates, ensures the target database exists by creating it if necessary, and runs a dummy query to prevent lazy-loading issues upon initialization.

SI.Rosetta.Persistence.RavenDB · high confidence

Added projections test kit with in-memory stubs

The SI.Rosetta.Projections.TestKit package now provides a test kit for validating projections. It includes an in-memory projection store (TestKitProjectionStore) that implements IProjectionsStore, INoSqlStore, and ISqlStore, allowing tests to run without a real database. A TestKitBase class simplifies writing projection tests by handling service registration (including a StubCheckpointStore and TestKitSubscriptionFactory) and providing Given/Then methods for event sourcing and assertion. An IdValidator ensures only supported ID types (string, int, int64, Guid) are used.

SI.Rosetta.Projections.TestKit · high confidence

Introduce KurrentDB-backed event-sourced aggregate repository

Added a new KurrentDBAggregateRepository implementation for SI.Rosetta.Aggregates.KurrentDB that handles event sourcing against KurrentDB. The repository supports saving aggregate changes with optimistic concurrency control and reading aggregate state by replaying events. It integrates with the existing upcasting infrastructure to transform events during deserialization, ensuring that unknown or versioned events are handled correctly (failing reads on unknown events to prevent state corruption).

SI.Rosetta.Aggregates.KurrentDB · high confidence

MongoDB connection configuration and BSON conventions

The MongoDB persistence layer now includes a dedicated configuration module that supports both explicit connection parameters (host, port, credentials) and a full connection string, with automatic database name extraction from the connection string when not explicitly provided. Additionally, BSON serialization conventions are registered once per process to ensure consistent document formatting across aggregates and projections, using camelCase field names, ignoring extra elements, and representing enums as strings.

SI.Rosetta.Persistence.MongoDB · high confidence

MongoDB support for checkpoint and projection persistence

Added MongoDB implementations for the \ICheckpointStore\ and \IProjectionsStore\ interfaces, enabling users to persist event-sourced state and checkpoints in MongoDB. The \MongoDbCheckpointStore\ handles checkpoint upserts with retry logic, while \MongoDbProjectionsStore\ provides document storage, loading, and deletion with support for unit-of-work transactions (using \WriteConcern.WMajority\) and automatic retries on transient MongoDB errors.

SI.Rosetta.Projections.MongoDB · high confidence

New Aggregates Test Kit for validating command handlers

The SI.Rosetta.Aggregates.TestKit package is now available, providing a structured testing framework for aggregate command handlers. It includes a \TestKitBase\ class that supports a Given-When-Then workflow, allowing users to seed initial events, execute commands, and verify both produced and published events against expected outcomes. The kit features an in-memory repository (\TestKitAggregateRepository\) that supports both event-sourced and state-based repositories, and includes detailed output formatting to help diagnose test failures by comparing expected versus actual event structures.

SI.Rosetta.Aggregates.TestKit · high confidence

New UpcastingTestKitBase for validating event upcasters

The SI.Rosetta.TestKit.Upcasting package now includes an UpcastingTestKitBase class that allows users to test their IEventUpcaster implementations in isolation. This test kit simulates the storage and retrieval process by encoding events as they would be stored, then decoding them through the registered upcasters to verify they transform correctly into the current event schema. The implementation also refactors internal storage logic to use a dedicated EventEncoding module for encoding and decoding operations.

SI.Rosetta.TestKit.Upcasting · high confidence

New Visual Studio template for generating SI.Rosetta F\# aggregates

Developers can now use a new Visual Studio item template to scaffold a complete SI.Rosetta aggregate structure in F\# projects. The template generates three files—AggregateState, Aggregate, and AggregateHandler—providing a starting point for implementing command handling and state management. It supports both event-sourced and state-based persistence patterns and includes installation scripts for Visual Studio 2022.

SI.Rosetta.Aggregates.Template · high confidence

RavenDB persistence layer for state-based aggregates

The SI.Rosetta.Aggregates.RavenDB package now provides a concrete implementation of the state-based aggregate repository interface using RavenDB. This new RavenDBAggregateRepository enables users to persist and retrieve aggregate states by loading and storing document data, supporting generic aggregate types and their associated states within the RavenDB document store. Also in this area: 1 commit (0 fixes) modifying SI.Rosetta.Aggregates, SI.Rosetta.Aggregates.HostBuilder, SI.Rosetta.Aggregates.RavenDB; Simplified aggregate repository API by removing event type generics; MongoDB support for aggregates and projections with improved subscription resilience.

SI.Rosetta.Aggregates.RavenDB · low confidence · unverified

Rosetta 1.29: .NET 10, KurrentDB, MongoDB, and Test Kits

Rosetta has been upgraded to target .NET 10 and now uses KurrentDB (version 26.2) as its primary event store, replacing the previous EventStoreDB integration. The framework now supports state-based aggregates persisted in RavenDB or MongoDB, allowing users to choose between event sourcing and state-based persistence or mix both. Projections can now persist read models to MongoDB in addition to RavenDB. This release also introduces dedicated Test Kits for aggregates and projections, adds event upcasting capabilities, and provides a local Docker stack for development. The solution structure has been reorganized to reflect these new persistence providers and test infrastructure.

(repo-wide) · high confidence

Support for state-based aggregates alongside event sourcing

The host builder now allows applications to use state-based aggregates (RavenDB, MongoDB) in addition to or instead of event-sourced aggregates (KurrentDB). New extension methods \UseAggregatesWithoutEventSourcing\ and \UseAggregatesWith\ enable configuring RavenDB and MongoDB repositories, while the previous single-store constraint is replaced by a system that ensures each aggregate type (event-sourced or state-based) is registered only once. The underlying store marker types have been renamed from \EventStore\ to specific implementations like \KurrentDB\, \RavenDB\, and \MongoDB\.

SI.Rosetta.Aggregates.HostBuilder · high confidence

Removals

Removal of F\# EventStore serialization module

The ESSerialization module, which provided logic for serializing and deserializing F\# discriminated union events to and from EventStore using Newtonsoft.Json, has been removed from the codebase.

SI.Rosetta.Serialization.EventStore · high confidence

Removed EventStore-specific projection subscription and factory implementations

The EventStore-specific implementations for subscription management and projection factories have been removed from the SI.Rosetta.Projections.EventStore module. Specifically, the code for handling EventStore stream subscriptions (ESSubscription.fs), creating subscription instances (ESSubscriptionFactory.fs), and managing JavaScript-based projections via the EventStore management client (JSProjectionsFactory.fs) has been deleted. This indicates a shift away from using the EventStore.Client library for these specific projection mechanics within this component.

SI.Rosetta.Projections.EventStore · high confidence

Behavioural changes

Aggregates now support versioned state and optional event sourcing

The aggregate model has been refactored to support both event-sourced and state-based persistence patterns. The \IAggregateRepository\ now returns an \Option\ type for \GetAsync\, allowing callers to handle missing aggregates explicitly without null checks, and accepts a \long\ (int64) version parameter. \AggregateState\ and \Aggregate\ types now use \int64\ for versioning and expose state via generic parameters in \AggregateHandler\, enabling more type-safe command execution. New interfaces \IEventSourcedAggregateRepository\ and \IStateBasedAggregateRepository\ inherit from the base repository to distinguish persistence strategies. Also in this area: 1 commit (0 fixes) modifying SI.Rosetta.Aggregates, SI.Rosetta.Aggregates.HostBuilder, SI.Rosetta.Aggregates.RavenDB; Simplified aggregate architecture with OpenTelemetry tracing; MongoDB support for aggregates and projections with improved subscription resilience.

SI.Rosetta.Aggregates · low confidence · unverified

Event-sourced repository now returns Option types and uses generic state parameters

The EventStoreAggregateRepository has been updated to support generic aggregate state parameters, allowing the repository to work with specific state types rather than relying on reflection-based factory creation. Additionally, the GetAsync method now returns an Option type (Some aggregate or None) instead of null, improving type safety and eliminating the need for null literal handling in consumer code.

SI.Rosetta.Aggregates.EventStore · high confidence

KurrentDB projections now support event upcasting and share a single client

The KurrentDB projection subsystem has been refactored to share a single KurrentDBClient across all aggregates and projections, replacing the previous per-subscription initialization. Additionally, subscriptions now accept an IEventUpcaster sequence, enabling event upcasting during deserialization. The subscription logic has been updated to handle unknown events gracefully by skipping them (with logging) when the skipUnknownEvents flag is set, and telemetry has been enhanced to track skipped events and resubscription attempts.

SI.Rosetta.Projections.KurrentDB · high confidence

Migrate event serialization from EventStore to KurrentDB

The serialization module for the event store backend has been replaced: the previous EventStore-specific implementation (ESSerialization.fs) using Newtonsoft.Json has been removed and replaced with a new KurrentDB implementation (KurrentDBSerialization.fs) that uses System.Text.Json. This change updates how events are serialized and deserialized for KurrentDB, including the handling of metadata headers and trace context propagation.

SI.Rosetta.Serialization · high confidence

Migration to System.Text.Json with event upcasting and OpenTelemetry support

SI.Rosetta.Common now uses System.Text.Json for event serialization instead of the previous Newtonsoft.Json-based approach, ensuring backward compatibility by reading both the new 'Plain' format and the legacy 'Newtonsoft' format for F\# options. This change introduces a new event upcasting mechanism (IEventUpcaster) to handle schema evolution, allowing stored events to be transformed before being deserialized into current domain types. Additionally, the library now emits OpenTelemetry traces and metrics (commands, events stored, projection handling) under the 'SI.Rosetta' source, and simplifies the common interfaces by removing the base ICommands/IEvents inheritance in favor of direct IAggregateCommands and IAggregateEvents interfaces.

SI.Rosetta.Common · high confidence

Person aggregate refactored to support event sourcing and new commands

The Person aggregate in the test kit has been updated to align with the framework's shift towards supporting both state-based and event-sourced patterns. The PersonAggregateHandler now explicitly uses IEventSourcedAggregateRepository and includes the PersonAggregateState as a generic parameter, reflecting the new generic handler signature. The PersonAggregateState class was cleaned up to use standard F\# properties instead of mutable fields and the AllowNullLiteral attribute, and its event application logic was corrected to use the NewName field from the NameChanged event. Additionally, the PersonAggregate now captures the OldName when recording a name change, and the PersonConsumer was extended to handle the new SetPersonHeight command while adding ConfigureAwait(false) to existing async calls.

Test.Aggregates/Person · high confidence

Projections host builder now supports MongoDB and KurrentDB with closed store types

The \SI.Rosetta.Projections.HostBuilder\ has been updated to support MongoDB and KurrentDB as event and projection stores, replacing the previous EventStore and RavenDB-only configuration. The library now enforces a closed set of store types (\EventRepository\ and \ProjectionStore\) to prevent invalid configurations. Users can now configure projections to read from KurrentDB and write to MongoDB or RavenDB, with the host builder automatically registering the necessary clients and hosted services for these stores.

SI.Rosetta.Projections.HostBuilder · high confidence

Projections subsystem refactored for MongoDB support and API simplification

The projection subsystem has been refactored to support MongoDB persistence and simplify its API. The checkpoint storage interface was consolidated from separate reader/writer interfaces into a single \ICheckpointStore\, and the \Projection\ class now uses this store instead of a dedicated writer. The \IProjectionsStore\ interface was updated to use generic \obj\ keys for load/delete operations and introduced a \LoadManyAsync\ method. Additionally, projection attributes were renamed (\SubscribedToStream\ to \HandlesStream\, \InactiveProjection\ to \DisabledProjection\) and the event type constraints were tightened to require \IAggregateEvents\ instead of the broader \IEvents\ interface. Also in this area: 2 commits (0 fixes) modifying SI.Rosetta.Projections; Projections now support skipping unknown events and expose telemetry; MongoDB support for aggregates and projections with improved subscription resilience.

SI.Rosetta.Projections · medium confidence · unverified

RavenDB projection store API refactored and checkpoint logic unified

The RavenDB persistence layer in SI.Rosetta.Projections.RavenDB has been refactored to improve API consistency and async behavior. The RavenDbCheckpointWriter was removed and its functionality merged into a renamed RavenDbCheckpointStore, which now implements a unified ICheckpointStore interface for both reading and writing checkpoints. The RavenDbProjectionsStore interface was updated to use generic type constraints (non-struct) and accept object identifiers instead of strings, introducing a new LoadManyAsync method for bulk loading. Additionally, all asynchronous RavenDB client operations now explicitly use ConfigureAwait(false) to prevent potential deadlocks, and the retry delay for transient errors was increased from 50ms to 100ms.

SI.Rosetta.Projections.RavenDB · high confidence

Refinement of Person domain models and test utilities

The Person domain model has been updated to distinguish between old and new values in the PersonNameChanged event, adding explicit OldName and NewName fields to improve clarity when tracking name changes. A new Reference type has been introduced in PersonMessages.fs to represent entities with an ID and name, while the UserReference type in Common.fs has been marked as CLIMutable to support serialization requirements. Additionally, the OrganizationMessages.fs module has been cleaned up by removing an unused System namespace import.

Test.PL · high confidence

Shared KurrentDB client registration via dependency injection

The KurrentDB persistence layer now registers a single, shared KurrentDBClient and KurrentDBProjectionManagementClient as singletons in the application's dependency injection container. This ensures that both Aggregates and Projections reuse the same underlying gRPC connection, reducing resource overhead. The registration validates the connection string immediately at startup rather than on first use, and the clients are disposed when the service provider is shut down.

SI.Rosetta.Persistence.KurrentDB · high confidence

Test.Aggregates sample updated to support mixed persistence and new organization aggregate

The Test.Aggregates sample application has been refactored to demonstrate the library's new capability to use Event Sourcing, non-event-sourced persistence, or a combination of both. The Program.fs now uses the generic \UseAggregatesWith\<EventStore, RavenDB\>\ method to configure this mixed persistence mode, replacing the previous single-store setup. Additionally, the sample now includes an \Organization\ aggregate alongside the existing \Person\ aggregate, with \ServiceInstance.fs\ updated to initialize and consume commands for both handlers, and the \AggregateConsumerBase\ renamed and updated to work with the new \IAggregateCommands\ interface.

Test.Aggregates · high confidence

Updated projection examples to use new stream handling and async patterns

The projection examples in Test.Projections/Projections have been updated to reflect API changes: the SubscribedToStream attribute is replaced by HandlesStream, and store operations (LoadAsync, StoreAsync) now require ConfigureAwait(false) for proper async handling. Additionally, stream names and projection types have been renamed (e.g., PersonStream to $ce-People, TotalPeopleCustomProjection to TotalPeopleAndOrganizationsCustomProjection) to better reflect their scope, and the TotalJohnsCustomProjectionHandler now tracks name changes for 'John' using NewName and OldName fields.

Test.Projections/Projections · high confidence

Test coverage

Added test domain models for Organization aggregate; Added unit tests for Organization projection handling; Added unit tests for aggregate hosting, organization behavior, telemetry, and event upcasting; Added unit tests for projection synchronization, event serialization, and hosting; Integration test suite for Rosetta event sourcing and projections.

Dependencies

Upgrade to .NET 9 and FSharp.Core 10.1 with dependency updates

The project has been upgraded to target .NET 9 and updated FSharp.Core to version 10.1.201/10.1.202. Several third-party dependencies have been updated, including Microsoft.Extensions.Hosting.Abstractions, Microsoft.Extensions.Configuration, Microsoft.Extensions.DependencyInjection, Newtonsoft.Json, EventStore.Client.Grpc, FSharp.Control.AsyncSeq, FSharp.Control.TaskSeq, System.Linq.Async, RavenDB.Client, and MongoDB.Driver. Additionally, the project now generates symbol packages (snupkg) for debugging support.

(dependencies) · high confidence

Housekeeping

Reordered import statements in Test.Projections host entry point

The order of open statements in the Test.Projections Program.fs file has been adjusted, moving the System.Reflection import above the SI.Rosetta.Projections.HostBuilder import. This is a minor code style or organization change with no impact on functionality.

Test.Projections · 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

Score

  • CAI 58 → 57 (-0.4)

Lenses

  • Code Health 99 → 99 (-0.3)
  • Architecture 100 → 100 (-0.0)
  • Maturity 66 → 68 (+2.8)
  • Readiness 35 → 32 (-3.5)
  • Security 100 → 100 (+0.1)
  • Domain Modelling 75 → 75 (+0.0)
  • Performance 100 (new)

Resolved (3)

  • Outdated: KurrentDB.Client
  • Workflow token permissions not restricted
  • XML-doc coverage: Test.DTOs (Test.DTOs/Test.DTOs.csproj)

New (8)

  • AggregateHandler`2.Handle (cognitive 16) (SI.Rosetta.Aggregates/AggregateHandler.fs)
  • Duplicated block (5 lines × 2) (SI.Rosetta.Aggregates.HostBuilder/HostBuilderExtensions.fs)
  • Duplicated block (5 lines × 2) (SI.Rosetta.Projections.HostBuilder/HostBuilderExtensions.fs)
  • Duplicated block (5 lines × 3) (SI.Rosetta.Aggregates.HostBuilder/HostBuilderExtensions.fs)
  • Duplicated block (5 lines × 3) (SI.Rosetta.Projections.HostBuilder/HostBuilderExtensions.fs)
  • Duplicated block (9 lines × 2) (SI.Rosetta.Aggregates.HostBuilder/HostBuilderExtensions.fs)
  • Duplicated block (9 lines × 2) (SI.Rosetta.Projections.HostBuilder/HostBuilderExtensions.fs)
  • Workflow token permissions not restricted (.github/workflows/ci.yml)

Changes since last survey

  • 7 commits — 7 feature/other, 0 fixes

By area

  • (root) — 6 commits
  • SI.Rosetta.Projections/ProjectionsFactory.fs — 1 commit

Notable commits

  • change: Name the aggregate handlers and projections to register, instead of an assembly
  • change: Outbox: record the aggregates' PublishedEvents in RavenDB or MongoDB
  • change: Outbox: turn RavenDB's document expiration on every 36 hours, which every licence allows
  • change: ProjectionsFactory: find the typed creation method by nameof, not its name as a string
  • change: README: a Projection's dependencies go in its Handlers, and their effects must be idempotent
  • change: README: show the Outbox in the Quick Start and the samples' configuration
  • change: Version 1.32

API surface

  • 1 added · 0 removed (a removed endpoint is potentially breaking)

Added endpoints (1)

  • GET /outbox

Architecture

  • Containers 0 added · 0 removed · contexts 3 added · 0 removed · edges 6 added · 2 removed

Added bounded contexts (3)

  • SI.Rosetta.Aggregates.MongoDB
  • SI.Rosetta.Aggregates.RavenDB
  • SI.Rosetta.Projections.HostBuilder

Added dependency edges (6)

  • SI.Rosetta.Aggregates.MongoDB → SI.Rosetta.Aggregates (coupling)
  • SI.Rosetta.Aggregates.RavenDB → SI.Rosetta.Aggregates (coupling)
  • SI.Rosetta.Aggregates.TestKit → SI.Rosetta.Aggregates (coupling)
  • SI.Rosetta.Aggregates.UnitTests → SI.Rosetta.Aggregates (coupling)
  • SI.Rosetta.Projections.HostBuilder → SI.Rosetta.Projections
  • SI.Rosetta.Projections.HostBuilder → SI.Rosetta.Projections.KurrentDB

Removed dependency edges (was a dependency, now gone) (2)

  • SI.Rosetta.Aggregates.TestKit → SI.Rosetta.Aggregates
  • SI.Rosetta.Aggregates.UnitTests → SI.Rosetta.Aggregates

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

Survey your own repository

si-informational-systems/Rosetta 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 31 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 084466422302dc5227300d724e1daaf1ad3d9f80 — the exact code this score is about.
  • Scored under rubric-2026.10.5 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer measure-2026.10.42+preprod-39f19585c494.