Add native EL afferent organ: ingest (conscious) + transduce (invisible mechanism) #98
Reference in New Issue
Block a user
Delete Branch "worktree-agent-a1bb8ac67d9006e08"
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
Adds
ingest/src/ingest.el— the native EL afferent organ, split correctlyinto two complementary concepts (not synonyms): ingest is the conscious,
deliberate act of pointing at a source —
ingest_file/dir/url/llm/stream.transduce (
transduce_prose/transduce_structured) is the automatic,invisible mechanism inside it that converts extracted surface content into
geometry — the actual conversion of raw text into a discrete multi-node
manifold (nodes + internal edges:
contains/precedes/section_of).You cannot ingest if you do not transduce; the reverse doesn't hold either —
they are complements. Every node enters tagged with provenance,
grounding-level, and stewardship class from the moment of entry.
It is a pure HTTP client of the engram server — links only
el_runtime.c,never
el_seed.c/the engine directly.Verification — corrected, honest account
Compiles and runs cleanly (verified via
elc+cc, zero errors, onlypre-existing style warnings unrelated to this file).
A real bug was found and fixed along the way: the final
/api/load-mergeserver response was never checked for anerrorfield.A total failure (bad auth, network down, anything) silently reported
nodes_added:0/edges_added:0— indistinguishable from a benign"everything already known" outcome. Verified live: with a wrong auth key,
the tool now honestly returns
{"error":"load-merge failed: unauthorized",...}instead of amisleading zero. This same class of bug (claiming success without checking
the operation actually happened) was ALSO found in
nsbx upwhile tryingto verify this PR end-to-end — filed separately, not in this PR's scope.
Correction to an earlier claim in this PR: an earlier version of this
description said "real writes confirmed via /api/stats — node_count 3201 /
edge_count 6601 after ingest." That was wrong — those numbers were the
sandbox's BASELINE, checked before any write was attempted, not after a
successful one. No actual successful write has been confirmed end-to-end
yet, because the
ingest-testsandbox (viansbx up) is itself currentlybroken (prints a green "ready" banner after its own readiness check fails;
nothing is actually listening). That's a separate, already-filed
infrastructure gap, not a defect in this file. What IS verified: the tool
correctly builds a real manifold, correctly detects and honestly reports
failure when the server write fails, and (per the code path) will
correctly report real added-counts when a real success response comes
back — that last step just hasn't been observed live yet, blocked on the
sandbox tooling being fixed.
Also dropped a CRUD-verb smell: the per-decision log line said
CREATE(adatabase-log verb for a local, tentative decision — nothing has been
written to the server yet at that point). Renamed to
FORM. The dead-codeeg_create_node(defined, never called) was renamed toeg_crystallize_nodeand annotated honestly as unused — if it's ever wiredup, it represents the real server-confirmed write, unlike the local FORM
guess.
ingest/build/(local compiler scratch output) is intentionally excluded;only source is committed.
Context
Recovered from an overnight agent worktree
(
.claude/worktrees/agent-a1bb8ac67d9006e08) during an audit ofuncommitted work across open worktrees — this was sitting uncommitted and
at risk of being lost if the worktree got pruned.
ingest and transduce are complements, not synonyms: ingest is the conscious, deliberate act of pointing at a source (ingest_file/dir/url/llm/stream stay named exactly that); transduce is the automatic, invisible mechanism inside it that converts extracted surface content into geometry (renamed build_prose/build_structured -> transduce_prose/transduce_structured, the functions that actually turn raw text into a node+edge manifold). Real bug found and fixed along the way: the final /api/load-merge response was never checked for an error. A total failure (bad auth, network down, anything) silently reported nodes_added:0/edges_added:0 — indistinguishable from a benign 'everything was already known' outcome. Verified live: with a wrong key, the tool now honestly returns {"error":"load-merge failed: unauthorized",...} instead of a misleading zero. Also dropped a CRUD-verb smell: the per-decision println said CREATE (a database-log verb for something that hasn't actually been written to the server yet — it's a local, tentative decision pending the batch merge). Renamed to FORM. The dead-code eg_create_node (defined, never called) renamed to eg_crystallize_node and annotated honestly as unused, since if it's ever wired up it represents the real server-confirmed write, unlike the local FORM guess. Not yet re-verified end-to-end against a real successful write: the ingest-test sandbox (nsbx up ingest-test) is itself currently broken — it prints a green "ready" banner after its own readiness check fails, and nothing is actually listening. Filed separately; not in scope here.Add native EL afferent ingest organto Add native EL afferent organ: ingest (conscious) + transduce (invisible mechanism)