Skip to content

S4: retire Bridge workflow recovery jobs

recover_once now runs exactly unattended-move alerts, expired-execution settlement (kept for one more release), and interactive task CI follow-up. The seven retired jobs and their exclusive helpers are removed. Dispatch tools were still gated in S4; S5 removes those tools and their switch. GitHub run deliveries retain the guarded metadata upsert and directly wake task CI using the stored SHA. Neither runs nor closed PRs advance Bridge workflows. Polling constants moved into ci_polling.py, shared by task CI and existing read projections. No MCP tool definitions, migrations, data, beat checks, task-update logic, or continuity-context logic changed.

Tests for removed behavior were removed individually from mixed modules. Shared fixtures and historical read/continuation coverage remain; historical merge readiness is seeded directly instead of invoking the retired job. Interactive CI wake tests now use task_ci.wake; signed-webhook coverage remains. Added exact three-job coverage in all dispatch-switch states, error-isolation coverage, and a closed-PR webhook regression that asserts no workflow mutation. Existing expiry coverage remains, including adapted queue expiry and historical-row tests.

Deleted test files:

  • tests/test_ci_follow_up.py: covered the retired workflow CI poller and its scheduling migration.
  • tests/test_ci_infrastructure.py: covered classification and automatic correction in that poller.

Validation

Final commands and actual results:

PYTHONPATH=src python -m pytest -q tests -k "task_ci or unattended or webhook or recover or ci_follow"

30 passed, 90 skipped, 2163 deselected, 3 setup errors. The errors are test_exact_admission_and_recovery_with_recorder_only_stall, test_real_pickup_incident_and_recovery, and test_real_polling_incident_and_recovery: their unchanged shared pickup fixture indexes missing HEYAIRA_SERVER_BEAT_E2E_DATABASE_URL directly. Beat checks and these tests were left untouched. The skips require isolated PostgreSQL URLs, including HEYAIRA_EXECUTION_E2E_DATABASE_URL for task CI, webhooks, and unattended moves. Development reruns also caught moved-constant imports; those were fixed before the final results above.

PYTHONPATH=src python -m pytest -q tests --ignore=tests/test_bridge_failure_background.py --ignore=tests/test_bridge_pickup.py --ignore=tests/test_bridge_polling.py -k "task_ci or unattended or webhook or recover or ci_follow"

30 passed, 90 skipped, 2070 deselected.

PYTHONPATH=src python -m pytest -q tests/test_ci_failures.py tests/test_task_ci.py tests/test_task_ci_failures.py tests/test_unattended_moves.py tests/test_github_webhooks.py tests/test_workflow_dispatch_switch.py tests/test_lease_grace.py tests/test_capacity_queue.py tests/test_capacity_queue_reads.py tests/test_stall_batching.py tests/test_merge_ready_head.py tests/test_pull_request_closed.py tests/test_pull_request_closed_head.py

99 passed, 104 skipped. Skips require an isolated PostgreSQL database.

python scripts/check_docs_contract.py

Passed: 50 MCP tools covered.

git diff --check

Passed, no whitespace errors.

PostgreSQL-backed webhook wake, task CI settlement, and expiry integration paths remain unverified locally. No commit was created.