will.anderson 588ca11f57 fix(context-dedup): include scan_part and affective_part IDs in seen set
Two design bugs in the state_set placement caused the dedup seen-ID set
to be incomplete even with callsites wired up:

1. state_set("engram_compile_seen_ids") was called immediately after
   merging the main node pools, before scan_part (persona fallback) and
   affective_part (bell node) were computed. Nodes appearing only in
   those segments were never added to the seen set.

2. affective_part is a bare JSON object (bn0 from json_array_get), not
   a JSON array. Passing it to engram_extract_ids would have gotten
   json_array_len == 0 and silently skipped the affective node's ID.

Fix: move state_set to after ctx is assembled from all three segments.
Extract ids_from_merged and ids_from_scan via engram_extract_ids (both
are JSON arrays), and extract ids_from_affective via json_get(affective_part, "id")
directly since it is a bare object. Merge all three via add_to_seen
before publishing to state.
2026-06-22 14:19:14 -05:00
2026-06-22 12:54:32 -05:00
2026-06-22 12:34:04 -05:00
2026-06-22 12:54:32 -05:00
2026-06-22 12:54:32 -05:00
S
Description
Neuron - the canonical CGI substrate. Real soul.el lives here.
22 MiB
Languages
Emacs Lisp 93%
Python 3.3%
Shell 1.8%
HTML 1.3%
Dockerfile 0.6%