mirror of
https://github.com/kuhyx/diet-guard.git
synced 2026-11-20 09:52:29 +01:00
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 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| conftest.py | ||
| test_budget.py | ||
| test_cli_gate.py | ||
| test_cli_sync.py | ||
| test_cli.py | ||
| test_estimator.py | ||
| test_foodbank.py | ||
| test_fuzzy.py | ||
| test_gate.py | ||
| test_gatelock_mealflow.py | ||
| test_gatelock.py | ||
| test_main.py | ||
| test_mcp.py | ||
| test_meal.py | ||
| test_portions.py | ||
| test_resolve.py | ||
| test_slots.py | ||
| test_state.py | ||
| test_sync_merge.py | ||
| test_sync.py | ||