Skip to content

fix(cp): sweeper task has no panic supervision or liveness signal #1474

Description

@chaodu-agent

Description

crates/openab-cp/src/main.rs spawns run_sweeper fire-and-forget; the JoinHandle is only used for the final abort(). If the sweeper panics, the CP keeps accepting connections and delegations while lease expiry and deadline sweeping silently stop — leases never expire, deadlines never fire, and no health/readiness endpoint exposes the failure. (#1469 round-4 F11.)

Same failure class as openab's own session-pool reaper bug fixed in #1457: a background loop whose silent death converts a maintenance function into unbounded state growth.

Steps to Reproduce

  1. Run openab-cp and force a panic inside run_sweeper (e.g. via a test-only injection).
  2. Observe the process stays up, /health still returns ok, registrations/delegations continue.
  3. Leases of disconnected agents never expire; deadline-overdue delegations never resolve.

Expected Behavior

Sweeper death is either fatal (process exits, orchestrator restarts it) or recovered (task restarted with backoff), and /health reflects sweeper liveness either way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions