Pipeline scheduler: recover stale InProgress tasks after migration

t-663·WorkTask·
·
·
·Omni/Pipeline.hs
Created2 months ago·Updated2 months ago·pipeline runs →

Dependencies

Description

Edit

Problem

After moving from the old dev/verify/integrate loop to the scheduler, stale InProgress tasks from the legacy pipeline can remain stranded indefinitely.

Observed example:

  • t-647 is still InProgress with an old pipeline verification-failure comment
  • scheduler only consumes task ready + Open candidates, so these tasks are never re-queued automatically

Impact

  • Work can be permanently stuck without manual intervention
  • Queue health degrades over time as legacy state accumulates

Proposed fix

  • Add startup reconciliation for stale task statuses:
  • detect InProgress tasks with no active scheduler run and old updated_at
  • transition back to Open (or NeedsHelp) with system comment
  • optionally reconcile stale pipeline_runs rows at the same time

Acceptance criteria

  • Stale InProgress tasks are automatically recovered to actionable states
  • Scheduler does not leave legacy pipeline artifacts blocking task flow

Timeline (1)

🔄[human]Open → Draft2 months ago