self-review 2026-05-21: fix curiosity seed splitting and awareness loop activation
Two fixes:
1. proactive_curiosity() was calling engram_activate_json with multi-word phrases
("memory knowledge context"). engram_activate finds seeds via istr_contains
(substring match), so the phrase had to appear verbatim in a node's content.
Almost no node contains the exact string "memory knowledge context", so only
0-2 nodes activated per curiosity scan. Fixed by activating each word separately:
"memory", "knowledge", "context" → 3 independent activate calls → hundreds of
nodes promoted to WM per cycle.
2. dist/neuron.c called http_serve() (blocking accept loop) which made awareness_run()
unreachable. soul.el correctly specifies http_serve_async but elc silently drops
unknown builtins, leaving blocking http_serve in the compiled C. Patched neuron.c
to call http_serve_async directly — HTTP server runs in a background pthread,
awareness_run() runs on the main thread as intended.
This commit is contained in:
Vendored
+6
-1
@@ -352,7 +352,12 @@ int main(int _argc, char** _argv) {
|
||||
}
|
||||
}
|
||||
println(el_str_concat(EL_STR("[soul] serving on port "), int_to_str(port)));
|
||||
http_serve(port, EL_STR("handle_request"));
|
||||
/* Use http_serve_async (non-blocking) so awareness_run() executes on the main
|
||||
* thread. http_serve would block here forever, making awareness_run unreachable.
|
||||
* http_serve_async spawns the accept loop in a background pthread and returns
|
||||
* immediately. awareness_run() then runs the idle-activation heartbeat loop.
|
||||
* Self-review fix 2026-05-21. */
|
||||
http_serve_async(port, EL_STR("handle_request"));
|
||||
println(EL_STR("[soul] awareness loop starting"));
|
||||
awareness_run();
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user