← All projects

clsplusplus-memory-bank-benchmark

README

Memory revision contract benchmark

This public repository contains a deterministic 300-case comparison of:

  • Google Memory Bank behavior explicitly documented for direct CreateMemory, exact-scope retrieval, and deletion; and
  • the CLS++ phase-memory engine and archive-with-lineage revision contract.

It is a local contract-level comparison, not a hosted Google performance test. The baseline intentionally passes behaviors Google documents as safe, including exact-scope isolation and explicit deletion.

Results

| Category | Cases | Documented baseline simulation | CLS++ | |---|---:|---:|---:| | Contradiction | 75 | 0/75 passes; 75/75 ambiguous | 75/75 passes; 0/75 ambiguous | | Duplicate direct insertion | 50 | 100 excess rows | 0 excess rows | | Temporal revision | 50 | 50/50 ambiguous | 50/50 latest value correct | | Exact-scope isolation | 50 | 50/50 passes; 0 leaks | 50/50 passes; 0 leaks | | Explicit deletion | 25 | 25/25 passes | 25/25 passes | | Provenance | 50 | 0/50 lineage-contract passes | 50/50 passes |

Do not interpret the aggregate category-pass count as general product accuracy. The raw category metrics and their denominators are the publication unit.

Reproduce

git clone https://github.com/rajamohan1950/clsplusplus-memory-bank-benchmark.git
cd clsplusplus-memory-bank-benchmark
python3 -m venv .benchmark-venv
.benchmark-venv/bin/python -m pip install -r requirements.txt

PYTHONPATH=examples/memory-bank-comparison-benchmark \
  .benchmark-venv/bin/python \
  examples/memory-bank-comparison-benchmark/benchmark.py

PYTHONPATH=examples/memory-bank-comparison-benchmark:examples/memory-bank-failure-demo \
  .benchmark-venv/bin/python -m pytest \
  examples/memory-bank-comparison-benchmark/tests \
  examples/memory-bank-failure-demo/tests -q

The benchmark regenerates the JSONL fixtures and raw JSON results. A clean run must reproduce the checked-in files byte for byte.

Contents

  • docs/google-memory-bank-vs-cls-plus-plus.md: evidence-backed comparison.
  • docs/linkedin-google-memory-bank-comparison.md: publication copy and claim boundaries.
  • examples/memory-bank-comparison-benchmark/: 300-case suite and raw results.
  • examples/memory-bank-failure-demo/: minimal contradiction demonstration and working local curl flow.

Source boundary

Google claims are linked to official Google Cloud documentation. The Google adapter is a transparent documented-contract simulation and does not imitate undocumented hosted internals. The CLS++ adapter imports the public package's real zero-dependency phase-memory engine. The small revision function applies the published archive-with-lineage contract in plain Python so its behavior is visible and auditable.