Insider.Sentinel.Dedup (Insider Lab v0.1.0)

Copy Markdown View Source

Offline, deterministic, bounded retention for canonical incidents and proposals.

Capsules enter first. Proposal admission requires the complete exact evidence graph and its already-retained capsule. The caller-owned Lab state retains bounded canonical evidence bytes so it can revalidate every bucket on every use; receipts remain privacy-minimal references only.

Summary

Types

t()

@type t() :: %Insider.Sentinel.Dedup{
  groups: term(),
  limits: term(),
  receipt_count: term(),
  retained_bytes: term()
}

Functions

ingest_capsule(state, capsule_bytes)

@spec ingest_capsule(term(), term()) ::
  {:ok, t(), Insider.Sentinel.Dedup.Receipt.t()}
  | {:error, Insider.Protocol.Error.t()}

ingest_proposal(state, proposal_bytes, capsule_bytes, manifest_bytes, verification_bytes, report_bytes)

@spec ingest_proposal(term(), term(), term(), term(), term(), term()) ::
  {:ok, t(), Insider.Sentinel.Dedup.Receipt.t()}
  | {:error, Insider.Protocol.Error.t()}

Admits a proposal only after exact graph recomputation and capsule binding.

new(options \\ [])

@spec new(keyword()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}

validate(state)

@spec validate(term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}