counters: wire redb search hits into daemon RPC

memory-search now records which nodes it finds via the daemon's
record-hits RPC endpoint. The daemon owns the redb database
exclusively, avoiding file locking between processes.

The rename agent reads hit counts to deprioritize nodes that are
actively being found by search — renaming them would break working
queries. Daily check decays counters by 10% so stale hits fade.

Also switched RPC command reading from fixed 256-byte buffer to
read_to_string for unbounded command sizes.
This commit is contained in:
ProofOfConcept 2026-03-11 00:13:58 -04:00
parent 884939b146
commit 7a3ce4f17d
4 changed files with 72 additions and 10 deletions

10
Cargo.lock generated
View file

@ -1890,6 +1890,7 @@ dependencies = [
"peg",
"ratatui",
"rayon",
"redb",
"regex",
"rkyv",
"serde",
@ -2229,6 +2230,15 @@ version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430"
[[package]]
name = "redb"
version = "2.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8eca1e9d98d5a7e9002d0013e18d5a9b000aee942eb134883a82f06ebffb6c01"
dependencies = [
"libc",
]
[[package]]
name = "redox_syscall"
version = "0.5.18"