fix(api): /api/neuron/list/<type> off-by-one — slice 16->17
Neuron Soul CI / build (pull_request) Has been cancelled
Neuron Soul CI / build (pull_request) Has been cancelled
str_slice(clean, 16, ...) left a leading slash on node_type ('/BacklogItem'), so
engram_scan_nodes_by_type_json matched nothing and list/<type> returned [] for EVERY type — silently
breaking backlog + typed-node listing across the app and MCP tools (reviewBacklog). Proven live: the
literal-scan endpoint /api/neuron/knowledge returns nodes; /api/neuron/list/Knowledge returned []. elc-clean.
NOTE: soul-core — needs dist/soul.c regen (Will); rides the same rebuild as #56/#57.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -459,7 +459,10 @@ fn handle_request(method: String, path: String, body: String) -> String {
|
||||
return handle_api_inspect_graph(method, path, body)
|
||||
}
|
||||
if str_starts_with(clean, "/api/neuron/list/") {
|
||||
let node_type: String = str_slice(clean, 16, str_len(clean))
|
||||
// Offset 17 = len("/api/neuron/list/"). Was 16, which left a leading "/" on node_type
|
||||
// ("/BacklogItem"), so engram_scan_nodes_by_type_json matched nothing → list/<type>
|
||||
// returned [] for EVERY type (broke backlog/typed-node listing app- and tool-wide).
|
||||
let node_type: String = str_slice(clean, 17, str_len(clean))
|
||||
return handle_api_list_typed(node_type, path, body)
|
||||
}
|
||||
if str_starts_with(clean, "/api/neuron/recall") {
|
||||
|
||||
Reference in New Issue
Block a user