diet-guard/diet_guard
Krzysztof kuhy Rudnicki e3af1f571b Gate: stand down inside declared holds
No lock and no owed slot while holds.covers("diet") is true; slots
inside a hold are excused; an open lock lifts within 30 s of a hold
starting. Fail closed (normal rules) if holds is missing or raises.
Pin holds-v0.1.0; bump coverage 7.17.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWVSoczW2NHQd887FUm
2026-11-03 20:27:11 +01:00
..
sync_merge slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
tests Gate: stand down inside declared holds 2026-11-03 20:27:11 +01:00
__init__.py Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
__main__.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
_activity_kcal.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
_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
_averages_periods.py Split the last seven Python files; extend the redirect guard to all five paths 2026-08-15 20:37:05 +02:00
_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
_averages.py Split the last seven Python files; extend the redirect guard to all five paths 2026-08-15 20:37:05 +02:00
_body_activity_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
_body_calc.py Ideal weight: drop Broca family and Hamwi 2026-11-01 18:54:38 +01:00
_body_energy.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
_body_fat_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
_body_ingest.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
_body_prefs.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
_body_report.py Ideal weight: drop Broca family and Hamwi 2026-11-01 18:54:38 +01:00
_body_steps.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
_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
_body_view.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
_budget_biometrics.py Split the last seven Python files; extend the redirect guard to all five paths 2026-08-15 20:37:05 +02:00
_budget_derived.py Split the last seven Python files; extend the redirect guard to all five paths 2026-08-15 20:37:05 +02:00
_budget_history.py Grade against 3.14 too, not just run on it 2026-08-29 11:35:06 +02:00
_budget.py Grade against 3.14 too, not just run on it 2026-08-29 11:35:06 +02:00
_calendar_view.py Take gatelock 0.8.1: colour reads through LockConfig.palette 2026-09-12 19:59:44 +02:00
_cli_args.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
_cli_averages.py Split the last seven Python files; extend the redirect guard to all five paths 2026-08-15 20:37:05 +02:00
_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
_cli_gate.py perf(gate): narrow the pre-lock pull and defer the heavy imports 2026-08-21 12:58:44 +02:00
_cli_init.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
_cli_kuchnia.py Catering: answer the panel's CSRF 403 at login; kuchnia --log publishes 2026-10-17 12:42:13 +02:00
_cli_log.py deps: flutter 3.47.7, crdt-sync 0.9.2, freedays 0.3.1, pydantic 2.14.0, ruff 0.17.0 2026-10-10 20:27:52 +02:00
_cli_prune.py feat(sync): add prune-peers to remove device dirs nothing writes to 2026-08-21 13:28:04 +02:00
_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
_cli.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
_coerce.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
_constants.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
_daystatus.py Show weekly and monthly average intake on both devices 2026-08-09 14:59:40 +02:00
_device.py Split _sync.py and its tests; extract the gate fixtures from conftest 2026-08-15 18:51:18 +02:00
_estimator_off.py perf(gate): narrow the pre-lock pull and defer the heavy imports 2026-08-21 12:58:44 +02:00
_estimator.py Split the last seven Python files; extend the redirect guard to all five paths 2026-08-15 20:37:05 +02:00
_foodbank_manual.py Grade against 3.14 too, not just run on it 2026-08-29 11:35:06 +02:00
_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
_foodbank_search.py Split the last seven Python files; extend the redirect guard to all five paths 2026-08-15 20:37:05 +02:00
_foodbank.py Grade against 3.14 too, not just run on it 2026-08-29 11:35:06 +02:00
_fuzzy.py feat(diet_guard): add meal-logging screen-lock gate with trigger fix 2026-06-10 22:32:39 +02:00
_gate.py Gate: stand down inside declared holds 2026-11-03 20:27:11 +01:00
_gatelock_body_graph.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
_gatelock_body_input.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
_gatelock_body_vars.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
_gatelock_body_widgets.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
_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
_gatelock_budgetedit.py Split the last seven Python files; extend the redirect guard to all five paths 2026-08-15 20:37:05 +02:00
_gatelock_calendar_schedule.py gate: HH:MM spinboxes instead of comboboxes for the meal schedule 2026-10-10 20:13:03 +02:00
_gatelock_calendar_types.py gate: HH:MM spinboxes instead of comboboxes for the meal schedule 2026-10-10 20:13:03 +02:00
_gatelock_calendar_ui.py gate: HH:MM spinboxes instead of comboboxes for the meal schedule 2026-10-10 20:13:03 +02:00
_gatelock_calendar_widgets.py Take gatelock 0.8.1: colour reads through LockConfig.palette 2026-09-12 19:59:44 +02:00
_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
_gatelock_core.py Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
_gatelock_delivery.py gate + CLI: fill today's empty slots from catering in one confirmed step 2026-10-10 13:12:15 +02:00
_gatelock_fetch.py perf(gate): unfreeze "Fetch from sync" and bound the interactive timeout 2026-08-21 13:07:37 +02:00
_gatelock_fields.py Take gatelock 0.8.1: colour reads through LockConfig.palette 2026-09-12 19:59:44 +02:00
_gatelock_fillall.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
_gatelock_groups.py Split the six Python gate files; guard the fake-tk patch set 2026-08-15 20:08:03 +02:00
_gatelock_kuchnia.py feat: import Kuchnia Wikinga catering deliveries into the food bank 2026-08-22 23:04:22 +02:00
_gatelock_layout.py gate + CLI: fill today's empty slots from catering in one confirmed step 2026-10-10 13:12:15 +02:00
_gatelock_lockfile.py Split the six Python gate files; guard the fake-tk patch set 2026-08-15 20:08:03 +02:00
_gatelock_mealflow.py gate + CLI: fill today's empty slots from catering in one confirmed step 2026-10-10 13:12:15 +02:00
_gatelock_nutrition.py Grade against 3.14 too, not just run on it 2026-08-29 11:35:06 +02:00
_gatelock_scheduleedit.py gate: HH:MM spinboxes instead of comboboxes for the meal schedule 2026-10-10 20:13:03 +02:00
_gatelock_spacing.py Re-point paths for the ~ reorganisation (home-tidy) 2026-09-11 19:53:03 +02:00
_gatelock_support.py feat: split oversized modules for 500-line limit, fix kasa coverage gap 2026-06-14 07:19:37 +02:00
_gatelock_typography.py Re-point paths for the ~ reorganisation (home-tidy) 2026-09-11 19:53:03 +02:00
_gatelock_ui_types.py gate + CLI: fill today's empty slots from catering in one confirmed step 2026-10-10 13:12:15 +02:00
_gatelock_ui.py gate + CLI: fill today's empty slots from catering in one confirmed step 2026-10-10 13:12:15 +02:00
_gatelock_widgetgroups.py Split the six Python gate files; guard the fake-tk patch set 2026-08-15 20:08:03 +02:00
_gatelock.py Gate: stand down inside declared holds 2026-11-03 20:27:11 +01:00
_hold.py Gate: stand down inside declared holds 2026-11-03 20:27:11 +01:00
_kuchnia_client.py Catering: answer the panel's CSRF 403 at login; kuchnia --log publishes 2026-10-17 12:42:13 +02:00
_kuchnia_config.py Grade against 3.14 too, not just run on it 2026-08-29 11:35:06 +02:00
_kuchnia_credential_store.py Grade against 3.14 too, not just run on it 2026-08-29 11:35:06 +02:00
_kuchnia_errors.py feat: import Kuchnia Wikinga catering deliveries into the food bank 2026-08-22 23:04:22 +02:00
_kuchnia_import.py kuchnia: walk every active order, not just the first 2026-10-10 12:32:17 +02:00
_kuchnia_log.py slots: never post the schedule combobox list; kuchnia dedup on raw minute 2026-10-10 20:06:16 +02:00
_kuchnia_orders.py kuchnia: walk every active order, not just the first 2026-10-10 12:32:17 +02:00
_kuchnia_parse.py feat: mirror the catering parser and slot spread in Dart, gated by one fixture 2026-08-23 08:00:54 +02:00
_kuchnia_spread.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
_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
_mcp_read.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
_mcp_server.py Make PC sync event-driven; retire the 15-min timer 2026-08-15 19:21:30 +02:00
_mcp.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
_meal_schedule_store.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
_meal_schedule.py slots: minute-of-day contract (phase 1 of 3: pure model + shared fixture) 2026-10-10 19:22:43 +02:00
_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
_portions.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
_prune_peers.py Grade against 3.14 too, not just run on it 2026-08-29 11:35:06 +02:00
_resolve.py Split the last seven Python files; extend the redirect guard to all five paths 2026-08-15 20:37:05 +02:00
_slot_wire.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
_slots.py slots: minute-of-day contract (phase 1 of 3: pure model + shared fixture) 2026-10-10 19:22:43 +02:00
_state_sync.py Split _state.py and _tk_fakes.py; make the food-log redirect fail closed 2026-08-15 20:21:26 +02:00
_state_today.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
_state.py slots: minute-of-day consumers (phase 2 of 3: Python side) 2026-10-10 19:53:39 +02:00
_sync_banks.py Grade against 3.14 too, not just run on it 2026-08-29 11:35:06 +02:00
_sync_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
_sync_client.py perf(gate): unfreeze "Fetch from sync" and bound the interactive timeout 2026-08-21 13:07:37 +02:00
_sync_errors.py Split _sync.py and its tests; extract the gate fixtures from conftest 2026-08-15 18:51:18 +02:00
_sync_events.py perf(cli): publish off-thread so logging a meal returns immediately 2026-08-21 13:22:26 +02:00
_sync_kuchnia.py Grade against 3.14 too, not just run on it 2026-08-29 11:35:06 +02:00
_sync_paths.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
_sync_refresh.py Grade against 3.14 too, not just run on it 2026-08-29 11:35:06 +02:00
_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_guard.py Grade against 3.14 too, not just run on it 2026-08-29 11:35:06 +02:00
_week_plan.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