You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cli): upgrade status to an active telemetry dashboard (#50)
- refactor(core): decouple large file detection (`has_large_files`) from daemon into `ops.py` for safe CLI querying.
- feat(cli): surface real-time power telemetry (Eco-Mode/Critical states) in the system status panel.
- feat(cli): integrate zero-latency cached remote drift warnings and pipeline blocker alerts into the repo status dashboard.
- fix(test): dynamically mock the system strategy factory to prevent `MacOSStrategy` from leaking AppleScript notifications during test execution.
- test: add parameterized coverage for dynamic health thresholds and UI telemetry rendering.
- docs: update architecture maps and documentation to reflect the new Active Observability feature.
Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,7 @@ In a distributed environment (Laptop ↔ Desktop), state drift is inevitable.
62
62
-**Out-of-Band Indexing:** Backups are stored in a configured namespace (default: `refs/heads/wip/pulsar/...`). Your `git status`, `git branch`, and `git log` remain completely clean.
63
63
-**Distributed Sessions:** Hop between machines. Pulsar tracks sessions per device and lets you `sync` to pick up exactly where you left off.
64
64
-**State-Aware Diagnostics:** The `doctor` command correlates transient log events with active system health to prevent alert fatigue, and proactively scans for pipeline blockers like strict git hooks or broken `systemd` configurations.
65
+
-**Active Observability:** The `status` dashboard provides zero-latency power telemetry (e.g., Eco-Mode throttling) and immediately surfaces cached warnings for remote session drift and oversized files.
65
66
-**Zero-Interference:**
66
67
- Uses a temporary index so it never messes up your partial `git add`.
67
68
- Detects if you are rebasing or merging and waits for you to finish.
@@ -186,7 +187,7 @@ This bootstraps the current directory with:
186
187
187
188
| Command | Description |
188
189
| :--- | :--- |
189
-
|`git pulsar status`| Show detailed daemon state and repository-specific commit/push history. |
190
+
|`git pulsar status`| Show real-time daemon telemetry, active health blockers, and repository status. |
190
191
|`git pulsar config`| Open the global configuration file in your default editor. |
191
192
|`git pulsar list`| Show all watched repositories and their status. |
192
193
|`git pulsar pause`| Temporarily suspend backups for this repo. |
Copy file name to clipboardExpand all lines: src/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ The `src/` directory contains the package source code. The architecture strictly
12
12
-**Safety:** Implements `GIT_INDEX_FILE` isolation to ensure it never locks or corrupts the user's active git index.
13
13
-**`git_pulsar/ops.py`**: High-level Business Logic.
14
14
-**Role:** The "Controller." It orchestrates complex multi-step operations like `finalize` (Octopus Merges), `restore`, and drift detection.
15
-
-**Logic:** Calculates the "Zipper Graph" topology to merge shadow commits back into the main branch, and manages atomic file I/O for cross-process state tracking.
15
+
-**Logic:** Calculates the "Zipper Graph" topology to merge shadow commits back into the main branch, manages atomic file I/O for cross-process state tracking, and evaluates pipeline blockers (e.g., oversized files).
-**Logic:** Implements a cascading hierarchy (Defaults → Global → Local) to merge settings from `~/.config/git-pulsar/config.toml` and project-level `pulsar.toml` or `pyproject.toml`.
@@ -35,8 +35,8 @@ The `src/` directory contains the package source code. The architecture strictly
35
35
### 4. The Interface
36
36
37
37
-**`git_pulsar/cli.py`**: The User Entry Point & Diagnostic Engine.
38
-
-**Role:** Argument parsing, UI rendering, and system health evaluation.
39
-
-**Logic:** Uses `rich` for terminal visualization. Beyond routing subcommands to `ops.py` and `daemon.py`, it presents the `doctor` diagnostics. It correlates repository state against transient event logs, and relies on `ops.py` to evaluate topological drift across distributed sessions and scan for host-environment pipeline blockers (e.g., strict git hooks, missing `systemd` linger).
38
+
-**Role:** Argument parsing, UI rendering, real-time observability, and system health evaluation.
39
+
-**Logic:** Uses `rich` for terminal visualization. Beyond routing subcommands to `ops.py` and `daemon.py`, it presents the `doctor` diagnostics and the zero-latency `status` dashboard (surfacing power telemetry, dynamic health constraints, and cached drift warnings). It correlates repository state against transient event logs, and relies on `ops.py` to evaluate topological drift across distributed sessions and scan for host-environment pipeline blockers (e.g., strict git hooks, missing `systemd` linger).
40
40
41
41
---
42
42
@@ -46,4 +46,4 @@ The `src/` directory contains the package source code. The architecture strictly
46
46
2.**Zero-Destruction:** The `prune` logic in `ops.py` relies on strictly namespaced refspecs (`refs/heads/wip/pulsar/...`) and never touches standard heads.
47
47
3.**Identity Stability:** The `system` module guarantees that a Machine ID persists across reboots, preventing "Split Brain" backup histories.
48
48
4.**Configuration Precedence:** Local project configuration MUST always override global user settings to ensure repo-specific constraints (e.g., large file limits) are respected.
49
-
5.**State Over Events:** The diagnostic engine (`cli.py`) MUST prioritize current repository and environmental state over historical log events to prevent alert fatigue from self-healing anomalies.
49
+
5.**State Over Events (Zero-Latency):** The diagnostic engine (`cli.py`) MUST prioritize current repository state and local caches (e.g., `.git/pulsar_drift_state`) over historical log events or live network calls, ensuring the CLI never blocks the user's terminal while evaluating system health.
Copy file name to clipboardExpand all lines: tests/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,7 @@ Verifies the "State Reconciliation" engine and primitive operations.
34
34
-**Octopus Merges:** Simulates complex multi-head merge scenarios (e.g., merging 3 different machine streams into `main`) to ensure the DAG (Directed Acyclic Graph) is constructed correctly without conflicts.
35
35
-**State Management:** Verifies atomic file I/O operations (`set_drift_state`) to ensure cross-process thread safety between the background daemon and foreground CLI.
36
36
-**Drift Detection:** Tests the core logic for identifying when remote sessions leapfrog local ones, simulating various network failures and detached HEAD states.
37
+
-**Pipeline Blockers:** Validates decoupled checks for oversized files (`has_large_files`), ensuring they safely abort operations and trigger system notifications without polluting the daemon's event loop.
37
38
38
39
### 5. Configuration Hierarchy (`test_config.py`)
39
40
@@ -46,6 +47,7 @@ Ensures the **Cascading Configuration** system behaves deterministically.
46
47
47
48
Validates the state-aware diagnostic engine and user-facing CLI commands.
48
49
50
+
-**Dashboard Observability:** Validates the `status` command's rendering of power telemetry (Eco-Mode vs. Critical), dynamic health thresholds, and zero-latency caching for drift/blocker warnings.
49
51
-**State vs. Event Correlation:** Tests the `doctor` command by decoupling repository health (state) from daemon logs (events). We mock dynamic lookback windows to verify that naturally resolved transient anomalies are suppressed, while active correlated failures trigger alerts.
50
52
-**Environment Simulation:** Uses `tmp_path` and `mocker` to synthesize restrictive `.git/hooks`, offline networks, and Linux `systemd` configurations (`loginctl`) without executing side effects on the host.
51
53
-**UI Determinism:** Ensures commands like `status` and `config` parse timestamps and route to standard system editors (`$EDITOR`, `nano`) correctly.
0 commit comments