From ed5633c6cfb36479915b7e4b23eb449dafc0bae0 Mon Sep 17 00:00:00 2001
From: npub13n66s06epmqf2kc3v373ez8hj65cuzyvxzjf93vwpervxqn2u7jq2qd9je
<8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
Date: Mon, 3 Aug 2026 08:32:15 -0400
Subject: [PATCH] Fix local relay auth and community persistence
Signed-off-by: npub13n66s06epmqf2kc3v373ez8hj65cuzyvxzjf93vwpervxqn2u7jq2qd9je <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
---
crates/buzz-db/src/lib.rs | 21 +++
crates/buzz-db/src/sqlite.rs | 183 ++++++++++++++++++++
crates/buzz-relay/src/main.rs | 9 +-
desktop/src-tauri/src/commands/agents.rs | 40 +++++
desktop/src-tauri/src/commands/workspace.rs | 9 +-
desktop/src-tauri/src/local_relay.rs | 2 +
6 files changed, 262 insertions(+), 2 deletions(-)
diff --git a/crates/buzz-db/src/lib.rs b/crates/buzz-db/src/lib.rs
index d4c76b2cc..fe45f6f4c 100644
--- a/crates/buzz-db/src/lib.rs
+++ b/crates/buzz-db/src/lib.rs
@@ -1481,6 +1481,27 @@ impl Db {
Ok(())
}
+ /// Rebind the durable loopback community to this single-node process's
+ /// current ephemeral authority while preserving its stable UUID and data.
+ /// SQLite-only: production deployments never rewrite tenant host mappings.
+ pub async fn rebind_single_node_community_host(
+ &self,
+ normalized_host: &str,
+ owner_pubkey: &str,
+ ) -> Result