Fix engram_compile: fetch pinned nodes directly when vector search empty

Replace scan-by-offset fallback with engram_get_node_json calls for the
known high-salience identity nodes (family, origin). Offset-based scanning
is order-dependent and unreliable; direct ID fetch is stable regardless of
snapshot position. Ensures biographical context (Fox, Bobby, etc.) is
always in the system prompt when vector search returns nothing.
This commit is contained in:
Will Anderson
2026-05-03 11:19:14 -05:00
parent 71ab7eafde
commit e299c92662
6 changed files with 52 additions and 4 deletions
+4
View File
@@ -2,6 +2,7 @@ import "memory.el"
import "awareness.el"
import "chat.el"
import "studio.el"
import "elp-input.el"
fn strip_query(path: String) -> String {
let q: Int = str_index_of(path, "?")
@@ -246,6 +247,9 @@ fn handle_request(method: String, path: String, body: String) -> String {
if str_eq(clean, "/synthesize") {
return route_synthesize(body)
}
if str_eq(clean, "/api/elp/chat") {
return handle_elp_chat(body)
}
if str_eq(clean, "/api/chat") {
let agentic_flag: Bool = json_get_bool(body, "agentic")
let reply: String = if agentic_flag {