Memory 019eae49
Memory ID (Session ID): 019eae49-cfc0-7000-b9ff-20aec757e941
Last Updated: 2026-06-09 23:43:31
Fact Summary
StoryMatrix Codebase Audit Findings (Actionable Fixes Required):
- Critical File Duplication:
src/[[projects/storymatrix|StoryMatrix]]/domain/models_1.py(4096 lines) is a duplicate ofmodels.py. Needs deletion.src/[[projects/storymatrix|StoryMatrix]]/application/agents/crews.pyis an unimported duplicate ofcrew.py. Needs deletion.src/[[projects/storymatrix|StoryMatrix]]/infrastructure/mock_service_old.pyis obsolete..backupfiles and empty tests (test_chroma.py,test_simple.py,test_sanity.py) need cleanup.
- DI Container Issues (
src/[[projects/storymatrix|StoryMatrix]]/core/container.py):
- Bloated (1060 lines), requires splitting/refactoring.
_safe_init_provideruses a dangeroustry: ... except Exception: passpattern that swallows initialization errors. Needs explicit logging/error handling.- Line 727 contains a duplicate
_provide_summary_servicedefinition that shadows line 720.
- Dependency & Configuration Inconsistencies:
pyproject.tomlPython versions conflict:requires-pythonexpects >=3.11, while ruff/mypy/hatch configs target 3.10. Must align all to3.11.- Core
dependenciesinpyproject.tomlare bloated with web/ML tools (fastapi, nicegui, celery, redis, multiple JSON parsers). Move web/heavy dependencies to extras (e.g.,[project.optional-dependencies.web]).
- Architectural/Code Smells:
mock_service.py(MockService) uses a magic null-object pattern (__getattr__,__call__returningMockService()) that silently swallows missing methods/miswiring.- Exception hierarchy in
src/[[projects/storymatrix|StoryMatrix]]/domain/exceptions.pyis split:ValidationErrorandStoryGenerationErrorbranch fromStoryMatrixExceptionrather thanDomainError/StoryMatrixError, breaking exception catching.
Reference Session
- Associated Chat Session: 019eae49-cfc0-7000-b9ff-20aec757e941