Bound beginSession/compileCtx payloads to a compact digest (main) #103
Reference in New Issue
Block a user
Delete Branch "fix/bound-session-payload-main"
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?
Lands the payload-bounding fix (originally PR #102, commit
872120c) onto main. PR #102 targeted the hotfix branch and carried hotfix-compiled generated C; this PR ports the.elsource onto current main and regenerates the C from main's tree.The fix
handle_api_begin_session/handle_api_compile_ctxconcatenated unbounded engram nodes as full objects (content up to ~90KB each; the self-identity hub ~90KB alone) → ~900KB responses that, after MCP re-escaping, closed the client socket on everybeginSession. Now each list is capped (8 activated / 10 recent for begin_session; 10 / 20 for compile_ctx) and every node projected to a light identity + a bounded, UTF-8-safe content snippet via new helpersapi_compact_node/api_compact_node_array/api_compact_activated/api_utf8_trunc/api_num_or_zero. Response drops ~900KB → ~12KB; full content stays available via recall / fetch / inspectGraph.Generated C
dist/soul.c— the CI-built amalgamation — regenerated from source (elcwhole-program compile ofsoul.el). This is what CI compiles, so the bounding is now actually present in a main build.dist/neuron-api.c— per-module artifact regenerated for consistency.The soul.c regen also compiles in already-merged source that the previously-committed soul.c was stale against (agent write/edit receipt fixes from #100/#101). This is soul.c catching up to main's own sources, not a behavioral change authored here.
Verification
cc -O2 -DHAVE_CURLbuild of regenerated soul.c: clean (warnings only, no errors) → working binary.scripts/verify-soul-contract.shon a throwaway port/HOME: PRESENCE PASS (27/27 routes), IMMUTABILITY PASS.api_compact_activated,self_neighbors":[],content_truncated). The identical source fix was already verified live (900KB → ~13KB, graph intact).Supersedes #102 (which will be closed).