Skip to content

Comments

Fix completed saga from static Start still being persisted#2147

Merged
jeremydmiller merged 2 commits intomainfrom
GH2073
Feb 9, 2026
Merged

Fix completed saga from static Start still being persisted#2147
jeremydmiller merged 2 commits intomainfrom
GH2073

Conversation

@jeremydmiller
Copy link
Member

Summary

  • Fixes Completed saga returned from static Start is persisted regardless of completed state #2073: When a saga's static Start method returns a saga that calls MarkCompleted(), the saga was still persisted to storage
  • Root cause: generateForOnlyStartingSaga() emitted unconditional insert frames (from SagaPersistenceChainPolicy) for the saga variable before the ConditionalSagaInsertFrame which has the IsCompleted() guard
  • Fix: Skip saga-type variables when emitting ReturnAction frames in both generateForOnlyStartingSaga() and DetermineSagaDoesNotExistSteps(), letting only ConditionalSagaInsertFrame handle saga persistence

Test plan

  • Added reproduction test Bug_2073_completed_saga_still_persisted with two cases: completed saga not persisted, non-completed saga persisted
  • All 1001 CoreTests pass (including existing saga tests like Bug_2056)

🤖 Generated with Claude Code

jeremydmiller and others added 2 commits February 9, 2026 06:08
…-2073

Skip saga variable when emitting ReturnAction frames in generateForOnlyStartingSaga
and DetermineSagaDoesNotExistSteps so that only ConditionalSagaInsertFrame handles
saga persistence, respecting the IsCompleted() guard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix ancillary store codegen variable name mismatch by removing OverrideName
  call in AncillaryOutboxFactoryFrame that diverged constructor param from body
- Fix ThrowRequiredDataMissingExceptionFrame not replacing {Id} placeholder in
  default missing entity message
- Add UseDeveloperExceptionPage to test setups so ThrowException and service
  location exceptions are caught as 500 responses

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.

Completed saga returned from static Start is persisted regardless of completed state

1 participant