Skip to main content

Module memory_lifecycle

Module memory_lifecycle 

Source
Expand description

Memory Lifecycle Management — consolidation, decay, compaction, archival.

Runs automatically on knowledge stores to keep memory healthy:

  • Confidence decay over time
  • Semantic consolidation of similar facts
  • Compaction when limits are exceeded
  • Archival of old/unused facts

Structs§

LifecycleConfig
LifecycleReport

Enums§

ForgettingModel
Which forgetting curve drives confidence decay (#1).

Constants§

DEFAULT_BASE_STABILITY_DAYS
Default characteristic memory stability (days) for the Ebbinghaus curve.
DEFAULT_RECLAIM_HEADROOM_PCT
Default proactive headroom on a capacity reclaim: settle a full store at 75% so it keeps real working room instead of churning at its cap.

Functions§

apply_confidence_decay
archive_facts
Archive evicted facts (lossless) into the request project’s facts partition; the generic multi-store archive lives in crate::core::memory_archive.
compact
consolidate_similar
list_archives
All facts archive files of project_root, sorted ascending (chronological).
reachable_archives
The newest reachable facts archives of project_root for the recall-miss rehydrate path — bounded by ArchiveConfig::rehydrate_reach so every retained archive is reachable (closes the pre-#995 retained-vs-reachable gap).
restore_archive
Restore the facts from a single archive file of project_root’s partition (legacy facts key supported).
run_lifecycle