Define the collector, service, and CLI lifecycle #8
Notifications
Due Date
No due date set.
Blocks
Depends on
#9 Define installation, upgrade, and removal behavior
xavierk/Fenris
#3 Prototype the TUI information architecture
xavierk/Fenris
#10 Define failure and recovery behavior
xavierk/Fenris
#7 Verify systemd lifecycle and privilege constraints
xavierk/Fenris
Reference: xavierk/Fenris#8
Reference in New Issue
Block a user
Parent map: Chart Fenris’s persistent TUI monitoring redesign
Question
What is the exact lifecycle contract among the systemd collector, on-demand TUI, and non-interactive CLI? Decide service states and ownership, enable/disable versus start/stop semantics, sampling while the TUI is closed, configuration reloads, stale detection, explicit privilege prompts, and compatibility behavior for status, sample, and fenris.sh.
Resolved Define the collector, service, and CLI lifecycle — full contract in ADR 0003.
Answer:
fenris-collect.timer(OnBootSec=2min,OnUnitInactiveSec=5min,AccuracySec=30s,Persistent=no,TimeoutStartSec=90s,WantedBy=timers.target) and root oneshotfenris-collect.service. No/run/fenrissurface; journal holds failures./etc/fenris/fenris.confholds only the device selector (by-id preferred, node warned), re-read each run; invalid config = bounded failed run, surfaced as a fact bystatus/TUI. Interval changes live in a documented timer drop-in./usr/libexec/fenris/fenris-collect(ExecStart) and/usr/libexec/fenris/fenris-monitor(enable/disable/collect trigger + period rows; the only polkit-authorized binary, actioncom.bongbetic.fenris.monitor,auth_admin). Root invokes helpers directly; no-agent environments fail cleanly with the root equivalent.disable --now, Resume =enable --now, via the helper, which records monitoring-period rows idempotently (first enable opens at the enable moment; resume over a raw-stop gap keeps the gap inside as unknown seconds; only the sanctioned path writesuser_disabled). This amends Verify systemd lifecycle and privilege constraints's direct-systemctl toggle — a period boundary cannot be recorded by systemctl; the research's spirit is intact.fenris sampleand TUI collect-now trigger the oneshot through the helper and report the synchronous outcome; no sampling outside the collector; TUI Pause confirms, Resume doesn't.statusretained (read-only: store + allow-listedsystemctl show, journal hint, never auto-samples);sampleretained (helper path);--device,start,stop,runrejected with migration pointers;fenris.shretired.AccuracySec+ 60 s; missed until 48 h; stale ≥ 48 h (matches ADR 0002's gate); empty store says "no observations yet" with an enable hint.Glossary gained Collection run and Deliberate disable in CONTEXT.md. Unblocks the TUI prototype, installation, and failure-behavior tickets.