Merge origin/main into main

Reconcile the staged-projection and Diagnostics feature work with the CI
quality-gate changes from origin/main. The origin side of every conflict was
lint-only, so the feature imports were kept and the ruff fixes re-applied:

- keep the branch's added imports (timefmt, activity_readout, projection
  ladder helpers) and drop the unused ones ruff reported
- restore `noqa: E402` on the post-bootstrap imports in fenris-monitor and
  keep the `noqa: F401` re-exports in the TUI that tests assert on
- make the TUI monitoring-glyph test clock-relative instead of pinned to a
  fixed date
This commit is contained in:
xavierk
2026-10-06 10:14:09 +05:30
53 changed files with 288 additions and 229 deletions
+6 -7
View File
@@ -3,7 +3,6 @@
Spec: §8.4, §8.5, §8.6, §8.7
"""
import json
import sqlite3
from datetime import datetime, timezone
from pathlib import Path
from unittest.mock import patch, MagicMock
@@ -56,7 +55,7 @@ class TestEnableIdempotentMatrix:
"""A fresh package install has a store directory but no database yet."""
args = MagicMock(now=False, store_path=store_path)
with patch("fenris.monitor.enable_timer") as mock_enable:
with patch("fenris.monitor.enable_timer"):
cmd_enable(args)
conn = init_store(store_path)
@@ -73,7 +72,7 @@ class TestEnableIdempotentMatrix:
args = MagicMock(now=False, store_path=store_path)
with patch("fenris.monitor.enable_timer") as mock_enable:
with patch("fenris.monitor.enable_timer"):
cmd_enable(args)
# Period should be open
@@ -117,7 +116,7 @@ class TestEnableIdempotentMatrix:
args = MagicMock(now=True, store_path=store_path)
with patch("fenris.monitor.enable_timer") as mock_enable:
with patch("fenris.monitor.enable_timer"):
cmd_enable(args)
# Should still have exactly one open period
@@ -141,7 +140,7 @@ class TestEnableIdempotentMatrix:
args = MagicMock(now=True, store_path=store_path)
with patch("fenris.monitor.enable_timer") as mock_enable:
with patch("fenris.monitor.enable_timer"):
cmd_enable(args)
# Should have a new open period
@@ -170,7 +169,7 @@ class TestDisableIdempotentMatrix:
args = MagicMock(now=True, store_path=store_path)
with patch("fenris.monitor.disable_timer") as mock_disable:
with patch("fenris.monitor.disable_timer"):
cmd_disable(args)
# Period should be closed with user_disabled
@@ -188,7 +187,7 @@ class TestDisableIdempotentMatrix:
args = MagicMock(now=True, store_path=store_path)
with patch("fenris.monitor.disable_timer") as mock_disable:
with patch("fenris.monitor.disable_timer"):
cmd_disable(args)
# No periods should exist