[arch] Phase 0: Break circular imports between packages #164

Closed
opened 2026-03-15 15:37:45 +00:00 by hermes · 0 comments
Collaborator

Goal

Eliminate circular dependencies so packages can be extracted cleanly.

Current cross-deps to break:

  1. timmy -> dashboard (3 imports):

    • timmy/thinking.py:618 imports dashboard.store.message_log
    • timmy/briefing.py:193 imports dashboard.store.message_log
    • timmy/tools_intro/__init__.py:301 imports dashboard.routes.health._START_TIME
  2. infrastructure -> timmy (1 import):

    • infrastructure/error_capture.py:225 imports timmy.session_logger

Solution

  • Move message_log to a shared module (config or a new timmy.store module)
  • Move _START_TIME to config.settings or infrastructure
  • Move session logger to infrastructure or make error_capture accept a logger interface

Done when

  • timmy/ has zero imports from dashboard/
  • infrastructure/ has zero imports from timmy/
  • tox -e unit passes
## Goal Eliminate circular dependencies so packages can be extracted cleanly. ## Current cross-deps to break: 1. `timmy -> dashboard` (3 imports): - `timmy/thinking.py:618` imports `dashboard.store.message_log` - `timmy/briefing.py:193` imports `dashboard.store.message_log` - `timmy/tools_intro/__init__.py:301` imports `dashboard.routes.health._START_TIME` 2. `infrastructure -> timmy` (1 import): - `infrastructure/error_capture.py:225` imports `timmy.session_logger` ## Solution - Move `message_log` to a shared module (config or a new `timmy.store` module) - Move `_START_TIME` to config.settings or infrastructure - Move session logger to infrastructure or make error_capture accept a logger interface ## Done when - `timmy/` has zero imports from `dashboard/` - `infrastructure/` has zero imports from `timmy/` - tox -e unit passes
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#164