Add engram_get_node_by_label runtime native to unblock soul link #68

Open
will.anderson wants to merge 0 commits from hotfix/runtime-engram-get-node-by-label into main
Owner

What

Adds the runtime native engram_get_node_by_label and registers it as an EL builtin. Backported verbatim (idiom-adapted to jb_finish) from release runtime v1.0.0-20260501.

Why

chat.el calls engram_get_node_by_label to fetch well-known nodes (conv:history, session:summary) by their stable label rather than by ID — immune to vector-index drift across restarts. The current runtime never defined the function, so the regenerated neuron/dist/soul.c (from neuron PR #77, hotfix/elc-source-typos) fails to link: soul.c references the un-prefixed C symbol engram_get_node_by_label, which was undefined.

Change (5 files, 33 insertions, pure additions)

  • el_runtime.c — the ~13-line function, inserted between engram_get_node_json and engram_search_json
  • el_runtime.h — prototype
  • el_seed.h__engram_get_node_by_label prototype
  • el_seed.c__engram_get_node_by_label seed wrapper
  • codegen.el — arity entry (return 1)

Matches the registration pattern of siblings engram_get_node_json / engram_search_json exactly.

Verification (macOS arm64)

  • cc -c el_runtime.c compiles clean on main base; nm confirms T _engram_get_node_by_label.
  • Full CI cc recipe (dist/soul.c + el_runtime.c, -lssl -lcrypto -lcurl -lpthread -lm) LINKS cleanCC_EXIT=0, no undefined symbols.
  • Regenerated soul boots + serves: booted on throwaway port 7799 with a throwaway engram (never :7770 / ~/.neuron); /health → HTTP 200, awareness loop running.

Merge coordination

el_runtime.c currently has open PRs touching it: #66 (lexical tokenized search) and #67 (semantic search). Both modify engram_search_json. This PR is deliberately isolated:

  • Branched off main (not off #66/#67), so it does not carry their search changes.
  • Touches only the newly added function + its registration — no edits to any search site.
  • The insertion anchor (between engram_get_node_json and the engram_search_json signature line) is stable across main, #66, and #67, so this should merge without conflicting with either search PR. Merge order does not matter.
## What Adds the runtime native `engram_get_node_by_label` and registers it as an EL builtin. Backported verbatim (idiom-adapted to `jb_finish`) from release runtime `v1.0.0-20260501`. ## Why `chat.el` calls `engram_get_node_by_label` to fetch well-known nodes (`conv:history`, `session:summary`) by their stable label rather than by ID — immune to vector-index drift across restarts. The current runtime never defined the function, so the regenerated `neuron/dist/soul.c` (from neuron PR #77, `hotfix/elc-source-typos`) **fails to link**: `soul.c` references the un-prefixed C symbol `engram_get_node_by_label`, which was undefined. ## Change (5 files, 33 insertions, pure additions) - `el_runtime.c` — the ~13-line function, inserted between `engram_get_node_json` and `engram_search_json` - `el_runtime.h` — prototype - `el_seed.h` — `__engram_get_node_by_label` prototype - `el_seed.c` — `__engram_get_node_by_label` seed wrapper - `codegen.el` — arity entry (`return 1`) Matches the registration pattern of siblings `engram_get_node_json` / `engram_search_json` exactly. ## Verification (macOS arm64) - `cc -c el_runtime.c` compiles clean on `main` base; `nm` confirms `T _engram_get_node_by_label`. - Full CI `cc` recipe (`dist/soul.c` + `el_runtime.c`, `-lssl -lcrypto -lcurl -lpthread -lm`) **LINKS clean** — `CC_EXIT=0`, no undefined symbols. - Regenerated soul **boots + serves**: booted on throwaway port 7799 with a throwaway engram (never `:7770` / `~/.neuron`); `/health` → HTTP 200, awareness loop running. ## Merge coordination `el_runtime.c` currently has open PRs touching it: **#66** (lexical tokenized search) and **#67** (semantic search). Both modify `engram_search_json`. This PR is deliberately isolated: - Branched off `main` (not off #66/#67), so it does **not** carry their search changes. - Touches **only** the newly added function + its registration — no edits to any search site. - The insertion anchor (between `engram_get_node_json` and the `engram_search_json` signature line) is stable across `main`, #66, and #67, so this should merge without conflicting with either search PR. Merge order does not matter.
will.anderson added 1 commit 2026-07-15 09:08:05 +00:00
Add engram_get_node_by_label runtime native to unblock soul link
El SDK Release / build-and-release (pull_request) Failing after 22s
6b9d9e6c4a
chat.el calls the runtime native engram_get_node_by_label to fetch
well-known nodes (conv:history, session:summary) by stable label rather
than by ID — immune to vector-index drift across restarts. The current
runtime never defined it, so the regenerated dist/soul.c fails to link.

Backport the function verbatim (idiom-adapted to jb_finish) from release
runtime v1.0.0-20260501 and register it as an EL builtin exactly like its
siblings: runtime definition + prototype, __-prefixed seed wrapper +
prototype, and codegen arity entry. No search-site code is touched.
Some checks are pending
El SDK Release / build-and-release (pull_request) Failing after 22s
branch-policy
Required
This branch is already included in the target branch. There is nothing to merge.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin hotfix/runtime-engram-get-node-by-label:hotfix/runtime-engram-get-node-by-label
git checkout hotfix/runtime-engram-get-node-by-label
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: neuron-technologies/el#68