Context
The entity.py docstring documents that entities should be immutable (using Pydantic's frozen=True config). This is a fundamental Clean Architecture property — entities represent stable business concepts that should not be mutated after construction.
No doctrine test enforces this. An entity could be defined as mutable without any test catching it.
Analysis reference
This rule appears in architecture documentation (entity.py docstring) but has neither an ADR nor a doctrine test.
Acceptance criteria
Related
- Entity docstring:
src/julee/core/entities/entity.py
test_entity.py (extend existing doctrine test)
- Tier 1 priority (documented principle with no enforcement)
Context
The
entity.pydocstring documents that entities should be immutable (using Pydantic'sfrozen=Trueconfig). This is a fundamental Clean Architecture property — entities represent stable business concepts that should not be mutated after construction.No doctrine test enforces this. An entity could be defined as mutable without any test catching it.
Analysis reference
This rule appears in architecture documentation (entity.py docstring) but has neither an ADR nor a doctrine test.
Acceptance criteria
frozen=Truein their model config (either viamodel_config = ConfigDict(frozen=True)orclass Config: frozen = True)Related
src/julee/core/entities/entity.pytest_entity.py(extend existing doctrine test)