engram: reconcile #105's embed-cache/beam-BFS latency fixes onto current dev #115
Reference in New Issue
Block a user
Delete Branch "fix/engram-search-latency-reconciled"
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?
Supersedes #105. #105's single commit (
1dc49b1) modifieslang/el-compiler/runtime/el_runtime.c, a path that does not exist on dev (renamed tolang/runtime/el_runtime.cby the restructure) — its branch traces to a July 22 merge-base, weeks before dev's qgate rescale, ACT-R fan effect, adjacency index, and the M8 HNSW vindex work from #109 (merged today). A direct merge/cherry-pick was impossible (wrong path) and would have been wrong regardless (would have thrown away everything dev grew since).This PR ports #105's three genuinely additive wins onto dev's CURRENT engram_activate, keeping dev's existing cosq/e_eff semantic layer entirely intact as the substrate rather than replacing it:
keep_alive:-1on the Ollama embed request (eg_embed_fetch) — pins the embed model resident so it can't be evicted by a larger generation model under memory pressure (measured cold reload ~2.2s vs ~0.02-0.05s warm).ENGRAM_ACTIVATE_BEAM, default 128), processing the frontier in hop-level batches and capping expansion width per level. Every node still gets recorded/reported — the cap bounds associative spread only. Kept as a genuine additional bound on top of (not instead of) the adjacency index / qgate / fan-effect mitigations dev already has for the same hub-explosion failure mode #105 was addressing.Full rationale and verification details (nsbx sandbox against a real cloned production snapshot, 13,424 nodes / 37,656 edges — live :8742/:7770 never touched) in the commit message.
Recommend closing #105 in favor of this PR — its branch content can't be salvaged (wrong file path, unrelated history) and force-pushing over it was avoided deliberately.
Note: CI on this repo's
ci-dev.yamlis currently red on a PRE-EXISTING, unrelated failure (the "Self-host compile El compiler (gen2)" step still builds the stalelang/el-compiler/runtime/el_runtime.ccopy, which is out of sync with the newer engram_cognition/geometry/reason/verify/vindex modules underlang/runtime/) — confirmed failing on dev's last several pushes before this PR existed (runs 3872/3883/3884), unrelated to this change. Flagging for separate attention rather than fixing here (out of scope for this PR).