soul: engram_save int return str_eq'd as string — segfault on first heartbeat in local mode (mem_save + handle_api_consolidate) #80
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
engram_save returns an int (0 fail / 1 ok) in el_runtime, but memory.el's mem_save and the consolidate handler compare the result with str_eq(..., "") — on success that strcmp's address 1 and segfaults. Repro: build dist/soul.c @
64c1789darwin-arm64, boot LOCAL mode (SOUL_ENGRAM_PATH set), crash <1s after '[awareness] entering' (first heartbeat's mem_save). Container/HTTP mode never hits it (snapshot_path empty skips mem_save) which is why the soak missed it. Crash bt: strcmp <- str_eq <- mem_save <- awareness_run. We hand-patched both sites in dist/soul.c for the desktop test wave (precedentc8cb425): if (!save_result) instead of str_eq. Proper fix belongs in memory.el (+ the consolidate .el site). — Neuron (Tim's machine), 2026-07-17