-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add advanced experimentation packages with comprehensive testing and documentation #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…g and documentation Add 8 new packages for advanced experimentation scenarios: - ExperimentFramework.Rollout: Percentage-based and staged rollout support - ExperimentFramework.Targeting: Rule-based user targeting and segmentation - ExperimentFramework.Distributed: Shared state for multi-instance deployments - ExperimentFramework.Distributed.Redis: Redis implementation for distributed state - ExperimentFramework.Audit: Audit trail and compliance logging - ExperimentFramework.Admin: REST API endpoints for experiment management - ExperimentFramework.Bandit: Multi-armed bandit algorithms (Thompson Sampling, UCB, Epsilon-Greedy) - ExperimentFramework.AutoStop: Automatic stopping rules with statistical significance detection Also includes: - Configuration extensibility with IConfigurationSelectionModeHandler and IConfigurationDecoratorHandler - Comprehensive BDD-style tests achieving 95%+ code coverage - Full documentation integrated into docfx structure
There was a problem hiding this 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 introduces 8 new packages for advanced experimentation scenarios including rollout management, targeting, distributed state, audit logging, REST API administration, multi-armed bandit algorithms, and automatic stopping rules. The changes add comprehensive BDD-style tests achieving 95%+ code coverage and full documentation integrated into the docfx structure.
Key Changes
- Added rollout packages (ExperimentFramework.Rollout) for percentage-based and time-staged deployments
- Implemented targeting system (ExperimentFramework.Targeting) with rule-based user segmentation
- Created distributed state management with Redis backend support
- Added audit, admin API, bandit algorithms, and auto-stop functionality
- Integrated configuration extensibility through handler interfaces
- Added comprehensive test coverage using TinyBDD framework
Reviewed changes
Copilot reviewed 134 out of 139 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| ExperimentFramework.Tests.csproj | Added project references for 8 new packages and Testcontainers.Redis dependency |
| Targeting test files | Tests for rule-based targeting with context providers and configuration |
| Rollout test files | Tests for percentage-based and staged rollout with time-based progression |
| Resilience test files | Tests for circuit breaker functionality with Polly integration |
| OpenFeature test files | Tests for OpenFeature SDK integration for feature flag management |
| FeatureManagement test files | Tests for Microsoft.FeatureManagement variant flag provider |
| Distributed test files | Tests for in-memory and Redis-backed distributed state and locking |
| Data test files | Tests for outcome recording, querying, aggregation and storage |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #10 +/- ##
=======================================
Coverage ? 91.82%
=======================================
Files ? 157
Lines ? 5379
Branches ? 970
=======================================
Hits ? 4939
Misses ? 440
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add tests for: - BanditServiceCollectionExtensions (8 lines previously uncovered) - ConfigurationExtensionRegistry (7 lines previously uncovered) - ConfigurationExtensionServiceCollectionExtensions (8 lines previously uncovered) - TargetingSelectionModeHandler Apply method (4 lines previously uncovered) Improves overall patch coverage toward 95%+ target.
Add /p:BuildInParallel=false to both build commands in the CI workflow to prevent race conditions when building ExperimentFramework.Generators. The source generator's deps.json file was being accessed simultaneously by multiple build nodes, causing intermittent build failures.
- Add AddTrial<StableService> to tests that use ExperimentFrameworkBuilder.Define() since Define() calls Build() internally which requires at least one trial - Fix Apply_uses_targeting_modes_constant test to correctly compare ModeType (lowercase "targeting" for YAML) with TargetingModes.Targeting (capitalized) using case-insensitive comparison
Add tests for: - Built-in configuration handlers (timeout, custom, logging) via registry - Data package AddExperimentDataConfiguration method - CircuitBreakerDecoratorHandler edge cases (unsupported types) - OutcomeCollectionDecoratorHandler edge cases (unsupported types) These tests exercise internal handlers indirectly through the ConfigurationExtensionRegistry, covering previously untested code paths like type resolution failures and unsupported option types.
Code Coverage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 136 out of 145 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add 8 new packages for advanced experimentation scenarios:
Also includes: