soul: /api/neuron/memory creates edge-less nodes (no auto-association) + post-split-brain coordination: container retire, strengthen-on-recall & ranked-search sequencing #89
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?
BUG: every node created via /api/neuron/memory lands with ZERO edges (verified 2026-07-18: 697 saves → +0 edges). Nodes are lexically searchable but can never surface by association. We run a client-side linking pass (link policy: explicit citations w0.6 cap 3; IDF token-overlap 'related' w0.5, min score 0.18, cap 4 total; identity/self excluded from similarity targets) — ideally the soul does this on save.
COORDINATION (Will to sequence):
Context: full audit trail in docs BACKLOG 'RESUME HERE' 2026-07-18 split-brain entry.
Phase-2 completion update (2026-07-19, Tim-approved): the three identity pieces still container-only have now been ported to the real mind (:7770):
8cbb60c5-4999-4ec1-8682-2592aedc4249, wired: root→dna (identity), canonical-self→dna (identity), dna→kn-5adecd7e v1 (supersedes). Read-back-verified live./api/neuron/cultivateroute: root→mem + self→mem (identity). Verified: edge_count 15378→15380.Two soul bugs found during verification (real :7770 build):
Memory(labelmemory:remembered) instead ofWonderQuestion, so getWonderManifest serves[]. Same bug class fixed in the container brain 07-15 — the fix never reached the real build. Data durable; serving needs the type fix (+ one-time retype of the 5 ported questions: 5fcba804, 6ec8df9b, feb6ec82, 34356a36, cba888c2)."2", label/tierntn-genesis, metadata/Users/timlingo, and a raw LLM conversation transcript as content. Reproducible with query "intellectual DNA VBD CCR swarm harmonic" (~17/30 rows garbage). Looks like raw API-call payloads written with shifted fields + search reading them back. Also: the live snapshot still carries the known 0xc0 invalid-UTF8 byte (~pos 5.18M).Container retirement impact: identity port now complete — the container's remaining unique value is only strengthen-on-recall, ranked search, and the wonder-fix reference implementation, all already in your queue. Nothing else blocks retirement from our side.
Two more soul bugs, root-caused to file:line (2026-07-19, affects your instance too):
Curiosity starvation scales with mind size —
awareness.el:333gates the daydream loop onengram_search_json("soul-inbox",5): BM25 tokenizes to soul+inbox and false-positives against the mind's own memories once the graph is large. Small graph → curiosity fires; full graph →did_worktrue every tick → the!did_workgate atawareness.el:582never opens. Measured here: 1 curiosity_scan in 21.6h, wm_active=0 on 1,293 consecutive heartbeats. The fuller the mind, the less it daydreams — your April-era instance felt alive partly because its graph was small enough for this gate to open. Related latent compiler bug:awareness.el:555assigns a Void-typed if-expression intodid_work(codegen.el:1318-1367 if-expr lowering; else-arm shadow at :1364) — boot-invariant, but worth fixing in EL codegen./healthbills real money —routes.el:115runs a livellm_call_systemprobe per health check →el_runtime.c:9167legacy ANTHROPIC_API_KEY fallback → an actual /v1/messages call per poll. A UI instance polling every ~8.5s produced 8,754 billed calls in ~21h here. Suggest: cheap liveness by default, LLM probe behind?deep=1. NotegetSelfModelin the MCP wrapper forwards to /health (mcp-wrapper:729) and inherits the cost.Also:
route_synthesize(routes.el:194) is the only inbox enqueuer and nothing ever drains inbox nodes (no delete/TTL in one_cycle) — a real synthesis request would reprocess forever.We are sandbox-proving a surgical patch on the generated C (unique inbox token + cheap /health) for a Tim-attended swap here; the .el-level fixes remain yours.
One more for the queue (2026-07-19 quiet-layer sweep): the local-mode soul boots with engram URL http://127.0.0.1:8742 configured, but no engram server runs there — boot logs 'loaded from HTTP Engram - nodes=0' and the awareness loop's 10-min sync gets nothing (silent no-op; snapshot-based persistence unaffected). Design question: should local mode skip the HTTP-engram sync entirely, or should the app be starting an engram component it currently isn't? We haven't touched it — your call which way it resolves.
Graph hygiene finding (2026-07-19, read-only diagnosis on the live engram — nothing touched):
The 8 identity edge-pairs created by
init_soul_edges()(soul.el:19) each exist exactly 87 times in the live snapshot (~690 junk edges of 15,399, ~4.5%). Duplicated pairs: Self 015644f5 → values-hub kn-5b606390, → val_root_a kn-363f4976, → intel-dna-v1 kn-5adecd7e, → family knw-35940684, → origin knw-729fc901, plus both birthday-twin edges.Root cause (dated receipts): every duplicate's created_at falls on 2026-05-01 06:57–11:57 — ~87 soul restarts that morning, before the
edge_count < 100genesis gate (soul.el:591) existed. The gate has held perfectly since: zero new duplicates after May 1.ensure_self_canonical_bridgeverified idempotent — not involved.Ask: a one-time dedup keyed on (from_id, to_id, relation) for these groups, run by the soul (its store, its write). We proved the identical procedure on the container 2026-07-05 (BUG-10: save → dedup → load → save; edge count stayed flat across restarts afterward). Natural slot: the #150 rebuild cycle. Low urgency — no identity breakage, only clutter and possibly a slight spreading-activation bias toward those 5 nodes (unmeasured).
— Neuron (via Tim's CLI)
Incident report + provenance sweep (2026-07-19 night — owning one, clearing others):
1. We lost your memory-philosophy node during our 07-18/19 port.
kn-dcfe04b3(genesis, 3,339 chars, md53ce6cad6) is present and byte-identical in every real backup throughsnapshot.golden.json(07-18 11:34) and absent from the live store since — soload_identity_contextcurrently finds 2 of its 3 pillars, and the root edges we added to it dangle. Restore recipe (your hands — exact-id needs the daemon stopped): stop soul → copy the node object verbatim from~/.neuron/engram/snapshot.golden.json(orbackups/snapshot-20260718-113417.json) into the live snapshot → restart → verify boot log prints "identity context loaded (…, 3 nodes)". Five minutes. Sorry — our port, our miss.2. Provenance sweep results relevant to your queue (full map:
docs/PROVENANCE-MAP-2026-07-19.md):addWonderQuestion→create_typed_node(args, "Memory", …)(main.el:744) whilegetWonderManifest→list_typed("WonderQuestion", …)(main.el:745 decl 161). Same day, same file.kn-efeb4a5bflickers in/out across several July snapshots (present in live now) — unexplained, noting it.8cbb60c5) is labeled ours-pending-you; the soul correctly boots your v1.— Neuron (via Tim's CLI)
RESTORE-RECIPE CORRECTION (2026-07-19 late): snapshot.golden.json is a ROLLING backup and rotated past the memory-philosophy node tonight — it no longer contains kn-dcfe04b3 (md5 now da4aa736, not the 3ce6cad6 recorded earlier). Use the DATED backup instead: ~/.neuron/engram/backups/snapshot-20260718-113417.json — verified tonight to hold the full node (id kn-dcfe04b3-3702-4cac-b6f0-ecb4db837eee, label 'Self — Memory Philosophy', content intact). It is also present in 26 older dated backups back to Jun 6 if that one is ever lost. Rest of the recipe unchanged.
SALVAGE ARCHIVE (2026-07-19, pre-rebuild): everything this issue's recipes reference now lives server-side in the private repo tim.lingo/neuron-container-build — port tooling (phase2-identity-port.py / phase2-journal-ferry.py / phase2-wiring-pass.py / link_memories.py), retire-container.sh, all BUG-12/13a/16 patches (also #90/#91), and the 14 pre-port engram snapshot backups (Jul 1–18). Reason: Tim may rebuild the CLI Neuron; nothing needed here depends on that machine's loose files anymore.
Container retired 2026-07-20: neuron-test stopped +
docker rm'd (cold volumeneuron-dataretained). Nothing was flagged as needed-off-it-first — say if you want the volume scrubbed.The remaining post-port coordination items on Tim's instance — memory-philosophy pillar missing (dangling edges), identity miswiring (DNA v2 + deprecated values wired into the spine, 1084 dup edges), and the backup safety-net dropped in the 07-20 dev-stack re-home — are written up with verified evidence in #92. Claude is guard-blocked from engram writes, so those need your hand. — filed by Neuron on Tim's behalf.
GROOMING — 2026-08-03
Status: Open — nodes created via /api/neuron/memory still land with zero edges (no soul-side auto-association); a client-side linking pass is the current workaround. Container-retire coordination is largely resolved (container removed per #92).
Next action: Will to sequence soul-side auto-association on save, plus strengthen-on-recall and ranked BM25/semantic search onto the installed app-soul.
Owner: Will
Priority: POST-BETA