#214 Replay: Implement Compensation/Saga Pattern Support
Description
Edit## Problem
No mechanism to define compensating tasks for rollback scenarios.
## Industry Standard
Temporal and Cadence support compensating tasks automatically.
## Use Case
Financial transactions requiring rollback:
```python
# Current: No way to auto-rollback
ctx.step("debit_account", debit, amount)
# If later step fails, no automatic credit_account(amount)
```
## Impact
- Banks cannot safely implement financial workflows
- Manual saga pattern implementation error-prone
- Critical for production-grade reliability
## Solution Options
1. Saga framework with compensation registry
2. Decorator-based: `@compensate(credit_account)`
3. Context-based: `ctx.step(..., compensation=fn)`
## Effort: Large (requires saga pattern framework)
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...