Fix chat.el node_type-slot bug + add engram write-corruption handoff
Neuron Soul CI / build (pull_request) Successful in 3m15s

chat.el recorded the soul's utterance via engram_node(content, "episodic", ...),
putting a TIER into the node_type slot (nodes showed node_type="episodic"). Now uses
engram_node_full(..., "Conversation", "soul:utterance", ..., "Episodic", tags).

The core wrapper fix is in the el repo (PR #52). HANDOFF-engram-write-corruption.md
has the full root-cause analysis, coercion mechanism, caller audit, validation,
deploy runbook (elc build + restart), and the data-prune proposal (~107 corrupt
nodes, all unrecoverable genesis/binary detritus → prune; backup taken).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Tim Lingo
2026-06-08 16:14:20 -05:00
parent cc07648ae1
commit 799ca3758b
2 changed files with 110 additions and 1 deletions
+9 -1
View File
@@ -509,7 +509,15 @@ fn handle_dharma_room_turn(body: String) -> String {
// Record what the soul said not where it was or with whom. Experience
// accumulates in the engram through the content of what was said.
let snap_path: String = state_get("soul_snapshot_path")
let discard_id: String = engram_node(clean_response, "episodic", el_from_float(0.6))
// Record what the soul said as a Conversation node with an Episodic tier. (Was:
// engram_node(content, "episodic", ...) which wrongly put a TIER into the node_type
// slot that's why nodes showed node_type="episodic". Use the full, correct contract.)
let utterance_tags: String = "[\"soul-utterance\",\"episodic\"]"
let discard_id: String = engram_node_full(
clean_response, "Conversation", "soul:utterance",
el_from_float(0.6), el_from_float(0.6), el_from_float(0.8),
"Episodic", utterance_tags
)
if !str_eq(snap_path, "") {
let discard_save: String = engram_save(snap_path)
}