fix: Phase 0b - correct all SQL column names in calculation engine
Schema corrections applied:
- weight_log: weight_kg → weight
- nutrition_log: calories → kcal
- activity_log: duration → duration_min, avg_heart_rate → hr_avg, max_heart_rate → hr_max
- rest_days: rest_type → type (aliased for backward compat)
- vitals_baseline: resting_heart_rate → resting_hr
- sleep_log: total_sleep_min → duration_minutes, deep_min → deep_minutes, rem_min → rem_minutes, waketime → wake_time
- focus_area_definitions: fa.focus_area_id → fa.key (proper join column)
Affected files:
- body_metrics.py: weight column (all queries)
- nutrition_metrics.py: kcal column + weight
- activity_metrics.py: duration_min, hr_avg, hr_max, quality via RPE mapping
- recovery_metrics.py: sleep + vitals columns
- correlation_metrics.py: kcal, weight
- scores.py: focus_area key selection
All 100+ Phase 0b placeholders should now calculate correctly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>