screen-locker/screen_locker/workout_log.json
Krzysztof kuhy Rudnicki e25d806742 Fix silent skip-credit bypass; replace with weekly shutdown-time bonus
The screen locker skipped enforcement on 2026-07-03 without ever showing
a lock: a banked skip credit (earned from a prior 5+/week streak) was
consumed automatically with no confirmation and no visible log. Reworked
the whole reward mechanic instead of just gating it, since banking a
"skip a future workout" credit works against maximizing weekly workouts:

- Removed skip credits entirely (has_skip_credit/consume_skip_credit and
  the confirmation dialog built to gate them). The only same-day skip
  paths left are heat_skip and sick_day, both requiring a genuine reason.
- Extra workouts (5+/week) now bank shutdown-time-later hours for the
  following week instead — comfort, not reduced enforcement. Reuses the
  existing _adjust_shutdown_time_by and reset_to_base_if_new_day's
  previously-discarded return value as the once-per-day gate.
- early_bird and sick_day no longer pollute workout_log.json. early_bird
  is a same-day pending marker now stored in its own self-expiring,
  HMAC-signed file; sick_day is sourced entirely from sick_history.json
  (already the real source of truth). Fixes an accidental-safety gap
  where "already took a sick day today" only halted startup by luck.
- Cleaned up 3 stale non-workout entries already in workout_log.json.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QdTccgbK7624kfoaV6CtXS
2026-07-03 15:27:08 +02:00

138 lines
4.5 KiB
JSON

{
"2026-05-31": {
"timestamp": "2026-05-31T13:17:30.464939+00:00",
"workout_data": {
"type": "phone_verified",
"source": "Workout verified! (72 min, partial)"
},
"hmac": "92d8fd4bb257cf0a00ed0fbc21cc280dc10f5e0bebcbc8f7ee5dc623a9bbf0cf"
},
"2026-06-01": {
"timestamp": "2026-06-01T11:17:19.440914+00:00",
"workout_data": {
"type": "phone_verified",
"source": "Workout verified! (121 min, partial)"
},
"hmac": "21334df99507b2ea8b6d3a4605c3139a67ca2414f1b1cf6efbc9fb2347f5d1bc"
},
"2026-06-05": {
"timestamp": "2026-06-05T09:23:12.410612+00:00",
"workout_data": {
"type": "phone_verified",
"source": "Workout verified! (94 min, partial)"
},
"hmac": "20ff6a5990afb0821a6448246fb2fea3b65c47286beb1a8f818d4705e3aa112d"
},
"2026-06-06": {
"timestamp": "2026-06-06T08:18:31.831102+00:00",
"workout_data": {
"type": "phone_verified",
"source": "Workout verified! (97 min, all succeeded)"
},
"hmac": "fe9111d1dea01cce713c9c75ab42701f9d03db38b62e37dbfb651cb2b9c5e24d"
},
"2026-06-08": {
"timestamp": "2026-06-08T09:24:18.568677+00:00",
"workout_data": {
"type": "phone_verified",
"source": "Workout verified! (108 min, all succeeded)"
},
"hmac": "cd470d778578661764a0ea3008c9b5f97a3484ec57023dddf4c273ee0176685e"
},
"2026-06-12": {
"timestamp": "2026-06-12T11:44:39.486020+00:00",
"workout_data": {
"type": "phone_verified",
"source": "Workout verified! (100 min, all succeeded)",
"after_sick_day": "true"
},
"hmac": "19da04ca404852d60c2cf3b0f5d21bc8830691603f2d710c482960808e64c17d"
},
"2026-06-13": {
"timestamp": "2026-06-13T08:05:10.092148+00:00",
"workout_data": {
"type": "phone_verified",
"source": "Workout verified! (112 min, all succeeded)"
},
"hmac": "c3df957c1be72de4d5428922d1c33815ce4d4fe7661e07ee69020e3a0cb4ea44"
},
"2026-06-14": {
"timestamp": "2026-06-14T08:03:30.547958+00:00",
"workout_data": {
"type": "phone_verified",
"source": "Workout verified! (72 min, all succeeded)"
},
"hmac": "2bf43ed46b3caa9b9edfe120d99f05d160c7169acf9ced8f6bb1c51d7e224acf"
},
"2026-06-15": {
"timestamp": "2026-06-15T08:20:26.706505+00:00",
"workout_data": {
"type": "phone_verified",
"source": "Workout verified! (92 min, all succeeded)"
},
"hmac": "e031a75971cc7881d63fb93881d337494baba59909a417655e487878fc2fdb88"
},
"2026-06-19": {
"timestamp": "2026-06-19T08:16:30.693811+00:00",
"workout_data": {
"type": "phone_verified",
"source": "Workout verified! (103 min, all succeeded)"
},
"hmac": "f05ea3f7a5bd754d06e76001e8641628644145ea49f2ace7ed28ba1802428d95"
},
"2026-06-22": {
"timestamp": "2026-06-22T07:58:28.232279+00:00",
"workout_data": {
"type": "phone_verified",
"source": "Workout verified! (76 min, partial)"
},
"hmac": "7d7480441c66bc2e05864a0085f7ffd6d06933beb6794bb4e0e0790be86967e4"
},
"2026-06-23": {
"timestamp": "2026-06-23T19:58:27.015653+00:00",
"workout_data": {
"type": "runnerup_manual",
"source": "RunnerUp run, 9.71km in 60.3min (11 laps)",
"duration_minutes": "60.3",
"distance_km": "9.71"
},
"hmac": "06adf65ab8e631c3c5d6a0b993a7044eda22e68204a7bdc8eac7cc95a512e5b4"
},
"2026-06-26": {
"timestamp": "2026-06-26T09:10:53.087667+00:00",
"workout_data": {
"type": "phone_verified",
"source": "Workout verified! (126 min, partial)"
},
"hmac": "ad8fbce338ede9408879632d394df454a00dd7257134b58f69c2e3d90702f09e"
},
"2026-06-27": {
"timestamp": "2026-06-28T06:06:49.125698+00:00",
"workout_data": {
"type": "runnerup_verified",
"source": "Auto-scanned: Running: 6.9 km in 44 min",
"distance_km": 6.9,
"duration_minutes": 44.0
},
"hmac": "cc4834fc72e939ce2ce0fbc5a8d4a204d2e5acf0b0980c486355549b18a3269e"
},
"2026-06-25": {
"timestamp": "2026-06-27T10:01:48.374179+00:00",
"workout_data": {
"type": "runnerup_verified",
"source": "Auto-scanned: Running: 8.0 km in 50 min",
"distance_km": 8.03,
"duration_minutes": 50.1
},
"hmac": "0e6c6dde4185ca0980ff9d5fdf5e20734a7f86724b0b355e57a6cd6df5b7ace2"
},
"2026-06-29": {
"timestamp": "2026-06-29T09:21:58.110418+00:00",
"workout_data": {
"type": "heat_skip",
"temperature_celsius": "32",
"city": "Warsaw"
},
"hmac": "75b19b1d085121463dbebbf0ae579e6efefc77ee3f3806ef593fd2e8723baa59"
}
}