Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(cli): upgrade status to an active telemetry dashboard#50

Merged
JacksonFergusonDev merged 7 commits into
mainfrom
refactor/status-upgrade
Feb 21, 2026
Merged

feat(cli): upgrade status to an active telemetry dashboard#50
JacksonFergusonDev merged 7 commits into
mainfrom
refactor/status-upgrade

Conversation

@JacksonFergusonDev
Copy link
Copy Markdown
Owner

Context

Previously, git pulsar status acted as a passive data-fetcher. If the daemon throttled backups due to low battery or stalled on a 100MB file, the user had to manually investigate or calculate timestamps to figure out why the pipeline stopped.

This PR upgrades the status command into a zero-latency observability dashboard, surfacing critical context (power telemetry, session drift, and pipeline blockers) directly to the user without blocking the main thread or triggering live network calls.

Key Changes

  • Core Refactor (ops.py, daemon.py, cli.py): * Extracted has_large_files() from the daemon loop into ops.py to decouple pipeline blocker detection from background execution.
    • Refactored _check_repo_health() to dynamically scale its stall threshold based on the repository's configured commit_interval.
  • Active Observability (cli.py):
    • Power Telemetry: Integrated battery polling. The UI now explicitly displays when the daemon enters "Eco-Mode" (pushes suspended) or "Critical" (all backups suspended).
    • Cached Roaming Radar: Wires the local .git/pulsar_drift_state cache into the status panel, appending a prominent divergence warning if a newer remote session exists.
    • Health Integration: Displays immediate warnings if oversized files (dataset.csv > 100MB) are stalling the commit loop.
  • Testing (test_cli.py, test_ops.py, test_daemon.py): * Fixed broken mocks resulting from the ops.py refactor.
    • Mocked the get_system factory inside test_ops.py to prevent MacOSStrategy from leaking actual AppleScript desktop notifications during test execution.
    • Added parameterized coverage for dynamic health thresholds and power state UI rendering.
  • Documentation: Updated README.md, src/README.md, and tests/README.md to document the new "Active Observability" feature and the architectural boundaries of the zero-latency CLI.

Verification

  • All 58 tests passing via uv run pytest.
  • Strict type linters satisfied (fixed tuple structures in pytest.mark.parametrize).
  • Verified zero-latency execution (no live network git fetch calls occur when running status).

- Repoint `has_large_files` mocks from `daemon.py` to `ops.py`.
- Relocate `test_has_large_files_uses_config_limit` to `test_ops.py` and isolate system notification side-effects via factory mocking.
- Expand `test_cli.py` to cover power telemetry rendering, dynamic health thresholds, and newly integrated drift/large-file dashboard warnings.
- Fix `pytest.mark.parametrize` argument typing to satisfy strict linters.
…grades

- Add coverage descriptions for power telemetry and passive dashboard rendering in `test_cli.py`.
- Document the relocation of pipeline blocker (large file) validation to `test_ops.py`.
- Update `ops.py` to reflect its new role in evaluating pipeline blockers (oversized files).
- Update `cli.py` to document the zero-latency `status` dashboard, power telemetry, and dynamic health thresholds.
- Expand Invariant 5 to codify the zero-latency requirement for CLI observability commands.
…etry

- Add a feature bullet for "Active Observability" detailing the new power telemetry and cached warning capabilities.
- Update the `status` command description in the Command Reference to reflect its new role as a real-time health dashboard.
@JacksonFergusonDev JacksonFergusonDev merged commit deceea9 into main Feb 21, 2026
4 checks passed
@JacksonFergusonDev JacksonFergusonDev deleted the refactor/status-upgrade branch February 21, 2026 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant