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
Vendored
BIN
View File
Binary file not shown.
Vendored
+5
View File
@@ -35,6 +35,7 @@ el_val_t json_safe(el_val_t s);
el_val_t build_system_prompt(el_val_t ctx);
el_val_t hist_append(el_val_t hist, el_val_t role, el_val_t content);
el_val_t hist_trim(el_val_t hist);
el_val_t clean_llm_response(el_val_t s);
el_val_t handle_chat(el_val_t body);
el_val_t handle_see(el_val_t body);
el_val_t studio_tools_json(void);
@@ -52,6 +53,10 @@ el_val_t handle_dharma(el_val_t path, el_val_t method, el_val_t body);
el_val_t handle_tool(el_val_t path, el_val_t method, el_val_t body);
el_val_t handle_nlg(el_val_t path, el_val_t method, el_val_t body);
el_val_t render_studio(void);
el_val_t elp_extract_topic(el_val_t msg);
el_val_t elp_detect_predicate(el_val_t msg);
el_val_t elp_parse(el_val_t msg);
el_val_t handle_elp_chat(el_val_t body);
el_val_t strip_query(el_val_t path);
el_val_t err_404(el_val_t path);
el_val_t err_405(el_val_t method, el_val_t path);