fix(build): close real local-build gaps from the hands-on build/run audit (clean re-merge) #158

Merged
will.anderson merged 2 commits from merge-pr154-v2 into main 2026-08-15 23:51:39 +00:00
Owner

Re-does PR #154's merge clean off current main (which now has #149/#150/#151). Modify/delete conflicts on 6 committed .elh files — took the deletion, matches #154's own fix (never commit generated .elh, gitignore instead; this is the fix for the stale-cache-preferred-over-recompile bug).

Ran the real regen (tools/regenerate-soul-amalgam.sh) as a build-verify pass and found two real, separate blockers, not introduced by this merge:

  1. routes.el: layered_cycle's signature grew a session_id + utility param; 2 of 3 call sites were never updated (comment nearby literally says 'same two arguments at all three dispatch sites' — only 1 had them). Fixed both.
  2. el_route_dispatch (from el's #93, the @route decorator codegen) is called in the merged routes.el but the elc BINARY being used to compile is stale — it predates #93's codegen.el changes, so it never emits the function. This is not a source bug: it's confirmation that dist/soul.c cannot fully compile again until elc itself gets rebuilt from current codegen.el, which needs the 24GB-memory-bug fix (separate, in progress) before the self-hosting rebuild can even run. Landing the source fix + regen infrastructure now; the binary build stays blocked until that lands.
Re-does PR #154's merge clean off current main (which now has #149/#150/#151). Modify/delete conflicts on 6 committed .elh files — took the deletion, matches #154's own fix (never commit generated .elh, gitignore instead; this is the fix for the stale-cache-preferred-over-recompile bug). Ran the real regen (tools/regenerate-soul-amalgam.sh) as a build-verify pass and found two real, separate blockers, not introduced by this merge: 1. routes.el: layered_cycle's signature grew a session_id + utility param; 2 of 3 call sites were never updated (comment nearby literally says 'same two arguments at all three dispatch sites' — only 1 had them). Fixed both. 2. el_route_dispatch (from el's #93, the @route decorator codegen) is called in the merged routes.el but the elc BINARY being used to compile is stale — it predates #93's codegen.el changes, so it never emits the function. This is not a source bug: it's confirmation that dist/soul.c cannot fully compile again until elc itself gets rebuilt from current codegen.el, which needs the 24GB-memory-bug fix (separate, in progress) before the self-hosting rebuild can even run. Landing the source fix + regen infrastructure now; the binary build stays blocked until that lands.
will.anderson added 2 commits 2026-08-15 23:51:17 +00:00
fix(build): close real local-build gaps found in a hands-on build/run audit
Neuron Soul CI / build (pull_request) Successful in 3m42s
Neuron Soul CI / deploy (pull_request) Has been skipped
5bd9fbe9cd
Three verified, currently-live problems, each closed with real evidence
(full trace kept in Neuron memory, tags neuron-technologies/neuron,build-audit):

1. dist/soul.c was stale relative to main's own chat.el (11 commits / 459
   lines behind, missing PR #122's OpenAI-tools + agentic-loop work and its
   two "silently break chat" fixes). tools/soulc-stamp.sh --check confirmed
   it; tools/build-soul-from-dist.sh correctly refused to build (exit 9).
   Regenerated and re-stamped. No runnable regen script existed anywhere
   upstream — added tools/regenerate-soul-amalgam.sh, which reproduces the
   committed amalgam's exact symbol set (byte-for-byte content match, modulo
   the genuinely new PR #122 functions) and is documented end-to-end in
   AGENTS.md, including three real elc/elb toolchain gotchas found and
   root-caused along the way (stale .elh caches silently truncating builds;
   elb cannot produce this repo's single-TU amalgam; elc silently drops the
   first function(s) after a comment block in a flat-concatenated compile).

2. tools/build-soul-from-dist.sh failed to link on macOS (`ld: library 'ssl'
   not found` — Homebrew's openssl@3 is keg-only) and was missing -lssl
   -lcrypto entirely, drifted from CI's own working recipe. Fixed: adds
   -L$(brew --prefix openssl@3)/lib on Darwin, matches CI's link line.
   Verified: dist/neuron now builds and boots clean on a throwaway
   port/HOME (never touched the live :7770/:8742).

3. Untracked committed *.elh compiler-header caches (elc/elb prefer a stale
   cached header over recompiling its source, silently, with no error —
   this is what caused an under-resolved 251-2541-function amalgam multiple
   times during this audit before the cause was found). Removed from git,
   gitignored going forward.

Also: AGENTS.md and README.md existed on disk but were never committed
(git log on both returned nothing) and documented the pre-collapse ~90-tool
MCP surface as current. Committed corrected versions reflecting the live
9-op surface (read/write/relate/supersede/think/attend/assert/ground/learn,
merged in #153) and the audit-verified build recipe/port topology.

Added connectd/ — a minimal local-dev stub for the neuron-connectd MCP
sidecar. routes.el/chat.el call 127.0.0.1:7771 for it right now on every
soul boot and agentic turn per a real, detailed 2026-06-13 spec
(mcp-connectors-adoption-spec.md); the sidecar itself was never built.
Meanwhile :7771 is a live three-way collision (axon's unbuilt-Rust default,
this connectd contract, and council — the anti-confabulation service
actually running there in prod, which live-answers both other things'
requests with unrelated 404s instead of a clean bridge-down signal). This
stub only implements the documented contract as "zero connectors
configured" for local-dev correctness; it does not attempt OAuth or a real
MCP client — that is a real, separate product decision. See
connectd/README.md for the full trace and the open question left for Will.
Merge remote-tracking branch 'origin/pr/154' into HEAD
Neuron Soul CI / build (pull_request) Has been cancelled
Neuron Soul CI / deploy (pull_request) Has been cancelled
2f84e2a1de
# Conflicts:
#	memory.elh
#	neuron-api.elh
#	routes.elh
#	safety.elh
#	sessions.elh
#	soul.elh
will.anderson merged commit 34fa334b6a into main 2026-08-15 23:51:39 +00:00
Sign in to join this conversation.