Skip to content

Comments

Add ExperimentFramework.Simulation package with isolation and integration testing models#57

Merged
JerrettDavis merged 6 commits intomainfrom
copilot/add-experimentframework-simulation
Jan 15, 2026
Merged

Add ExperimentFramework.Simulation package with isolation and integration testing models#57
JerrettDavis merged 6 commits intomainfrom
copilot/add-experimentframework-simulation

Conversation

Copy link
Contributor

Copilot AI commented Jan 15, 2026

Description

Adds ExperimentFramework.Simulation package enabling pre-production validation of control vs experimental implementations through shadow execution with structured reporting. Supports keyed services to test different implementations side-by-side with comprehensive isolation and integration models for both output-based (read) and action-based (write) experiments.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring
  • Dependency update
  • CI/CD changes

Related Issues

(Issue linking handled automatically by the system)

Changes Made

Core Implementation

  • SimulationRunner with fluent builder API supporting control + multiple conditions
  • Keyed service support for resolving different implementations (tries keyed service first, falls back to default)
  • ISimulationComparator<T> with built-in equality and JSON structural comparators
  • SimulationReport with deterministic JSON and text output suitable for CI artifacts
  • Type-safe reporting via IScenarioResult/IImplementationResult interfaces (no reflection)

Async Support

  • Native ValueTask<T> support avoiding unnecessary Task allocations
  • Scenario<TService, TResult> accepting Func<TService, ValueTask<TResult>>

Models & Configuration

  • ShadowModeOptions with ReturnMode (Control/Selected) and FailOnDifference
  • Selected implementation logic respects ReturnMode configuration
  • Per-scenario timing, exception capture, and diff reporting

Isolation & Integration Models

  • Isolation model: Uses mock implementations for safe testing without side effects
  • Integration model: Uses real implementations for shadow writes with actual validation
  • Dependency control patterns to prevent unintended cascading down dependency trees
  • Support for both output-based (read operations) and action-based (write operations) experiments

Comprehensive Sample (samples/ExperimentFramework.SimulationSample/)

  • Scenario 1: Output-based simulation (read operations) - safe with real implementations
  • Scenario 2: Action-based isolation model (write with mocks) - no side effects
  • Scenario 3: Action-based integration model (write with shadow) - real validation
  • Scenario 4: Dependency control - preventing cascading effects
  • Fully documented with README explaining when to use each pattern

Example Usage

// Register different implementations with keyed services
services.AddKeyedScoped<IDatabase, PostgresV1Database>("postgres-v1");
services.AddKeyedScoped<IDatabase, PostgresV2Database>("postgres-v2");

var sim = SimulationRunner.Create(services)
    .For<IDatabase>()
    .WithResultType<List<Customer>>()
    .Control("postgres-v1")
    .Condition("postgres-v2")
    .WithComparator(SimulationComparators.Json<List<Customer>>())
    .ReturnControlResult();

var report = await sim.RunAsync(scenarios);
report.WriteJson("artifacts/simulation.json");
report.WriteSummary("artifacts/simulation.txt");

Testing

  • Unit tests pass locally
  • Integration tests pass locally
  • All existing tests pass
  • Added new tests for new functionality
  • Manual testing performed

Test Configuration

  • OS: Linux
  • .NET Version: 10.0, 9.0, 8.0 (multi-targeted)
  • Other details: 18 tests covering shadow execution, comparators, reporting, ValueTask support, keyed service resolution. Comprehensive sample demonstrates all patterns.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Screenshots (if applicable)

N/A

Additional Context

Architecture Decisions

  • Keyed service pattern enables testing multiple implementations without complex factory patterns
  • Interface-based result access eliminates reflection overhead in reporting pipeline
  • ValueTask preference aligns with high-throughput scenarios where allocations matter
  • JSON comparator uses System.Text.Json serialization for structural equality
  • ReturnMode configuration allows choosing between control and selected implementation results
  • Isolation and integration models provide flexibility for different testing scenarios

Code Review Feedback Addressed

  • Added keyed service support for resolving different implementations
  • Fixed selected implementation logic to respect ReturnMode setting
  • Removed duplicate AsRunnerFor method (consolidated to WithResultType)
  • Removed unused isControl parameter
  • Made _options field readonly
  • Added test validating detection of differences between keyed implementations

Isolation & Integration Support

  • Comprehensive sample demonstrating output-based vs action-based experiments
  • Isolation model using mocks for safe testing without side effects or cascading
  • Integration model using real implementations for shadow writes and validation
  • Documentation includes decision matrix for choosing the right approach
  • Safety checklist for shadow writes to production environments
  • Dependency control patterns to prevent unintended cascading

Documentation

  • Complete guide at docs/simulation-and-shadow-mode.md
  • Keyed service registration pattern examples
  • Isolation vs integration models section with best practices
  • Dependency cascading prevention patterns
  • CI integration patterns and custom comparator examples
  • Comprehensive working sample at samples/ExperimentFramework.SimulationSample/
Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature] Add ExperimentFramework.Simulation package for shadow-mode execution and report generation</issue_title>
<issue_description>### Problem

ExperimentFramework routes real traffic to a selected implementation. Teams want confidence in a new implementation’s correctness and performance before ramping selection.

Today, verifying parity requires:

  • duplicating calls manually (control + variant)
  • bespoke diff logic
  • ad-hoc report formats

Goals

  • Provide a “simulation runner” that can evaluate control + one or more conditions for the same inputs.

  • Support shadow mode:

    • execute both paths
    • optionally return control result
    • record diffs + performance + exceptions
  • Generate deterministic, structured simulation reports suitable for CI artifacts.

Non-goals

  • Not a load-testing tool.
  • Not a replacement for production observability.

Proposed Capabilities

A) Shadow execution

  • ShadowMode options:

    • Return control result
    • Return selected result
    • “Fail if diff” mode

B) Comparators

  • Built-in comparators:

    • equality comparator
    • JSON structural comparator (for DTOs)
    • custom comparator via ISimulationComparator

C) Side-effect safety

  • Provide opt-in guardrails:

    • “dry run” hints (if service supports it)
    • warning-only mode

D) Playback

  • Inputs can be provided via:

    • in-memory scenarios (C#)
    • serialized JSON scenario files
    • (future) trace replay

E) Reporting

  • Produce SimulationReport:

    • per-scenario results
    • selected routes
    • durations
    • exception summaries
    • diff summaries
    • overall pass/fail

Support output:

  • JSON report file
  • text summary file

Acceptance Criteria

  • Given a trial with control + conditions, the simulator can run all implementations against the same scenario.
  • Simulator can run async pipelines and stream/ValueTask APIs without forcing Task allocations.
  • Reports include per-implementation timing and diff results.
  • Can run in CI and emit artifacts deterministically.
  • Documentation: “Simulation & Shadow Mode” with examples.

Example

var sim = SimulationRunner.Create(host.Services)
    .For<IMyDatabase>()
    .Control()
    .Condition("true")
    .WithComparator(SimulationComparators.Json())
    .ReturnControlResult();

var report = await sim.RunAsync(new[]
{
    new Scenario("Ping", async db => await db.PingAsync()),
    new Scenario("GetCustomers", async db => await db.GetCustomersAsync())
});

report.WriteJson("artifacts/sim.json");
report.WriteSummary("artifacts/sim.txt");

</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits January 15, 2026 04:00
Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
Copilot AI changed the title [WIP] Add ExperimentFramework.Simulation package for shadow-mode execution Add ExperimentFramework.Simulation package for shadow-mode execution and simulation reporting Jan 15, 2026
Copilot AI requested a review from JerrettDavis January 15, 2026 04:10
@JerrettDavis JerrettDavis requested a review from Copilot January 15, 2026 04:45
@JerrettDavis JerrettDavis marked this pull request as ready for review January 15, 2026 04:49
@github-actions github-actions bot added documentation Improvements or additions to documentation area: tests dependencies labels Jan 15, 2026
@github-actions
Copy link

github-actions bot commented Jan 15, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

Scorecard details
PackageVersionScoreDetails
nuget/Microsoft.Extensions.DependencyInjection 10.0.1 UnknownUnknown
nuget/Microsoft.Extensions.Logging.Console 10.0.1 UnknownUnknown
nuget/Microsoft.Extensions.DependencyInjection.Abstractions 🟢 6.9
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 18 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Code-Review🟢 10all changesets reviewed
Packaging⚠️ -1packaging workflow not detected
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
License🟢 10license file detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Branch-Protection🟢 5branch protection is not maximal on development and all release branches
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
Pinned-Dependencies🟢 9dependency not pinned by hash detected -- score normalized to 9
Vulnerabilities🟢 91 existing vulnerabilities detected
nuget/System.Text.Json 10.0.1 UnknownUnknown
nuget/Microsoft.Extensions.Configuration.Json 10.0.1 UnknownUnknown
nuget/Microsoft.Extensions.DependencyInjection 10.0.1 UnknownUnknown
nuget/Microsoft.FeatureManagement 4.4.0 🟢 7.4
Details
CheckScoreReason
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Code-Review🟢 10all changesets reviewed
Maintained🟢 104 commit(s) and 9 issue activity found in the last 90 days -- score normalized to 10
Packaging⚠️ -1packaging workflow not detected
Token-Permissions🟢 8detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy🟢 10security policy file detected
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Binary-Artifacts🟢 10no binaries found in the repo
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 2branch protection is not maximal on development and all release branches
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Vulnerabilities🟢 100 existing vulnerabilities detected
SAST🟢 9SAST tool detected but not run on all commits
nuget/Microsoft.NET.Test.Sdk 17.14.1 🟢 5
Details
CheckScoreReason
Code-Review🟢 6Found 12/18 approved changesets -- score normalized to 6
Maintained🟢 1025 commit(s) and 21 issue activity found in the last 90 days -- score normalized to 10
Packaging⚠️ -1packaging workflow not detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
Binary-Artifacts⚠️ 0binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities🟢 91 existing vulnerabilities detected
nuget/coverlet.collector 6.0.4 🟢 5.6
Details
CheckScoreReason
Code-Review⚠️ 2Found 7/30 approved changesets -- score normalized to 2
Maintained🟢 1023 commit(s) and 17 issue activity found in the last 90 days -- score normalized to 10
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions🟢 9detected GitHub workflow tokens with excessive permissions
Binary-Artifacts🟢 7binaries present in source code
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ 0Project has not signed or included provenance with any releases.
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Security-Policy⚠️ 0security policy file not detected
Vulnerabilities🟢 100 existing vulnerabilities detected
SAST🟢 8SAST tool detected but not run on all commits
nuget/xunit 2.9.3 🟢 4.9
Details
CheckScoreReason
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Maintained🟢 1030 commit(s) and 27 issue activity found in the last 90 days -- score normalized to 10
Code-Review⚠️ 1Found 3/30 approved changesets -- score normalized to 1
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 9license file detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Packaging⚠️ -1packaging workflow not detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
Security-Policy⚠️ 0security policy file not detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Vulnerabilities🟢 100 existing vulnerabilities detected
nuget/xunit.runner.visualstudio 3.1.5 UnknownUnknown

Scanned Files

  • samples/ExperimentFramework.SimulationSample/ExperimentFramework.SimulationSample.csproj
  • src/ExperimentFramework.Simulation/ExperimentFramework.Simulation.csproj
  • tests/ExperimentFramework.Simulation.Tests/ExperimentFramework.Simulation.Tests.csproj

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds the ExperimentFramework.Simulation package to enable shadow-mode execution for validating control vs experimental implementations through side-by-side comparison with structured reporting. The implementation provides a fluent builder API, built-in comparators for result validation, async/ValueTask support, and deterministic JSON/text report generation suitable for CI artifacts.

Changes:

  • New simulation package with fluent builder API supporting control and multiple condition configurations
  • Built-in equality and JSON structural comparators with extensible custom comparator interface
  • Deterministic JSON and text report generation with per-scenario timing and diff analysis

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/ExperimentFramework.Simulation/ExperimentFramework.Simulation.csproj Multi-targeted project file (net8.0, net9.0, net10.0) with System.Text.Json dependency
src/ExperimentFramework.Simulation/Builders/SimulationRunnerBuilder.cs Entry point and builder classes for creating simulation runners
src/ExperimentFramework.Simulation/Builders/SimulationRunner.cs Core simulation execution logic with scenario orchestration and result comparison
src/ExperimentFramework.Simulation/Comparators/*.cs Equality and JSON comparators with factory methods
src/ExperimentFramework.Simulation/Models/*.cs Data models for scenarios, results, and configuration options
src/ExperimentFramework.Simulation/Reporting/SimulationReportExtensions.cs JSON and text report generation extension methods
src/ExperimentFramework.Simulation/ServiceCollectionExtensions.cs DI registration extension for future extensibility
tests/ExperimentFramework.Simulation.Tests/*.cs Test suite covering runners, comparators, and reporting
docs/simulation-and-shadow-mode.md Comprehensive documentation with usage examples and best practices
ExperimentFramework.slnx Solution file updated to include new projects

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 91.41104% with 14 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@39d101a). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...tFramework.Simulation/Builders/SimulationRunner.cs 74.07% 7 Missing ⚠️
...Framework.Simulation/Comparators/JsonComparator.cs 88.46% 3 Missing ⚠️
...Simulation/Reporting/SimulationReportExtensions.cs 95.08% 3 Missing ⚠️
...ramework.Simulation/ServiceCollectionExtensions.cs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #57   +/-   ##
=======================================
  Coverage        ?   83.42%           
=======================================
  Files           ?      194           
  Lines           ?     7023           
  Branches        ?      993           
=======================================
  Hits            ?     5859           
  Misses          ?     1164           
  Partials        ?        0           
Flag Coverage Δ
unittests 83.42% <91.41%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JerrettDavis
Copy link
Owner

@copilot apply changes based on the comments in this thread

@JerrettDavis
Copy link
Owner

@copilot Retry

…icate method, add test

Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 15, 2026

@copilot Retry

Applied all code review feedback in commit 2dcd1c5:

  • Added keyed service support for resolving different implementations
  • Fixed selected implementation logic to respect ReturnMode configuration
  • Removed duplicate AsRunnerFor method
  • Removed unused isControl parameter
  • Made _options field readonly
  • Added test for different implementations using keyed services
  • Updated documentation with service registration pattern example

All 18 tests passing.

@JerrettDavis
Copy link
Owner

@copilot we need support and demos to demonstrate how simulations work with both action-based and output-based experiments. For example, if someone has multiple database implementation and we're conducting experiments, we may want to simulate writing to the database or we may want to actually shadow write to the database. We need to ensure we demonstrate comprehensive isolation and integration models to allow users to run simulations on real and simulated dependencies (e.g. we don't want to cascade down a dependency tree and write to a real database if that isn't actually desired).

Review the current implementation and ensure our simulation and shadow packages enable robust workflows that account for various different scenarios.

…s integration models

Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 15, 2026

@copilot we need support and demos to demonstrate how simulations work with both action-based and output-based experiments. For example, if someone has multiple database implementation and we're condu...

Added comprehensive simulation sample and enhanced documentation in commit 766aabe.

New Sample: ExperimentFramework.SimulationSample

Demonstrates 4 key scenarios:

  1. Output-based (reads) - Safe with real implementations
  2. Action-based Isolation (writes with mocks) - No side effects, prevents cascading
  3. Action-based Integration (writes with shadow) - Real validation with cleanup considerations
  4. Dependency Control - Isolating dependencies to prevent unintended cascading

Documentation Updates:

  • Isolation vs Integration models section with decision matrix
  • Dependency cascading prevention patterns
  • When to use mocks vs real implementations
  • Safety checklist for shadow writes

Run the sample: cd samples/ExperimentFramework.SimulationSample && dotnet run

The sample explicitly shows how to test write operations safely without cascading down dependency trees by using mock implementations for dependencies while testing the target service.

Copilot AI changed the title Add ExperimentFramework.Simulation package for shadow-mode execution and simulation reporting Add ExperimentFramework.Simulation package with isolation and integration testing models Jan 15, 2026
Copilot AI requested a review from JerrettDavis January 15, 2026 19:28
@github-actions
Copy link

Code Coverage

Summary
  Generated on: 01/15/2026 - 20:32:59
  Coverage date: 01/15/2026 - 20:31:17 - 01/15/2026 - 20:32:26
  Parser: MultiReport (3x Cobertura)
  Assemblies: 20
  Classes: 228
  Files: 195
  Line coverage: 80.5%
  Covered lines: 5685
  Uncovered lines: 1376
  Coverable lines: 7061
  Total lines: 26854
  Branch coverage: 71.9% (2246 of 3122)
  Covered branches: 2246
  Total branches: 3122
  Method coverage: 88.3% (909 of 1029)
  Full method coverage: 76.7% (790 of 1029)
  Covered methods: 909
  Fully covered methods: 790
  Total methods: 1029

ExperimentFramework                                                                                  90.4%
  ExperimentFramework.Activation.ActivationEvaluator                                                 93.1%
  ExperimentFramework.Activation.SystemTimeProvider                                                   100%
  ExperimentFramework.Decorators.BenchmarkDecoratorFactory                                            100%
  ExperimentFramework.Decorators.DecoratorPipeline                                                    100%
  ExperimentFramework.Decorators.ErrorLoggingDecoratorFactory                                         100%
  ExperimentFramework.Decorators.TimeoutDecoratorFactory                                              100%
  ExperimentFramework.ExperimentBuilder                                                              81.1%
  ExperimentFramework.ExperimentBuilderExtensions                                                     100%
  ExperimentFramework.ExperimentFrameworkBuilder                                                      100%
  ExperimentFramework.ExperimentLoggingBuilder                                                        100%
  ExperimentFramework.ExperimentRegistry                                                              100%
  ExperimentFramework.KillSwitch.ExperimentDisabledException                                          100%
  ExperimentFramework.KillSwitch.InMemoryKillSwitchProvider                                           100%
  ExperimentFramework.KillSwitch.KillSwitchDecoratorFactory                                           100%
  ExperimentFramework.KillSwitch.NoopKillSwitchProvider                                               100%
  ExperimentFramework.KillSwitch.TrialDisabledException                                               100%
  ExperimentFramework.Metrics.MetricsDecoratorFactory                                                 100%
  ExperimentFramework.Metrics.NoopExperimentMetrics                                                   100%
  ExperimentFramework.Models.BehaviorRule                                                             100%
  ExperimentFramework.Models.Experiment                                                               100%
  ExperimentFramework.Models.ExperimentRegistration                                                    75%
  ExperimentFramework.Models.SelectionModeExtensions                                                  100%
  ExperimentFramework.Models.SelectionRule                                                            100%
  ExperimentFramework.Models.ServiceExperimentDefinition<T>                                           100%
  ExperimentFramework.Models.Trial                                                                    100%
  ExperimentFramework.Naming.DefaultExperimentNamingConvention                                        100%
  ExperimentFramework.Naming.ExperimentSelectorName                                                   100%
  ExperimentFramework.RuntimeExperimentProxy<T>                                                      81.8%
  ExperimentFramework.Selection.Providers.BooleanFeatureFlagProvider                                  100%
  ExperimentFramework.Selection.Providers.BooleanFeatureFlagProviderFactory                           100%
  ExperimentFramework.Selection.Providers.ConfigurationValueProvider                                   80%
  ExperimentFramework.Selection.Providers.ConfigurationValueProviderFactory                           100%
  ExperimentFramework.Selection.SelectionModeAttribute                                                100%
  ExperimentFramework.Selection.SelectionModeProviderBase                                             100%
  ExperimentFramework.Selection.SelectionModeProviderFactory<T>                                       100%
  ExperimentFramework.Selection.SelectionModeRegistry                                                 100%
  ExperimentFramework.ServiceCollectionExtensions                                                    77.6%
  ExperimentFramework.ServiceExperimentBuilder<T>                                                    94.5%
  ExperimentFramework.ServiceRegistration.OperationMetadata                                           100%
  ExperimentFramework.ServiceRegistration.OperationResult                                             100%
  ExperimentFramework.ServiceRegistration.PlanExecutionResult                                        83.3%
  ExperimentFramework.ServiceRegistration.RegistrationPlan                                            100%
  ExperimentFramework.ServiceRegistration.RegistrationPlanBuilder                                    97.2%
  ExperimentFramework.ServiceRegistration.RegistrationPlanExecutor                                   62.7%
  ExperimentFramework.ServiceRegistration.RegistrationPlanReport                                     98.1%
  ExperimentFramework.ServiceRegistration.ServiceGraphPatchOperation                                   77%
  ExperimentFramework.ServiceRegistration.ServiceGraphSnapshot                                        100%
  ExperimentFramework.ServiceRegistration.ValidationFinding                                           100%
  ExperimentFramework.ServiceRegistration.Validators.LifetimeSafetyValidator                          100%
  ExperimentFramework.Telemetry.NoopExperimentTelemetry                                               100%
  ExperimentFramework.Telemetry.OpenTelemetryExperimentTelemetry                                      100%
  ExperimentFramework.Validation.TrialConflictDetector                                               98.7%
  ExperimentFramework.Validation.TrialConflictException                                               100%
  ExperimentFramework.Variants.VariantFeatureManagerAdapter                                           100%

ExperimentFramework.Admin                                                                            33.4%
  ExperimentFramework.Admin.ExperimentAdminEndpoints                                                  100%
  ExperimentFramework.Admin.GovernanceAdminEndpoints                                                    0%

ExperimentFramework.Audit                                                                               0%
  ExperimentFramework.Audit.CompositeAuditSink                                                          0%
  ExperimentFramework.Audit.LoggingAuditSink                                                            0%
  ExperimentFramework.Audit.ServiceCollectionExtensions                                                 0%

ExperimentFramework.AutoStop                                                                          100%
  ExperimentFramework.AutoStop.AutoStopOptions                                                        100%
  ExperimentFramework.AutoStop.Rules.MinimumSampleSizeRule                                            100%
  ExperimentFramework.AutoStop.Rules.StatisticalSignificanceRule                                      100%
  ExperimentFramework.AutoStop.ServiceCollectionExtensions                                            100%
  ExperimentFramework.AutoStop.VariantData                                                            100%

ExperimentFramework.Bandit                                                                           98.8%
  ExperimentFramework.Bandit.Algorithms.EpsilonGreedy                                                 100%
  ExperimentFramework.Bandit.Algorithms.ThompsonSampling                                             97.3%
  ExperimentFramework.Bandit.Algorithms.UpperConfidenceBound                                          100%
  ExperimentFramework.Bandit.ArmStatistics                                                            100%
  ExperimentFramework.Bandit.ServiceCollectionExtensions                                              100%

ExperimentFramework.Configuration                                                                    68.6%
  ExperimentFramework.Configuration.Building.ConfigurationExperimentBuilder                          85.3%
  ExperimentFramework.Configuration.Building.TypeResolver                                              69%
  ExperimentFramework.Configuration.ConfigurationFileWatcher                                         90.1%
  ExperimentFramework.Configuration.Exceptions.ConfigurationLoadException                             100%
  ExperimentFramework.Configuration.Exceptions.ExperimentConfigurationException                       100%
  ExperimentFramework.Configuration.Exceptions.TypeResolutionException                                100%
  ExperimentFramework.Configuration.Extensions.ConfigurationExtensionRegistry                        79.1%
  ExperimentFramework.Configuration.Extensions.ConfigurationExtensionServiceCollectionExtensions     92.8%
  ExperimentFramework.Configuration.Extensions.Handlers.ConfigurationKeySelectionModeHandler          100%
  ExperimentFramework.Configuration.Extensions.Handlers.CustomDecoratorHandler                       93.7%
  ExperimentFramework.Configuration.Extensions.Handlers.CustomSelectionModeHandler                   66.6%
  ExperimentFramework.Configuration.Extensions.Handlers.FeatureFlagSelectionModeHandler               100%
  ExperimentFramework.Configuration.Extensions.Handlers.GovernanceConfigurationHandler                 44%
  ExperimentFramework.Configuration.Extensions.Handlers.InMemoryBackplaneConfigurationHandler        11.1%
  ExperimentFramework.Configuration.Extensions.Handlers.LoggingBackplaneConfigurationHandler         11.1%
  ExperimentFramework.Configuration.Extensions.Handlers.LoggingDecoratorHandler                      91.6%
  ExperimentFramework.Configuration.Extensions.Handlers.OpenTelemetryBackplaneConfigurationHandler   11.1%
  ExperimentFramework.Configuration.Extensions.Handlers.TimeoutDecoratorHandler                       100%
  ExperimentFramework.Configuration.Loading.ConfigurationFileDiscovery                                100%
  ExperimentFramework.Configuration.Loading.ExperimentConfigurationLoader                            84.6%
  ExperimentFramework.Configuration.Models.CircuitBreakerDecoratorOptions                             100%
  ExperimentFramework.Configuration.Models.OutcomeCollectionDecoratorOptions                          100%
  ExperimentFramework.Configuration.Models.TimeoutDecoratorOptions                                    100%
  ExperimentFramework.Configuration.Schema.Generated.ConfigurationSchema                                0%
  ExperimentFramework.Configuration.Schema.Generated.SchemaRegistry                                     0%
  ExperimentFramework.Configuration.Schema.SchemaExporter                                               0%
  ExperimentFramework.Configuration.Schema.SchemaHasher                                               100%
  ExperimentFramework.Configuration.Schema.SchemaVersionTracker                                      94.5%
  ExperimentFramework.Configuration.ServiceCollectionExtensions                                      48.2%
  ExperimentFramework.Configuration.Validation.ConfigurationValidationError                           100%
  ExperimentFramework.Configuration.Validation.ConfigurationValidationResult                          100%
  ExperimentFramework.Configuration.Validation.ConfigurationValidator                                69.5%

ExperimentFramework.Data                                                                             98.1%
  ExperimentFramework.Data.Configuration.OutcomeCollectionDecoratorHandler                            100%
  ExperimentFramework.Data.Decorators.OutcomeCollectionDecoratorFactory                               100%
  ExperimentFramework.Data.ExperimentBuilderExtensions                                                100%
  ExperimentFramework.Data.Models.ExperimentOutcome                                                   100%
  ExperimentFramework.Data.Models.OutcomeAggregation                                                  100%
  ExperimentFramework.Data.Models.OutcomeQuery                                                        100%
  ExperimentFramework.Data.Recording.OutcomeRecorder                                                  100%
  ExperimentFramework.Data.Recording.OutcomeRecorderOptions                                           100%
  ExperimentFramework.Data.ServiceCollectionExtensions                                                100%
  ExperimentFramework.Data.Storage.InMemoryOutcomeStore                                              93.6%
  ExperimentFramework.Data.Storage.NoopOutcomeStore                                                   100%

ExperimentFramework.Distributed                                                                      94.6%
  ExperimentFramework.Distributed.InMemoryDistributedLockProvider                                    92.5%
  ExperimentFramework.Distributed.InMemoryDistributedState                                           95.4%
  ExperimentFramework.Distributed.ServiceCollectionExtensions                                         100%

ExperimentFramework.Distributed.Redis                                                                 100%
  ExperimentFramework.Distributed.Redis.RedisDistributedLockProvider                                  100%
  ExperimentFramework.Distributed.Redis.RedisDistributedState                                         100%
  ExperimentFramework.Distributed.Redis.ServiceCollectionExtensions                                   100%

ExperimentFramework.FeatureManagement                                                                  80%
  ExperimentFramework.FeatureManagement.ExperimentBuilderExtensions                                    50%
  ExperimentFramework.FeatureManagement.ServiceCollectionExtensions                                   100%
  ExperimentFramework.FeatureManagement.VariantFeatureFlagProvider                                    100%

ExperimentFramework.Governance                                                                       33.4%
  ExperimentFramework.Governance.Approval.AutomaticApprovalGate                                         0%
  ExperimentFramework.Governance.Approval.ManualApprovalGate                                            0%
  ExperimentFramework.Governance.Approval.RoleBasedApprovalGate                                        23%
  ExperimentFramework.Governance.ApprovalManager                                                     11.1%
  ExperimentFramework.Governance.ApprovalResult                                                         0%
  ExperimentFramework.Governance.GovernanceBuilder                                                   65.9%
  ExperimentFramework.Governance.GovernanceConfiguration                                                0%
  ExperimentFramework.Governance.LifecycleManager                                                    79.1%
  ExperimentFramework.Governance.Policy.ConflictPreventionPolicy                                        0%
  ExperimentFramework.Governance.Policy.ErrorRatePolicy                                              11.7%
  ExperimentFramework.Governance.Policy.PolicyEvaluator                                              30.7%
  ExperimentFramework.Governance.Policy.TimeWindowPolicy                                                0%
  ExperimentFramework.Governance.Policy.TrafficLimitPolicy                                           10.8%
  ExperimentFramework.Governance.ServiceCollectionExtensions                                          100%
  ExperimentFramework.Governance.Versioning.VersionManager                                              0%

ExperimentFramework.Metrics.Exporters                                                                99.3%
  ExperimentFramework.Metrics.Exporters.OpenTelemetryExperimentMetrics                                100%
  ExperimentFramework.Metrics.Exporters.PrometheusExperimentMetrics                                  99.2%

ExperimentFramework.OpenFeature                                                                        80%
  ExperimentFramework.OpenFeature.ExperimentBuilderExtensions                                          50%
  ExperimentFramework.OpenFeature.OpenFeatureProvider                                                 100%
  ExperimentFramework.OpenFeature.ServiceCollectionExtensions                                         100%

ExperimentFramework.Plugins                                                                            87%
  ExperimentFramework.Plugins.Abstractions.PluginEventArgs                                            100%
  ExperimentFramework.Plugins.Abstractions.PluginLoadFailedEventArgs                                  100%
  ExperimentFramework.Plugins.Configuration.PluginConfigurationValidator                              100%
  ExperimentFramework.Plugins.Configuration.PluginDiscoveryService                                    100%
  ExperimentFramework.Plugins.Configuration.PluginsConfig                                             100%
  ExperimentFramework.Plugins.HotReload.PluginReloadEventArgs                                         100%
  ExperimentFramework.Plugins.HotReload.PluginReloadFailedEventArgs                                   100%
  ExperimentFramework.Plugins.HotReload.PluginReloadService                                           100%
  ExperimentFramework.Plugins.HotReload.PluginWatcher                                                87.8%
  ExperimentFramework.Plugins.Integration.PluginBuilderExtensions                                     100%
  ExperimentFramework.Plugins.Integration.PluginManager                                              83.3%
  ExperimentFramework.Plugins.Integration.PluginTypeResolver                                          100%
  ExperimentFramework.Plugins.Loading.PluginContext                                                  55.4%
  ExperimentFramework.Plugins.Loading.PluginLoadContext                                                72%
  ExperimentFramework.Plugins.Loading.PluginLoader                                                   91.9%
  ExperimentFramework.Plugins.Loading.SharedTypeRegistry                                             89.1%
  ExperimentFramework.Plugins.Manifest.ManifestLoader                                                  92%
  ExperimentFramework.Plugins.Manifest.ManifestValidationResult                                        50%
  ExperimentFramework.Plugins.Manifest.ManifestValidator                                             97.7%
  ExperimentFramework.Plugins.Manifest.PluginManifest                                                 100%
  ExperimentFramework.Plugins.Manifest.PluginManifestAttribute                                        100%
  ExperimentFramework.Plugins.Manifest.PluginManifestJson                                             100%
  ExperimentFramework.Plugins.Security.PluginSecurityValidator                                         73%
  ExperimentFramework.Plugins.ServiceCollectionDecoratorExtensions                                   70.5%
  ExperimentFramework.Plugins.ServiceCollectionExtensions                                             100%

ExperimentFramework.Resilience                                                                         99%
  ExperimentFramework.Resilience.CircuitBreakerDecoratorFactory                                       100%
  ExperimentFramework.Resilience.CircuitBreakerOpenException                                          100%
  ExperimentFramework.Resilience.CircuitBreakerOptions                                                100%
  ExperimentFramework.Resilience.Configuration.CircuitBreakerDecoratorHandler                         100%
  ExperimentFramework.Resilience.ResilienceBuilderExtensions                                          100%
  ExperimentFramework.Resilience.ResilienceServiceCollectionExtensions                               85.7%

ExperimentFramework.Rollout                                                                          98.7%
  ExperimentFramework.Rollout.Configuration.RolloutSelectionModeHandler                               100%
  ExperimentFramework.Rollout.Configuration.StagedRolloutSelectionModeHandler                        97.9%
  ExperimentFramework.Rollout.ExperimentBuilderExtensions                                             100%
  ExperimentFramework.Rollout.RolloutAllocator                                                         95%
  ExperimentFramework.Rollout.RolloutProvider                                                         100%
  ExperimentFramework.Rollout.ServiceCollectionExtensions                                             100%
  ExperimentFramework.Rollout.StagedRolloutOptions                                                    100%
  ExperimentFramework.Rollout.StagedRolloutProvider                                                   100%

ExperimentFramework.Science                                                                          88.8%
  ExperimentFramework.Science.Analysis.ExperimentAnalyzer                                            88.3%
  ExperimentFramework.Science.Builders.EndpointBuilder                                                100%
  ExperimentFramework.Science.Builders.HypothesisBuilder                                              100%
  ExperimentFramework.Science.Builders.SuccessCriteriaBuilder                                         100%
  ExperimentFramework.Science.Corrections.BenjaminiHochbergCorrection                                 100%
  ExperimentFramework.Science.Corrections.BonferroniCorrection                                        100%
  ExperimentFramework.Science.Corrections.HolmBonferroniCorrection                                    100%
  ExperimentFramework.Science.EffectSize.CohensD                                                      100%
  ExperimentFramework.Science.EffectSize.EffectSizeExtensions                                         100%
  ExperimentFramework.Science.EffectSize.OddsRatio                                                    100%
  ExperimentFramework.Science.EffectSize.RelativeRisk                                                 100%
  ExperimentFramework.Science.Models.Hypothesis.Endpoint                                                0%
  ExperimentFramework.Science.Models.Hypothesis.HypothesisDefinition                                    0%
  ExperimentFramework.Science.Models.Results.StatisticalTestResult                                   66.6%
  ExperimentFramework.Science.Models.Snapshots.EnvironmentInfo                                          0%
  ExperimentFramework.Science.Power.PowerAnalyzer                                                    78.7%
  ExperimentFramework.Science.Reporting.JsonReporter                                                 88.8%
  ExperimentFramework.Science.Reporting.MarkdownReporter                                             72.8%
  ExperimentFramework.Science.ServiceCollectionExtensions                                             100%
  ExperimentFramework.Science.Snapshots.InMemorySnapshotStore                                        90.1%
  ExperimentFramework.Science.Statistics.ChiSquareTest                                               79.1%
  ExperimentFramework.Science.Statistics.MannWhitneyUTest                                            97.3%
  ExperimentFramework.Science.Statistics.OneWayAnova                                                 98.4%
  ExperimentFramework.Science.Statistics.PairedTTest                                                 81.5%
  ExperimentFramework.Science.Statistics.TwoSampleTTest                                              88.4%

ExperimentFramework.Simulation                                                                       89.5%
  ExperimentFramework.Simulation.Builders.SimulationRunner                                            100%
  ExperimentFramework.Simulation.Builders.SimulationRunner<T1, T2>                                     74%
  ExperimentFramework.Simulation.Builders.SimulationRunnerBuilder                                     100%
  ExperimentFramework.Simulation.Builders.SimulationServiceBuilder<T>                                 100%
  ExperimentFramework.Simulation.Comparators.EqualityComparator<T>                                    100%
  ExperimentFramework.Simulation.Comparators.JsonComparator<T>                                       88.4%
  ExperimentFramework.Simulation.Comparators.SimulationComparators                                    100%
  ExperimentFramework.Simulation.Models.ImplementationResult<T>                                      85.7%
  ExperimentFramework.Simulation.Models.Scenario<T1, T2>                                              100%
  ExperimentFramework.Simulation.Models.ScenarioResult<T>                                             100%
  ExperimentFramework.Simulation.Models.SimulationReport                                              100%
  ExperimentFramework.Simulation.Reporting.SimulationReportExtensions                                93.4%
  ExperimentFramework.Simulation.ServiceCollectionExtensions                                            0%

ExperimentFramework.StickyRouting                                                                    92.5%
  ExperimentFramework.StickyRouting.ExperimentBuilderExtensions                                       100%
  ExperimentFramework.StickyRouting.ServiceCollectionExtensions                                       100%
  ExperimentFramework.StickyRouting.StickyRoutingProvider                                            86.6%
  ExperimentFramework.StickyRouting.StickyTrialRouter                                                 100%

ExperimentFramework.Targeting                                                                         100%
  ExperimentFramework.Targeting.Configuration.TargetingSelectionModeHandler                           100%
  ExperimentFramework.Targeting.InMemoryTargetingConfiguration                                        100%
  ExperimentFramework.Targeting.ServiceCollectionExtensions                                           100%
  ExperimentFramework.Targeting.SimpleTargetingContext                                                100%
  ExperimentFramework.Targeting.TargetingProvider                                                     100%
  ExperimentFramework.Targeting.TargetingRules                                                        100%

@JerrettDavis JerrettDavis merged commit 94c110f into main Jan 15, 2026
6 checks passed
@JerrettDavis JerrettDavis deleted the copilot/add-experimentframework-simulation branch January 15, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: samples area: tests dependencies documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add ExperimentFramework.Simulation package for shadow-mode execution and report generation

3 participants