AgentBlueprintProtocol.Conformance.Report (Agent Blueprint Protocol v0.1.0)

Copy Markdown View Source

The pure report builder over a loaded corpus and runner results: overall agreement, exit status, counts.

Refuses vacuous green: agreement requires total > 0 AND zero disagreements — an empty-but-valid corpus must never verify anything. (The loader's :corpus_empty denial is the first refusal; this floor is the second, independent one.)

to_bytes/2 emits deterministic JCS-canonical bytes through the package's own Canonicalization (one canonicalizer, no second encoder) and binds the run to the exact corpus loaded via its recomputed identity — two runs over two different corpora can never produce identical report bytes. The report states what the corpus agreed; it is not a decision. The report states what the corpus agreed; it is not a decision.

Summary

Functions

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

Emits deterministic JCS-canonical report bytes, identity-bound.

Types

t()

@type t() :: %AgentBlueprintProtocol.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(AgentBlueprintProtocol.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(AgentBlueprintProtocol.Conformance.Corpus.t(), [
  {binary(), [%{case_id: binary(), agree: boolean()}]}
]) :: {:ok, binary()} | {:error, term()}

Emits deterministic JCS-canonical report bytes, identity-bound.