Files
HaloKeymind/docs
mjgodatandClaude Opus 5.5 bdac192add fix(presets): never overwrite an unreadable /presets in lazy mode
Lazy mode treated any failed read of /presets as an empty store, so the
next countdown, revert or commit save replaced the user's slots with a
fresh table. It now remembers whether /presets holds this node's table
(loaded at boot or saved since). Once stored, a failed read is
"unreadable": get/add/del/load preset reply "Error: presets unreadable",
the pending revert or commit still runs from the RAM mirror, and save()
refuses until a read succeeds, leaving the stored bytes untouched.

Seeding now follows resident exactly: begin() seeds an empty table; at
run time the default is only added while /presets was never written, so
a table emptied by "del preset" stays empty until reboot in both modes.

Lazy members are reordered and the flags packed so the object is 32 B on
32-bit targets (static_assert tightened to <= 32).

Tests (both modes): del-all stays empty until reboot. Lazy only: corrupt
store with a pending timeout, short store with a commit, store vanishing
with a pending load, and a never-stored missing store.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 00:59:08 -07:00
..
2026-03-31 00:51:15 +13:00