a5f411e739
Convert routes.el from ~89 hand-written dispatch branches to 75 @route-decorated
handlers with VBD roles (@manager/@accessor/@utility), driven by the modular
compiler's native @route dispatch. routes.elh updated to match.
Fix four latent bugs that the modular compiler surfaces (unlike the old inlining
compiler, it faithfully emits every source statement, so per-module compilation
no longer silently drops code):
- safety.el: malformed soft-phrases literal (extra unescaped quote)
- sessions.el: str_replace quote arg + topic_tags JSON escaping
- memory.el mem_save and neuron-api.el consolidate: engram_save returns a Bool,
not a String; str_eq(result, "") dereferenced the Bool value (0x1) as a char*,
segfaulting the awareness loop on boot and POST /api/neuron/consolidate.
Check it as a Bool (if !save_result). The old compiler dropped these checks,
masking the bug in the shipped dist/soul.c.
Regenerate dist/soul.c through the bounded per-module path (modular elc per module
plus amalgamation that embeds dist/elp-c-decls.h), never by folding soul.el through
elc (27GB OOM). Verified on a throwaway snapshot and port: boots with the awareness
loop active and no segfault, @route dispatch matches the manual dispatcher across
all sampled routes and the four shadowing-hazard pairs, and consolidate returns 200.
16 lines
798 B
Plaintext
16 lines
798 B
Plaintext
// auto-generated by elc --emit-header — do not edit
|
|
extern fn flag_true(body: String, key: String) -> Bool
|
|
extern fn rate_limit_check(ip: String, path: String) -> String
|
|
extern fn strip_query(path: String) -> String
|
|
extern fn err_404(path: String) -> String
|
|
extern fn err_405(method: String, path: String) -> String
|
|
extern fn route_health() -> String
|
|
extern fn route_lineage() -> String
|
|
extern fn route_imprint_contextual(body: String) -> String
|
|
extern fn route_imprint_user(body: String) -> String
|
|
extern fn route_synthesize(body: String) -> String
|
|
extern fn handle_dharma_recv(body: String) -> String
|
|
extern fn connectd_get(suffix: String) -> String
|
|
extern fn connectd_post(suffix: String, body: String) -> String
|
|
extern fn handle_request(method: String, path: String, body: String) -> String
|