BoundedAuthorityProtocol.Conformance.Report (Bounded Authority Protocol v0.1.0)

Copy Markdown View Source

Pure report builder for the loaded corpus and runner results.

build/2 computes overall agreement (every case agreed with its expectation), the exit status (0 on complete agreement, 1 otherwise), and the applicability matrix summary. to_bytes/2 emits deterministic JCS-canonical report bytes through the package's own V1.Jcs.encode/2 — one canonicalizer, no second encoder.

Summary

Functions

Builds the agreement report from the loaded corpus and runner results.

Emits deterministic JCS-canonical report bytes.

Types

t()

@type t() :: %BoundedAuthorityProtocol.Conformance.Report{
  agreed: non_neg_integer(),
  agreement: boolean(),
  disagreed: non_neg_integer(),
  exit_status: 0 | 1,
  total: non_neg_integer()
}

Functions

build(corpus, results)

@spec build(BoundedAuthorityProtocol.Conformance.Corpus.t(), [
  {binary(), [%{case_id: binary(), agree: boolean()}]}
]) :: t()

Builds the agreement report from the loaded corpus and runner results.

to_bytes(corpus, results)

@spec to_bytes(BoundedAuthorityProtocol.Conformance.Corpus.t(), [
  {binary(), [%{case_id: binary(), agree: boolean()}]}
]) :: {:ok, binary()} | {:error, :invalid}

Emits deterministic JCS-canonical report bytes.