mirror of
https://github.com/block/buzz.git
synced 2026-10-27 04:30:52 +00:00
## Summary Upgrade Buzz from MeshLLM `v0.76.0-rc9` to the latest stable [v0.76.2 release](https://github.com/Mesh-LLM/mesh-llm/releases/tag/v0.76.2) (via v0.76.1). - Update all eight Mesh git dependencies across desktop and relay smoke examples; both lockfiles resolve all 47 Mesh packages to `a0c1e66b0ac037dd56544b9e2d94969ea43d694f` (tag `v0.76.2`). All non-Mesh lock records are unchanged by the 0.76.1 → 0.76.2 bump. - Match Mesh's `ed25519-dalek = 3.0.0` and `rusqlite = 0.40` dependencies. - Explicitly enable rusqlite's `fallible_uint` feature, preserving Buzz's existing `u64` SQL conversions when **mesh is disabled**. Mesh-enabled builds previously supplied this transitively, so testing both configurations matters. - Temporarily pin **only** the optional `sqlx-sqlite` package to the merged upstream compatibility fix [transact-rs/sqlx#4402](https://github.com/transact-rs/sqlx/pull/4402), revision `94aafe3a68884d923b0798a767c8d7f6cfda89d2`. SQLx 0.9.0 caps `libsqlite3-sys` below 0.38, while Mesh 0.76 requires 0.38. Cargo resolves the conflict even with SQLite disabled. The fix raises that upper bound; remove the patch once released. Buzz's active PostgreSQL driver stays on crates.io SQLx 0.9.0. - Preserve the explicit Linux keyring 3 `crypto-rust` feature so Secret Service sessions retain DH encryption independently of Mesh keyring 4. - Preserve the dedicated examples-only `buzz-mesh-smoke` crate and lifecycle workflow wiring, keeping Mesh/native-runtime dev dependencies out of relay CI builds. - v0.76.1 → v0.76.2 upstream delta: self-updater fix for composed product-v2 bundles (Mesh-LLM/mesh-llm#1844) plus release plumbing — no API changes affecting Buzz. - Merged `origin/main` (`7c789dee0`) without rewriting shared PR history. ### Validation at `ae4adba15` (local macOS ARM64, Hermit toolchain) - **Passed:** `cargo test --locked -p buzz-mesh-smoke --all-targets` (all six example harnesses compile; no live harness execution). - **Passed:** desktop Tauri workspace tests, both default and `--features mesh-llm` graphs (3,296 tests with mesh enabled, 0 failures). - **Passed:** `just desktop-tauri-clippy` (both feature graphs, `-D warnings`), root workspace clippy `-D warnings`, `cargo fmt --all --check`. - **Passed:** `--locked` metadata resolution for both workspaces; lockfile diff audited to touch only Mesh package records. - **Passed:** full pre-push hook suite on the final push (branch-skew, rust-tests, desktop-tauri-checks, file-size-check) — no hooks bypassed. - **Not run:** live Mesh inference/admission smoke or installed-app UI exercise. CI lifecycle smoke coverage applies. Originating Buzz conversation: buzz://message?channel=dffbc117-845a-4c02-bc3f-eaeeefc4deaa&id=670f9c262e1ec0a4df5600b3173a0c5de2abe17e08ba9ccfdd8eff109fadf1a8 --------- Signed-off-by: Thinker <75d8a808fa21bb8d1812e080cf471db601c6e8e6a62dcd516d37531e83a7bb77@meshllm.communities.buzz.xyz> Signed-off-by: Michael Neale <michael.neale@gmail.com> Co-authored-by: Thinker <75d8a808fa21bb8d1812e080cf471db601c6e8e6a62dcd516d37531e83a7bb77@meshllm.communities.buzz.xyz> Co-authored-by: Michael Neale <michael.neale@gmail.com> Co-authored-by: Galadriel <b81c841ed20a8e17caf4e6fac2f6f3bc61d304c84b8394720f6d00f37538c47e@meshllm.communities.buzz.xyz> Co-authored-by: Gu <gu@buzz>
114 lines
4.8 KiB
Bash
Executable File
114 lines
4.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# =============================================================================
|
|
# ci-mesh-lifecycle-smoke.sh — relay-driven mesh lifecycle smoke
|
|
# =============================================================================
|
|
# Provisions a membership-gated buzz-relay and runs the full relay-driven
|
|
# mesh lifecycle harness (crates/buzz-mesh-smoke/examples/mesh_relay_lifecycle_smoke.rs):
|
|
# membership → signed discovery notes → relay-derived allowlist → join →
|
|
# inference over QUIC → stranger denied.
|
|
#
|
|
# Mirrors the shape of mesh-llm's own CI smoke scripts (single runner, tiny
|
|
# CPU model, real multi-process mesh), but with the Buzz relay as the control
|
|
# plane instead of a hand-carried invite token.
|
|
#
|
|
# Usage:
|
|
# ./scripts/ci-mesh-lifecycle-smoke.sh [--profile <cargo-profile>] [--no-build]
|
|
#
|
|
# Env:
|
|
# MESH_SMOKE_MODEL Override the served model ref (default: SmolLM2-135M).
|
|
# =============================================================================
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
|
cd "${REPO_ROOT}"
|
|
|
|
CARGO_PROFILE="${CARGO_PROFILE:-ci}"
|
|
SKIP_BUILD=false
|
|
while [[ $# -gt 0 ]]; do
|
|
case "$1" in
|
|
--profile) CARGO_PROFILE="$2"; shift 2 ;;
|
|
--no-build) SKIP_BUILD=true; shift ;;
|
|
*) echo "Unknown option: $1" >&2; exit 1 ;;
|
|
esac
|
|
done
|
|
|
|
BLUE='\033[0;34m'
|
|
GREEN='\033[0;32m'
|
|
RED='\033[0;31m'
|
|
NC='\033[0m'
|
|
log() { echo -e "${BLUE}[mesh-lifecycle]${NC} $*"; }
|
|
ok() { echo -e "${GREEN}[mesh-lifecycle]${NC} $*"; }
|
|
err() { echo -e "${RED}[mesh-lifecycle]${NC} $*" >&2; }
|
|
|
|
# ── Build ─────────────────────────────────────────────────────────────────────
|
|
|
|
if [[ "${SKIP_BUILD}" == "true" ]]; then
|
|
log "Skipping build (--no-build)"
|
|
else
|
|
log "Building relay, admin CLI, and lifecycle harness (profile: ${CARGO_PROFILE})..."
|
|
cargo build --profile "${CARGO_PROFILE}" -p buzz-relay -p buzz-admin -p git-credential-nostr
|
|
cargo build --profile "${CARGO_PROFILE}" -p buzz-mesh-smoke --example mesh_relay_lifecycle_smoke
|
|
fi
|
|
|
|
ADMIN_BIN="target/${CARGO_PROFILE}/buzz-admin"
|
|
HARNESS_BIN="target/${CARGO_PROFILE}/examples/mesh_relay_lifecycle_smoke"
|
|
for bin in "${ADMIN_BIN}" "${HARNESS_BIN}" "target/${CARGO_PROFILE}/buzz-relay"; do
|
|
if [[ ! -x "${bin}" ]]; then
|
|
err "Missing binary: ${bin}"
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
# ── Relay identity + membership gating ───────────────────────────────────────
|
|
# The relay owner and signing key are throwaway CI identities. RELAY_OWNER
|
|
# never participates in the mesh; it only satisfies the NIP-43 requirement
|
|
# that a membership-gated relay has an administrable owner.
|
|
|
|
log "Generating relay owner + signing identities..."
|
|
read_keys() { "${ADMIN_BIN}" generate-key 2>/dev/null; }
|
|
OWNER_OUT="$(read_keys)"
|
|
RELAY_OWNER_PUBKEY="$(echo "${OWNER_OUT}" | awk '/Public key:/ {print $3}')"
|
|
SIGNER_OUT="$(read_keys)"
|
|
BUZZ_RELAY_PRIVATE_KEY="$(echo "${SIGNER_OUT}" | awk '/Secret key:/ {print $3}')"
|
|
if [[ -z "${RELAY_OWNER_PUBKEY}" || -z "${BUZZ_RELAY_PRIVATE_KEY}" ]]; then
|
|
err "Failed to generate relay identities via buzz-admin generate-key"
|
|
exit 1
|
|
fi
|
|
export BUZZ_REQUIRE_RELAY_MEMBERSHIP=true
|
|
export RELAY_OWNER_PUBKEY
|
|
export BUZZ_RELAY_PRIVATE_KEY
|
|
|
|
# ── Start the membership-gated relay ─────────────────────────────────────────
|
|
# A stale relay on :3000 would pass the readiness poll while silently running
|
|
# WITHOUT membership gating — the stranger-denied assertion would then fail
|
|
# (or worse, an open relay would mask a real gating regression). Fail fast.
|
|
if lsof -nP -iTCP:3000 -sTCP:LISTEN >/dev/null 2>&1; then
|
|
err "Port 3000 is already in use — stop the existing relay first (its config would not be membership-gated)"
|
|
exit 1
|
|
fi
|
|
|
|
log "Starting membership-gated relay..."
|
|
CARGO_PROFILE="${CARGO_PROFILE}" ./scripts/start-relay-for-tests.sh --no-build
|
|
|
|
cleanup() {
|
|
log "Stopping relay..."
|
|
if [[ -f /tmp/buzz-relay.pid ]]; then
|
|
kill "$(cat /tmp/buzz-relay.pid)" 2>/dev/null || true
|
|
fi
|
|
# The harness kills its own children; sweep any stragglers from a hard fail.
|
|
pkill -f mesh_relay_lifecycle_smoke 2>/dev/null || true
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
# ── Run the lifecycle harness ────────────────────────────────────────────────
|
|
|
|
log "Running relay-driven mesh lifecycle smoke..."
|
|
RELAY_URL=ws://localhost:3000 \
|
|
DATABASE_URL=postgres://buzz:buzz_dev@localhost:5432/buzz \
|
|
REDIS_URL=redis://localhost:6379 \
|
|
BUZZ_ADMIN_BIN="${ADMIN_BIN}" \
|
|
"${HARNESS_BIN}"
|
|
|
|
ok "Relay-driven mesh lifecycle smoke passed"
|