feat(wake): W6 — off-host dead-man beacon + pluggable alarm-sink adapter (#910)
All checks were successful
ci/woodpecker/push/publish Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful

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:
2026-07-26 02:30:28 +00:00
committed by Mos
parent 320f5bfb6f
commit 003cdaa1a6
5 changed files with 722 additions and 3 deletions

View File

@@ -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