Files
codebase-memory-mcp/tests
soren a0a9c26809 fix(pipeline): capture committed_nodes before dump frees the index (#334)
The #334 plausibility gate compares committed (extracted) node count
against persisted rows, but committed_nodes was read AFTER
cbm_gbuf_dump_to_sqlite(), which calls release_gbuf_indexes() and frees
node_by_qn. cbm_gbuf_node_count() therefore returned 0, committed_nodes
fell at/below CBM_DUMP_VERIFY_MIN_FLOOR, and the gate never fired (a
healthy index reported expected_nodes:0 while expected_edges was correct,
since edges.count survives the dump).

- pipeline.c: capture committed node/edge counts before the dump.
- pipeline_incremental.c: set committed counts on the incremental path too
  (via new cbm_pipeline_set_committed_counts), so the gate covers
  incremental/reparse reindexes — the scenario #334 actually reproduces.
- test_pipeline.c: drive the real pipeline and assert committed_nodes > 0
  and == persisted (the existing dump_verify tests fed synthetic counts and
  could not catch the capture-ordering bug).

Signed-off-by: soren <nguiasoren@gmail.com>
2026-06-23 06:39:49 +09:00
..
…
…