|
| 1 | +name: Mesh Lifecycle |
| 2 | +# Relay-driven mesh lifecycle smoke: membership → signed discovery notes → |
| 3 | +# relay-derived allowlist → join → CPU inference over QUIC → stranger denied |
| 4 | +# (relay membership rejection + no routed inference, with a differential |
| 5 | +# trusted-inference health proof so a dead serve node can't fake a denial). |
| 6 | +# Runs the full Buzz "shared compute" join story with three real mesh-llm |
| 7 | +# node processes on one runner, using the Buzz relay as the control plane |
| 8 | +# (no hand-carried invite tokens). Mirrors the shape mesh-llm's own CI uses |
| 9 | +# for its two-node smokes (tiny CPU model, one runner, real QUIC mesh). |
| 10 | + |
| 11 | +on: |
| 12 | + push: |
| 13 | + branches: [main] |
| 14 | + paths: |
| 15 | + - 'crates/buzz-relay/examples/mesh_*.rs' |
| 16 | + - 'crates/buzz-relay/Cargo.toml' |
| 17 | + - 'crates/buzz-admin/**' |
| 18 | + - 'crates/buzz-test-client/**' |
| 19 | + - 'crates/buzz-ws-client/**' |
| 20 | + - 'Cargo.lock' |
| 21 | + - 'desktop/src-tauri/src/mesh_llm/**' |
| 22 | + - 'scripts/ci-mesh-lifecycle-smoke.sh' |
| 23 | + - 'scripts/start-relay-for-tests.sh' |
| 24 | + - '.github/workflows/mesh-lifecycle.yml' |
| 25 | + pull_request: |
| 26 | + paths: |
| 27 | + - 'crates/buzz-relay/examples/mesh_*.rs' |
| 28 | + - 'crates/buzz-relay/Cargo.toml' |
| 29 | + - 'crates/buzz-admin/**' |
| 30 | + - 'crates/buzz-test-client/**' |
| 31 | + - 'crates/buzz-ws-client/**' |
| 32 | + - 'Cargo.lock' |
| 33 | + - 'desktop/src-tauri/src/mesh_llm/**' |
| 34 | + - 'scripts/ci-mesh-lifecycle-smoke.sh' |
| 35 | + - 'scripts/start-relay-for-tests.sh' |
| 36 | + - '.github/workflows/mesh-lifecycle.yml' |
| 37 | + workflow_dispatch: |
| 38 | + |
| 39 | +concurrency: |
| 40 | + group: mesh-lifecycle-${{ github.event_name == 'pull_request' && github.ref || github.sha }} |
| 41 | + cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
| 42 | + |
| 43 | +env: |
| 44 | + CARGO_TERM_COLOR: always |
| 45 | + |
| 46 | +jobs: |
| 47 | + lifecycle-smoke: |
| 48 | + name: Relay-Driven Mesh Lifecycle Smoke |
| 49 | + runs-on: ubuntu-24.04 |
| 50 | + timeout-minutes: 45 |
| 51 | + permissions: |
| 52 | + contents: read |
| 53 | + steps: |
| 54 | + - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 |
| 55 | + |
| 56 | + - uses: cashapp/activate-hermit@cea9af7913204a965fd488637a8d1811bba2e616 # v1 |
| 57 | + |
| 58 | + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 |
| 59 | + with: |
| 60 | + save-if: ${{ github.event_name != 'pull_request' }} |
| 61 | + |
| 62 | + # The mesh-llm SDK downloads a signed native runtime (llama.cpp CPU |
| 63 | + # build) on first init, and the serve node downloads the smoke model |
| 64 | + # from HuggingFace on first run. Key on the lockfile so a mesh pin bump |
| 65 | + # rolls the runtime cache; the model ref is stable. |
| 66 | + - name: Restore mesh runtime + model caches |
| 67 | + id: mesh-caches |
| 68 | + uses: actions/cache/restore@caa296126883cff596d87d8935842f9db880ef25 # v5 |
| 69 | + with: |
| 70 | + path: | |
| 71 | + ~/.cache/mesh-llm/native-runtimes |
| 72 | + ~/.cache/huggingface/hub |
| 73 | + key: mesh-lifecycle-${{ runner.os }}-smollm2-135m-${{ hashFiles('Cargo.lock') }} |
| 74 | + restore-keys: | |
| 75 | + mesh-lifecycle-${{ runner.os }}-smollm2-135m- |
| 76 | +
|
| 77 | + - name: Start integration services |
| 78 | + run: | |
| 79 | + for attempt in 1 2 3; do |
| 80 | + if docker compose up -d postgres redis minio minio-init; then |
| 81 | + break |
| 82 | + fi |
| 83 | + if [ "$attempt" -eq 3 ]; then |
| 84 | + echo "docker compose up failed after 3 attempts" >&2 |
| 85 | + exit 1 |
| 86 | + fi |
| 87 | + echo "docker compose up failed (attempt $attempt), retrying in $((attempt * 5))s..." >&2 |
| 88 | + sleep $((attempt * 5)) |
| 89 | + done |
| 90 | +
|
| 91 | + - name: Run relay-driven mesh lifecycle smoke |
| 92 | + run: ./scripts/ci-mesh-lifecycle-smoke.sh 2>&1 | tee /tmp/mesh-lifecycle-harness.log |
| 93 | + |
| 94 | + - name: Save mesh runtime + model caches |
| 95 | + if: github.ref == 'refs/heads/main' && steps.mesh-caches.outputs.cache-hit != 'true' |
| 96 | + uses: actions/cache/save@caa296126883cff596d87d8935842f9db880ef25 # v5 |
| 97 | + with: |
| 98 | + path: | |
| 99 | + ~/.cache/mesh-llm/native-runtimes |
| 100 | + ~/.cache/huggingface/hub |
| 101 | + key: mesh-lifecycle-${{ runner.os }}-smollm2-135m-${{ hashFiles('Cargo.lock') }} |
| 102 | + |
| 103 | + - name: Upload relay + harness logs |
| 104 | + if: failure() |
| 105 | + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 |
| 106 | + with: |
| 107 | + name: mesh-lifecycle-logs |
| 108 | + path: | |
| 109 | + /tmp/buzz-relay.log |
| 110 | + /tmp/mesh-lifecycle-harness.log |
| 111 | + if-no-files-found: ignore |
0 commit comments