Crosswake.ProofLane.Evidence (crosswake v0.2.4)

View Source

Builds the deliberately small, privacy-safe proof-lane evidence artifact.

Evidence is an allowlist contract, not a generic diagnostic envelope. The same final-byte scanner is used by hashing, read-only checking, and promotion.

Summary

Types

result(value)

@type result(value) :: {:ok, value} | {:error, Crosswake.ProofLane.Evidence.Error.t()}

t()

@type t() :: %Crosswake.ProofLane.Evidence{
  approved_hashes: term(),
  assertion_ids: term(),
  captured_at: term(),
  commit_ref: term(),
  crosswake_version: term(),
  device_class: term(),
  ios_runtime_line: term(),
  outcome: term(),
  retention_label: term(),
  route_id: term(),
  schema_version: term(),
  status: term(),
  template_version: term()
}

Functions

approved_hash(kind, bytes)

@spec approved_hash(atom(), binary()) :: result(String.t())

build(input)

@spec build(map()) :: result(t())

check(path)

@spec check(Path.t()) :: :ok | {:error, Crosswake.ProofLane.Evidence.Error.t()}

check(path, sources)

@spec check(Path.t(), list()) ::
  :ok | {:error, Crosswake.ProofLane.Evidence.Error.t()}

promote(candidate, destination)

@spec promote(map() | t(), Path.t()) ::
  :ok | {:error, Crosswake.ProofLane.Evidence.Error.t()}

promote(candidate, destination, opts)

@spec promote(map() | t(), Path.t(), keyword()) ::
  :ok | {:error, Crosswake.ProofLane.Evidence.Error.t()}

scan_stage(stage)

@spec scan_stage(Path.t()) :: :ok | {:error, Crosswake.ProofLane.Evidence.Error.t()}

to_map(evidence)

@spec to_map(t()) :: map()