diet-guard/docs
Krzysztof kuhy Rudnicki e6322f7f3e Serialise the relay's log writers
The narrow pull, the log write and the publish each read, merge and write
the food log. Run at once (a publish in flight while a second request
logs) they lose the append: the phone is told "logged" and the only copy
is gone. The new race test lost an entry before this change (1 of 2) and
keeps both after it; the shared temp-file name of the log writer also
collided between threads.

One asyncio lock now covers the pull, "resolve slot + log" and the
publish. A request arriving during a publish waits for it (up to one full
tick); the model call stays outside the lock.

Also: a test that the relay unlocks the header diet_guard's devices store
wrote (same key, a blob sealed by one opens on the other), the skill
returns grams 0 for nothing to estimate (parse fails closed, nothing is
logged), and the doc's session note is corrected: the pull and publish
refresh the gate's session file as the CLI's publish does.

Failure paths: a lost append is now impossible in-process (fail closed by
waiting); the pull failure, locked key, estimator and cleanup paths are
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWZHWP4KZ6x5TcXDBFC
2026-11-17 21:21:05 +01:00
..
explanations Add change explanation: desktop-web-build 2026-07-20 17:27:42 +02:00
DOCS-body.md Ideal weight: drop Broca family and Hamwi 2026-11-01 18:54:38 +01:00
DOCS-claude-relay.md Serialise the relay's log writers 2026-11-17 21:21:05 +01:00
DOCS-design.md Adopt the four markdown namespaces and gate them 2026-08-24 15:57:20 +02:00
DOCS-flutter-rules-design.md Adopt the four markdown namespaces and gate them 2026-08-24 15:57:20 +02:00
DOCS-flutter-rules-language.md Adopt the four markdown namespaces and gate them 2026-08-24 15:57:20 +02:00
DOCS-flutter-rules-state-and-data.md Adopt the four markdown namespaces and gate them 2026-08-24 15:57:20 +02:00
DOCS-flutter-rules-testing-and-assets.md Adopt the four markdown namespaces and gate them 2026-08-24 15:57:20 +02:00
DOCS-flutter-rules-ui.md Adopt the four markdown namespaces and gate them 2026-08-24 15:57:20 +02:00
DOCS-kuchnia-wikinga-phone.md Update app/diet_guard (17 files) 2026-10-10 13:49:58 +02:00
DOCS-kuchnia-wikinga.md Catering: answer the panel's CSRF 403 at login; kuchnia --log publishes 2026-10-17 12:42:13 +02:00
DOCS-meal-schedule.md gate: HH:MM spinboxes instead of comboboxes for the meal schedule 2026-10-10 20:13:03 +02:00
DOCS-sick-days.md Sick days: diet stands down only when the day does not keep it 2026-10-16 15:12:59 +02:00
DOCS-sync-latency.md Adopt the four markdown namespaces and gate them 2026-08-24 15:57:20 +02:00
DOCS-textgate-keep.md Icon-only date and time pickers 2026-11-11 12:05:11 +01:00