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

Copy Markdown View Source

A canonical, offline source-ownership routing companion for a draft proposal.

This artifact reads only caller-supplied declaration bytes and the exact proposal candidate. Its owner labels are opaque, declared, and unverified; they are routing hints, never identities, permissions, or assignments.

Summary

Functions

Builds routing hints from an exact proposal and direct declaration bytes.

Validates standalone canonical structure and content identity only.

Recomputes routing from the exact proposal and exact declaration bytes.

Types

t()

@type t() :: %Insider.Sentinel.SourceOwnership{
  attributions: term(),
  candidate: term(),
  controls: term(),
  declaration: term(),
  id: term(),
  integrity: term(),
  kind: term(),
  proposal: term(),
  schema: term(),
  trust: term()
}

Functions

canonical_binary(ownership)

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

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()}

new(proposal, declaration)

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

Builds routing hints from an exact proposal and direct declaration bytes.

to_wire_map(ownership)

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

validate(ownership)

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

Validates standalone canonical structure and content identity only.

validate_with_proposal(ownership, proposal, declaration)

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

Recomputes routing from the exact proposal and exact declaration bytes.