fix(agent): persist behavioural config; make compression actually work
Eight MemoryConfig fields (float16, compression, compression_level, compact_threshold, hebbian_boost, decay_factor, wal_enabled, wal_max_entries) were never written to /meta, so reopening a store silently reset them to defaults — a compressed store was rewritten uncompressed by the first checkpoint after a reopen, and wal_enabled=false flipped back to true. They are now stored as /meta attributes; each is optional on load so older files keep opening with the previous defaults, and non-finite floats are ignored. Writing the round-trip test exposed that `compression = true` never worked in a default build: the embeddings dataset called with_zstd() unconditionally but the agent crate never enabled the zstd feature, so every checkpoint failed with "unsupported filter: 32015". The default build now compresses with deflate (always available, pure Rust path); Zstd is opt-in via a new `zstd` agent feature. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
d4f2d3e7b5
commit
4f2975d7e3
@@ -48,6 +48,9 @@ harness = false
|
||||
default = ["float16", "hnsw"]
|
||||
float16 = ["half"]
|
||||
parallel = ["rayon"]
|
||||
# Compress embeddings with Zstd instead of deflate when
|
||||
# `MemoryConfig::compression` is on. Off by default: it links libzstd (C).
|
||||
zstd = ["clawhdf5/zstd"]
|
||||
# HNSW approximate-nearest-neighbour acceleration for the vector stage of
|
||||
# hybrid_search. On by default; the index is rebuilt from the cache on demand
|
||||
# and stays self-consistent with the persisted memory store. Disable with
|
||||
|
||||
Reference in New Issue
Block a user