mirror of
https://github.com/kuhyx/diet-guard.git
synced 2026-11-11 21:13:53 +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 |
||
|---|---|---|
| .. | ||
| tests | ||
| __init__.py | ||
| __main__.py | ||
| _budget.py | ||
| _cli_gate.py | ||
| _cli_sync.py | ||
| _cli.py | ||
| _coerce.py | ||
| _constants.py | ||
| _estimator.py | ||
| _foodbank.py | ||
| _fuzzy.py | ||
| _gate.py | ||
| _gatelock_core.py | ||
| _gatelock_mealflow.py | ||
| _gatelock_nutrition.py | ||
| _gatelock_support.py | ||
| _gatelock_ui.py | ||
| _gatelock.py | ||
| _mcp.py | ||
| _meal.py | ||
| _portions.py | ||
| _resolve.py | ||
| _slots.py | ||
| _state.py | ||
| _sync_merge.py | ||
| _sync.py | ||