Crash resilience: systemd unit + systemd-aware restart script (v1.25.0) #50

Merged
ClaudiuSchuster merged 1 commit from oss-oo/obs-crisis-hardening-nkyw20260926 into main 2026-09-26 00:17:23 +00:00
Owner

The observatory is a link in the orchestration chain (bells → broker → observatory → owner); its crash during the 2026-09-25/26 triple crisis needed a manual restart. This round adds the safety net without changing the opt-in character:

  • zcode-observatory.service — Restart=on-failure systemd user unit, deliberately NOT auto-enabled (owner preference); install.sh templates the ExecStart path, installs the unit and prints the enable command without running it (--no-unit opts out).
  • observatory-restart.sh — prefers systemctl --user restart when the unit exists; the legacy fallback uses a bracketed pgrep pattern (the ps-grep predecessor killed its own shell on the station) and logs under XDG state (never /tmp, which the station wipes on reboot).
  • managed-parent steer spawns — the send-button and fastlane paths mark their dispatch children so the dispatcher’s v1.0.1 notification scope self-check keeps them in place (the fastlane branches on exit codes, the status view polls liveness — a re-exec would fake deliveries).
  • Tests pin the unit’s restart/opt-in contract, the restart script’s systemd branch / self-kill-safe pattern / log location, and install.sh’s never-enables wiring — 45 unit tests green, CI compile/boot green, Super-Linter green (all six lanes).

Pairs with zcode-dispatch v1.0.1 (PR #31): broker restart policy + watchdog, scoped notification bells, canary infra group whose failures surface in the contract banner.

The observatory is a link in the orchestration chain (bells → broker → observatory → owner); its crash during the 2026-09-25/26 triple crisis needed a manual restart. This round adds the safety net without changing the opt-in character: - **`zcode-observatory.service`** — `Restart=on-failure` systemd user unit, deliberately NOT auto-enabled (owner preference); `install.sh` templates the ExecStart path, installs the unit and prints the enable command without running it (`--no-unit` opts out). - **`observatory-restart.sh`** — prefers `systemctl --user restart` when the unit exists; the legacy fallback uses a bracketed pgrep pattern (the ps-grep predecessor killed its own shell on the station) and logs under XDG state (never `/tmp`, which the station wipes on reboot). - **managed-parent steer spawns** — the send-button and fastlane paths mark their dispatch children so the dispatcher’s v1.0.1 notification scope self-check keeps them in place (the fastlane branches on exit codes, the status view polls liveness — a re-exec would fake deliveries). - Tests pin the unit’s restart/opt-in contract, the restart script’s systemd branch / self-kill-safe pattern / log location, and install.sh’s never-enables wiring — 45 unit tests green, CI compile/boot green, Super-Linter green (all six lanes). Pairs with zcode-dispatch v1.0.1 (PR #31): broker restart policy + watchdog, scoped notification bells, canary infra group whose failures surface in the contract banner.
Crash resilience: systemd unit + systemd-aware restart script (v1.25.0)
All checks were successful
Checks / Functional checks (pull_request) Successful in 16s
8c0b5edc61
The observatory is a link in the orchestration chain (bells → broker →
observatory → owner); its crash during the 2026-09-25/26 triple crisis
needed a manual restart. This round gives it a safety net without
changing its opt-in character:

- zcode-observatory.service: Restart=on-failure unit, deliberately NOT
  auto-enabled (owner preference) — install.sh templats the ExecStart
  path, installs it into ~/.config/systemd/user/ and prints the enable
  command without running it (--no-unit opts out)
- observatory-restart.sh: prefers systemctl --user restart when the
  unit exists; legacy fallback uses a bracketed pgrep pattern (the
  ps-grep predecessor killed its own shell on the station) and logs
  under XDG state (never /tmp, which the station wipes on reboot)
- steer spawns (send button + fastlane) mark their dispatch children
  managed-parent so the dispatcher's v1.0.1 notification scope
  self-check keeps them in place — the fastlane branches on exit codes
  and the status view polls liveness; a re-exec would fake deliveries
- tests: the unit's restart/opt-in contract, the restart script's
  systemd branch, self-kill-safe pattern and log location, install.sh's
  unit wiring (installs, never enables)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
OSS-Singularity/zcode-dispatch-observatory!50
No description provided.