#364 HIGH: ForEach/While loop checkpoints not persisted to database
Description
Edit## Issue
ForEach and While loop operators save checkpoints to ctx._checkpoints_cache but do NOT call absurd_client.set_checkpoint() to persist them.
Locations:
- ForEach: engine/interpreters/operators.py:695-698
- While: engine/interpreters/operators.py:789-792
```python
# Only updates in-memory cache, not database!
ctx._checkpoints_cache[checkpoint_key] = {
'last_index': idx,
'total_items': len(items),
}
# Missing: absurd_client.set_checkpoint(...)
```
## Impact
- If worker crashes during ForEach/While loop, progress is lost
- Loop restarts from beginning instead of last completed iteration
- Violates DBOS atomic transaction principle
## Fix
Call absurd_client.set_checkpoint() after updating cache, OR implement cache-flush mechanism at transaction commit
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...