Description
The file app/modules/pipeline.py (lines 29-34) violates the project's import boundaries defined in pyproject.toml and enforced by import-linter. The pipeline module imports directly from other domain modules instead of communicating through core/models.py as required by the architecture.
This is a should-fix code smell that undermines the modular architecture and makes the dependency graph harder to reason about.
Current State
app/modules/pipeline.py lines 29-34 import from other domain modules directly
- The project's import-linter contracts (defined in
pyproject.toml) enforce that domain modules MUST NOT import from each other
core/ MUST NOT import from modules/
api/ may import from core/ and modules/
- These violations may currently be silent (import-linter not running in CI) or ignored
Acceptance Criteria
References
- Code smell: import boundary violation in pipeline.py:29-34
- Architecture rules:
backend/.github/instructions/python-backend.instructions.md
Additional Context
The import boundary rules exist to keep domain modules independent. If the pipeline needs data from other modules, it should receive that data as parameters (Pydantic models from core/models.py) rather than importing the modules directly. This refactoring may require changing the pipeline's function signatures to accept pre-fetched data.
Description
The file
app/modules/pipeline.py(lines 29-34) violates the project's import boundaries defined inpyproject.tomland enforced byimport-linter. The pipeline module imports directly from other domain modules instead of communicating throughcore/models.pyas required by the architecture.This is a should-fix code smell that undermines the modular architecture and makes the dependency graph harder to reason about.
Current State
app/modules/pipeline.pylines 29-34 import from other domain modules directlypyproject.toml) enforce that domain modules MUST NOT import from each othercore/MUST NOT import frommodules/api/may import fromcore/andmodules/Acceptance Criteria
pipeline.pycore/models.pyPydantic models onlylint-importscommand)References
backend/.github/instructions/python-backend.instructions.mdAdditional Context
The import boundary rules exist to keep domain modules independent. If the pipeline needs data from other modules, it should receive that data as parameters (Pydantic models from
core/models.py) rather than importing the modules directly. This refactoring may require changing the pipeline's function signatures to accept pre-fetched data.