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
+1
View File
@@ -5,6 +5,7 @@ extern fn json_safe(s: String) -> String
extern fn build_system_prompt(ctx: String) -> String
extern fn hist_append(hist: String, role: String, content: String) -> String
extern fn hist_trim(hist: String) -> String
extern fn clean_llm_response(s: String) -> String
extern fn handle_chat(body: String) -> String
extern fn handle_see(body: String) -> String
extern fn studio_tools_json() -> String