[loop-generated] [bug] Bare except Exception blocks swallow errors silently #484

Closed
opened 2026-03-19 19:47:52 +00:00 by Timmy · 2 comments
Owner

Problem

11 locations use bare except Exception: without logging, making debugging impossible.

Locations

  • src/timmy/memory_system.py:638
  • src/dashboard/app.py:444
  • src/dashboard/routes/world.py:223,252,267,342
  • src/dashboard/routes/system.py:168,192,217
  • src/dashboard/routes/agents.py:93
  • src/dashboard/routes/chat_api.py:87

Impact

Errors silently swallowed. No trace in production. Violates SOUL.md audit trail.

Fix

Add logger.exception(...) or logger.warning(...) to each bare except block. Do NOT change control flow.

Files

  • src/timmy/memory_system.py
  • src/dashboard/app.py
  • src/dashboard/routes/world.py
  • src/dashboard/routes/system.py
  • src/dashboard/routes/agents.py
  • src/dashboard/routes/chat_api.py
## Problem 11 locations use bare `except Exception:` without logging, making debugging impossible. ### Locations - src/timmy/memory_system.py:638 - src/dashboard/app.py:444 - src/dashboard/routes/world.py:223,252,267,342 - src/dashboard/routes/system.py:168,192,217 - src/dashboard/routes/agents.py:93 - src/dashboard/routes/chat_api.py:87 ## Impact Errors silently swallowed. No trace in production. Violates SOUL.md audit trail. ## Fix Add `logger.exception(...)` or `logger.warning(...)` to each bare except block. Do NOT change control flow. ## Files - src/timmy/memory_system.py - src/dashboard/app.py - src/dashboard/routes/world.py - src/dashboard/routes/system.py - src/dashboard/routes/agents.py - src/dashboard/routes/chat_api.py
Author
Owner

Instructions for Kimi

Add error logging to all bare except Exception: blocks listed in the issue.

For each file:

  1. Ensure a logger = logging.getLogger(__name__) exists at module level
  2. Replace except Exception: with except Exception: followed by logger.exception('...') with a descriptive message
  3. Keep the existing control flow (don't re-raise unless already doing so)

Files to modify:

  • src/timmy/memory_system.py (line 638)
  • src/dashboard/app.py (line 444)
  • src/dashboard/routes/world.py (lines 223, 252, 267, 342)
  • src/dashboard/routes/system.py (lines 168, 192, 217)
  • src/dashboard/routes/agents.py (line 93)
  • src/dashboard/routes/chat_api.py (line 87)

Verify: tox -e unit

## Instructions for Kimi Add error logging to all bare `except Exception:` blocks listed in the issue. For each file: 1. Ensure a `logger = logging.getLogger(__name__)` exists at module level 2. Replace `except Exception:` with `except Exception:` followed by `logger.exception('...')` with a descriptive message 3. Keep the existing control flow (don't re-raise unless already doing so) Files to modify: - `src/timmy/memory_system.py` (line 638) - `src/dashboard/app.py` (line 444) - `src/dashboard/routes/world.py` (lines 223, 252, 267, 342) - `src/dashboard/routes/system.py` (lines 168, 192, 217) - `src/dashboard/routes/agents.py` (line 93) - `src/dashboard/routes/chat_api.py` (line 87) Verify: `tox -e unit`
kimi was assigned by Timmy 2026-03-19 19:50:21 +00:00
Author
Owner

Additional bare except Exception: blocks found beyond original scope:

  • src/dashboard/routes/system.py (lines 168, 192, 217)
  • src/dashboard/routes/agents.py (line 93)
  • src/dashboard/routes/chat_api.py (line 87)

Please include these in the fix as well. Same pattern: add as exc and log the error.

Additional bare `except Exception:` blocks found beyond original scope: - `src/dashboard/routes/system.py` (lines 168, 192, 217) - `src/dashboard/routes/agents.py` (line 93) - `src/dashboard/routes/chat_api.py` (line 87) Please include these in the fix as well. Same pattern: add `as exc` and log the error.
Timmy closed this issue 2026-03-19 23:05:03 +00:00
kimi was unassigned by Timmy 2026-03-19 23:05:04 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#484