diet-guard/diet_guard/tests
Krzysztof kuhy Rudnicki 8a9c7713b9
Some checks are pending
pre-commit / pre-commit (push) Waiting to run
Tests / test (3.10) (push) Waiting to run
Tests / test (3.11) (push) Waiting to run
Tests / test (3.12) (push) Waiting to run
Review fixes: specific sync exceptions, clearer names
Address code-review feedback on the sync-before-lock change:

- pull_shared_log now catches (SyncError, GitHubSyncError, OSError) instead
  of a blanket `except Exception`. crdt_sync wraps every requests transport
  error in GitHubSyncError, so those three are the whole realistic failure
  surface; the gate still fails closed on all of them, and a genuine bug now
  surfaces instead of being hidden as "sync unavailable". Drops the
  broad-exception pylint disable and the per-file BLE001 ignore in pyproject.
- Rename _cli_gate._is_due -> _should_lock: too easily confused with the pure
  local predicate gate_is_due it wraps. The new name says what it decides.
- Rename the list `satisfied` -> `satisfied_slots` in _reconcile_after_fetch;
  it's a list of slots, not a boolean.

No behaviour change; 100% coverage retained.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FtSmzACzJSGyEatgK9exkd
2026-07-11 18:33:43 +02:00
..
__init__.py feat(diet_guard): add meal-logging screen-lock gate with trigger fix 2026-06-10 22:32:39 +02:00
conftest.py Add cross-device log sync (Python half of Milestone 3) 2026-06-22 19:36:27 +02:00
test_budget.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
test_cli_gate.py Review fixes: specific sync exceptions, clearer names 2026-07-11 18:33:43 +02:00
test_cli_sync.py Migrate sync to shared crdt_sync library (Python + Dart) 2026-07-10 23:49:43 +02:00
test_cli.py Add cross-device log sync (Python half of Milestone 3) 2026-06-22 19:36:27 +02:00
test_estimator.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
test_foodbank.py Add cross-device log sync (Python half of Milestone 3) 2026-06-22 19:36:27 +02:00
test_fuzzy.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
test_gate.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
test_gatelock_mealflow.py Sync before locking the gate + manual "Fetch from sync" button 2026-07-11 17:54:38 +02:00
test_gatelock.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
test_main.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
test_mcp.py Add MCP server exposing diet status + a gated log_meal 2026-07-10 21:36:46 +02:00
test_meal.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
test_portions.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
test_resolve.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
test_slots.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
test_state.py Sync before locking the gate + manual "Fetch from sync" button 2026-07-11 17:54:38 +02:00
test_sync_merge.py Migrate sync to shared crdt_sync library (Python + Dart) 2026-07-10 23:49:43 +02:00
test_sync.py Review fixes: specific sync exceptions, clearer names 2026-07-11 18:33:43 +02:00