# 014 — SLURP Leadership Lifecycle and Health Probes - Area: `pkg/election/slurp_manager.go`, `pkg/health/*`, `main.go` - Priority: Medium-High ## Background SLURP leadership embeds into election manager but lacks fully wired start/stop runners on admin transitions, single-runner guarantees, and concrete health/readiness probes with metrics. ## Scope / Deliverables - Lifecycle: - Start context generation on becoming admin; stop on demotion; guard against multiple runners. - Expose leadership state (leader id, term, since) and generation status. - Health/Readiness: - Add health checks for generation loop (last success time, backlog), report via health manager. - Readiness endpoint to block traffic if generation cannot start. - Metrics: - Prometheus metrics for generation ticks, failures, time since last success, active tasks. ## Acceptance Criteria / Tests - On admin change in tests, generation starts within a bounded time and stops on demotion; no concurrent runners. - Health endpoints reflect unhealthy state when the loop is stalled; metrics increment as expected. ## Notes - Align with Issue 005 (election heartbeat) for consistent transitions.