{
  "handle": "Heartbeat",
  "mechanism": "Periodic Liveness {{signal}}: An entity emits {{signal}} (Heartbeat) every interval I. Missing K consecutive heartbeats triggers failure detection. Heartbeat may include health metrics. Receiver tracks last-seen timestamp. It feeds into the {{quorum}} detector, allowing the collective to identify and prune dead nodes.",
  "gloss": "Liveness detection via periodic signals",
  "failure_modes": [
    "False failure detection: the node is alive and its heartbeat was delayed, so absence of signal was read as absence of the emitter.",
    "Heartbeat outlives usefulness: the emitter is alive and the work it was doing is not, so liveness is reported while progress has stopped."
  ],
  "invariants": [
    "Missing `timeout_multiplier` consecutive intervals triggers failure DETECTION, which is a suspicion and not a fact about the emitter.",
    "Emission interval stays within `interval`."
  ],
  "preconditions": [
    "Active component",
    "{{monitor}}"
  ],
  "postconditions": [
    "Liveness confirmed"
  ],
  "parameters": [
    {
      "name": "interval",
      "type": "Duration",
      "range": "[100ms, 60s]",
      "description": "Time between heartbeats"
    },
    {
      "name": "timeout_multiplier",
      "type": "Integer",
      "range": "[2, 5]",
      "description": "Missed beats before failure"
    }
  ],
  "_meta": {
    "tier": 1,
    "ring": 0,
    "supersedes": [
      "sema:Heartbeat#mh:SHA-256:7f881d347e8ead278efa6ee9abb5ce8c50f1ea70d38f485cb2c4e911457702b2",
      "sema:Heartbeat#mh:SHA-256:d0e6ffd899704efd75b87f0365bbe48fec4a1179b81e08923779ed84be7c83c2",
      "sema:Heartbeat#mh:SHA-256:c36fe65a4b171559a33cb36f37ec448dce8ad7092c665426bfabee3dbeb6d1c1"
    ],
    "path": [
      "Infrastructure",
      "Primitives"
    ]
  },
  "sema_id": "sema:Heartbeat#mh:SHA-256:c5dfefe91d5460716f19e001290b47c3853173b17f0b6914793f6f51a41903ef",
  "sema_ref": "Heartbeat#c5df",
  "sema_stub": "c5df",
  "dependencies": {
    "accepts": {
      "signal": "sema:Signal#mh:SHA-256:6eaff8a06e08e75279670bc09d88175d130815240fdfb3a21252c0364769c1fc"
    },
    "composes_with": {
      "quorum": "sema:Quorum#mh:SHA-256:2a33f05d34bfb2667645680393ca37865d4a7d05d2056eddf4c9df0c13b21744"
    },
    "references": {
      "monitor": "sema:Monitor#mh:SHA-256:d31621c43589a14a237d53b3ff53c360b841cea6fe8fa8b7dc90724a686fcf8f"
    }
  },
  "sema_layer": "Infrastructure",
  "sema_category": "Primitives",
  "used_by": {
    "composes_with": {
      "Delegate": "sema:Delegate#mh:SHA-256:00fabbb5e33ec9b95dce20eb8c03e6dd3578e59b041dcf0d6a28b8908763ca45"
    },
    "references": {
      "ExplainBeacon": "sema:ExplainBeacon#mh:SHA-256:2ae591c2bb79c9a8e037722f368f68b0e6a507503cfc74ab09b9bb1d43fa1856",
      "QuorumPulse": "sema:QuorumPulse#mh:SHA-256:15db29bbca17a27d707e309f281c97cf66f9840bb907cbe9f53f90a40236b34e",
      "Responsibility": "sema:Responsibility#mh:SHA-256:d8ccf6225585313bd3efd0198c588063cb62add74447c15fe5128c0ebfdc1d19",
      "TaskLifecycle": "sema:TaskLifecycle#mh:SHA-256:559124d595219af971fe018e4709077bbe77f3ce7e1769a058cbeffd4a11c38b"
    }
  }
}
