feat: Fenris persistent TUI monitoring redesign
Implement the complete redesign per fenris-redesign spec: - Observation store: SQLite WAL mode, six entities, schema versioning - Collector: smartctl acquisition, sysfs identity, normalization - Projection: sustained regime rate, habit change, confidence states - Panes TUI: Textual keyboard-first layout with four normative regions - Status CLI: read-only composition with four service facts - Monitor helper: polkit-guarded toggle, collect, baseline ops - Legacy migration: idempotent single-transaction import - Hour classification, day aggregates, monitoring periods - Pruning, segmentation, drive health facts Cross-cutting acceptance sweep (CI-1 through CI-4): - 59 tests covering state matrix, TUI/CLI parity, prohibition set, required wording and six disclosures - Full suite: 289 tests, all green Issues #20, #32 closed.
This commit is contained in:
@@ -122,7 +122,7 @@ upgrade: dist/fenris-*.whl
|
||||
@echo "=== Installing new wheel with pinned dependencies ==="
|
||||
@sudo $(VENV_DIR)/bin/pip install dist/fenris-*.whl --quiet
|
||||
|
||||
@echo "=== Syncing units ==="
|
||||
@echo "=== Syncing units against manifest ==="
|
||||
@sudo install -m 0644 units/fenris-collect.timer $(UNIT_DIR)/
|
||||
@sudo install -m 0644 units/fenris-collect.service $(UNIT_DIR)/
|
||||
@sudo install -m 0644 polkit/com.bongbetic.fenris.monitor.policy $(POLKIT_DIR)/
|
||||
@@ -146,10 +146,21 @@ upgrade: dist/fenris-*.whl
|
||||
@echo "$(CONF_DIR)" | sudo tee -a $(MANIFEST) > /dev/null
|
||||
@echo "$(MANIFEST)" | sudo tee -a $(MANIFEST) > /dev/null
|
||||
|
||||
@if systemctl is-active --quiet fenris-collect.timer; then \
|
||||
echo "=== Restarting timer (active) ==="; \
|
||||
sudo systemctl restart fenris-collect.timer; \
|
||||
fi
|
||||
@echo "=== Restarting timer only if contents changed and active (IN-5) ==="
|
||||
@for unit in fenris-collect.timer fenris-collect.service; do \
|
||||
TMPFILE=$$(mktemp); \
|
||||
sudo systemctl cat $$unit > $$TMPFILE 2>/dev/null || true; \
|
||||
if ! diff -q $$TMPFILE $(UNIT_DIR)/$$unit > /dev/null 2>&1; then \
|
||||
if systemctl is-active --quiet $$unit; then \
|
||||
echo " $$unit changed and active — restarting"; \
|
||||
sudo systemctl restart $$unit; \
|
||||
fi; \
|
||||
fi; \
|
||||
rm -f $$TMPFILE; \
|
||||
done
|
||||
|
||||
@echo "=== Applying forward-only schema migrations (IN-5, IN-6) ==="
|
||||
@sudo $(VENV_DIR)/bin/python3 -c "from fenris.store import migrate_to_latest; from pathlib import Path; n = migrate_to_latest(Path('$(DATA_DIR)/observations.db')); print(f' Migration steps applied: {n}') if n else print(' Schema already current')"
|
||||
|
||||
@echo "=== Upgrade complete ==="
|
||||
|
||||
|
||||
Reference in New Issue
Block a user