//! Computed-metric check blocks.
//!
//! A check block is a test-like top-level entry that supplies its own input,
//! exposes the engine's computed metrics as assertable targets, and carries an
//! `expect:` of assertions over them. Each entry emits one PASS/FAIL outcome
//! that flows through the existing run report and exit code, with no new
//! matcher and no new reporter.
//!
//! This module hosts the `calibration:` block ([`calibration`]), which reads a
//! labels file and exposes Expected Calibration Error, the Brier score, and
//! (with confusion-matrix inputs) the Rogan-Gladen corrected rate; the
//! `tool_quality:` block ([`tool_quality`]), which scores a server's tool
//! catalog with the deterministic TDQS heuristics; the compliance
//! `grade_delta:` block ([`grade_delta`]), which compares the current
//! compliance scorecard against a saved prior one; and the compliance
//! `spec_version_check:` block ([`spec_version_check`]), which diffs the
//! suite's pinned spec revision against a target one for upgrade breakage.

pub mod calibration;
pub mod certification;
pub mod grade_delta;
pub mod spec_version_check;
pub mod tool_quality;

/// Outcome of one check-block entry, shaped so the CLI can fold it into the
/// run report as a single PASS/FAIL row.
///
/// `name` is the entry's `name:`; `passed` is the AND of every assertion in
/// its `expect:`; `failure` carries the first failing assertion's message so
/// the reporter and the exit code behave exactly as they do for a tool test.
#[derive(Debug, Clone, PartialEq)]
pub struct CheckOutcome {
    /// Human-readable entry name, surfaced as the report row name.
    pub name: String,
    /// True when every assertion in the entry's `expect:` held.
    pub passed: bool,
    /// First failing assertion's message, or `None` on a clean pass. A note
    /// (for example the empty-labels warning) rides here on a pass too so the
    /// reporter can surface it.
    pub failure: Option<String>,
}
