Mirror / foldkit-mirror
Key-value restore semantics
Prefs.reduce(model, message) writes a stored value back only for fields still at their initial value. If a user types 'new text' into draft before the asynchronous MirrorRestored arrives, reduce preserves 'new text' instead of overwriting it with the older stored draft.
Because Prefs.subscriptions starts immediately on cold load, a key-value mirror holds outgoing writes until the Model matches the latest restore answer (or matches the store itself when no restore ran). Empty stores release writes immediately, failed reads resolve as empty, and each runtime holds its own gate independently.
When both a URL mirror and a key-value mirror observe the same field, startup precedence is URL value (when present), then key-value restore, then the initial value.