Lookup ownership
The legacy domains/lookup package is a migration container, not a permanent business module. A reference dictionary belongs to the module that owns its meaning and change policy, even while its public HTTP path remains under /api/v1/lookup for compatibility.
Extracted to Devices
Devices now owns the complete SQL, repository, service, handler, and route slices for:
- device types, categories, functions, and application risks;
- applied-part types and electrical safety classes;
- primary and backup power sources;
- EU and FDA regulatory classes.
The legacy lookup router mounts Devices root components. It does not import Devices handlers, services, or repositories.
Remaining assignments
| Legacy query group | Target owner | Reason |
|---|---|---|
failure_code | maintenance | Describes maintenance and fault diagnosis |
work_order_type | maintenance | Defines maintenance work classification |
work_order_priority | maintenance | Defines maintenance planning urgency |
work_order_status | maintenance | Defines the work-order lifecycle |
location_category | facilities | Classifies facility-owned locations |
organization_type | organizations | Classifies organizations during onboarding and administration |
user_roles | identity | Defines authentication and membership authorization roles |
subscription_plans | billing | Defines commercial plan entitlements and pricing identity |
status | reference temporarily | A mixed generic table currently read by several workflows |
The generic status table should not receive new unrelated status families. Each target module should own new lifecycle states directly. Existing status families can be split during their owning module's extraction.
Migration order
- Maintenance dictionaries as one cohesive group.
- Facility location categories.
- Organization types.
- Identity roles.
- Billing subscription plans.
- Audit and split the remaining generic status families.
An automated allowlist test prevents new SQL query groups from being added to the legacy lookup directory during this migration.