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

Copy Markdown View Source

A bounded, canonical recipe for proving a confirmed incident still fails.

A regression embeds the exact source confirmation and scenario as data. Its SHA-256 identity detects accidental or malicious rewriting when the expected digest is trusted separately; it is not authenticity or proof of failure. classify/2 requires two distinct fresh confirmation records and deliberately cannot make a passing-after claim.

Summary

Types

t()

@type t() :: %Insider.Sentinel.Regression{
  confirmed_record: term(),
  execution_policy: term(),
  expectation: term(),
  id: term(),
  integrity: term(),
  scenario: term(),
  schema: term()
}

Functions

canonical_binary(regression)

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

classify(regression, records)

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

Classifies exactly two fresh confirmation records against a regression.

The stable result is data, not a new evidence artifact. A failed result means both fresh runs reproduced the bound failure. Every other valid run combination is inconclusive; positive repair proof belongs to verification.

decode(binary)

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

decode_map(wire)

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

materialize(record, scenario)

@spec materialize(Insider.Sentinel.Confirmation.Record.t(), Insider.Scenario.t()) ::
  {:ok, t()} | {:error, Insider.Protocol.Error.t()}

to_wire_map(regression)

@spec to_wire_map(t()) :: map()

validate(regression)

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