Skip to content

feat(di): add typed shield provider parity - #292

Merged
thomhurst merged 2 commits into
mainfrom
issue-212-di-api
Aug 25, 2026
Merged

feat(di): add typed shield provider parity#292
thomhurst merged 2 commits into
mainfrom
issue-212-di-api

Conversation

@thomhurst

Copy link
Copy Markdown
Owner

Summary

  • add IShieldProvider<TResult> plus typed configuration and reload-aware DI registrations
  • expose typed providers through keyed DI and the registry while preserving immutable keyed snapshots
  • make StandardHttpShieldOptions.CircuitBreaker result-aware and preserve HandlesResult overrides
  • document the API symmetry and add reload, state-reset, registry, configuration, and HTTP breaker regression coverage

Motivation

The DI surface exposed configuration and reload support only for untyped shields, while standard HTTP configuration erased result predicates from its circuit breaker. This restores typed/untyped parity without resurrecting the removed VoidShield shape.

Validation

  • dotnet build Kevlar.slnx -c Release -t:Rebuild -p:Version=1.1.0-issue212 -p:CI=true
  • dotnet run --project tests/Kevlar.Tests -f net8.0 -c Release --no-build -- --timeout 5m (928 passed)
  • dotnet run --project tests/Kevlar.Tests -f net10.0 -c Release --no-build -- --timeout 5m (953 passed)
  • dotnet run --project tests/Kevlar.IntegrationTests -c Release --no-build -- --timeout 5m (150 passed)
  • pwsh scripts/Verify-Docs.ps1 (27 pages)
  • pwsh scripts/Verify-DocSnippets.ps1 -PackagesPath artifacts/packages-issue212-d396629 -Version 1.1.0-issue212 (154 snippets)
  • npm run build from docs/
  • pwsh scripts/Verify-Packages.ps1 -PackagesPath artifacts/packages-issue212-d396629 -Version 1.1.0-issue212

Closes #212

Add typed configuration and reload parity, and make the standard HTTP circuit breaker result-aware.
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a86a9749-bfd8-4eff-a251-ae3e7f84819f


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thomhurst
thomhurst merged commit c97be8a into main Aug 25, 2026
8 checks passed
@thomhurst
thomhurst deleted the issue-212-di-api branch August 25, 2026 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(di): consistent registration naming; typed IShieldProvider/AddReloadingShield; typed CircuitBreaker in StandardHttpShieldOptions

1 participant