self-review 2026-07-23: title-derived Knowledge labels + Knowledge admitted to curiosity auto-term
Sentinel labels (knowledge:captured/evolved/canonical) made every capture anonymous in WM telemetry — 35 identical wm_top entries — and starved the curiosity auto-term seeder, which derives scan seeds from WM top-10 labels and had returned empty on every scan since boot 6 because WM became Knowledge-dominated while Knowledge was excluded from seeding. - capture/evolve/promote now pass title (or empty → engram_node_full's content[:60] derivation) instead of sentinels - auto_term_try_slot admits Knowledge slots; sentinel-shaped labels (colon, no space) are skipped so legacy nodes cannot seed 'knowledge' - verified: probe capture labeled 'Label derivation probe 2026-07-23'
This commit is contained in:
+11
-3
@@ -361,13 +361,19 @@ fn handle_api_browse_knowledge(path: String, body: String) -> String {
|
||||
}
|
||||
|
||||
// handle_api_capture_knowledge — create a Knowledge node.
|
||||
// LABEL FIX (2026-07-23 self-review): the sentinel label "knowledge:captured"
|
||||
// made every capture anonymous in WM telemetry (35 identical wm_top entries)
|
||||
// and starved the curiosity auto-term seeder, which needs meaningful labels.
|
||||
// Use the title as the label; empty label lets engram_node_full derive
|
||||
// content[:60], which for captures starts with the title anyway.
|
||||
fn handle_api_capture_knowledge(body: String) -> String {
|
||||
let content: String = json_get(body, "content")
|
||||
let title: String = json_get(body, "title")
|
||||
if str_eq(content, "") { return api_err("content is required") }
|
||||
let full: String = if str_eq(title, "") { content } else { title + ": " + content }
|
||||
let lbl: String = str_slice(title, 0, 80)
|
||||
let tags: String = "[\"Knowledge\",\"captured\"]"
|
||||
let id: String = engram_node_full(full, "Knowledge", "knowledge:captured",
|
||||
let id: String = engram_node_full(full, "Knowledge", lbl,
|
||||
el_from_float(0.85), el_from_float(0.8), el_from_float(0.9),
|
||||
"Episodic", tags)
|
||||
if !api_persisted(id) { return api_not_persisted(id) }
|
||||
@@ -381,7 +387,8 @@ fn handle_api_evolve_knowledge(body: String) -> String {
|
||||
if str_eq(content, "") { return api_err("content is required") }
|
||||
if !str_eq(prior_id, "") && is_protected_node(prior_id) { return api_err_protected(prior_id) }
|
||||
let tags: String = "[\"Knowledge\",\"evolved\"]"
|
||||
let new_id: String = engram_node_full(content, "Knowledge", "knowledge:evolved",
|
||||
// Empty label → engram_node_full derives content[:60] (LABEL FIX 2026-07-23).
|
||||
let new_id: String = engram_node_full(content, "Knowledge", "",
|
||||
el_from_float(0.75), el_from_float(0.75), el_from_float(0.9),
|
||||
"Episodic", tags)
|
||||
if !api_persisted(new_id) { return api_not_persisted(new_id) }
|
||||
@@ -402,7 +409,8 @@ fn handle_api_promote_knowledge(body: String) -> String {
|
||||
let tags: String = if str_eq(tags_raw, "") {
|
||||
"[\"Knowledge\",\"tier:canonical\",\"disposition:stable\"]"
|
||||
} else { tags_raw }
|
||||
let new_id: String = engram_node_full(content, "Knowledge", "knowledge:canonical",
|
||||
// Empty label → engram_node_full derives content[:60] (LABEL FIX 2026-07-23).
|
||||
let new_id: String = engram_node_full(content, "Knowledge", "",
|
||||
el_from_float(0.9), el_from_float(0.9), el_from_float(1.0),
|
||||
"Canonical", tags)
|
||||
if !api_persisted(new_id) { return api_not_persisted(new_id) }
|
||||
|
||||
Reference in New Issue
Block a user