boundgraph-check 0.1.0

Layer 5 of BoundGraph: the checker engine and the ed25519 signing that makes a verdict evidence.
Documentation
//! Layer 5 of BoundGraph: the checkers, and the signatures that make them evidence.
//!
//! This is where Law III is cashed in. A reasoner proposes; a tool acts; a
//! slicer condenses. None of that is allowed to commit anything. A state change
//! commits only on [`Evidence`] — a verdict from a model-free checker, signed,
//! naming exactly what it looked at.
//!
//! # The two guarantees, and where they live
//!
//! **Model-free.** [`Checker::check`] refuses to run a checker whose declared
//! capability set is not within [`checker_ceiling`], which omits `net` and
//! `secret`. A checker therefore cannot reach an inference API — not by
//! convention, by authority. The same ceiling omits `time` and `rand`, which is
//! what makes the determinism requirement enforceable rather than aspirational.
//!
//! **Unforgeable.** [`Checker::check`] puts the digests of the work order and
//! the condensate into the evidence itself and then signs the whole thing, so a
//! passing verdict cannot be harvested and reattached to a patch that failed.
//! Both steps are in the trait's provided method, so no implementation can skip
//! either.
//!
//! # Status
//!
//! Feature 08, milestone M3. Built in dependency order rather than story order:
//! signing has no dependency on the trait, and `check` returns signed evidence,
//! so signing comes first.
//!
//! | Story | Module |
//! |---|---|
//! | US-0802 evidence signing | [`sign`] |
//! | US-0801 checker trait | [`checker`] |
//! | US-0803 JSON Schema checker | [`schema`] |
//! | US-0804 compile checker | [`sandbox`], [`compile`] |
//! | US-0805 test-run checker | [`testrun`] |
//! | US-0806 diff-scope checker | [`scope`] |
//!
//! [`Evidence`]: boundgraph_core::Evidence

#![doc(html_root_url = "https://docs.rs/boundgraph-check")]

pub mod checker;
pub mod compile;
pub mod sandbox;
pub mod schema;
pub mod scope;
pub mod sign;
pub mod testrun;

pub use checker::{CheckError, Checker, Constant, Judgement, checker_ceiling, ensure_model_free};
pub use compile::{CompileChecker, CompileConfig, ProbeError, SandboxedCompile};
pub use sandbox::{Command, Outcome, Sandbox, SandboxError, workspace_grant};
pub use scope::{Change, ChangeKind, DiffScope, PatchError, parse_patch};
pub use testrun::{SandboxedTests, TestConfig, failing_tests};

#[cfg(feature = "unconfined")]
pub use sandbox::Unconfined;
pub use schema::{
    DEFAULT_BUDGET, MAX_DEPTH, SUPPORTED_KEYWORDS, Schema, SchemaChecker, SchemaError, Validation,
    Violation,
};
pub use sign::{
    KeyRing, LocalKey, PUBLIC_KEY_LEN, PublicKey, SEED_LEN, Sign, SignError, VerifyError,
    sign_evidence, verify,
};

/// Re-exported so a consumer holding evidence does not also depend on
/// `boundgraph-core` just for the types it is made of.
pub use boundgraph_core::{CheckerId, Evidence, EvidenceKind, Signature, SigningKeyId, Verdict};