Several recurring Senate engines fail with phantom running task errors even though no worker or scheduler process exists. Investigate recurring-task reconciliation between tasks and task_runs, verify against Agent activity heartbeat, Orphan coverage check, and World-model improvement detector, and fix the cleanup path so recurring tasks do not strand or misreport active runs.
Completion Notes
Root cause: orchestra.services.reap_stale_task_leases only treated running tasks as heartbeat-gated, so startup reconcile and similar recovery paths could leave recurring tasks stuck at status=running after task_runs had already gone terminal. Fix landed in Orchestra commit d8ae298b2742eaed170d7c7a556e14943240c714 via PR #166. Local verification: python3 -m py_compile orchestra/services.py tests/test_reap_phantom_running_tasks.py tests/test_reap_dangling_runs.py tests/test_reap_stale_tz.py and pytest -q tests/test_reap_phantom_running_tasks.py tests/test_reap_dangling_runs.py tests/test_reap_stale_tz.py -> 13 passed. Restart of orchestra-supervisor.service could not be performed from this sandbox because sudo/systemd restart is blocked by no-new-privileges.