diet-guard/diet_guard/tests
Krzysztof kuhy Rudnicki c310861855 slots: minute-of-day consumers (phase 2 of 3: Python side)
Every Python consumer now speaks slot minutes:

- satisfaction is nearest-slot snapping (_slot_wire.satisfied_by_entries)
  at every "is this slot logged?" site: gate, CLI status, MCP, catering
  occupancy and dedup. Nothing on disk is rewritten; 07:00/10:00 entries
  keep covering 07:15/10:15 after a schedule move.
- log_meal writes slot_fields(minute) before signing (slot + slot_min).
- schedule store and sync encode via schedule_to_wire/from_wire; a
  whole-hour schedule stays byte-identical (f/l/n only).
- CLI ate --hour takes HH or HH:MM; MCP log_meal takes "HH:MM" or a
  legacy int hour, validated against today's slots; get_slots returns
  {minute, label}.
- gate History tab: first/last are HH:MM ttk.Comboboxes (quarter-hour
  list, typed times, Up/Down step without posting the popdown), locked
  as disabled; validation mirrors normalized().
- gate timer fires every 15 min; docs rewritten for minutes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015npsYVB2PdtWkG7MPAi4tn
2026-10-10 19:53:39 +02:00
..
__init__.py feat(diet_guard): add meal-logging screen-lock gate with trigger fix 2026-06-10 22:32:39 +02:00
_gate_fixtures.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
_gate_focus_probe.py Split the six Python gate files; guard the fake-tk patch set 2026-08-15 20:08:03 +02:00
_gate_keyboard_probe.py gate + CLI: fill today's empty slots from catering in one confirmed step 2026-10-10 13:12:15 +02:00
_gate_layout_probe.py gate + CLI: fill today's empty slots from catering in one confirmed step 2026-10-10 13:12:15 +02:00
_gate_measurement.py Split the six Python gate files; guard the fake-tk patch set 2026-08-15 20:08:03 +02:00
_kuchnia_fakes.py feat: import Kuchnia Wikinga catering deliveries into the food bank 2026-08-22 23:04:22 +02:00
_state_redirects.py gate + CLI: fill today's empty slots from catering in one confirmed step 2026-10-10 13:12:15 +02:00
_sync_fakes.py Split _sync.py and its tests; extract the gate fixtures from conftest 2026-08-15 18:51:18 +02:00
_tk_fakes_canvas.py Body tab: weight/body-fat logs, BMI, ideal weight, goal-based kcal target, workouts + Health Connect steps, week planner 2026-09-28 09:03:03 +02:00
_tk_fakes_containers.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
_tk_fakes.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
conftest.py Body tab: weight/body-fat logs, BMI, ideal weight, goal-based kcal target, workouts + Health Connect steps, week planner 2026-09-28 09:03:03 +02:00
test_activity_sources.py Body tab: weight/body-fat logs, BMI, ideal weight, goal-based kcal target, workouts + Health Connect steps, week planner 2026-09-28 09:03:03 +02:00
test_averages_report.py Split the last seven Python files; extend the redirect guard to all five paths 2026-08-15 20:37:05 +02:00
test_averages.py Split the last seven Python files; extend the redirect guard to all five paths 2026-08-15 20:37:05 +02:00
test_body_calc.py Body tab: weight/body-fat logs, BMI, ideal weight, goal-based kcal target, workouts + Health Connect steps, week planner 2026-09-28 09:03:03 +02:00
test_body_parity.py Body tab: weight/body-fat logs, BMI, ideal weight, goal-based kcal target, workouts + Health Connect steps, week planner 2026-09-28 09:03:03 +02:00
test_body_report.py Body tab: weight/body-fat logs, BMI, ideal weight, goal-based kcal target, workouts + Health Connect steps, week planner 2026-09-28 09:03:03 +02:00
test_body_store.py Body tab: weight/body-fat logs, BMI, ideal weight, goal-based kcal target, workouts + Health Connect steps, week planner 2026-09-28 09:03:03 +02:00
test_body_sync.py Body tab: weight/body-fat logs, BMI, ideal weight, goal-based kcal target, workouts + Health Connect steps, week planner 2026-09-28 09:03:03 +02:00
test_budget_history_io.py Grade against 3.14 too, not just run on it 2026-08-29 11:35:06 +02:00
test_budget_history.py Split the last seven Python files; extend the redirect guard to all five paths 2026-08-15 20:37:05 +02:00
test_budget.py Split the last seven Python files; extend the redirect guard to all five paths 2026-08-15 20:37:05 +02:00
test_calendar_averages.py Show weekly and monthly average intake on both devices 2026-08-09 14:59:40 +02:00
test_calendar_view.py Migrate diet_guard to gatelock v0.2.0 per-output locking 2026-07-25 16:56:13 +02:00
test_cli_averages.py Show weekly and monthly average intake on both devices 2026-08-09 14:59:40 +02:00
test_cli_body.py Body tab: weight/body-fat logs, BMI, ideal weight, goal-based kcal target, workouts + Health Connect steps, week planner 2026-09-28 09:03:03 +02:00
test_cli_future_ate.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_cli_gate.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_cli_sync.py Refresh the phone weight from run_sync, where the PC's event-driven sync actually passes 2026-09-17 09:53:59 +02:00
test_cli.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_daystatus.py Split _state.py and _tk_fakes.py; make the food-log redirect fail closed 2026-08-15 20:21:26 +02:00
test_estimator.py Split the last seven Python files; extend the redirect guard to all five paths 2026-08-15 20:37:05 +02:00
test_foodbank_manual.py Split the last seven Python files; extend the redirect guard to all five paths 2026-08-15 20:37:05 +02:00
test_foodbank_rebuild.py Split the last seven Python files; extend the redirect guard to all five paths 2026-08-15 20:37:05 +02:00
test_foodbank.py Split the last seven Python files; extend the redirect guard to all five paths 2026-08-15 20:37:05 +02:00
test_fuzzy.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
test_gate_layout_fits.py Fit the meal gate on 1366x768 with a full day logged, and stop the auto-scroll 2026-08-03 16:00:13 +02:00
test_gate_schedule_move.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_gate_tk_modules.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_gate.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_gatelock_body.py Body tab: weight/body-fat logs, BMI, ideal weight, goal-based kcal target, workouts + Health Connect steps, week planner 2026-09-28 09:03:03 +02:00
test_gatelock_calendar_schedule.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_gatelock_calendar.py Body tab: weight/body-fat logs, BMI, ideal weight, goal-based kcal target, workouts + Health Connect steps, week planner 2026-09-28 09:03:03 +02:00
test_gatelock_dashboard.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_gatelock_fanout.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_gatelock_fillall_gate.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_gatelock_fillall.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_gatelock_form.py Split the three gate test files; assert fake_tk really swaps tkinter 2026-08-15 20:12:13 +02:00
test_gatelock_groups.py Split the three gate test files; assert fake_tk really swaps tkinter 2026-08-15 20:12:13 +02:00
test_gatelock_keyboard.py Take gatelock 0.8.1: colour reads through LockConfig.palette 2026-09-12 19:59:44 +02:00
test_gatelock_mealflow.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_gatelock_scheduleedit.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_gatelock.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_kuchnia_autoload.py feat: import Kuchnia Wikinga catering deliveries into the food bank 2026-08-22 23:04:22 +02:00
test_kuchnia_cli.py gate + CLI: fill today's empty slots from catering in one confirmed step 2026-10-10 13:12:15 +02:00
test_kuchnia_client.py kuchnia: walk every active order, not just the first 2026-10-10 12:32:17 +02:00
test_kuchnia_credential_store.py feat: sync the catering credential as its own document 2026-08-23 08:12:30 +02:00
test_kuchnia_credential_sync.py feat: carry the catering credential to the phone 2026-08-23 08:25:27 +02:00
test_kuchnia_fill.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_kuchnia_gate.py Prefill a catering dish as a whole-portion reference so the gate logs its own calories, not grams/100 times them 2026-09-20 08:30:05 +02:00
test_kuchnia_import.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_kuchnia_orders.py kuchnia: walk every active order, not just the first 2026-10-10 12:32:17 +02:00
test_kuchnia_parity.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_kuchnia_parse.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_kuchnia_queue.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_main.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
test_manual_workout_parse.py Body tab: weight/body-fat logs, BMI, ideal weight, goal-based kcal target, workouts + Health Connect steps, week planner 2026-09-28 09:03:03 +02:00
test_mcp_averages.py Make PC sync event-driven; retire the 15-min timer 2026-08-15 19:21:30 +02:00
test_mcp_slot.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_mcp.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_meal_schedule_store.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_meal_schedule_vectors.py slots: minute-of-day contract (phase 1 of 3: pure model + shared fixture) 2026-10-10 19:22:43 +02:00
test_meal_schedule.py slots: minute-of-day contract (phase 1 of 3: pure model + shared fixture) 2026-10-10 19:22:43 +02:00
test_phone_weight.py Body tab: weight/body-fat logs, BMI, ideal weight, goal-based kcal target, workouts + Health Connect steps, week planner 2026-09-28 09:03:03 +02:00
test_portions.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
test_prune_peers.py fix(sync): prune the revision marker too, not just the device directory 2026-08-21 13:38:34 +02:00
test_resolve.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
test_slot_wire.py slots: minute-of-day contract (phase 1 of 3: pure model + shared fixture) 2026-10-10 19:22:43 +02:00
test_slots_future.py slots: minute-of-day contract (phase 1 of 3: pure model + shared fixture) 2026-10-10 19:22:43 +02:00
test_slots_nearest.py slots: minute-of-day contract (phase 1 of 3: pure model + shared fixture) 2026-10-10 19:22:43 +02:00
test_slots.py slots: minute-of-day contract (phase 1 of 3: pure model + shared fixture) 2026-10-10 19:22:43 +02:00
test_state_redirect.py Register the _hmac_key fixture; guard the redirect so it fails locally 2026-08-15 21:19:35 +02:00
test_state_sync.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_state_today.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_state.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_sync_backend.py perf(gate): unfreeze "Fetch from sync" and bound the interactive timeout 2026-08-21 13:07:37 +02:00
test_sync_banks_mirror.py perf(sync): hoist the device listing and stop the curated-bank 404 storm 2026-08-21 13:16:08 +02:00
test_sync_banks.py Split the last seven Python files; extend the redirect guard to all five paths 2026-08-15 20:37:05 +02:00
test_sync_budget.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_sync_device_id.py perf(sync): hoist the device listing and stop the curated-bank 404 storm 2026-08-21 13:16:08 +02:00
test_sync_events.py perf(cli): publish off-thread so logging a meal returns immediately 2026-08-21 13:22:26 +02:00
test_sync_kuchnia.py fix: stop a touched credentials file clobbering a newer peer edit 2026-08-23 08:15:40 +02:00
test_sync_merge_banks.py Split _sync.py and its tests; extract the gate fixtures from conftest 2026-08-15 18:51:18 +02:00
test_sync_merge_budget.py Split _sync.py and its tests; extract the gate fixtures from conftest 2026-08-15 18:51:18 +02:00
test_sync_merge_schedule.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_sync_merge.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_sync_pull.py perf(sync): hoist the device listing and stop the curated-bank 404 storm 2026-08-21 13:16:08 +02:00
test_sync_refresh.py perf(gate): narrow the pre-lock pull and defer the heavy imports 2026-08-21 12:58:44 +02:00
test_sync.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
test_test_guard.py Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00