refactor: improve system-wide telemetry and eliminate silent errors - #46
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 silentcontinuestatements.By piping these suppressed exceptions into the standard
loggingstream, 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.py): Replaced silent masking in_check_repo_health,show_status, andlist_reposwithlogger.debug()calls. UI elements now surface diagnostic exception data where appropriate.cli.py): Added explicit exception capturing to the dry-run push verification insetup_repoto catch and log specific authentication and upstream faults.ops.py): Injectedlogger.warning()into the iterators forsync_sessionandprune_backups. This captures malformed refs or missing objects instead of dropping them silently from the DAG traversal.daemon.py,system.py): Added debug telemetry forsubprocessand hardware interrogation faults inget_remote_hostandget_machine_id. This ensures restrictive/etc/permissions or malformed URLs are mathematically verifiable in the logs.