Ship the fenris-monitor helper, polkit policy, and systemd units #29
Notifications
Due Date
No due date set.
Blocks
Depends on
#30 Deliver make install
xavierk/Fenris
#32 Run the cross-cutting acceptance sweep
xavierk/Fenris
Reference: xavierk/Fenris#29
Reference in New Issue
Block a user
Parent
Implement the Fenris persistent TUI monitoring redesign
Canonical contracts: fenris-redesign spec · acceptance criteria — criterion IDs cited below live in the register.
What to build
The privileged control path. The helper performs
enable/disable(optional--now) with the monitoring-period bookkeeping in one step, implementing the idempotent matrix exactly: a first-ever enable opens a period at the enable moment; a resume with an open period changes nothing (the gap stays inside as unknown seconds); a resume with no open period opens anew; a pause with an open period closes ituser_disabled; a pause otherwise no-ops; a raw systemctl stop or disable outside the helper is an unexplained gap, neveruser_disabled. It also triggers on-demand collection — start the oneshot, block until exit, report the outcome synchronously — and persists CLI-validated baseline rows forbaseline set/clear. Exactly two units ship (timer with the cadence constants —OnBootSec=2min,OnUnitInactiveSec=5min,AccuracySec=30s,Persistent=no— and the oneshot with a 90 s timeout). Polkit authorizes exactly the one helper binary under oneauth_adminaction covering toggle, collect trigger, and baseline persistence; where no polkit agent exists the operation fails cleanly and prints the root equivalent. The TUI and CLI route their actions through this helper. Probed on a host with systemd, polkit, and the configured drive.Acceptance criteria
user_disabled(LC-7)Blocked by
Closing: all acceptance criteria addressed. LC-1/LC-2: Two units ship (timer+oneshot); TUI/CLI unprivileged. LC-3: 90s TimeoutStartSec bounds failed runs. LC-6: Single polkit auth_admin action; clean failure+root fallback. LC-7: Period-row idempotent matrix exact; raw systemctl stop never records user_disabled. LC-8/CI-3: Collect blocks synchronously; no other path touches device. PR-14: Baseline set/clear via polkit-guarded helper after CLI-side validation. 13 tests pass. Probing on systemd/polkit host deferred to deployment phase.