fix(api): /api/neuron/list/<type> off-by-one (list-by-type returned [] for all types) #58

Merged
will.anderson merged 1 commits from fix/list-typed-slice-offset into main 2026-06-28 17:13:25 +00:00
Member

/api/neuron/list/<type> off-by-one — list-by-type returned [] for everything

handle for /api/neuron/list/ sliced the node type at offset 16, but "/api/neuron/list/" is 17
chars — so node_type came out as "/BacklogItem" (leading slash), engram_scan_nodes_by_type_json("/…")
matched nothing, and every list/<type> returned [] despite a 5,140-node engram.

Proven live: /api/neuron/knowledge (literal-type scan) returns real nodes; /api/neuron/list/Knowledge
(slice path) returned []. Fix: 16 → 17. elc-clean.

Impact: this silently broke typed-node listing app- and tool-wide — including reviewBacklog (MCP) and
any UI/tool that lists by type. It's the foundational half of why the backlog never read back (the other
half is the MCP wrapper using /memory+/recall instead of the typed create/list — separate fix).

⚠️ Soul-core: needs dist/soul.c regen — rides the same rebuild as #56 + #57.

## `/api/neuron/list/<type>` off-by-one — list-by-type returned [] for everything `handle` for `/api/neuron/list/` sliced the node type at offset **16**, but `"/api/neuron/list/"` is **17** chars — so `node_type` came out as `"/BacklogItem"` (leading slash), `engram_scan_nodes_by_type_json("/…")` matched nothing, and **every** `list/<type>` returned `[]` despite a 5,140-node engram. **Proven live:** `/api/neuron/knowledge` (literal-type scan) returns real nodes; `/api/neuron/list/Knowledge` (slice path) returned `[]`. Fix: `16 → 17`. elc-clean. **Impact:** this silently broke typed-node listing app- and tool-wide — including `reviewBacklog` (MCP) and any UI/tool that lists by type. It's the foundational half of why the backlog never read back (the other half is the MCP wrapper using `/memory`+`/recall` instead of the typed create/list — separate fix). **⚠️ Soul-core:** needs `dist/soul.c` regen — rides the same rebuild as #56 + #57.
tim.lingo added 1 commit 2026-06-27 21:00:24 +00:00
fix(api): /api/neuron/list/<type> off-by-one — slice 16->17
Neuron Soul CI / build (pull_request) Has been cancelled
3ad9dc7df7
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>
will.anderson merged commit b210013891 into main 2026-06-28 17:13:25 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: neuron-technologies/neuron#58