feat(recall): context-dedup improvements #51
Closed
will.anderson
wants to merge 0 commits from
improve/recall-context-dedup into main
pull from: improve/recall-context-dedup
merge into: :main
:dev
:neuron-branding-sweep
:main
:docs/correspondence-and-ownership-2026-08-16
:fix/engram-is-canonical
:fix/graph-edges-no-canonical-clobber
:docs/architecture-2026-08-14-deep-night
:fix/mcp-wrapper-agentic-routing
:merge-pr154-v2
:merge-pr151-v2
:merge-pr150-v2
:merge-pr149-v2
:build-audit-1786832983
:fix-mcp-wrapper-tool-schemas
:docs-cognitive-architecture
:docs/session-2026-08-13-language-faculty
:docs/geo-operators-el-cutover-reversal-2026-08-13
:docs/engram-cognitive-architecture-2026-08-12
:engram-store-wiring
:el-route-decorators
:fix/bound-session-payload
:rebase/openai-tools-onto-main
:rebase/gate-state-key-reads-onto-main
:feat/gold-set-heldout
:feat/structural-audit
:feat/claim24-unfloored-semantic
:feat/executive-filter-recall
:feat/recall-through-activation
:chore/regen-soul-amalgam-20260807
:reconcile/hotfix-to-main-launch
:salvage/elh-state-20260704
:feat/plan-mode-endpoint
:fix/operator-identity-home-resolution
:fix/prevent-engram-corruption
:improve/recall-context-format
:improve/recall-context-dedup
:improve/recall-cross-session-continuity
:improve/recall-emotional-recall
:improve/recall-activation-seed
:improve/recall-recall-completeness
:improve/recall-temporal-precision
:improve/recall-engram-scoring
:improve/recall-recall-reliability
:docs/conversation-retrieval-design
No Reviewers
Labels
Clear labels
BETA-CRITICAL
blocks-public-beta
HELD
ORTHOGONAL
P0
POST-BETA
security
On the beta critical path — must resolve before ship
Must be fixed before any public beta
Blocked pending an external decision (counsel / dual sign-off)
Parallel workstream (testing/hardening) — safe to assign off critical path
Drop-everything severity
Important but not blocking the beta ship
Security vulnerability
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: neuron-technologies/neuron#51
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "improve/recall-context-dedup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Reduces redundant engram queries per chat turn by caching results across functions:
engram_compilestate keyengram_compile_bell_nodesohandle_chataffective_prefixreads the cached value instead of firing a secondengram_search_json("bell distress...")engram_compile_activation_jsonsostrengthen_chat_nodesreuses it instead of callingengram_activate_json(message, 2)a third time per turnstr_slice(ctx, 0, 6000)mid-object truncation with backwards-scan for}boundary — prevents malformed trailing JSON objects in contextWhat changed
engram_compile(): addsstate_set("engram_compile_bell_node", recent_bell)andstate_set("engram_compile_activation_json", ...)after assembling contexthandle_chat()affective_prefix: replaced liveengram_search_json("bell distress...")withstate_get("engram_compile_bell_node")handle_chat()end: replacedengram_activate_json(message, 2)withstate_get("engram_compile_activation_json")}boundary replaces abrupt character slicePull request closed