feat(wake): W6 — off-host dead-man beacon + pluggable alarm-sink adapter (#910)
Co-authored-by: jason.woltje <jason@diversecanvas.com> Co-committed-by: jason.woltje <jason@diversecanvas.com>
This commit was merged in pull request #910.
This commit is contained in:
@@ -402,6 +402,18 @@ cmd_run() {
|
||||
# A single failing source must not kill the long-lived service; poll-once
|
||||
# already failed loud on stderr for it. The loop keeps serving healthy ones.
|
||||
cmd_poll_once || true
|
||||
# W6 SEAM (§1.3, off-host dead-man beacon): emit ONE monotonic liveness
|
||||
# beacon per poll cycle. This is the ONLY W6 call site in the detector — a
|
||||
# single, clean, opt-in seam. It is INERT unless the operator wires a beacon
|
||||
# sink (WAKE_BEACON_SINK_CMD); wiring + install-validating that target is W7's
|
||||
# job, not the detector's. Liveness is SPLIT from work-triggering, so a beacon
|
||||
# emit failure NEVER kills the detector loop — but it is loud (not silent),
|
||||
# and the off-host monitor's absence check (beacon.sh check) is the real
|
||||
# safety net regardless of what this dying host does.
|
||||
if [ -n "${WAKE_BEACON_SINK_CMD:-}" ]; then
|
||||
"$SCRIPT_DIR/beacon.sh" emit >/dev/null || \
|
||||
echo "detector.sh: WARN — off-host liveness beacon emit failed (see beacon.sh); the off-host absence check remains the authoritative dead-man." >&2
|
||||
fi
|
||||
[ "$once" -eq 1 ] && break
|
||||
sleep "$interval"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user