Audit finding
src/SightAdapt/ApplicationProfile.cs currently combines:
- the read-only settings contract;
- mutable persisted settings;
- application-assignment state;
- visual-profile state;
- application identity;
- JSON serialization attributes;
- legacy
effect compatibility behavior.
The runtime ApplicationProfile model contains persistence-only members such as LegacyEffect, and its Effect compatibility property always exposes/forces invert semantics. Persistence schema concerns therefore leak into domain behavior and make the model harder to reason about.
This violates KISS, Single Point of Authority and clean separation of concerns.
Target state
Create explicit persisted DTOs owned by the settings/persistence boundary. Deserialize and migrate DTOs, then map them to clean runtime/domain models.
Legacy fields must be interpreted only by the migration layer. Domain models must not carry JSON annotations or legacy compatibility setters.
Acceptance criteria
Audit finding
src/SightAdapt/ApplicationProfile.cscurrently combines:effectcompatibility behavior.The runtime
ApplicationProfilemodel contains persistence-only members such asLegacyEffect, and itsEffectcompatibility property always exposes/forces invert semantics. Persistence schema concerns therefore leak into domain behavior and make the model harder to reason about.This violates KISS, Single Point of Authority and clean separation of concerns.
Target state
Create explicit persisted DTOs owned by the settings/persistence boundary. Deserialize and migrate DTOs, then map them to clean runtime/domain models.
Legacy fields must be interpreted only by the migration layer. Domain models must not carry JSON annotations or legacy compatibility setters.
Acceptance criteria
effecthandling exist only in the persistence/migration boundary.