Commit Graph

1 Commits

Author SHA1 Message Date
dfd60d4f7b Close the open gate when a phone meal arrives
A meal logged on the phone while the gate window was up changed nothing
until Fetch was pressed: the new credit watch only fires on a local
write to the food log, and the PC never pulled on its own.

While a non-demo window is open it now pulls peer logs every 30 s, with
the Fetch button's own narrow pull on a worker thread. One pull is in
flight at a time (shared with the button), failures are logged and
retried, and the window stays up. The pull's write trips the watch,
which closes through the usual reconcile path. gatelock moves to 0.14.0
for watch_credit.

refresh_peer_logs also read the local log before the peer downloads and
wrote it after, so a meal logged during the pull was overwritten. It now
merges the peers first and reads the local log just before the write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWWfb63jncj9Lca2jeX
2026-11-16 09:18:07 +01:00