Merge pull request 'fix(api): /api/neuron/list/<type> off-by-one (list-by-type returned [] for all types)' (#58) from fix/list-typed-slice-offset into main
Neuron Soul CI / build (push) Has been cancelled
Deploy Soul to GKE / deploy (push) Has been cancelled

This commit was merged in pull request #58.
This commit is contained in:
2026-06-28 17:13:22 +00:00
+4 -1
View File
@@ -465,7 +465,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") {