mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-04 08:13:37 +08:00
Add a reusable store primitive that claims the oldest ready overlay generation, reserves a canonical index generation, and reuses the existing overlay compaction path. On reservation or compaction failure, the helper releases the compaction claim and marks the reserved generation failed when applicable. Keep the behavior inert unless explicitly called by future compaction workers. Cover the no-ready CBM_STORE_NOT_FOUND contract and route an existing tombstone compaction canary through the new helper. Validation: CBM_ONLY_SUITE=store_nodes build/c/test-runner (104 passed); git diff --check; scripts/check-source-safety.sh src/store/store.c src/store/store.h tests/test_store_nodes.c; make -f Makefile.cbm -j8 cbm. Signed-off-by: Andrew Hundt <ATHundt@gmail.com>