Insider.Sentinel.Bisection.Record (Insider Lab v0.1.0)

Copy Markdown View Source

Canonical evidence for one bounded offline bisection over declared targets.

The record describes a deterministic binary search over a host-supplied ordered target list and references exact confirmation records by identity. SHA-256 establishes content identity, not source authenticity; callers must retain the referenced evidence graph. The record never names a repository, revision order, checkout, or Git operation: every target is declared input.

A completed record isolates one adjacent nonreproduced/reproduced pair on the search path. Its fixed limitations state that reading that pair as the earliest reproducing target is a host assumption of monotonic outcomes and that indices off the search path are never probed.

Summary

Functions

Whether one probe is a complete, clean confirmation bound to the declared binding.

Derives one index decision from exactly the probes run for that index.

Recomputes a bisection record from its retained trusted evidence graph.

Types

t()

@type t() :: %Insider.Sentinel.Bisection.Record{
  cleanup: term(),
  controls: term(),
  culprit: term(),
  id: term(),
  integrity: term(),
  limitations: term(),
  policy: term(),
  reason: term(),
  schema: term(),
  source: term(),
  status: term(),
  targets: term(),
  trials: term(),
  uncertainty: term(),
  usage: term()
}

Functions

algorithm()

@spec algorithm() :: String.t()

canonical_binary(record)

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

clean_probe?(record, binding)

@spec clean_probe?(Insider.Sentinel.Confirmation.Record.t(), map()) :: boolean()

Whether one probe is a complete, clean confirmation bound to the declared binding.

An index whose first probe is not clean is inconclusive whatever a second probe would return, so the search stops there. Probes that fail before observation carry no run identity and would otherwise repeat one content-addressed record, which no trial may reference twice.

controls()

@spec controls() :: map()

decode(value)

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

decode_map(wire)

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

limitations()

@spec limitations() :: [String.t()]

maximum_probes()

@spec maximum_probes() :: pos_integer()

maximum_targets()

@spec maximum_targets() :: pos_integer()

new(options)

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

probe_decision(records, binding)

@spec probe_decision([Insider.Sentinel.Confirmation.Record.t()], map()) :: String.t()

Derives one index decision from exactly the probes run for that index.

Every probe must be a complete, clean, distinct confirmation bound to the declared binding; the declared target fingerprint must equal both the requested and observed target fingerprint of that probe. Anything else is inconclusive rather than a weaker verdict. One probe that is not clean is already inconclusive, so the search records it alone; see clean_probe?/2.

probes_per_index()

@spec probes_per_index() :: pos_integer()

to_wire_map(record)

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

validate(record)

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

validate_with_evidence(record, regression, capsule, manifest, targets, records)

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

Recomputes a bisection record from its retained trusted evidence graph.

Standalone validation proves canonical shape and that the recorded trials form one deterministic search path. This operation additionally binds the source regression, capsule, manifest, the exact ordered declared targets, and every referenced confirmation record, and rederives each trial decision from the records it references.