# Phase 1 Data Model: Dead Transitional Residue Cleanup ## Overview This feature introduces no new table, enum, or persisted artifact. It narrows the active runtime language around two already-existing truth domains: 1. Baseline profile lifecycle truth should flow only through `BaselineProfileStatus`. 2. Tenant app-status should remain, at most, historical stored data, not active runtime/support truth. ## Persistent Source Truths ### BaselineProfile **Purpose**: Workspace-owned baseline profile record. **Key fields**: - `id` - `workspace_id` - `name` - `status` - `capture_mode` - `active_snapshot_id` **Validation rules**: - `status` is cast to `BaselineProfileStatus` and is the only active lifecycle contract for draft, active, and archived behavior. - Deprecated alias constants on the model are not part of persistent truth and can be removed once no runtime caller depends on them. ### Tenant **Purpose**: Tenant-owned lifecycle and management record. **Key fields**: - `id` - `workspace_id` - `name` - `status` - `rbac_status` - `app_status` (historical legacy field) **Validation rules**: - `status` remains the active tenant lifecycle truth. - `rbac_status` remains a separate active management truth. - `app_status` may remain stored historically, but current runtime/support paths must not treat it as active default truth. ## Support Artifacts In Scope ### Deprecated alias layer **Artifact**: `BaselineProfile::STATUS_DRAFT`, `STATUS_ACTIVE`, `STATUS_ARCHIVED` **Role after cleanup**: - removed from active runtime language ### Legacy badge layer **Artifacts**: - `BadgeDomain::TenantAppStatus` - `BadgeCatalog` mapper entry for tenant app status - `TenantAppStatusBadge` **Role after cleanup**: - removed if no runtime consumer remains ### Legacy default setup **Artifacts**: - `TenantFactory` default `app_status => 'ok'` - `SeedBackupHealthBrowserFixture` default `app_status => 'ok'` **Role after cleanup**: - removed as ambient defaults - legacy `app_status` becomes explicit per-test or per-scenario setup only ## Behavioral Rules 1. Removing dead residue must not change baseline profile archive/list/workspace behavior. 2. Removing dead residue must not change tenant lifecycle or RBAC truth behavior. 3. Tests that still need a legacy `app_status` value must set it explicitly in the scenario. 4. Historical schema and migrations remain historical artifacts, not cleanup targets in this slice. ## No New Persistence - No new table is introduced. - No new enum or reason family is introduced. - No new derived readiness or cleanup artifact is introduced. - No stored field is repurposed into a new active truth contract.