Skip to content
CAI
Software that uses CAICheck a score

MarsonShine/MS.Microservice

53.2

Adequate · 21 September 2026

31.7k

lines of production code

C#

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a modular .NET 10 microservice framework that provides foundational infrastructure for building distributed applications, including provider-neutral AI capabilities, reliable messaging with outbox patterns, and structured observability. It offers a comprehensive suite of cross-cutting utilities for domain modeling, functional programming, caching, and security, alongside standardized ASP.NET Core hosting and identity management. The platform is designed to be consumed as reusable NuGet packages, supported by extensive testing, documentation, and sample applications that demonstrate event sourcing and isolated development environments.

How it got here

2019–2021 — Core microservice library scaffolding

15 changes.

This period established the foundational structure and core utilities for the MS.Microservice project, targeting .NET 10 with a modular architecture. It introduced essential cross-cutting concerns including caching, domain abstractions, functional result patterns, and security helpers, while also setting up centralized dependency management and Swagger integration.

2023–2026 — Microservice platform foundation and module expansion

43 changes.

This period focused on establishing the core infrastructure for a microservice platform, introducing foundational libraries for event sourcing, reliable messaging, and structured logging. It expanded the ecosystem with specialized modules for AI capabilities, audio processing, and Excel utilities, while standardizing HTTP client interactions and resilience patterns. Comprehensive test coverage and build tooling were added to support local development and validate the architectural boundaries of the growing library suite.

Features

Add core DTOs and functional Result pattern

This change introduces new data transfer objects and a functional programming core type to the microservice core library. It adds \PagedRequestDto\ and \PagedAndSortedRequestDto\ to standardize pagination parameters, along with a generic \PagedResultDto\<TResult\>\ for paginated responses. Additionally, it implements a \Result\<T\>\ type that replaces exception-based control flow with a railway-oriented programming model, allowing operations to return success or failure states that can be chained using \Map\ and \Bind\ methods. A simple \ResultDto\ is also added for standard API response wrapping.

src/MS.Microservice.Core/Dto · high confidence

Add feature toggle management via configuration

Introduces a new feature toggle system in the core library, allowing applications to enable or disable specific features based on configuration settings. The implementation includes a \FeatureToggleManager\ to query toggle states, an \IFeatureToggleProvider\ interface, and a \ConfigurationFeatureToggleProvider\ that reads boolean values from the application configuration under the \FeatureToggles\ section. Services are registered via a new \AddFeatureToggle\ extension method on \IServiceCollection\, making the toggle manager available for dependency injection.

src/MS.Microservice.Core/FeatureManager · high confidence

Added SingleflightManager to prevent duplicate concurrent operations

A new SingleflightManager class has been introduced in the core concurrent utilities to handle scenarios where multiple concurrent requests attempt to execute the same operation. This component ensures that only one request performs the actual work while others wait and share the result, thereby avoiding redundant computations and improving system resource efficiency.

src/MS.Microservice.Core/Concurrent · high confidence

Added shared document navigation layout

The default layout now includes a dedicated navigation section for pages within the docs directory. This adds a 'Document Navigation' bar showing links to the document center, the current topic's directory (if available), and the project home, along with a 'Continue Reading' list of sibling pages. Additionally, a pager at the bottom of the page provides 'Previous' and 'Next' links to navigate sequentially through the documentation.

_\layouts · high confidence

Adds event sourcing infrastructure and caching subsystems to the lab sample

The lab infrastructure now includes a complete event sourcing stack backed by PostgreSQL, featuring an EF Core context, database migrations for event streams, snapshots, and projection checkpoints, along with DI extensions to register the event store, snapshot store, and an order command service. It also introduces a configurable caching layer with an in-memory implementation, operation logging, and a buffer queue for asynchronous processing, alongside HTTP middleware and extensions to enable request body buffering.

samples/Lab/MS.Microservice.Lab.Infrastructure · high confidence

Initial repository structure and .NET 10 baseline

This change introduces the foundational structure for the MS.Microservice project, establishing a .NET 10.0 target framework with C\# 14.0 language features, nullable reference types, and implicit usings enabled. It includes a Dockerfile for containerized builds, a root solution file (MS.Microservice.slnx) organizing the modular architecture (AI, Logging, Messaging, Persistence, etc.), and comprehensive documentation covering architecture, getting started, and lab exercises. The repository is licensed under Apache 2.0 and sets up the build environment with global.json, nuget.config, and Directory.Build.props.

(repo-wide) · high confidence

Introduce Specification pattern for composable data queries

Added the Specification pattern implementation in the core library, providing a structured way to define complex queries with filtering, sorting, paging, and eager loading. The new files include the \ISpecification\ and \ISpecification\<T, TResult\>\ interfaces, a base \Specification\<T\>\ class with protected methods for \Where\, \OrWhere\, \Include\, \OrderBy\, and paging, and supporting types like \OrderExpression\ and \ExpressionCombiner\ for combining criteria. This allows developers to build reusable, composable query definitions that can be applied across different data access layers.

src/MS.Microservice.Core/Specification · high confidence

Introduce core EventBus infrastructure for event publishing and subscription

This change adds the foundational components for the event bus system within the core library. It introduces the IEventBus interface and EventBusManager implementation, enabling services to subscribe to specific event types via IEventHandler and publish events asynchronously. The IEvent interface is also added as a legacy alias that extends Messaging.IIntegrationEvent, ensuring compatibility with existing integration contracts while providing a local abstraction for event handling.

src/MS.Microservice.Core/EventBus · high confidence

Introduce modular AI microservice with provider support and question generation harness

The MS.Microservice.AI module is now available as a standalone, independently browsable family of projects, providing provider-neutral contracts for chat, TTS, ASR, image generation, and image editing. It includes concrete provider implementations for OpenAI, DeepSeek, and Qwen (including reference-image editing), a structured question-generation harness with validation and repair capabilities, and an educational image prompt pipeline. Users can register these capabilities via DI and configure providers with specific API keys, timeouts, and concurrency limits.

MS.Microservice.AI · high confidence

Introduce provider-agnostic structured request logging with NLog and Serilog support

This change adds a new logging infrastructure to the microservice platform, providing a provider-agnostic ambient request context that captures headers (requestId, platformId, userflag), timing, and status codes. It includes an ASP.NET Core middleware to automatically inject this context into the request pipeline, high-performance logging extensions in the Core package, and dedicated integration packages for NLog (with custom layout renderers) and Serilog (with an enricher). This allows developers to easily trace requests across services and configure their preferred logging backend without modifying business logic.

MS.Microservice.Logging · high confidence

Introduce reliable messaging module with self-managed EF Core and RabbitMQ providers

This change introduces the MS.Microservice.Messaging module, providing a unified, reliable messaging system for microservices. It defines neutral contracts (IIntegrationEvent, IUnitOfWork, IIntegrationEventHandler) so business code remains independent of specific transport or persistence implementations. The module includes a self-managed EF Core provider that ensures atomicity by storing outbound messages in an Outbox and tracking inbound messages in an Inbox within the same database transaction as business data, supporting features like idempotency, lease-based concurrency, and retry/dead-letter handling. It also provides a RabbitMQ transport implementation for persistent publishing with mandatory routing and consumer acknowledgment, alongside a Wolverine provider option for native reliable storage. The module includes a MessageContractRegistry for versioned event typing, diagnostics for monitoring queue depths and operation metrics, and explicit topology provisioning for RabbitMQ exchanges and queues.

MS.Microservice.Messaging, MS.Microservice.Persistence · high confidence

Introduce reusable MS.Microservice.Swagger package for ASP.NET Core

This change adds the MS.Microservice.Swagger package, which extracts Swagger and OpenAPI integration into a standalone, reusable component. It provides \AddPlatformSwagger\ for service collection configuration and \UsePlatformSwagger\ for middleware wiring, allowing developers to enable Swagger UI, configure document metadata (title, version, name), set route prefixes, and enable bearer security definitions. The package also supports XML comment inclusion via a configurable file path and custom JavaScript injection, replacing previous in-app implementations with a more testable and flexible design.

src/MS.Microservice.Swagger · high confidence

Introduces core domain abstractions and repository interfaces

The domain layer now includes foundational infrastructure for data persistence and entity management. This adds an abstract DomainService with UnitOfWork access, an EntityHelper for robust equality and key comparison (including EF Core workarounds), and a set of repository interfaces (IRepository, IBasicRepository, IQueryRepository) alongside their base implementation (BasicRepositoryBase). It also defines the IUnitOfWork interface and extension methods that wrap persistence operations in functional Result/Either types for structured error handling.

src/MS.Microservice.Core/Domain · high confidence

Introduces laboratory domain models and event-sourcing infrastructure

This change adds the core domain layer for the laboratory sample, including identity aggregates (User, Role, Action) with password hashing and JWT claim generation, an event-sourced Order aggregate with state management, and logging aggregates. It also introduces durable inbox and outbox message models for reliable messaging, domain event abstractions (IHasDomainEvents, IDomainEventDispatcher), and a specific permission constant for messaging operations.

samples/Lab/MS.Microservice.Lab.Domain · high confidence

Introduction of Event Sourcing Abstractions

The EventSourcingAbstractions file introduces core interfaces and types for the event sourcing infrastructure, including IEventStore for stream operations, ISnapshotStore for state management, and IProjectionCheckpointStore for tracking read model positions. It also defines the EventEnvelope and AggregateSnapshot records along with the EventStoreConcurrencyException to handle optimistic concurrency conflicts.

src/MS.Microservice.EventSourcing · high confidence

Introduction of core domain primitive interfaces

The MS.Microservice.Domain.Primitives module now exposes a set of foundational interfaces for entity modeling and auditing, including IAggregateRoot, IEntity, ISoftDeleted, and specific audit contracts like ICreatedAt, IUpdatedAt, ICreator, and IUpdater. These interfaces allow business domains to reference common structural contracts without depending on the full Core infrastructure. To support migration from legacy naming conventions, compatibility shims (IUpdator, ICreatorAndUpdator, IFullAuditTracker) are provided alongside the new standard interfaces, with the obsolete types marked for removal in a future major version.

src/MS.Microservice.Domain.Primitives · high confidence

Introduction of weak-reference eviction cache mechanism

The caching module now includes a new WeakEvictionCache implementation that manages object lifecycles using strong and weak references. This cache keeps items as strong references while they are actively accessed, but downgrades them to weak references after a configurable threshold of inactivity, allowing the garbage collector to reclaim memory for unused objects. The change also introduces supporting configuration options (CacheOptions) and an interface (ICacheEntity) to define cache entity contracts within the microservice core.

src/MS.Microservice.Core/Ceching · high confidence

Lab sample introduces isolated identity, command, and background service implementations

The lab sample in samples/Lab/MS.Microservice.Lab now includes a standalone set of application components to demonstrate microservice patterns in isolation. This includes new background services (BadPracticeBackgroundService and HighPerformanceBackgroundService) for exercise purposes, and a complete identity subsystem with a custom SignInManager, BearerTokenGenerator, and LabTokenIssuerOptions for explicit token issuance and validation. User management is supported via new commands (ChangePassword, RegisterAccount, UserCreated, UserModify) and their handlers, alongside functional-style demo services (ChangePasswordAppService, RegisterAccountAppService) that illustrate validation and persistence composition. Additionally, feature toggles are available via a FeatureToggleAttribute, and order-related models and interfaces (IOrderQueryAppService, IOrderWorkflowAppService) are added to support workflow exercises.

samples/Lab/MS.Microservice.Lab · high confidence

New ASP.NET Core host library with external JWT identity and platform HTTP defaults

The \MS.Microservice.AspNetCore\ package introduces a standardized host setup for ASP.NET Core services. It provides \ServiceHost.CreateBuilder\ for consistent logging configuration, and \AddPlatformHttp\/\UsePlatformHttp\ to wire up trace-correlated ProblemDetails, forwarded header handling for proxy trust, and opt-in CORS. Additionally, it adds \AddExternalIdentity\ to configure JWT Bearer authentication against an external OIDC authority, enforcing HTTPS in production and mapping specific subject, role, and permission claims (e.g., \profiles.manage\, \messaging.manage\) for authorization policies.

src/MS.Microservice.AspNetCore · high confidence

New Excel utility library with import/export and performance diagnostics

The \src/MS.Microservice.Excel\ package introduces a comprehensive set of utilities for Excel handling. It provides \ExcelHelper\ for synchronous and asynchronous export/import of generic objects and \DataTable\ instances, and \MiniExcelHelper\ as an alternative implementation leveraging the MiniExcelLibs library. A \DynamicExcelBuilder\ enables row-by-row insertion into existing sheets using reflection-based property accessors, while \ExcelColumnAttribute\ allows mapping properties to columns with configuration options like name, order, and font color. Additionally, the package includes \PerformanceProbe\ for internal, phase-level performance measurement of import/export operations, tracking elapsed time, allocated bytes, and GC counts.

src/MS.Microservice.Excel · high confidence

New HTTP client utilities with logging, safe content handling, and optimized query-string building

The \src/MS.Microservice.Core/Net\ area introduces three new components to improve HTTP communication: \LogHttpClient\ provides a generic JSON request helper that isolates request headers, preserves encoding and cancellation contracts, and avoids logging sensitive URL parameters or bodies; \LoggingHttpClientHandler\ wraps request and response content to allow safe, repeated reading for logging without consuming the stream, solving issues with duplicate reads of \HttpContent\; and \QueryStringParameters\ replaces ad-hoc query-string assembly with a compiled, cached accessor approach that efficiently converts objects or dictionaries into URL parameters, handling nulls, enumerables, and date formatting consistently.

src/MS.Microservice.Core/Net · high confidence

New HttpClient extension methods for simplified JSON API calls

Added HttpClientExtensions in the MS.WebHttpClient namespace, providing GetAsync methods that accept an object body to automatically build query strings and deserialize JSON responses. This simplifies making HTTP GET requests with parameters by handling query string construction and JSON deserialization internally.

src/MS.Microservice.Core/Http · high confidence

New JSON serialization converters and default settings

The serialization module now includes custom JSON converters for handling DateTimeOffset values (with fixed UTC+8 offset and local time formatting), phone number desensitization (masking middle digits), and string-to-long conversion (supporting both string and number JSON tokens). Additionally, a new default serialization configuration is provided, enabling case-insensitive property matching, camel-case naming, and comprehensive Unicode (including Chinese character) encoding support.

src/MS.Microservice.Core/Serialization · high confidence

New LINQ predicate composition and conditional filtering utilities

The Linq module now includes new types and extension methods to simplify building complex query predicates. ExpressionStarter\<T\> provides a fluent API for chaining And/Or conditions with support for default expressions and implicit conversion to standard LINQ expressions. PredicateBuilder offers static factory methods and extension methods (Or, And, Not, Extend) to combine expression trees safely, handling parameter rebinding. Additionally, QueryableExtensions adds a WhereIf method that conditionally applies a filter to an IQueryable based on a boolean condition, allowing cleaner query construction without explicit if-else blocks.

src/MS.Microservice.Core/Linq · high confidence

New OpenTelemetry observability package for messaging and infrastructure metrics

The new \MS.Microservice.Observability\ package provides a centralized way to configure OpenTelemetry tracing and metrics for the platform. It registers DI services to automatically instrument ASP.NET Core and HTTP client calls, while specifically collecting messaging outcomes (such as inbox/outbox claimed, published, failed, and dead-lettered counts) and handler durations via the \PlatformMetrics\ class. Tracing is configured to capture activity from the application, \MS.Microservice.Messaging\, Wolverine, and \MS.Microservice.AI\, with exporters (Console or OTLP) enabled only when explicitly configured via \OpenTelemetry:ConsoleExporterEnabled\ or \OpenTelemetry:OtlpExporterEnabled\.

src/MS.Microservice.Observability · high confidence

New audio processing library for combining, mixing, and converting audio files

The \src/MS.Microservice.Audio\ package now provides a comprehensive audio processing library built on NAudio. It introduces the \IAudioProcessor\ interface and \AudioProcessor\ implementation, enabling users to combine multiple audio files, streams, or byte arrays into a single output; mix multiple audio tracks with configurable stereo conversion and buffer sizes; and convert audio formats (such as MP3 and WAV) with options for target wave formats, LAME presets, and resampling quality. The library also includes an \AudioFileFormatDetector\ to identify actual file formats by inspecting headers (supporting WAV, MP3, FLAC, and OGG detection) and comparing them against file extensions, as well as extension-based batch processing utilities for directory-wide operations.

src/MS.Microservice.Audio · high confidence

New build tooling for local development, module packaging, and consumption validation

The build system now includes a comprehensive set of PowerShell scripts to streamline local development and module distribution. Developers can use \start-local.ps1\ to spin up an isolated local environment with PostgreSQL, RabbitMQ, and Keycloak, supporting both 'SelfManaged' and 'Wolverine' messaging providers, as well as a dedicated 'Lab' mode for independent messaging experiments. The \pack-modules.ps1\ and \export-modules.ps1\ scripts allow for the creation of NuGet packages and source exports for specific module families, while \validate-module-consumption.ps1\ ensures these packages can be successfully consumed by verifying standalone source exports and local package consumers. Additionally, \container-smoke-test.ps1\ provides a way to validate the application's health within a Docker container, and \MessagingConsumer.cs\ offers a programmatic verification of commit, rollback, and duplicate-consumption checks for independent business contexts.

build · high confidence

New core utility library with null-check helpers, HTTP client, and StringBuilder caching

The src/MS.Microservice.Core module introduces a new set of cross-cutting utilities. It adds a Check class for parameter validation (null, empty, length constraints) and a CorePlatformException type that includes a numeric error code. For HTTP interactions, it provides a LogHttpClient that isolates request headers, preserves encoding and cancellation contracts, and explicitly separates request-specific headers from HttpClient.DefaultRequestHeaders; it also clarifies exception handling for cancellation, HTTP failures, and JSON parsing. Additionally, a StringBuilderCache is included to reuse StringBuilder instances for performance, and documentation outlines the module's boundaries and usage guidelines.

src/MS.Microservice.Core · high confidence

New cryptographic and data masking utilities added to the security core

The security module now includes new helper classes for data protection: AesCrypt, DesCrypt, and RsaCrypt provide AES, Triple DES, and RSA encryption/decryption capabilities respectively, while CryptologyHelper adds HMAC-SHA256 and SHA-256 hashing. Additionally, SecretField introduces methods to mask sensitive information like phone numbers and emails, and the Summary namespace includes a new Md5 class for hashing.

src/MS.Microservice.Core/Security · high confidence

New distributed cache extension methods for simplified get/set operations

A new extension class \IDestributedCacheExtensions\ has been added to the distributed caching infrastructure, providing convenient methods to interact with \IDistributedCache\. Users can now use \TryGetValueAsync\ to atomically retrieve a cached value or fetch it from a provided callback if missing, and \GetAsync\ variants that handle JSON serialization/deserialization automatically. Additionally, a \SetAsync\ method is available to serialize objects to JSON bytes before storing them in the cache, reducing boilerplate code for common caching scenarios.

src/MS.Microservice.Core/Ceching/Extensions · high confidence

New educational image generation sample with Qwen integration and safety-focused prompt engineering

A new sample application for generating educational flashcard images has been added to the samples/AI directory. It introduces a complete prompt-generation pipeline that includes deterministic semantic analysis for safety and context (detecting prohibitions, classroom settings, and running actions), specialized prompt builders for alphabet, word, phrase, and sentence card types, and logic for maintaining visual continuity across grouped sentences. The system integrates with the Qwen/DashScope image generation provider via a dedicated adapter and implements strict content-safety measures, such as stripping negative language and sensitive keywords to prevent provider-side filtering rejections. Service registration is provided via extension methods to wire up the planning, grouping, and orchestration components.

samples/AI · high confidence

New extension methods for collections, strings, dates, and functional results

The core library now includes a suite of new extension methods across several types. For collections, you can use \Shuffle\, \IntersectBy\, \ToDistinctDictionary\, and \OrderByReference\ on \IEnumerable\ and \ICollection\ types, along with \Flatten\ for hierarchical data traversal. String handling is enhanced with \IsNullOrEmpty\, \IsNullOrWhiteSpace\, and \ReadAsByte\. Date and time conversions are simplified with \ToLocalTimeMilliseconds\, \ToLocalTimeSeconds\, \FromUnixTimeMilliseconds\, and \FromUnixTimeSeconds\. Additionally, functional programming is supported with \Result\ extensions like \Try\, \TryAsync\, \Ensure\, \MapTry\, and \BindAsync\, as well as reactive extensions for \IObservable\ such as \Trace\, \Partition\, and \Safety\.

src/MS.Microservice.Core/Extension · high confidence

New extension methods for reference-equality immutable dictionaries

Added IEnumerableExtensions to provide new methods for creating ImmutableDictionary instances that use reference equality for keys. The new file includes ToImmutableReferenceDictionary overloads for both IEnumerable and IDictionary sources, allowing users to group items by object identity rather than value equality, as well as a ToImmutableOrdinalDictionary for string-keyed collections using ordinal string comparison.

src/MS.Microservice.Core/Extension/Immutable · high confidence

New functional programming core library with data structures and error handling

The \src/MS.Microservice.Core/Functional\ area now provides a comprehensive functional programming toolkit. This includes core types like \Option\ (with \Some\/\None\), \Either\ (for success/error branching), and \Exceptional\ (wrapping exceptions), along with their respective extension methods for \Map\, \Bind\, and \Match\. The library also introduces immutable data structures such as \BinaryTree\, \Bst\, \LabelTree\, and a custom \List\ (linked list) with functional operations like \Map\, \Bind\, and \Aggregate\. Additionally, it offers utility extensions for \Action\, \Func\, and \IEnumerable\ to support currying, partial application, and functional traversal patterns.

src/MS.Microservice.Core/Functional · high confidence

New provider-neutral AI abstractions for chat, speech, and image capabilities

The MS.Microservice.AI.Abstractions module now exposes a comprehensive, provider-neutral contract for five AI capabilities: Chat, Text-to-Speech (TTS), Automatic Speech Recognition (ASR), Image Generation, and Image Editing. This introduces strongly typed request and response records (e.g., AIChatRequest, AIAsrRequest, AIImageGenerationRequest) alongside dedicated client interfaces (IAIChatClient, IAIAsrClient, etc.) and provider interfaces (IAIChatProvider, etc.) that enable scenario-based model resolution. To support production readiness, the module also defines core infrastructure abstractions including a structured exception hierarchy (AIException, AIRateLimitException, AIContentSafetyException) with canonical error codes, production policies for rate limiting (IAIRateLimiter), circuit breaking (IAICircuitBreaker), log sanitization (IAILogSanitizer), and secret management (IAISecretProvider), as well as usage tracking via IAICostReporter.

MS.Microservice.AI/src · high confidence

New resilience retry library and utility helpers

This update introduces a comprehensive retry mechanism in the \MS.Microservice.Core.Common.Advance.Resilience\ namespace, allowing developers to configure retry strategies (fixed count, exponential backoff, timeout) and conditions (exception types, result predicates, regex matches) via a fluent \RetryBuilder\. Additionally, several utility classes are added: \NumberConverter\ for binary conversion and bitwise shifts, \GitCommitIdGenerator\ for creating unique IDs from commit metadata, \ResourceHelper\ for reading embedded resources, and \TextNormalizer\ for standardizing text by converting Chinese punctuation and whitespace to their English equivalents.

src/MS.Microservice.Core/Common · high confidence

New utility classes for resource management, numeric operations, and reference handling

This update introduces three new utility components to the core library. DisposableStack provides a stack-based mechanism for managing IDisposable objects, automatically releasing them in last-in-first-out order when disposed. MathExtensions adds generic extension methods for numeric types (supporting IFloatingPoint, INumber, and related interfaces), enabling operations like Round, Ceiling, Floor, Abs, Min, Max, Clamp, Pow, Sqrt, Log, and trigonometric functions. StrongToWeakReference offers a wrapper around WeakReference that allows toggling between strong and weak references, useful for caching scenarios where objects should be kept alive temporarily but can be collected if memory pressure increases.

src/MS.Microservice.Core/Microsoft · high confidence

Reference service introduces profile management with provider-agnostic migration tooling

The Reference sample now includes a complete profile management capability, featuring a domain model for user profiles linked to external identities, application services for creating and changing profiles with optimistic concurrency, and an audit trail for profile changes. To support this, a new database migrator tool has been added that exports SQL migration artifacts and SHA-256 manifests for both SelfManaged (EF Core) and Wolverine messaging providers, allowing teams to review and apply schema changes for the reference service's business and messaging tables.

samples/Reference · high confidence

Behavioural changes

2 commits (0 fixes) modifying src

A change to existing behaviour in src — 2 commits, 1 file.

src · medium confidence · unverified

Centralized JWT claim type constants

The Identity module now includes a dedicated JwtClaimTypes class that defines standard JWT claim keys (such as amr, id, platformId, nickname, phone, email, role, audience, issuer, userSource, and tenantId) as public constants, providing a single source of truth for claim names used across the service.

src/MS.Microservice.Core/Identity · high confidence

Compiled property accessors replace reflection for query string population

The reflection subsystem in the core microservice library now uses compiled delegates (via IL emission and expression trees) to read and write object properties, replacing the previous per-call reflection approach. This change introduces a strategy pattern with two implementations—IL-based (default) and expression-tree-based—managed by a central cache in PropertyAccessors. For users, this means that serializing object properties into query string parameters or similar collections is significantly faster and allocates less memory, as metadata discovery happens only once per type. The behavior remains consistent with the previous reflection-based logic, preserving property filtering (public, instance, non-indexed) and ordering.

src/MS.Microservice.Core/Reflection · high confidence

Introduces canonical messaging contracts and stable message identity

The messaging layer now defines a standardized set of transport-independent header names (MessageId, TraceParent, CorrelationId, etc.) and a hierarchy of event interfaces (IEventContract, IDomainEvent, IIntegrationEvent). Integration events now inherit from a base IntegrationEvent class that enforces a stable, persistent Guid-based identity and creation timestamp, ensuring that message identity is preserved across retries and transport redeliveries.

src/MS.Microservice.Core/Messaging · high confidence

Lab persistence layer now uses EF Core with PostgreSQL and supports identity seeding

The lab persistence module has been refactored to use Entity Framework Core with a PostgreSQL (Npgsql) backend, replacing the previous SqlSugar implementation. This introduces a new \ActivationDbContext\ that manages identity entities (Users, Roles, Actions) and logging, along with dedicated entity configurations for inbox/outbox messaging. A new database migrator tool and seed script allow operators to initialize the \fz\_platform\_activation\ schema and create lab-specific operator and reader accounts via explicit commands, ensuring isolated exercise identities are provisioned only when requested.

samples/Lab/MS.Microservice.Lab.Persistence · high confidence

Test coverage

Added architecture and component boundary tests; Added integration tests for the reference web host; Added persistence tests for profile management and messaging integration; Added test coverage for Excel utilities and performance diagnostics; Added test coverage for domain, functional, and infrastructure components; Added tests for external JWT authorization and identity validation; Added tests for messaging telemetry, distributed tracing, and OpenTelemetry configuration; Added tests for migration command parsing and artifact export; Added tests for user profile validation and update behavior; Added unit tests for AI core infrastructure and provider integrations; Added unit tests for EducationalImages sample microservice; Added unit tests for EventBus and Swagger configuration; Added unit tests for ProfileService and audit handling; Added unit tests for core resilience, caching, and functional utilities.

Dependencies

Centralized dependency management and new library scaffolding

The project now uses a centralized version management strategy via a new Directory.Packages.props file, which defines specific versions for core libraries including Microsoft .NET 10 packages, Wolverine 5.31.0, NLog 6.1.3, and OpenTelemetry 1.15.x. This change introduces new project structures for the AI module (supporting OpenAI, DeepSeek, and Qwen providers), a unified logging infrastructure with NLog and Serilog integrations, and a messaging layer built on Wolverine and RabbitMQ. Additionally, new GitHub Action scripts for translation and URL-to-markdown conversion have been added with their respective dependencies.

(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

Score

  • CAI 52 → 53 (+1.5)
  • Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 77 → 81 (+4.1)
  • Architecture 78 → 82 (+4.4)
  • Maturity 71 → 74 (+2.2)
  • Readiness 42 → 49 (+7.0)
  • Security 78 → 75 (-3.3)
  • Domain Modelling 62 → 52 (-9.9)
  • Event-Driven 100 (new)
  • Accessibility 61 → 60 (-1.2)
  • Performance 53 → 51 (-2.5)

Resolved (95)

  • Bounded contexts not declared
  • CommentedOutCode (src/MS.Microservice.Infrastructure/Caching/OperationLogBuffer.cs)
  • CommentedOutCode (src/MS.Microservice.Web/Controller/AccountController.cs)
  • CommentedOutCode (src/MS.Microservice.Web/Infrastructure/Authorizations/Handlers/RbacAuthorizationHandler.cs)
  • CommentedOutCode (src/MS.Microservice.Web/Infrastructure/Authorizations/Handlers/RbacAuthorizationHandler.cs)
  • Coverage not measured
  • Dead code: FlushCallback (src/MS.Microservice.Infrastructure/Caching/OperationLogBuffer.cs)
  • Dead code: InitDataProductTable (src/MS.Microservice.Web/Infrastructure/ActivationDbContextSeed.cs)
  • Dead code: InitUserTable (src/MS.Microservice.Web/Infrastructure/ActivationDbContextSeed.cs)
  • Dead code: ProcessOperationGroupAsync (src/MS.Microservice.Infrastructure/Caching/OperationLogBuffer.cs)
  • Dead code: TestEntityBaseLong (test/MS.Microservice.Core.Tests/Domain/EntityBaseTests.cs)
  • Duplicated block (11 lines × 2) (src/MS.Microservice.Core/Security/Cryptology/RsaCrypt.cs)
  • Duplicated block (11 lines × 2) (src/MS.Microservice.Infrastructure/Common/NAudio/AudioProcessorExtensions.cs)
  • Duplicated block (13 lines × 2) (MS.Microservice.AI/src/MS.Microservice.AI.Core/OpenAICompatibleChatProviderBase.cs)
  • Duplicated block (14 lines × 2) (src/MS.Microservice.Core/Security/Cryptology/RsaCrypt.cs)
  • Duplicated block (15 lines × 2) (MS.Microservice.AI/src/MS.Microservice.AI.Core/OpenAICompatibleImageGenerationProviderBase.cs)
  • Duplicated block (18 lines × 2) (MS.Microservice.AI/src/MS.Microservice.AI.Core/OpenAICompatibleChatProviderBase.cs)
  • Duplicated block (6 lines × 2) (MS.Microservice.Persistence/MS.Microservice.Persistence.SqlSugar/src/MS.Microservice.Persistence.SqlSugar/DbContext/BaseContext.cs)
  • EmptyCatchBlock (src/MS.Microservice.Infrastructure/Common/NAudio/AudioProcessor.cs)
  • EmptyCatchBlock (src/MS.Microservice.Infrastructure/Common/NAudio/AudioProcessorExtensions.cs)
  • …and 75 more

New (214)

  • AIProductionPipeline.ExecuteStreamAsync (cognitive 19) (MS.Microservice.AI/src/MS.Microservice.AI.Core/AIProductionPipeline.cs)
  • BarePragmaDisable (src/MS.Microservice.Domain.Primitives/IAuditor.cs)
  • CRAP 132: .ApplySpecification (MS.Microservice.Persistence/src/MS.Microservice.Persistence.SqlSugar/SqlSugarQueryableExtensions.cs)
  • CRAP 182: OutboxStore.ClaimAsync (MS.Microservice.Messaging/src/MS.Microservice.Messaging.SelfManaged.EFCore/OutboxStore.cs)
  • CRAP 182: SelfManagedFailedMessageOperations.ReplayInboxAsync (MS.Microservice.Messaging/src/MS.Microservice.Messaging.SelfManaged.EFCore/SelfManagedFailedMessageOperations.cs)
  • CRAP 35: InboxStore.AcquireAsync (MS.Microservice.Messaging/src/MS.Microservice.Messaging.SelfManaged.EFCore/InboxStore.cs)
  • CRAP 56: SelfManagedFailedMessageOperations.ReplayAsync (MS.Microservice.Messaging/src/MS.Microservice.Messaging.SelfManaged.EFCore/SelfManagedFailedMessageOperations.cs)
  • CRAP 56: SelfManagedOutboxWorker.ExecuteAsync (MS.Microservice.Messaging/src/MS.Microservice.Messaging.SelfManaged.EFCore/SelfManagedOutboxWorker.cs)
  • CRAP 72: SelfManagedPublisher.PublishBatchAsync (MS.Microservice.Messaging/src/MS.Microservice.Messaging.SelfManaged.EFCore/SelfManagedPublisher.cs)
  • CommentedOutCode (samples/Lab/MS.Microservice.Lab.Infrastructure/Caching/OperationLogBuffer.cs)
  • CommentedOutCode (samples/Lab/MS.Microservice.Lab/Controller/AccountController.cs)
  • Dead code: FlushCallback (samples/Lab/MS.Microservice.Lab.Infrastructure/Caching/OperationLogBuffer.cs)
  • Dead code: InitDataProductTable (samples/Lab/MS.Microservice.Lab/Infrastructure/ActivationDbContextSeed.cs)
  • Dead code: InitUserTable (samples/Lab/MS.Microservice.Lab/Infrastructure/ActivationDbContextSeed.cs)
  • Dead code: ProcessOperationGroupAsync (samples/Lab/MS.Microservice.Lab.Infrastructure/Caching/OperationLogBuffer.cs)
  • Dead code: TestEntityBaseLong (test/MS.Microservice.Lab.Tests/Core/Domain/EntityBaseTests.cs)
  • Dependency advisory scan runs only on code events
  • Documentation: no installation or build instructions (README.md)
  • Duplicated block (10 lines × 2) (MS.Microservice.Messaging/src/MS.Microservice.Messaging.SelfManaged.EFCore/SelfManagedPublisher.cs)
  • Duplicated block (11 lines × 2) (samples/Lab/MS.Microservice.Lab/Application/BackgroundServices/BadPracticeBackgroundService.cs)
  • …and 194 more

Changes since last survey

  • 110 commits — 80 feature/other, 30 fixes

By area

  • src/MS.Microservice.Web — 17 commits
  • (root) — 10 commits
  • MS.Microservice.Persistence/MS.Microservice.Persistence.EFCore — 9 commits
  • src/MS.Microservice.Messaging.SelfManaged.EFCore — 9 commits
  • samples/Lab — 8 commits
  • src/MS.Microservice.Infrastructure — 7 commits
  • samples/Reference — 5 commits
  • src/MS.Microservice.Messaging.Wolverine — 4 commits
  • MS.Microservice.AI/src — 3 commits
  • src/MS.Microservice.Core — 3 commits
  • test/MS.Microservice.Messaging.IntegrationTests — 3 commits
  • MS.Microservice.AI/README.md — 2 commits
  • MS.Microservice.Persistence/MS.Microservice.Persistence.SqlSugar — 2 commits
  • docs/Password-Hashing-With-IPasswordHasher.md — 2 commits
  • src/MS.Microservice.Domain.Primitives — 2 commits
  • src/MS.Microservice.Excel — 2 commits
  • src/MS.Microservice.Messaging.RabbitMQ — 2 commits
  • test/MS.Microservice.Core.Tests — 2 commits
  • .github/instructions — 1 commit
  • build/consumers — 1 commit

Notable commits

  • fix: fix(ai): enforce streaming deadlines and reject truncated completions
  • fix: fix(ai): separate provider outcomes from reporting and stream abandonment
  • fix: fix(api): standardize problem details responses
  • fix: fix(auth): correct authorization handler lifetime
  • fix: fix(auth): deny unauthorized actions by default
  • fix: fix(build): align SDK and restore the complete host graph
  • fix: fix(cache): complete cache manager operations
  • fix: fix(cache): register compatible distributed cache
  • fix: fix(container): restore and publish all project references
  • fix: fix(core): import RSA keys natively and honor modulus block boundaries
  • fix: fix(deps): restore audited dependency baseline
  • fix: fix(efcore): complete registered repositories
  • fix: fix(efcore): share UTC audit stamping across independent entity contracts
  • fix: fix(health): add provider-aligned readiness checks
  • fix: fix(hosting): load deployed settings consistently from each entry point
  • fix: fix(http): isolate request headers and preserve encoding and cancellation contracts
  • fix: fix(inbox): commit handler effects with processed receipt
  • fix: fix(lab): authorize messaging operations with an explicit permission path
  • fix: fix(lab): define explicit token issuance and compatible validation trust
  • fix: fix(messaging): distinguish busy inbox leases from committed consumption
  • …and 90 more

API surface

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

Added endpoints (15)

  • GET /api/operations/messages/failures
  • GET /api/v1/audit
  • GET /api/v1/me
  • GET /api/v1/profiles
  • GET /api/v1/profiles/{id}
  • GET /api/v1/roles
  • GET /health/live
  • GET /health/ready
  • GET /lab/messaging/audit
  • GET /lab/messaging/failures
  • PATCH /api/v1/profiles/{id}
  • POST /api/operations/messages/failures/{failureId}/replay
  • POST /api/v1/profiles
  • POST /lab/messaging/failures/{failureId}/replay
  • POST /lab/messaging/profiles

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

Survey your own repository

MarsonShine/MS.Microservice 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 7b1c78a4f3a276236c58d986b0c7303cc75c6a59 — 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.