Skip to content

test(queue): verify worker first-heartbeat < STUCK_CUTOFF + live run-queue smoke #141

Description

@rdfitted

Follow-up from #126 (PR #134). The durable run queue uses STUCK_CUTOFF_MS = 90s: a running row whose heartbeat_at is older than the cutoff (or NULL) becomes reclaimable by reclaim_stuck / try_claim.

  • Verify a freshly-spawned worker emits its first heartbeat within 90s of spawn, so reclaim_stuck never requeues a healthy-but-quiet worker. Heartbeats are designed to be independent of git output, but project DNA notes some CLIs index 8–15 min before producing a diff — confirm the heartbeat path really is independent and lands well inside 90s. Tune STUCK_CUTOFF_MS / heartbeat cadence if not.
  • Run the live queue E2E smoke (needs the Tauri shell, so it couldn't run headlessly): launch a real Hive session → spawn a worker → confirm GET /api/sessions/{id}/queue shows running → (heartbeat) → finalized accurately → kill the app mid-run → resume → confirm the row is reclaimable and the dashboard reflects it.

Acceptance: measured first-heartbeat latency is comfortably under the cutoff (or the cutoff is adjusted); the live smoke passes end-to-end.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions