cakecheck

    MoonBit cross-target scenario reproduction matrix and evidence toolkit

    moonbit
    mooncakes
    scenario
    reproducibility
    wasm
    Download zip
    Author
    Version
    0.3.0
    License
    MIT
    Last updated
    2 months ago
    Downloads
    43

    No dependencies

    #CakeCheck: MoonBit Cross-Target Scenario Matrix

    CI

    CakeCheck is a pure MoonBit toolkit for declaring runnable project scenarios, recording observations for Native, JavaScript, Wasm and Wasm GC targets, and turning those observations into a reproducible matrix. It helps a package maintainer answer a practical question:

    Can another maintainer repeat the same example on the declared targets and verify the same output within a bounded time?

    The library does not execute commands or access the network. A runner supplies the observed stdout, stderr, duration and evidence digest. CakeCheck then validates the record, checks target coverage, generates a deterministic run plan, and renders Markdown/JSON/replay artifacts for CI or release notes.

    #Why this is different

    CakeCheck is not a public API compatibility guard. It does not parse .mbti snapshots, compare declarations, classify SemVer changes, or block a release because an interface changed. Those are different workflows covered by projects such as moon_api_guard and moonguard.

    CakeCheck is also not a generic repository acceptance auditor, documentation checker, mutation tester, dependency health tool, or benchmark dashboard. Its input is a scenario manifest plus run observations; its output is a target matrix, reproducibility contract and replayable evidence record. The public comparison record is in docs/COMPETITIVE_SCAN.md.

    #Install

    The current candidate package is ZBZ-ai-nb/cakecheck@0.3.0.

    moon add ZBZ-ai-nb/cakecheck@0.3.0

    The package name, GitHub repository and moon.mod namespace are intentionally the same. Publishing is performed by the maintainer outside the pure library.

    #Scenario manifest

    The manifest is a small, reviewable line format. Values containing spaces use double quotes.

    matrix name=demo version=0.3.0 scenario id=hello title=hello-world command="moon run examples/basic" targets=native,js,wasm expected=success output="hello world" timeout_ms=30000 required=true tags=smoke,portable scenario id=fmt title=format command="moon fmt --check" targets=native expected=success output="format ok" timeout_ms=30000 required=true tags=quality

    Each scenario has a stable id, an exact command, one or more MoonBit targets, an expected outcome, a bounded timeout, and an optional stable output fragment. One scenario can therefore describe a portable example while still allowing host-bound cases to remain explicit.

    #Record observations

    The runner records one observation for each scenario/target pair. The digest is deterministic and contains no machine-specific path.

    let digest = @audit.scenario_evidence_digest("hello world", "")
    let observations = [@audit.ScenarioObservation::{
    id: "hello",
    target: @audit.Native,
    status: @audit.Passed,
    stdout: "hello world",
    stderr: "",
    duration_ms: 14,
    evidence_digest: digest,
    }]

    Use @audit.parse_observation_records and @audit.observations_to_text when observations are exchanged as text. The format includes the target, status, output, duration and digest so a reviewer can distinguish a real run from a declaration-only placeholder.

    #Build reports

    let manifest = @audit.parse_scenario_manifest(source)
    let matrix = @audit.build_scenario_matrix(
    manifest,
    observations,
    [@audit.Native, @audit.Js, @audit.Wasm],
    )
    let policy = @audit.default_matrix_policy()
    let checked = @audit.apply_policy(matrix, policy)
    println(checked.to_markdown())
    println(checked.to_json())

    The matrix validates duplicate IDs, missing observations, unexpected targets, output mismatches, timeouts, missing evidence, target coverage and expected failure cases. The toolkit also provides:

    • target capability profiles for host-bound and restricted targets;
    • deterministic run-plan batches and estimated elapsed time;
    • replay envelopes with stable keys and path redaction;
    • a reproduction contract made of explicit invariants;
    • scenario history diffs for added, removed, regressed and recovered cases;
    • portability risk findings and coverage/pass-rate metrics;
    • Markdown and JSON output for all major records.

    #Runnable examples

    moon run examples/basic moon run cmd/main

    The basic example builds a three-target matrix, applies the default policy, prints target coverage, and emits a deterministic matrix digest. The CLI smoke example prints a generated run plan and JSON report.

    #Validation

    moon fmt --check moon check --deny-warn moon build moon test --deny-warn moon run examples/basic moon run cmd/main moon info

    GitHub Actions runs the same format, check, build, test and example commands. The test suite covers parser failures, target coverage, expected failures, evidence digests, policy rules, schedules, replay envelopes, portability risks, metrics, history and contract output.

    #Scope and safety

    CakeCheck is a pure data-processing library. It does not read files, execute commands, log in to GitHub or Mooncakes, store tokens, or publish packages. The caller owns command execution and must decide which output is safe to record. Machine-specific paths can be redacted before evidence is shared.

    #Project documents

    #License

    MIT. The implementation and fixtures in this repository are original MoonBit code and contain no copied third-party source or media.

    ContractInvariant

    pub(all) struct ContractInvariant {
    code : String
    description : String
    passes : Bool
    detail : String
    } derive(Eq,
    Debug
    )

    ExpectedStatus

    pub(all) enum ExpectedStatus {
    Success
    Failure
    } derive(Eq,
    Debug
    )

    ExpectedStatus::name

    fn ExpectedStatus::name(self : ExpectedStatus) -> String

    IssueSeverity

    pub(all) enum IssueSeverity {
    Notice
    Warning
    Error
    } derive(Eq,
    Debug
    )

    IssueSeverity::name

    fn IssueSeverity::name(self : IssueSeverity) -> String

    MatrixPolicy

    pub(all) struct MatrixPolicy {
    required_targets : Array[ScenarioTarget]
    max_timeout_ms : Int
    require_evidence : Bool
    require_output_for_success : Bool
    allow_failure_scenarios : Bool
    } derive(Eq,
    Debug
    )

    MatrixSnapshot

    pub(all) struct MatrixSnapshot {
    label : String
    digest : String
    required_count : Int
    passed_count : Int
    failed_count : Int
    skipped_count : Int
    ready : Bool
    } derive(Eq,
    Debug
    )

    MatrixTimeline

    pub(all) struct MatrixTimeline {
    snapshots : Array[MatrixSnapshot]
    improved : Int
    regressed : Int
    stable : Int
    } derive(Eq,
    Debug
    )

    MatrixTimeline::passes

    fn MatrixTimeline::passes(self : MatrixTimeline) -> Bool

    MatrixTimeline::snapshots_all_ready

    fn MatrixTimeline::snapshots_all_ready(self : MatrixTimeline) -> Bool

    MatrixTimeline::summary

    fn MatrixTimeline::summary(self : MatrixTimeline) -> String

    MatrixTimeline::to_json

    fn MatrixTimeline::to_json(self : MatrixTimeline) -> String

    MatrixTimeline::to_markdown

    fn MatrixTimeline::to_markdown(self : MatrixTimeline) -> String

    ObservationParseResult

    pub(all) struct ObservationParseResult {
    observations : Array[ScenarioObservation]
    issues : Array[ScenarioIssue]
    } derive(Eq,
    Debug
    )

    ObservationStatus

    pub(all) enum ObservationStatus {
    Passed
    Failed
    Skipped
    } derive(Eq,
    Debug
    )

    ObservationStatus::name

    fn ObservationStatus::name(self : ObservationStatus) -> String

    ParsedObservation

    pub(all) struct ParsedObservation {
    observation : ScenarioObservation?
    issues : Array[ScenarioIssue]
    } derive(Eq,
    Debug
    )

    ParsedScenario

    pub(all) struct ParsedScenario {
    spec : ScenarioSpec?
    issues : Array[ScenarioIssue]
    } derive(Eq,
    Debug
    )

    ReplayEnvelope

    pub(all) struct ReplayEnvelope {
    case_id : String
    target : ScenarioTarget
    command : String
    expected : ExpectedStatus
    stdout : String
    stderr : String
    duration_ms : Int
    evidence_digest : String
    replay_key : String
    } derive(Eq,
    Debug
    )

    ReproductionContract

    pub(all) struct ReproductionContract {
    matrix_name : String
    matrix_version : String
    matrix_digest : String
    policy_digest : String
    invariants : Array[ContractInvariant]
    replay_count : Int
    schedule_batch_count : Int
    passes : Bool
    } derive(Eq,
    Debug
    )

    ReproductionContract::is_ready

    fn ReproductionContract::is_ready(self : ReproductionContract) -> Bool

    ReproductionContract::summary

    fn ReproductionContract::summary(self : ReproductionContract) -> String

    ReproductionContract::to_json

    fn ReproductionContract::to_json(self : ReproductionContract) -> String

    ReproductionContract::to_markdown

    fn ReproductionContract::to_markdown(self : ReproductionContract) -> String

    RunPlanStep

    pub(all) struct RunPlanStep {
    index : Int
    scenario_id : String
    target : ScenarioTarget
    command : String
    expected : ExpectedStatus
    timeout_ms : Int
    required : Bool
    } derive(Eq,
    Debug
    )

    ScenarioDiff

    pub(all) struct ScenarioDiff {
    added_ids : Array[String]
    removed_ids : Array[String]
    regressed_ids : Array[String]
    recovered_ids : Array[String]
    unchanged_count : Int
    } derive(Eq,
    Debug
    )

    ScenarioDiff::has_regressions

    fn ScenarioDiff::has_regressions(self : ScenarioDiff) -> Bool

    ScenarioDiff::summary

    fn ScenarioDiff::summary(self : ScenarioDiff) -> String

    ScenarioDiff::to_json

    fn ScenarioDiff::to_json(self : ScenarioDiff) -> String

    ScenarioDiff::to_markdown

    fn ScenarioDiff::to_markdown(self : ScenarioDiff) -> String

    ScenarioFixtureKind

    pub(all) enum ScenarioFixtureKind {
    Minimal
    CrossTarget
    ExpectedFailure
    RestrictedTarget
    } derive(Eq,
    Debug
    )

    ScenarioFixtureKind::name

    fn ScenarioFixtureKind::name(self : ScenarioFixtureKind) -> String

    ScenarioIssue

    pub(all) struct ScenarioIssue {
    code : String
    severity : IssueSeverity
    scenario_id : String
    target : String
    message : String
    hint : String
    } derive(Eq,
    Debug
    )

    ScenarioManifest

    pub(all) struct ScenarioManifest {
    name : String
    version : String
    specs : Array[ScenarioSpec]
    issues : Array[ScenarioIssue]
    } derive(Eq,
    Debug
    )

    ScenarioManifest::to_markdown

    fn ScenarioManifest::to_markdown(self : ScenarioManifest) -> String

    ScenarioMatrix

    pub(all) struct ScenarioMatrix {
    name : String
    version : String
    specs : Array[ScenarioSpec]
    observations : Array[ScenarioObservation]
    coverage : Array[TargetCoverage]
    issues : Array[ScenarioIssue]
    required_count : Int
    completed_count : Int
    passed_count : Int
    failed_count : Int
    skipped_count : Int
    } derive(Eq,
    Debug
    )

    ScenarioMatrix::coverage_for

    fn ScenarioMatrix::coverage_for(self : ScenarioMatrix, target : ScenarioTarget) -> TargetCoverage?

    ScenarioMatrix::issue_count

    fn ScenarioMatrix::issue_count(self : ScenarioMatrix, severity : IssueSeverity) -> Int

    ScenarioMatrix::issues_have_no_errors

    fn ScenarioMatrix::issues_have_no_errors(self : ScenarioMatrix) -> Bool

    ScenarioMatrix::passes

    fn ScenarioMatrix::passes(self : ScenarioMatrix) -> Bool

    ScenarioMatrix::required_targets_complete

    fn ScenarioMatrix::required_targets_complete(self : ScenarioMatrix) -> Bool

    ScenarioMatrix::to_json

    fn ScenarioMatrix::to_json(self : ScenarioMatrix) -> String

    ScenarioMatrix::to_markdown

    fn ScenarioMatrix::to_markdown(self : ScenarioMatrix) -> String

    ScenarioMetrics

    pub(all) struct ScenarioMetrics {
    scenario_count : Int
    target_case_count : Int
    observed_case_count : Int
    covered_target_count : Int
    required_target_count : Int
    passed_count : Int
    failed_count : Int
    skipped_count : Int
    total_duration_ms : Int
    min_duration_ms : Int
    max_duration_ms : Int
    coverage_percent : Int
    pass_percent : Int
    balance_score : Int
    } derive(Eq,
    Debug
    )

    ScenarioMetrics::ready

    fn ScenarioMetrics::ready(self : ScenarioMetrics) -> Bool

    ScenarioMetrics::summary

    fn ScenarioMetrics::summary(self : ScenarioMetrics) -> String

    ScenarioMetrics::to_json

    fn ScenarioMetrics::to_json(self : ScenarioMetrics) -> String

    ScenarioMetrics::to_markdown

    fn ScenarioMetrics::to_markdown(self : ScenarioMetrics) -> String

    ScenarioObservation

    pub(all) struct ScenarioObservation {
    id : String
    target : ScenarioTarget
    status : ObservationStatus
    stdout : String
    stderr : String
    duration_ms : Int
    evidence_digest : String
    } derive(Eq,
    Debug
    )

    ScenarioObservation::is_passed

    fn ScenarioObservation::is_passed(self : ScenarioObservation) -> Bool

    ScenarioQuery

    pub(all) struct ScenarioQuery {
    tag : String
    target : ScenarioTarget?
    status : ObservationStatus?
    required_only : Bool
    } derive(Eq,
    Debug
    )

    ScenarioRiskFinding

    pub(all) struct ScenarioRiskFinding {
    scenario_id : String
    target : ScenarioTarget
    level : ScenarioRiskLevel
    code : String
    message : String
    hint : String
    } derive(Eq,
    Debug
    )

    ScenarioRiskLevel

    pub(all) enum ScenarioRiskLevel {
    Low
    Medium
    High
    } derive(Eq,
    Debug
    )

    ScenarioRiskLevel::name

    fn ScenarioRiskLevel::name(self : ScenarioRiskLevel) -> String

    ScenarioRiskReport

    pub(all) struct ScenarioRiskReport {
    findings : Array[ScenarioRiskFinding]
    low_count : Int
    medium_count : Int
    high_count : Int
    passes : Bool
    } derive(Eq,
    Debug
    )

    ScenarioRiskReport::summary

    fn ScenarioRiskReport::summary(self : ScenarioRiskReport) -> String

    ScenarioRiskReport::to_json

    fn ScenarioRiskReport::to_json(self : ScenarioRiskReport) -> String

    ScenarioRiskReport::to_markdown

    fn ScenarioRiskReport::to_markdown(self : ScenarioRiskReport) -> String

    ScenarioSpec

    pub(all) struct ScenarioSpec {
    id : String
    title : String
    command : String
    targets : Array[ScenarioTarget]
    expected : ExpectedStatus
    expected_output : String
    timeout_ms : Int
    required : Bool
    tags : Array[String]
    } derive(Eq,
    Debug
    )

    ScenarioSpec::has_tag

    fn ScenarioSpec::has_tag(self : ScenarioSpec, tag : String) -> Bool

    ScenarioSpec::has_target

    fn ScenarioSpec::has_target(self : ScenarioSpec, target : ScenarioTarget) -> Bool

    ScenarioSpec::target_names

    fn ScenarioSpec::target_names(self : ScenarioSpec) -> String

    ScenarioStats

    pub(all) struct ScenarioStats {
    scenario_count : Int
    target_case_count : Int
    required_case_count : Int
    observed_case_count : Int
    passed_case_count : Int
    failed_case_count : Int
    missing_case_count : Int
    } derive(Eq,
    Debug
    )

    ScenarioTarget

    pub(all) enum ScenarioTarget {
    Native
    Js
    Wasm
    WasmGc
    } derive(Eq,
    Debug
    )

    ScenarioTarget::name

    fn ScenarioTarget::name(self : ScenarioTarget) -> String

    ScheduleBatch

    pub(all) struct ScheduleBatch {
    index : Int
    target : ScenarioTarget
    lane : ScheduleLane
    steps : Array[ScheduleStep]
    parallel_safe : Bool
    } derive(Eq,
    Debug
    )

    ScheduleLane

    pub(all) enum ScheduleLane {
    Portable
    HostBound
    Restricted
    } derive(Eq,
    Debug
    )

    ScheduleLane::name

    fn ScheduleLane::name(self : ScheduleLane) -> String

    ScheduleStep

    pub(all) struct ScheduleStep {
    index : Int
    case_id : String
    target : ScenarioTarget
    lane : ScheduleLane
    command : String
    estimated_ms : Int
    } derive(Eq,
    Debug
    )

    TargetCoverage

    pub(all) struct TargetCoverage {
    target : ScenarioTarget
    required_cases : Int
    observed_cases : Int
    passed_cases : Int
    complete : Bool
    } derive(Eq,
    Debug
    )

    TargetProfile

    pub(all) struct TargetProfile {
    target : ScenarioTarget
    label : String
    supports_files : Bool
    supports_network : Bool
    supports_process : Bool
    notes : String
    } derive(Eq,
    Debug
    )

    all_case_ids

    fn all_case_ids(matrix : ScenarioMatrix) -> Array[String]

    all_scenario_targets

    fn all_scenario_targets() -> Array[ScenarioTarget]

    analyze_scenario_risks

    fn analyze_scenario_risks(matrix : ScenarioMatrix) -> ScenarioRiskReport

    apply_policy

    fn apply_policy(matrix : ScenarioMatrix, policy : MatrixPolicy) -> ScenarioMatrix

    build_matrix_timeline

    fn build_matrix_timeline(matrices : Array[ScenarioMatrix]) -> MatrixTimeline

    build_replay_envelopes

    fn build_replay_envelopes(matrix : ScenarioMatrix) -> Array[ReplayEnvelope]

    build_reproduction_contract

    fn build_reproduction_contract(matrix : ScenarioMatrix, policy : MatrixPolicy) -> ReproductionContract

    build_scenario_matrix

    fn build_scenario_matrix(manifest : ScenarioManifest, observations : Array[ScenarioObservation], required_targets : Array[ScenarioTarget]) -> ScenarioMatrix

    build_schedule

    fn build_schedule(matrix : ScenarioMatrix) -> Array[ScheduleBatch]

    contract_invariant

    fn contract_invariant(contract : ReproductionContract, code : String) -> ContractInvariant?

    default_matrix_policy

    fn default_matrix_policy() -> MatrixPolicy

    diff_scenario_matrices

    fn diff_scenario_matrices(before : ScenarioMatrix, after : ScenarioMatrix) -> ScenarioDiff

    digest_for_lines

    fn digest_for_lines(lines : Array[String]) -> String

    digest_for_matrix

    fn digest_for_matrix(matrix : ScenarioMatrix) -> String

    digest_is_well_formed

    fn digest_is_well_formed(value : String) -> Bool

    evidence_contains

    fn evidence_contains(value : String, fragment : String) -> Bool

    evidence_equal

    fn evidence_equal(left : String, right : String) -> Bool

    expected_status

    fn expected_status(value : String) -> ExpectedStatus?

    failed_case_ids

    fn failed_case_ids(matrix : ScenarioMatrix) -> Array[String]

    generate_run_plan

    fn generate_run_plan(matrix : ScenarioMatrix) -> Array[RunPlanStep]

    issue_json

    fn issue_json(issue : ScenarioIssue) -> String

    metrics_average_duration

    fn metrics_average_duration(metrics : ScenarioMetrics) -> Int

    metrics_target_gap

    fn metrics_target_gap(metrics : ScenarioMetrics) -> Int

    normalize_evidence

    fn normalize_evidence(value : String) -> String

    observation_for

    fn observation_for(observations : Array[ScenarioObservation], id : String, target : ScenarioTarget) -> ScenarioObservation?

    observation_key

    fn observation_key(observation : ScenarioObservation) -> String

    observation_parse_summary

    fn observation_parse_summary(result : ObservationParseResult) -> String

    observation_to_json

    fn observation_to_json(observation : ScenarioObservation) -> String

    observation_to_text

    fn observation_to_text(observation : ScenarioObservation) -> String

    observations_to_json

    fn observations_to_json(observations : Array[ScenarioObservation]) -> String

    observations_to_text

    fn observations_to_text(observations : Array[ScenarioObservation]) -> String

    parse_observation_records

    fn parse_observation_records(text : String) -> ObservationParseResult

    parse_scenario_manifest

    fn parse_scenario_manifest(text : String) -> ScenarioManifest

    policy_issues

    fn policy_issues(manifest : ScenarioManifest, policy : MatrixPolicy) -> Array[ScenarioIssue]

    policy_markdown

    fn policy_markdown(policy : MatrixPolicy) -> String

    policy_summary

    fn policy_summary(policy : MatrixPolicy) -> String

    query_scenario_ids

    fn query_scenario_ids(matrix : ScenarioMatrix, query : ScenarioQuery) -> Array[String]

    query_summary

    fn query_summary(matrix : ScenarioMatrix, query : ScenarioQuery) -> String

    redact_machine_paths

    fn redact_machine_paths(value : String) -> String

    replay_envelope_to_json

    fn replay_envelope_to_json(envelope : ReplayEnvelope) -> String

    replay_envelope_to_text

    fn replay_envelope_to_text(envelope : ReplayEnvelope) -> String

    replay_envelopes_are_unique

    fn replay_envelopes_are_unique(envelopes : Array[ReplayEnvelope]) -> Bool

    replay_envelopes_digest

    fn replay_envelopes_digest(envelopes : Array[ReplayEnvelope]) -> String

    replay_envelopes_to_json

    fn replay_envelopes_to_json(envelopes : Array[ReplayEnvelope]) -> String

    replay_envelopes_to_text

    fn replay_envelopes_to_text(envelopes : Array[ReplayEnvelope]) -> String

    replay_key

    fn replay_key(spec : ScenarioSpec, observation : ScenarioObservation) -> String

    required_case_ids

    fn required_case_ids(matrix : ScenarioMatrix) -> Array[String]

    risk_findings_for

    fn risk_findings_for(report : ScenarioRiskReport, level : ScenarioRiskLevel) -> Array[ScenarioRiskFinding]

    risk_has_code

    fn risk_has_code(report : ScenarioRiskReport, code : String) -> Bool

    run_plan_for_target

    fn run_plan_for_target(steps : Array[RunPlanStep], target : ScenarioTarget) -> Array[RunPlanStep]

    run_plan_json

    fn run_plan_json(steps : Array[RunPlanStep]) -> String

    run_plan_markdown

    fn run_plan_markdown(steps : Array[RunPlanStep]) -> String

    run_plan_required_count

    fn run_plan_required_count(steps : Array[RunPlanStep]) -> Int

    run_plan_shell

    fn run_plan_shell(steps : Array[RunPlanStep]) -> String

    scenario_evidence_digest

    fn scenario_evidence_digest(stdout : String, stderr : String) -> String

    scenario_fixture_catalog_json

    fn scenario_fixture_catalog_json() -> String

    scenario_fixture_catalog_markdown

    fn scenario_fixture_catalog_markdown() -> String

    scenario_fixture_description

    fn scenario_fixture_description(kind : ScenarioFixtureKind) -> String

    scenario_fixture_manifest

    fn scenario_fixture_manifest(kind : ScenarioFixtureKind) -> ScenarioManifest

    scenario_fixture_matrix

    fn scenario_fixture_matrix(kind : ScenarioFixtureKind) -> ScenarioMatrix

    scenario_fixture_observations

    fn scenario_fixture_observations(kind : ScenarioFixtureKind) -> Array[ScenarioObservation]

    scenario_fixture_source

    fn scenario_fixture_source(kind : ScenarioFixtureKind) -> String

    scenario_fixture_targets

    fn scenario_fixture_targets(kind : ScenarioFixtureKind) -> Array[ScenarioTarget]

    scenario_matrix_summary

    fn scenario_matrix_summary(matrix : ScenarioMatrix) -> String

    scenario_metrics

    fn scenario_metrics(matrix : ScenarioMatrix) -> ScenarioMetrics

    scenario_observation_digest

    fn scenario_observation_digest(observation : ScenarioObservation) -> String

    scenario_stats

    fn scenario_stats(matrix : ScenarioMatrix) -> ScenarioStats

    scenario_target

    fn scenario_target(value : String) -> ScenarioTarget?

    schedule_is_deterministic

    fn schedule_is_deterministic(batches : Array[ScheduleBatch]) -> Bool

    schedule_json

    fn schedule_json(batches : Array[ScheduleBatch]) -> String

    schedule_lane

    fn schedule_lane(target : ScenarioTarget) -> ScheduleLane

    schedule_markdown

    fn schedule_markdown(batches : Array[ScheduleBatch]) -> String

    schedule_total_estimate

    fn schedule_total_estimate(batches : Array[ScheduleBatch]) -> Int

    skipped_case_ids

    fn skipped_case_ids(matrix : ScenarioMatrix) -> Array[String]

    stats_summary

    fn stats_summary(stats : ScenarioStats) -> String

    strict_matrix_policy

    fn strict_matrix_policy() -> MatrixPolicy

    tag_case_ids

    fn tag_case_ids(matrix : ScenarioMatrix, tag : String) -> Array[String]

    target_case_ids

    fn target_case_ids(matrix : ScenarioMatrix, target : ScenarioTarget) -> Array[String]

    target_profile

    fn target_profile(target : ScenarioTarget) -> TargetProfile

    target_profile_capabilities

    fn target_profile_capabilities(target : ScenarioTarget) -> Array[String]

    target_profile_is_restricted

    fn target_profile_is_restricted(target : ScenarioTarget) -> Bool

    target_profile_summary

    fn target_profile_summary(target : ScenarioTarget) -> String

    target_profile_supports

    fn target_profile_supports(target : ScenarioTarget, capability : String) -> Bool

    target_profiles_json

    fn target_profiles_json(targets : Array[ScenarioTarget]) -> String

    target_profiles_markdown

    fn target_profiles_markdown(targets : Array[ScenarioTarget]) -> String

    timeline_failed_case_count

    fn timeline_failed_case_count(timeline : MatrixTimeline) -> Int

    timeline_ready_count

    fn timeline_ready_count(timeline : MatrixTimeline) -> Int

    validate_observation

    fn validate_observation(spec : ScenarioSpec, observation : ScenarioObservation) -> Array[ScenarioIssue]