Skip to content

refactor: improve system-wide telemetry and eliminate silent errors - #46

Merged
JacksonFergusonDev merged 4 commits into
mainfrom
improve-logging
Feb 19, 2026
Merged

refactor: improve system-wide telemetry and eliminate silent errors#46
JacksonFergusonDev merged 4 commits into
mainfrom
improve-logging

Conversation

@JacksonFergusonDev

Copy link
Copy Markdown
Owner

Description

This PR patches a critical gap in our observability pipeline where standard exceptions were falling past the event horizon without triggering any telemetry. Previously, broad except Exception: blocks were masking subsystem faults, such as permission errors, malformed git objects, or network timeouts—behind hardcoded string fallbacks or silent continue statements.

By piping these suppressed exceptions into the standard logging stream, we preserve the stack trace for forensic analysis while maintaining a clean, uninterrupted TUI for the user. It's essentially adding a neutrino detector to our background processes; we don't need to see every interaction, but we absolutely need the data when an anomaly occurs.

Changes

  • CLI Telemetry (cli.py): Replaced silent masking in _check_repo_health, show_status, and list_repos with logger.debug() calls. UI elements now surface diagnostic exception data where appropriate.
  • Repository Setup (cli.py): Added explicit exception capturing to the dry-run push verification in setup_repo to catch and log specific authentication and upstream faults.
  • Iterative Operations (ops.py): Injected logger.warning() into the iterators for sync_session and prune_backups. This captures malformed refs or missing objects instead of dropping them silently from the DAG traversal.
  • Subsystem Parsers (daemon.py, system.py): Added debug telemetry for subprocess and hardware interrogation faults in get_remote_host and get_machine_id. This ensures restrictive /etc/ permissions or malformed URLs are mathematically verifiable in the logs.

Update `_check_repo_health`, `show_status`, and `list_repos` to log or display the specific exception data. Previously, failures during `GitRepo` instantiation or `repo._run` were caught by broad `except Exception:` blocks and masked with hardcoded string fallbacks like "Never" or "Error". This replaces the silent masking with `logger.debug()` calls and appends the exception message to the UI output where appropriate, improving diagnostic resolution.
…tion

Modify the `setup_repo` dry-run push `try...except` block to capture and display the actual `Exception`. This prevents standard git upstream faults or network permission errors from being permanently masked behind a generic SSH warning.
Inject `logger.warning()` into the `except Exception:` blocks of `sync_session` and `prune_backups`. Previously, failures to read or parse timestamps for individual backup refs triggered a silent `continue`. This ensures that unparseable refs or missing objects leave a trace in the daemon logs rather than silently dropping out of the synchronization pipeline.
Implement `logger.debug()` tracking for parsing failures in `get_remote_host` and hardware-level extraction failures in `get_machine_id`. This ensures that malformed remote URLs or restrictive `/etc/machine-id` permissions leave a forensic trace in the logs rather than silently degrading daemon functionality.
@JacksonFergusonDev
JacksonFergusonDev merged commit 048b0f2 into main Feb 19, 2026
4 checks passed
@JacksonFergusonDev
JacksonFergusonDev deleted the improve-logging branch February 19, 2026 06:28
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