Files
buzz/desktop
Michael Neale d99cba5bbb fix(mesh): run the mesh unenforced on relays that do not enforce membership
Mesh admission is seeded from the relay's NIP-43 membership snapshot
(kind:13534), which is built purely from the `relay_members` table. On a
relay running with `BUZZ_REQUIRE_RELAY_MEMBERSHIP=false`, signing in never
writes a `relay_members` row, so that snapshot lists at most whoever was
added out of band. Ordinary participants are absent from it.

Desktop treated that as an authoritative roster, so every node resolved an
empty intersection, fell back to `trust_owners([self])`, and sat at "1 NODE"
with an empty peer list forever. Two machines sharing compute on the same
open relay could never see each other, through any number of restarts.

Admission was only part of it: `availability_from_events` also required a
snapshot and filtered status notes to `members.contains(reporter)`, so
serve-target discovery was membership-gated too. Relaxing admission alone
would still have left peers undiscoverable.

Resolve the relay's membership mode from its NIP-11 document instead. The
relay advertises NIP-43 only when membership is actually enforced, so the
advertisement is a faithful signal. When it is absent, skip the snapshot
requirement for routing and pass `trusted_owner_ids: None`, which the
existing SDK path already maps to `TrustPolicy::Off` — stock MeshLLM
behaviour, scoped by the relay-derived mesh topic.

Membership emptiness deliberately does NOT drive this. On an enforcing relay
a missing snapshot is a transient replication gap, and the existing code
treats it as an error precisely so a blip cannot flap a live node down to
self-only. Keying open-mesh off "no snapshot" would have turned that blip
into a silent loss of admission enforcement. A failed NIP-11 probe therefore
falls back to the enforcing behaviour: an unreachable relay can never relax
admission.

Closed-relay behaviour is unchanged, including the fail-closed error and the
shrink hysteresis. `roster_reconcile_action` maps `Ok(None)` to `Keep`: a
node already enforcing an allowlist keeps it, so a mid-flight NIP-11 change
cannot de-restrict a running mesh.

Freshness and owner-signed endpoint binding still gate routing on an open
relay; only the membership intersection is lifted.

Co-authored-by: Michael Neale <michael.neale@gmail.com>
Signed-off-by: Michael Neale <michael.neale@gmail.com>
2026-08-25 11:17:06 +10:00
..
…

Buzz

Desktop chat shell with:

  • Tauri + React + TypeScript + Vite
  • Tailwind CSS
  • shadcn/ui-ready shared components
  • Biome (lint/format/check)
  • Feature-driven frontend structure

Scripts

  • pnpm dev - run the web frontend
  • pnpm tauri dev - run the desktop app
  • pnpm build - typecheck and build frontend
  • pnpm typecheck - TypeScript checks
  • pnpm lint - Biome lint
  • pnpm format - Biome format (write)
  • pnpm check - Biome check

Structure

  • src/shared - reusable app-wide code (ui, lib, styles)
  • src/features - feature modules (vertical slices)
  • src/app - top-level app composition