self-review 2026-05-19: fix curiosity_scan seed — 'seed' is a reserved EL name

EL compiles any variable named 'seed' to EL_NULL at call sites (likely
conflicts with BFS seed node terminology in the runtime builtins). Rename to
'curiosity_seed' throughout proactive_curiosity(). Also note this as a known
EL reserved-name hazard alongside the inline if-else string expression bug.
This commit is contained in:
2026-05-19 08:58:53 -05:00
parent dd22130faf
commit 94b71a78dc
2 changed files with 15 additions and 12 deletions
+9 -6
View File
@@ -108,15 +108,18 @@ fn proactive_curiosity() -> Bool {
// expressions. EL codegen initialises the result slot to 0 (null) before
// evaluating the if, so string-literal if-else branches can produce an
// empty string when the true branch fires. Imperative shadowing is safe.
//
// NOTE: variable named "curiosity_seed" not "seed" "seed" appears to be
// a reserved/conflicting name in EL that compiles to EL_NULL at call sites.
let minute_block: Int = (ts / 60000) % 4
let seed: String = "memory knowledge context"
if minute_block == 1 { let seed = "self identity values architecture" }
if minute_block == 2 { let seed = "recent decision pattern lesson" }
if minute_block == 3 { let seed = "working active project" }
let results: String = engram_activate_json(seed, 2)
let curiosity_seed: String = "memory knowledge context"
if minute_block == 1 { let curiosity_seed = "self identity values architecture" }
if minute_block == 2 { let curiosity_seed = "recent decision pattern lesson" }
if minute_block == 3 { let curiosity_seed = "working active project" }
let results: String = engram_activate_json(curiosity_seed, 2)
let found: Int = json_array_len(results)
let wmc: Int = engram_wm_count()
let ise: String = "{\"event\":\"curiosity_scan\",\"seed\":\"" + seed
let ise: String = "{\"event\":\"curiosity_scan\",\"seed\":\"" + curiosity_seed
+ "\",\"activated\":" + int_to_str(found)
+ ",\"wm_active\":" + int_to_str(wmc)
+ ",\"ts\":" + int_to_str(ts) + "}"