Skip to main content

Module cold_storage

Module cold_storage 

Source
Expand description

Non-Destructive Phagic Digestive Cold-Storage Subsystem.

§Sacred Rule (the Law of Non-Destructive Phagocytosis)

Phagic systems must NEVER delete anything. Irrelevant or distant “outer rim” memories in each galaxy are gently migrated into compressed cold storage, preserving the complete lineage, provenance, vector clocks, and retrievability.

§Architecture

  • Outer-Rim Metric: Calculates distance $D(m) \in [0.0, 1.0]$ from the galactic core as: $D(m) = f(\text{age}, \text{access_frequency}, \text{harmonic_resonance}, \text{emotional_valence}, \text{importance_weight})$
  • Hot Tier: Active memories in MemoryStore and Tantivy SearchEngine.
  • Cold Tier: Compressed archive (MessagePack + Gzip/Deflate), preserving all metadata, vector clocks, content, embeddings, and association graph links.
  • Digestion & Condensation: Synthesizes clusters of outer-rim memories into distilled thematic nodes (Tier::Semantic, MemoryType::Symbolic) in the active hot tier, referencing the cold-stored records, while full original memories rest safely in cold storage.
  • Thawing (Warm Restoration): Zero data loss — any cold-stored memory can be queried directly or thawed back into the hot active tier with full fidelity.

Structs§

ColdDiscoveryOutcome
Outcome of a bounded cold-storage discovery scan.
ColdQuery
Filter for querying cold-stored memories.
ColdRecord
A persistent record stored in the cold archive.
ColdRecordSummary
Lightweight summary of a cold-stored memory for listings and queries.
OuterRimFactors
Breakdown of the factors contributing to a memory’s outer-rim distance.
PhagicConfig
Configuration parameters for the outer-rim metric and digestion process.
PhagicDigestReport
Telemetry report of a phagic digestion pass on a galaxy.
PhagicDigester
Non-destructive digestive processor.

Enums§

CompressionCodec
Compression algorithm used for cold storage payloads.

Functions§

calculate_outer_rim_distance
Calculate the outer-rim distance $D(m) \in [0.0, 1.0]$ for a memory.
compress_memory
Compress a memory into a binary payload using the specified codec.
decompress_memory
Decompress a binary payload back into the original memory.