POST/PUT /api/teams/{id}/deadman/switches accepts any timeout_seconds > 0, but sweepDeadman runs inside Sweep (internal/api/archiver.go), which ticks every sweepInterval = 15 * time.Minute. A switch with a 60s timeout is therefore detected up to timeout + 15m late, and the API gives no hint.
Why it is not a one-line fix
sweepDeadman returns the set of heartbeat alert ids that expireStale must skip, and the two run in one pass. Giving deadman its own faster loop means keeping that exemption correct (expiry must not resolve a heartbeat the switch loop owns).
Options
A scheduler with named tasks and per-task intervals (deadman ~30s, notifier 30s, sweeper 15m), each under its own advisory lock. This also fixes escalation never advancing when no ntfy URL is set (the notifier loop does not start without one).
Or enforce a minimum timeout (>= sweepInterval) and document it.
Acceptance
A switch with a short timeout opens its incident within roughly timeout + the new check interval.
Test using the existing back-dated received_at technique.
## Problem
`POST/PUT /api/teams/{id}/deadman/switches` accepts any `timeout_seconds > 0`, but `sweepDeadman` runs inside `Sweep` (`internal/api/archiver.go`), which ticks every `sweepInterval = 15 * time.Minute`. A switch with a 60s timeout is therefore detected up to timeout + 15m late, and the API gives no hint.
## Why it is not a one-line fix
`sweepDeadman` returns the set of heartbeat alert ids that `expireStale` must skip, and the two run in one pass. Giving deadman its own faster loop means keeping that exemption correct (expiry must not resolve a heartbeat the switch loop owns).
## Options
- A scheduler with named tasks and per-task intervals (deadman ~30s, notifier 30s, sweeper 15m), each under its own advisory lock. This also fixes escalation never advancing when no ntfy URL is set (the notifier loop does not start without one).
- Or enforce a minimum timeout (>= sweepInterval) and document it.
## Acceptance
- A switch with a short timeout opens its incident within roughly timeout + the new check interval.
- Test using the existing back-dated `received_at` technique.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
POST/PUT /api/teams/{id}/deadman/switchesaccepts anytimeout_seconds > 0, butsweepDeadmanruns insideSweep(internal/api/archiver.go), which ticks everysweepInterval = 15 * time.Minute. A switch with a 60s timeout is therefore detected up to timeout + 15m late, and the API gives no hint.Why it is not a one-line fix
sweepDeadmanreturns the set of heartbeat alert ids thatexpireStalemust skip, and the two run in one pass. Giving deadman its own faster loop means keeping that exemption correct (expiry must not resolve a heartbeat the switch loop owns).Options
Acceptance
received_attechnique.