mitai-jinkendo/backend/calculations
Lars 10ea560fcf
All checks were successful
Deploy Development / deploy (push) Successful in 51s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 14s
fix: Phase 0b - fix last sleep column names in health_stability_score
Fixed remaining sleep_log column name errors in calculate_health_stability_score:
- SELECT: total_sleep_min, deep_min, rem_min → duration_minutes, deep_minutes, rem_minutes
- _score_sleep_quality: Updated dict access to use new column names

This was blocking goal_progress_score from calculating.

Changes:
- scores.py: Fixed sleep_log SELECT query and _score_sleep_quality dict access

This should be the LAST column name bug! All Phase 0b calculations should now work.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 09:35:36 +01:00
..
__init__.py feat: Phase 0b - Calculation Engine for 120+ Goal-Aware Placeholders 2026-03-28 07:20:40 +01:00
activity_metrics.py fix: Phase 0b - fix remaining calculation errors 2026-03-28 08:39:31 +01:00
body_metrics.py fix: Phase 0b - fix remaining calculation bugs from log analysis 2026-03-28 08:50:55 +01:00
correlation_metrics.py fix: Phase 0b - correct all SQL column names in calculation engine 2026-03-28 08:28:20 +01:00
nutrition_metrics.py fix: Phase 0b - correct all SQL column names in calculation engine 2026-03-28 08:28:20 +01:00
recovery_metrics.py fix: Phase 0b - fix remaining calculation bugs from log analysis 2026-03-28 08:50:55 +01:00
scores.py fix: Phase 0b - fix last sleep column names in health_stability_score 2026-03-28 09:35:36 +01:00