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
:main
:hotfix/elc-source-typos
:fix/safety-contact-truncation
:fix/genesis-boot-crash
:fix/immutable-on-hotfix
:feat/bounded-persona-floor
:ci/rdynamic-http-handler
:ci/harden-gate-boot
:feat/neuron-dev-setup
:feat/immutable-engram-deletes
:feat/agent-phase1-soul
:salvage/elh-state-20260704
:hotfix/trackb-threat-to-others
:feat/soul-model-self-report
:feat/openai-format-providers
:feat/plan-mode-endpoint
:fix/operator-identity-home-resolution
:fix/wrapper-backlog-endpoints
:fix/list-typed-slice-offset
:feat/connectors-call-route
:fix/chat-vision-attachments
:fix/prevent-engram-corruption
:fix/emergency-regressions
:fix/session-continuity-hook
:fix/context-dedup-shared-ids
:fix/engram-float-parser
: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
:improve/recall-session-start-recall
:improve/reliability-engram-write
:improve/reliability-state-management
:improve/soul-memory-formation
:improve/safety-crisis-detection
:improve/reliability-route-error-recovery
:improve/reliability-llm-retry
:improve/reliability-session-boundary
:improve/reliability-safety-resilience
:improve/reliability-engram-connection
:improve/soul-routes-api
:improve/reliability-cross-session-affective
:propose/agent-workspace-root-read
:improve/reliability-conv-history
:improve/soul-strip
:improve/soul-chat-pipeline
:docs/conversation-retrieval-design
:propose/no-fake-tools-in-chat-mode
:fix/ci-soul-build-single-file
:fix/canonical-self-bridge
:feat/agent-tool-workspace-scope
:fix/agentic-tools-duplicate-web-search
:green/agentic-fixes
:feat/connectors-soul
:feat/layer-safety
:feat/layer-imprint
:feat/layer-stewardship
:test/layer-composition
:test/layer-safety
:test/layer-stewardship
:test/layer-imprint
:feat/memory-delete-update
:feat/native-web-search
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