LLMDB.History.Rebuilder (LLM DB v2026.4.7)

Copy Markdown View Source

Rebuilds snapshot-based history artifacts from an ordered snapshot observation chain.

The observation chain is typically sourced from snapshot-index.json and contains entries keyed by immutable snapshot_id, with optional provenance such as captured_at, source_commit, and parent_snapshot_id.

Summary

Types

observation()

@type observation() :: map()

summary()

@type summary() :: %{
  snapshots_written: non_neg_integer(),
  unique_snapshots_written: non_neg_integer(),
  events_written: non_neg_integer(),
  output_dir: String.t(),
  snapshot_index_path: String.t(),
  latest_path: String.t(),
  from_snapshot_id: String.t() | nil,
  to_snapshot_id: String.t() | nil
}

Functions

rebuild(opts)

@spec rebuild(keyword()) :: {:ok, summary()} | {:error, term()}