self-review 2026-07-28: feed importance into WM scoring

n->importance was stored, serialized, and clamped at creation but never
read by any activation path — a curated importance=1.0 node competed
identically with a default note. Multiply raw_wm by (0.5 + importance):
default 0.5 nodes are unchanged (x1.0), critical x1.5, low x0.6;
importance<=0 from legacy snapshots stays neutral. Verified activation
and WM promotion unchanged for default-importance candidates.
This commit is contained in:
2026-07-28 08:37:34 -05:00
parent 9f362c90e5
commit 6ebe3d0d66
+12 -2
View File
@@ -7903,8 +7903,18 @@ el_val_t engram_activate(el_val_t query, el_val_t depth) {
double type_threshold = engram_type_threshold(n->node_type, n->tier);
/* Goal bias weights the node's relevance to current intent. */
double bias = engram_goal_bias(n, q);
/* Raw working memory score. */
double raw_wm = best_bg[i] * bias * n->confidence;
/* Raw working memory score.
* Importance factor (2026-07-28 self-review): n->importance was
* stored, serialized, and clamped at creation (default 0.5) but
* never read by any scoring path a curated importance=1.0 node
* competed identically with a throwaway note at equal activation.
* Map it to a gentle multiplier centered on the 0.5 default:
* impf = 0.5 + importance default nodes unchanged (×1.0),
* critical (1.0) ×1.5, low (0.1) ×0.6. Nodes loaded from legacy
* snapshots with importance<=0 stay neutral rather than being
* silently suppressed. */
double impf = (n->importance > 0.0) ? (0.5 + n->importance) : 1.0;
double raw_wm = best_bg[i] * bias * n->confidence * impf;
/* Apply inhibitory suppression. Full inhibition → scale by factor. */
double inh = inhibition[i];
if (inh > 1.0) inh = 1.0;