jhshuai/moontestledger/ledger does not have a README file

    InputError

    pub(all) suberror InputError {
    Invalid(Diagnostic)
    } derive(
    Debug
    )

    AttemptRecord

    pub(all) struct AttemptRecord {
    report_id : String
    attempt : Int
    observation : ObservedCase
    } derive(Eq,
    Debug
    )

    AttemptRecord::equal

    AttemptRecord::not_equal

    fn AttemptRecord::not_equal(x : AttemptRecord, y : AttemptRecord) -> Bool

    CaseKey

    pub(all) struct CaseKey {
    classname : String
    name : String
    } derive(Compare, Eq, Hash,
    Debug
    )

    Exact producer identity. Parameterized names are not normalized.

    CaseKey::compare

    fn CaseKey::compare(CaseKey, CaseKey) -> Int

    CaseKey::equal

    fn CaseKey::equal(CaseKey, CaseKey) -> Bool

    CaseKey::hash

    fn CaseKey::hash(self : CaseKey) -> Int

    CaseKey::hash_combine

    fn CaseKey::hash_combine(CaseKey, Hasher) -> Unit

    CaseKey::not_equal

    fn CaseKey::not_equal(x : CaseKey, y : CaseKey) -> Bool

    CaseKey::op_ge

    fn CaseKey::op_ge(x : CaseKey, y : CaseKey) -> Bool

    CaseKey::op_gt

    fn CaseKey::op_gt(x : CaseKey, y : CaseKey) -> Bool

    CaseKey::op_le

    fn CaseKey::op_le(x : CaseKey, y : CaseKey) -> Bool

    CaseKey::op_lt

    fn CaseKey::op_lt(x : CaseKey, y : CaseKey) -> Bool

    CaseKey::to_repr

    CaseSummary

    pub(all) struct CaseSummary {
    environment : String
    shard : String
    key : CaseKey
    verdict : Verdict
    attempts : Array[AttemptRecord]
    } derive(Eq,
    Debug
    )

    CaseSummary::equal

    fn CaseSummary::equal(CaseSummary, CaseSummary) -> Bool

    CaseSummary::not_equal

    fn CaseSummary::not_equal(x : CaseSummary, y : CaseSummary) -> Bool

    Diagnostic

    pub(all) struct Diagnostic {
    code : String
    report_id : String
    path : String
    message : String
    line : Int
    column : Int
    } derive(Eq,
    Debug
    )

    Diagnostic::equal

    fn Diagnostic::equal(Diagnostic, Diagnostic) -> Bool

    Diagnostic::not_equal

    fn Diagnostic::not_equal(x : Diagnostic, y : Diagnostic) -> Bool

    Document

    pub(all) struct Document {
    binding : ReportBinding
    report : ParsedReport
    } derive(Eq,
    Debug
    )

    Document::equal

    fn Document::equal(Document, Document) -> Bool

    Document::not_equal

    fn Document::not_equal(x : Document, y : Document) -> Bool

    Document::to_repr

    ExpectedReport

    pub(all) struct ExpectedReport {
    id : String
    environment : String
    shard : String
    attempt : Int
    cases : Array[CaseKey]
    } derive(Eq,
    Debug
    )

    ExpectedReport::equal

    ExpectedReport::not_equal

    fn ExpectedReport::not_equal(x : ExpectedReport, y : ExpectedReport) -> Bool

    Ledger

    type Ledger

    Accepted documents are immutable snapshots. A conflicting re-import cannot replace earlier evidence, and rejected input leaves this ledger unchanged.

    Ledger::ingest

    fn Ledger::ingest(self : Ledger, document : Document) -> Unit raise InputError

    Ledger::new

    fn Ledger::new(plan : RunPlan, limits? : Limits) -> Ledger raise InputError

    Ledger::snapshot

    fn Ledger::snapshot(self : Ledger) -> Snapshot

    Export a fresh snapshot, ordered by the plan. Mutating its arrays cannot alter the ledger; absent expected reports remain absent in the document list.

    Ledger::source

    fn Ledger::source(self : Ledger, report_id : String) -> String?

    Ledger::summary

    fn Ledger::summary(self : Ledger) -> Summary

    Return a fresh evidence snapshot in canonical environment/shard/identity order, regardless of the order documents were ingested.

    Limits

    pub(all) struct Limits {
    max_reports : Int
    max_cases : Int
    max_source_units : Int
    max_total_source_units : Int
    max_events : Int
    max_depth : Int
    max_attributes : Int
    max_problems : Int
    } derive(Eq,
    Debug
    )

    Limits::default

    fn Limits::default() -> Limits

    Limits::equal

    fn Limits::equal(Limits, Limits) -> Bool

    Limits::not_equal

    fn Limits::not_equal(x : Limits, y : Limits) -> Bool

    Limits::to_repr

    Limits::validate

    fn Limits::validate(self : Limits) -> Unit raise InputError

    Validate budgets before allocating or accepting data. Upper bounds keep counter arithmetic and retained-source allocation explicitly bounded.

    MissingCase

    pub(all) struct MissingCase {
    report_id : String
    key : CaseKey
    } derive(Eq,
    Debug
    )

    MissingCase::equal

    fn MissingCase::equal(MissingCase, MissingCase) -> Bool

    MissingCase::not_equal

    fn MissingCase::not_equal(x : MissingCase, y : MissingCase) -> Bool

    ObservedCase

    pub(all) struct ObservedCase {
    key : CaseKey
    outcome : Outcome
    problems : Array[Problem]
    skipped_reason : String?
    path : String
    line : Int
    column : Int
    } derive(Eq,
    Debug
    )

    ObservedCase::equal

    ObservedCase::not_equal

    fn ObservedCase::not_equal(x : ObservedCase, y : ObservedCase) -> Bool

    Outcome

    pub(all) enum Outcome {
    Pass
    Failure
    Error
    Skip
    } derive(Eq,
    Debug
    )

    Outcome::equal

    fn Outcome::equal(Outcome, Outcome) -> Bool

    Outcome::not_equal

    fn Outcome::not_equal(x : Outcome, y : Outcome) -> Bool

    Outcome::to_repr

    ParsedReport

    pub(all) struct ParsedReport {
    source : String
    cases : Array[ObservedCase]
    } derive(Eq,
    Debug
    )

    The entire input is retained, including inert metadata and output.

    ParsedReport::equal

    ParsedReport::not_equal

    fn ParsedReport::not_equal(x : ParsedReport, y : ParsedReport) -> Bool

    Problem

    pub(all) struct Problem {
    kind : ProblemKind
    message : String?
    type_name : String?
    text : String
    path : String
    line : Int
    column : Int
    } derive(Eq,
    Debug
    )

    Problem::equal

    fn Problem::equal(Problem, Problem) -> Bool

    Problem::not_equal

    fn Problem::not_equal(x : Problem, y : Problem) -> Bool

    Problem::to_repr

    ProblemKind

    pub(all) enum ProblemKind {
    Failure
    Error
    } derive(Eq,
    Debug
    )

    ProblemKind::equal

    fn ProblemKind::equal(ProblemKind, ProblemKind) -> Bool

    ProblemKind::not_equal

    fn ProblemKind::not_equal(x : ProblemKind, y : ProblemKind) -> Bool

    ReportBinding

    pub(all) struct ReportBinding {
    id : String
    run_id : String
    revision : String
    environment : String
    shard : String
    attempt : Int
    } derive(Eq,
    Debug
    )

    Metadata supplied by the producer; it is checked against the plan. This is a binding contract, not cryptographic proof of artifact origin.

    ReportBinding::equal

    ReportBinding::not_equal

    fn ReportBinding::not_equal(x : ReportBinding, y : ReportBinding) -> Bool

    RunPlan

    pub(all) struct RunPlan {
    run_id : String
    revision : String
    reports : Array[ExpectedReport]
    } derive(Eq,
    Debug
    )

    RunPlan::equal

    fn RunPlan::equal(RunPlan, RunPlan) -> Bool

    RunPlan::new

    fn RunPlan::new(run_id : String, revision : String, reports : Array[ExpectedReport], limits? : Limits) -> RunPlan raise InputError

    Construct a canonical inventory. Retry subsets and shard membership are declared, never guessed from file names, timestamps or observed totals.

    RunPlan::not_equal

    fn RunPlan::not_equal(x : RunPlan, y : RunPlan) -> Bool

    RunPlan::to_repr

    Snapshot

    pub(all) struct Snapshot {
    plan : RunPlan
    documents : Array[Document]
    } derive(Eq,
    Debug
    )

    Independent copies of the expected inventory and accepted evidence.

    Snapshot::equal

    fn Snapshot::equal(Snapshot, Snapshot) -> Bool

    Snapshot::not_equal

    fn Snapshot::not_equal(x : Snapshot, y : Snapshot) -> Bool

    Snapshot::to_repr

    Summary

    pub(all) struct Summary {
    run_id : String
    revision : String
    complete : Bool
    cases : Array[CaseSummary]
    missing_reports : Array[String]
    missing_cases : Array[MissingCase]
    } derive(Eq,
    Debug
    )

    Summary::equal

    fn Summary::equal(Summary, Summary) -> Bool

    Summary::exit_code

    fn Summary::exit_code(self : Summary, deny_recovered? : Bool) -> Int

    0: complete passing/skipped/recovered; 1: failed/unresolved or denied recovery; 3: incomplete inventory. Invalid input is reported separately.

    Summary::not_equal

    fn Summary::not_equal(x : Summary, y : Summary) -> Bool

    Summary::to_repr

    Verdict

    pub(all) enum Verdict {
    Passed
    Failed
    Error
    Skipped
    RecoveredOnRetry
    Unresolved
    Incomplete
    } derive(Eq,
    Debug
    )

    Verdict::equal

    fn Verdict::equal(Verdict, Verdict) -> Bool

    Verdict::not_equal

    fn Verdict::not_equal(x : Verdict, y : Verdict) -> Bool

    Verdict::to_repr