self-review 2026-05-17: fix heartbeat JSON validity for unset state keys

state_get() returns "" for unset keys. Both soul.pulse and soul_boot_count
could be empty on first heartbeat cycle, producing invalid JSON like
{"event":"heartbeat","pulse":,"boot":,...}. Add defensive guards:
if str_eq(raw, "") { "0" } else { raw } for both fields.
This commit is contained in:
2026-05-17 08:40:02 -05:00
parent e5364e7292
commit ffd17b2774
4 changed files with 90 additions and 60 deletions
Vendored
BIN
View File
Binary file not shown.