consciousness/poc-memory
Kent Overstreet 32d17997af memory-search: fix returned-set deduplication and pre-seeded count
mark_returned() was append-only without checking if the key already
existed, causing duplicates to accumulate across hook invocations.
load_returned() then returned all entries including duplicates, which
made the returned count exceed the seen count, causing a u64 underflow
in the pre-seeded calculation.

Fix: check load_returned() before appending in mark_returned(), dedup
on read in load_returned(), and use saturating_sub for the pre-seeded
count as a safety net.

Co-Authored-By: ProofOfConcept <poc@bcachefs.org>
2026-03-09 17:15:24 -04:00
..
defaults split into workspace: poc-memory and poc-daemon subcrates 2026-03-08 20:43:59 -04:00
schema split into workspace: poc-memory and poc-daemon subcrates 2026-03-08 20:43:59 -04:00
src memory-search: fix returned-set deduplication and pre-seeded count 2026-03-09 17:15:24 -04:00
build.rs split into workspace: poc-memory and poc-daemon subcrates 2026-03-08 20:43:59 -04:00
Cargo.toml split into workspace: poc-memory and poc-daemon subcrates 2026-03-08 20:43:59 -04:00
config.example.jsonl split into workspace: poc-memory and poc-daemon subcrates 2026-03-08 20:43:59 -04:00