Repository navigation
Description
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
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_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
- I searched existing issues and this is not a duplicate.
- My reproduction uses shareable code (a dummy snippet or a public OSS repository), not proprietary code.
Activity
kriswill commentedon Jul 5, 2026
Companion issues in this cascade:
graph.db.zst, weak import gateSQLITE_CORRUPTtotal=N, results=[]with no error-wal/-shmbehindquick_check-based integrity gate (this issue)DeusData commentedon Jul 7, 2026
Thanks for the precise sequential-pipeline JSON report. Triage: high-priority graph property correctness bug under #592.
Sequential and parallel extraction must produce the same valid JSON shape for ASYNC_CALLS and Route properties. A good guard would assert json_valid/json_extract behavior on emitted edge and route properties, not just string equality.
fix(branch): restore files clobbered by a stale-base soft reset
fix(pipeline): valid JSON for sequential-path service edges and Route…