#364 HIGH: ForEach/While loop checkpoints not persisted to database

closed high Created 2025-12-11 21:39 · Updated 2025-12-12 14:48

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 All
Loading audit history...