[Senate] Fix phantom-running recurring engine cleanup

← All Specs

Goal

Eliminate recurring-task failures where tasks remain assigned to a worker or scheduler even though no live process exists. The fix should make phantom-run detection and cleanup reliable for recurring engines so tasks do not accumulate false failures or get stranded between scheduler and worker state.

Acceptance Criteria

☐ Root cause identified for phantom running task failures on recurring Senate engines
☐ Cleanup or reconciliation logic updated so the affected tasks return to a consistent open/running state automatically
☐ Verified against at least Agent activity heartbeat, Orphan coverage check, and World-model improvement detector

Approach

  • Review recent run history for the phantom-running recurring tasks and compare task state vs task_runs state.
  • Inspect Orchestra supervisor/reaper reconciliation paths that clear active_run_id, assignment state, and scheduler-owned runs.
  • Implement and verify a fix with bounded reproduction or targeted unit coverage.
  • Dependencies

    • Orchestra recurring-task lifecycle and task-run reconciliation logic

    Dependents

    • Senate recurring drivers that currently report phantom workers instead of doing work

    Work Log

    2026-04-26 06:46:33Z

    • Spec created during engine-failure triage task 9e45545a-0eeb-4698-9d79-ffda3f456b45 for follow-up implementation.

    Tasks using this spec (1)
    [Senate] Fix phantom-running recurring engine cleanup
    Senate done P84
    File: senate_recurring_engine_phantom_runs_spec.md
    Modified: 2026-05-01 20:13
    Size: 1.5 KB