b6ed9340bf63dc9e3b57ede4f928c325b9d529bd
The soul preferred its own local snapshot over the engram:
// Always try local snapshot first ... HTTP Engram is only used for the
// very first boot (empty/absent snapshot).
The copy outranked the store. Every one of these is a cost of that inversion,
and all of them were live tonight:
- the graphs drifted: 31,795 nodes / 75,241 edges in the soul against
13,439 / 37,670 in the engram — more than twice the edges, silently
- write-through exists only to reconcile them, and had never once run
- /api/graph/edges serialized 128 MB to answer a read, because the soul's
copy was not the engram's
- a read route overwrote the engram's canonical snapshot.json with the
soul's divergent copy
- three resident copies of one graph (soul, engram, Neuron.app) — about
7.2 GB of RAM for a store that is 2.2 GB on disk, which is what pushed the
host into swap
None of those are features. They are reconciliation debt from one decision.
The engram had already reached this conclusion for its own boot path — "the
durable owner is the paged store (neuron.egm + neuron.wal) ... snapshot.json is
never read again as the ongoing store. This closes the 'restart reverted to a
17h-old snapshot' data-loss window." The soul kept booting the legacy way the
engram had abandoned, and inherited exactly that data-loss window.
So in HTTP-engram mode the soul now seeds from the engram on EVERY boot and
never reads a local snapshot, present or not — a stale copy that outranks the
store is the bug, not a fallback. It already never wrote one in this mode
(gated behind is_genesis && safe_to_seed, and safe_to_seed requires
!using_http_engram), so this supplies the missing half.
It also refuses to boot on an empty seed rather than silently rebuilding a
divergent graph from nothing. launchd KeepAlive with ThrottleInterval=10 turns
that into a retry every 10s until the engram is up — self-healing, no spin.
File mode (no ENGRAM_URL) is untouched: there the soul genuinely is the owner.
Verified before deploy: with a deliberately empty local snapshot planted, the
soul booted in ~30s reporting 13,446 nodes / 37,675 edges — the engram's
contents, not the empty local file.
Merge pull request 'Tools + agentic loop on the OpenAI wire — plus two pre-existing bugs that silently break chat' (#122) from feat/soul-openai-tools-v2 into main
neuron
The canonical CGI substrate: the soul (the running agent), the engram (its memory
graph), and the MCP proxy/wrapper that expose it. See AGENTS.md for detail, including
the audit-verified local build/regenerate recipe and known local-build gotchas.
Quick local build
# 1. dist/soul.c must match current .el sources — this refuses otherwise:
bash tools/build-soul-from-dist.sh dist/neuron
# 2. If it refuses (stale amalgam), regenerate first — see AGENTS.md's
# "Build / regenerate dist/soul.c" section for the full, gotcha-laden recipe.
For a full local dev stack (soul + engram + mcp-wrapper + mcp-proxy, wired into Claude
Code) see neuron-dev-setup/README.md instead — this repo alone only builds the soul.
Code vs. Artifact
- Authored source:
*.el+*.elhat the repo root pluscli/,council/,connectd/,mcp-proxy/,mcp-wrapper/— edit here. - Artifacts (do not hand-edit):
dist/soul.c(generated single-TU amalgam — regenerate via the recipe inAGENTS.md, thentools/soulc-stamp.sh --write) and thedist/neuronbinary it compiles to. - Release: git tag
neuron-vX.Y.Zon this repo. Noreleases/folders.
See org policy: docs/CODE-VS-ARTIFACT.md.
Languages
Emacs Lisp
68.6%
Python
15.5%
Shell
14.6%
HTML
0.6%
Go Template
0.4%
Other
0.3%