# Phase 44 — Hardening | Field | Value | |-------|-------| | Status | Complete | | Audit findings | 14, 16, 17, 18, 19, 20 | | Depends on | Phase 43 | ## Goal Tighten lifecycle, concurrency, and startup paths that worsen under long-running operation. ## What to build - [x] SimulationRunner: track run Task; await on stop (5s timeout) - [x] TrendDetector: Redis lock around GET/modify/SET history - [x] Paging workers: JsonDocument `using` (Phase 42); poll interval 5s (was 2s) - [x] PatientPhiMigrationService: keyset-batched updates (500) - [x] Light polish: deferred Parquet rewrite; health checks unchanged (low severity) ## Key files - `SimulationRunner.cs` - `TrendDetector.cs` - `PagingWorkerService.cs`, `LocalPagingWorkerService.cs` - `PatientPhiMigrationService.cs` - `ParquetFileBuilder.cs`, Kafka/Rabbit health checks ## Acceptance criteria - Simulation stop awaits tracked run task - Trend history correct under concurrency - PHI migration does not load fully migrated rows - Suite green ## Verification notes - Simulation stop awaits tracked execute tasks. - Trend history updates under a short Redis lock key.