Skip to content

Fix code gen missing non-saga handler with Separated mode#2290

Merged
jeremydmiller merged 1 commit intomainfrom
fix/2289-saga-codegen-separate-handler
Mar 12, 2026
Merged

Fix code gen missing non-saga handler with Separated mode#2290
jeremydmiller merged 1 commit intomainfrom
fix/2289-saga-codegen-separate-handler

Conversation

@jeremydmiller
Copy link
Member

Summary

  • Fixes explodeAllFiles() in HandlerGraph.GeneratesCode.cs to always yield ByEndpoint chains, not only when the parent chain has no handlers
  • When a message type has both a Saga handler and a non-saga handler with MultipleHandlerBehavior.Separated, the non-saga handler was moved to ByEndpoint but its code file was never generated because the if/else logic only yielded ByEndpoint chains when the parent had zero handlers

Test plan

  • Existing saga separated behavior test passes (using_a_saga_with_separated_behavior_mode)
  • All 1160 CoreTests pass with no regressions

Closes #2289

🤖 Generated with Claude Code

…n Separated mode

When a message type has both a Saga handler and a separate non-saga handler
with MultipleHandlerBehavior.Separated, the non-saga handler was moved to
ByEndpoint but never yielded as a code file because explodeAllFiles() used
an if/else that only yielded ByEndpoint chains when the parent had no handlers.

Closes #2289

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

For the same message type, code gen only picks up the handler in saga, but not in a separate subscriber

1 participant