In this section: Hands-On Examples

Chapter 7 UMA code example

Metadata orchestration tutorial

This tutorial shows orchestration emerging from contracts and events instead of hardcoded workflow steps. The Rust cloud runner is the validated path, with TypeScript kept in parity.

Tutorial route

Keep the primary navigation alongside the lesson so the contract and policy links are visible before you reach the footer.

What you will learn

  • how emits and subscribes create runtime bindings
  • how policy fail-open and fail-closed modes affect execution
  • how CloudEvents and telemetry prove orchestration behavior

Prerequisites

  • Rust 1.76 or newer
  • Wasmtime 20 or newer
  • Node.js 20 or newer
  • jq and yq are optional

Full tutorial

  1. Enter the example
    cd chapter-07-metadata-orchestration
  2. List the guided labs
    ./scripts/list_labs.sh
  3. Run the baseline cloud flow
    ./scripts/run_lab.sh lab1-baseline-cloud-flow
  4. Verify Rust and TypeScript parity
    ./scripts/run_lab.sh lab2-rust-ts-parity
  5. Run the fail-closed policy lab
    ./scripts/run_lab.sh lab3-policy-fail-closed
  6. Run the telemetry audit lab
    ./scripts/run_lab.sh lab4-telemetry-audit
  7. Run the chapter smoke path
    ./scripts/smoke_orchestration_labs.sh

What to inspect

After each command, look for these proof points. They are the signals that connect the code example back to the UMA architecture claim.

  • binding.created
  • policy.violation
  • validation.passed
  • telemetry.ok

Acceptance check

The chapter-level validation path is:

./scripts/smoke_orchestration_labs.sh

Return to the repository root for the final acceptance gate:

cd ..
./scripts/smoke_reader_paths.sh

Where to go next

Chapter 8 makes service graph evolution inspectable.