AOS Hub / Docs

Certification examples

The repository contains executable examples that double as production certification fixtures. They are the best implementation-backed starting points for custom Rust integrations, but most are not installed as operator commands and most gate names are not accepted by crucible selftest.

#End-to-end scenario examples

ExampleWhat it provesRepository check
crucible-nginx-curl-http-200.rsBuilds a workload guest, generates canonical scenario TOML, runs two live VMs, and grades a guest-originated HTTP result.checks.crucible.phase7.nginxCurlHttp200
crucible-qemu-live-world-network.rsTwo live guests, deterministic lossy route, guest receipt, search choice, exact checkpoint, and fresh-process replay.Included by checks.crucible.phase2.qemuLiveNetworkIo
crucible-qemu-signal-shared-cause.rsOne event drives network forwarder power loss, storage cache loss, and node crash/restart with exact evidence and replay.checks.crucible.phase7.signalSharedCause

The Nginx/Curl program is explained in the quickstart. For new fault authoring, begin with the shared-cause example: it shows the complete topology, signal, binding, target, effect, artifact-store, lifecycle, evidence, checkpoint, and replay path in one place.

#QEMU protocol and adapter examples

AreaExamplesRepresentative check
Genesis, quantum stepping, preemptioncrucible-qemu-live-genesis, -live-node-step, -live-plugin-quantum, -live-plugin-preemptionchecks.crucible.phase2.qemuLiveGenesisExecutor and related phase-2 checks
Fingerprints and exact snapshotscrucible-qemu-fingerprint, -live-plugin-fingerprint, -live-exact-snapshotchecks.crucible.phase2.qemuSingleVmFingerprint, qemuExactSnapshotRestore
Networkcrucible-qemu-live-network-io plus the world-network API example abovechecks.crucible.phase2.qemuLiveNetworkIo
Block storagecrucible-qemu-live-block-realization, -live-block-io, -live-block-nodechecks.crucible.phase2.qemuLiveBlockIo
9pcrucible-qemu-live-ninep-iochecks.crucible.phase2.qemuLive9pIo
Node lifecyclecrucible-qemu-live-node-lifecycle-faultchecks.crucible.phase2.qemuLiveNodeLifecycleFault
CPU, memory, interrupt, clock, acceleratorcrucible-qemu-live-fault-hardware and its matrix moduleschecks.crucible.phase2.qemuLiveFaultHardware
Coverage and terminal boundariescrucible-qemu-live-coverage, -live-terminal-horizon, -live-terminal-targetsRelated phase-2 checks

All source files are under crates/crucible-qemu/examples and crates/crucible-api/examples.

#Running the supported checks

Build the complete package and run its public live subset first:

nix build .#pkg-crucible
./result/bin/crucible selftest

Maintainers can build a named repository check directly, for example:

nix-build -A checks.crucible.phase7.signalSharedCause

Repository checks are hermetic and supply the matching QEMU, plugin, kernel, root image, initrd, and run directory. The check path named in the table is the nix-build -A attribute; Crucible's nested repository checks are not all flattened into flake checks outputs.

Do not invoke the examples with host-built QEMU or replace their AOS package dependencies with host tools. Their results certify the versioned process and shared-memory boundary only when the matched closure is used.

#Reading an example safely

Separate fixture details from reusable contracts:

  • guest payload constants and instruction budgets are fixture-specific;
  • World, WorldFaultTopology, signal, binding, and property construction are reusable authoring patterns;
  • ProductionVmLifecycleConfig demonstrates the direct Rust lifecycle path, not an additional CLI configuration file;
  • machine-readable key=value output is a gate contract, not the canonical event-log format; and
  • helper modules under an example directory are part of that certification executable, not a stable library API.

For accepted CLI syntax use the command reference. For public Rust contracts use the crate rustdoc and the types re-exported by crucible and crucible-api.