forked from Rockachopa/Timmy-time-dashboard
feat: automatic error feedback loop with bug report tracker (#80)
Errors and uncaught exceptions are now automatically captured, deduplicated, persisted to a rotating log file, and filed as bug report tasks in the existing task queue — giving Timmy a sovereign, local issue tracker with zero new dependencies. - Add RotatingFileHandler writing errors to logs/errors.log (5MB rotate, 5 backups) - Add error capture module with stack-trace hashing and 5-min dedup window - Add FastAPI exception middleware + global exception handler - Instrument all background loops (briefing, thinking, task processor) with capture_error() - Extend task queue with bug_report task type and auto-approve rule - Fix auto-approve type matching (was ignoring task_type field entirely) - Add /bugs dashboard page and /api/bugs JSON endpoints - Add ERROR_CAPTURED and BUG_REPORT_CREATED event types for real-time feed - Add BUGS nav link to desktop and mobile navigation - Add 16 tests covering error capture, deduplication, and bug report routes Co-authored-by: Alexander Payne <apayne@MM.local> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
6545b7e26a
commit
aa3263bc3b
@@ -74,8 +74,11 @@ class QueueTask:
|
||||
|
||||
AUTO_APPROVE_RULES = [
|
||||
{"assigned_to": "timmy", "type": "chat_response"},
|
||||
{"assigned_to": "timmy", "type": "thought"},
|
||||
{"assigned_to": "timmy", "type": "internal"},
|
||||
{"assigned_to": "forge", "type": "run_tests"},
|
||||
{"priority": "urgent", "created_by": "timmy"},
|
||||
{"type": "bug_report", "created_by": "system"},
|
||||
]
|
||||
|
||||
|
||||
@@ -87,7 +90,10 @@ def should_auto_approve(task: QueueTask) -> bool:
|
||||
match = True
|
||||
for key, val in rule.items():
|
||||
if key == "type":
|
||||
continue # type matching is informational for now
|
||||
if task.task_type != val:
|
||||
match = False
|
||||
break
|
||||
continue
|
||||
task_val = getattr(task, key, None)
|
||||
if isinstance(task_val, Enum):
|
||||
task_val = task_val.value
|
||||
|
||||
Reference in New Issue
Block a user