Version: codebase-memory-mcp 0.8.1 (built from source)
Platform: macOS (Apple Silicon) · Install channel: Built from source · Binary variant: standard
What happened, and what did you expect?
Two JSON-emission bugs in pass_calls.c (the sequential pipeline path — small repos; the parallel path is correct):
- The ASYNC_CALLS edge props format closes the
method field with a quote but not broker, producing "broker":"bullmq}. The fixup block beneath it only repairs the truncation case (props[plen-1] != '}'), which never fires in the normal case — so every brokered ASYNC_CALLS edge gets malformed properties.
create_svc_route_node stores the raw method/broker string as the Route node's properties (e.g. literally bullmq instead of {"broker":"bullmq"}).
Consequence: any json_extract over those rows errors — including the edges generated columns (local_name_gen, the url_path index), so index-backed queries over such edges can fail, and PRAGMA quick_check (which recomputes generated columns) aborts with malformed JSON instead of completing. The parallel path's build_service_route / emit_http_async_service_edge handle both correctly, so the two pipelines produce different bytes for the same input.
Expected: the sequential path emits the same valid JSON as the parallel path.
Reproduction
Index this snippet as a small repo (small file counts take the sequential path):
const { Queue } = require("bullmq");
const mailQueue = new Queue("mail");
async function notify() { await mailQueue.add("welcome-email", {}); }
Then:
SELECT count(*) FROM edges WHERE json_valid(properties)=0; -- expect >= 1
SELECT count(*) FROM nodes WHERE json_valid(properties)=0; -- expect >= 1 (Route nodes)
PRAGMA quick_check; -- aborts: "malformed JSON"
Observed field values: edges with {"callee":"mailQueue.add","url_path":"welcome-email","broker":"bullmq} and Route nodes whose properties column is the bare string bullmq.
Cascade
Found while root-causing #895/#896: a quick_check-based integrity gate (the natural fix for #895) trips over these rows, so this needs fixing first or the gate must tolerate non-corruption quick_check aborts — otherwise projects with brokered async calls would re-index into the same state repeatedly. Companion: #897.
Maintainer note
I have a working private fix for this (with reproduce-first regression tests) that I can submit as a PR. Before I do, I'd prefer you groom this issue — confirm the framing, tag, and prioritize — so the PR lands against an agreed shape.
Confirmations
Version: codebase-memory-mcp 0.8.1 (built from source)
Platform: macOS (Apple Silicon) · Install channel: Built from source · Binary variant: standard
What happened, and what did you expect?
Two JSON-emission bugs in
pass_calls.c(the sequential pipeline path — small repos; the parallel path is correct):methodfield with a quote but notbroker, producing"broker":"bullmq}. The fixup block beneath it only repairs the truncation case (props[plen-1] != '}'), which never fires in the normal case — so every brokered ASYNC_CALLS edge gets malformedproperties.create_svc_route_nodestores the raw method/broker string as the Route node'sproperties(e.g. literallybullmqinstead of{"broker":"bullmq"}).Consequence: any
json_extractover those rows errors — including theedgesgenerated columns (local_name_gen, theurl_pathindex), so index-backed queries over such edges can fail, andPRAGMA quick_check(which recomputes generated columns) aborts withmalformed JSONinstead of completing. The parallel path'sbuild_service_route/emit_http_async_service_edgehandle both correctly, so the two pipelines produce different bytes for the same input.Expected: the sequential path emits the same valid JSON as the parallel path.
Reproduction
Index this snippet as a small repo (small file counts take the sequential path):
Then:
Observed field values: edges with
{"callee":"mailQueue.add","url_path":"welcome-email","broker":"bullmq}and Route nodes whosepropertiescolumn is the bare stringbullmq.Cascade
Found while root-causing #895/#896: a
quick_check-based integrity gate (the natural fix for #895) trips over these rows, so this needs fixing first or the gate must tolerate non-corruptionquick_checkaborts — otherwise projects with brokered async calls would re-index into the same state repeatedly. Companion: #897.Maintainer note
I have a working private fix for this (with reproduce-first regression tests) that I can submit as a PR. Before I do, I'd prefer you groom this issue — confirm the framing, tag, and prioritize — so the PR lands against an agreed shape.
Confirmations