feat: add Support Engineer (auto error detection and repair)#195
Closed
Paritoshdagar wants to merge 1 commit into
Closed
feat: add Support Engineer (auto error detection and repair)#195Paritoshdagar wants to merge 1 commit into
Paritoshdagar wants to merge 1 commit into
Conversation
- New module src/scheduler/support_engineer.py: - Runs as APScheduler cron job (* * * * *) every minute - Scans messages table for errors (messages.error IS NOT NULL) - Matches against KNOWN_ERRORS patterns - Applies fixes: hindsight bank recreation, bot.db reclone, homedir perms - Logs fix attempts to support_fixes table - Escalates unknown errors to owner via Telegram (chat_id from APPROVED_USERS) - Uses existing telegram.Bot instance via set_bot_and_owner() - main.py: wires SupportEngineer into lifecycle after scheduler - config/features.py: adds support_engineer_enabled property - config/settings.py: adds enable_support_engineer field (env: ENABLE_SUPPORT_ENGINEER) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
Adds a
SupportEngineerclass that runs as an APScheduler cron job (every minute) inside the existing bot process. Scansbot.dbfor errors, matches against known patterns, applies fixes, and escalates unknowns to the owner via Telegram.Test plan
support_engineer.enabledin logs)* * * * *)support_fixestable🤖 Generated with Claude Code