Skip to content

feat(strategy): expose handling clauses - #173

Merged
thomhurst merged 2 commits into
mainfrom
issue-165-handling-clause
Aug 23, 2026
Merged

feat(strategy): expose handling clauses#173
thomhurst merged 2 commits into
mainfrom
issue-165-handling-clause

Conversation

@thomhurst

Copy link
Copy Markdown
Owner

Summary

  • expose HandlingClause as a readonly wrapper over Kevlar's existing OutcomeJudge, including shared default semantics
  • add clause-aware Use factories on static, untyped, typed, and builder surfaces
  • let custom reactive strategies declare Strategy.Handling for chain validation and Kevlar.Testing descriptors
  • document handling guidance for custom strategies and library authors

Declaration hook decision

Implemented the public protected Strategy.Handling hook in this PR. It maps directly to the existing internal judge, catches unreachable fallback chains, and surfaces as CustomStrategyDescriptor.Handling without exposing predicates.

Test plan

  • dotnet build Kevlar.slnx -c Release
  • dotnet run --project tests/Kevlar.Tests -c Release --no-build -- --timeout 5m
  • dotnet run --project tests/Kevlar.Testing.Tests -c Release --no-build -- --timeout 5m
  • dotnet run --project tests/Kevlar.IntegrationTests -c Release --no-build -- --timeout 5m
  • dotnet run --project tests/Kevlar.Analyzers.Tests -c Release --no-build -- --timeout 5m
  • npm run build --prefix docs

Closes #165

@coderabbitai

coderabbitai Bot commented Aug 23, 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: e208cb19-2622-4f92-aec7-58fc944b5f10


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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b7c4c2bc88

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/Kevlar/HandlingClause.cs
@thomhurst
thomhurst merged commit d6f1a37 into main Aug 23, 2026
6 checks passed
@thomhurst
thomhurst deleted the issue-165-handling-clause branch August 23, 2026 14:07
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.

feat(strategy): let custom strategies consume the handling clause

1 participant