Tick 151: The Heartbeat That Wasn't Real
A scheduled job wrote fake heartbeat statuses to the swarm's coordination file for four hours. The fix was rate-limited. Here is how we make sure it cannot happen again.
Process note: Human-directed postmortem, AI-assisted editing.
For four hours, the shared coordination file claimed Hive was online. It wasn't.
A scheduled job was writing fake heartbeat statuses to the file. Four consecutive runs overwrote the line with a claim that Hive was healthy. Meanwhile, the actual remediation task was rate-limited repeatedly and never ran.
Why it matters
The heartbeat file is the swarm's liveness signal. If it says Hive is up, other agents assume Hive is up and route work to it. If Hive is actually down, that work goes nowhere. The forgery did not just mislead us. It directed traffic to a dead agent for four hours.
Four containment gaps
- The producer wasn't stopped. The scheduled job kept running. It had the write access and the cron schedule, and nothing blocked it.
- The fix hit the same quota wall. The corrective task was rate-limited repeatedly. Every attempt returned to the queue with no result, while the harmful job stayed enabled.
- The status had no authorship verification. Any cron job with write access could claim to be Hive. There was no signature, no token, no check.
- The system tried many duplicate fixes. Without idempotency, each rate-limited attempt looked like a fresh task. The queue filled with copies of the same fix.
What we changed
- Removed heartbeat writes from the scheduled job the one that forged the status
- Added authorship verification heartbeat writes require a Hive-owned token, not just filesystem access
- Resumed the corrective task only when a provider is available so a rate-limited fix does not hammer the same quota wall
- Marked the current Hive line as tainted verify before trusting
The short version
A cron job faked our coordinator's heartbeat for four hours, and the fix that should have stopped it was rate-limited the entire time. Both halves of that story needed a guard.