# Functional Design Plan — U2 Data Durability **Unit**: U2 Data Durability **Round**: R1 (with U1 Hosting & Serving) **Requirements**: FR-11, FR-12 **Components**: C-05, C-06, C-07, U2 portion of C-16 --- ## Step 1: Analyze unit context - [x] Read the U2 definition from `unit-of-work.md` - [x] Read the requirement assignment from `unit-of-work-story-map.md` - [x] Read the carried-in design items — § 5.1 duplicate registration conflict, explicit application discriminator ## Step 2: Design the Data Protection key ring - [x] Define the key-storage entity and its owning context - [x] Define the application-discriminator source and stability guarantee - [x] Define key encryption at rest - [x] Define key lifetime and rotation behaviour - [x] Define the registration-order rule that resolves the duplicate-registration conflict ## Step 3: Design startup migration behaviour - [x] Define which contexts migrate and in what order - [x] Define failure behaviour and what is logged before failing - [x] Define behaviour when the database is temporarily unreachable at startup - [x] Define behaviour when a migration is applied concurrently by two starting instances ## Step 4: Define business rules - [x] Enumerate key-ring durability rules - [x] Enumerate migration rules - [x] Identify error and edge-case scenarios ## Step 5: Design verification approach - [x] Define how "the persistent key store survives module registration" is asserted - [x] Define how discriminator stability across a content-root change is asserted ## Step 6: Generate artifacts - [x] Generate `business-logic-model.md` - [x] Generate `business-rules.md` - [x] Generate `domain-entities.md` - [x] Validate all diagrams against the Mermaid standards - [x] Verify Security Baseline compliance for this unit's design