From 9909e63c2d8b6c1594915abaa168ad3bd584fe47 Mon Sep 17 00:00:00 2001 From: atlas Date: Sun, 22 Nov 2026 23:37:39 +0100 Subject: [PATCH] keep storage detail out of the matrix handbook --- docs/2-handbook/swarm/matrix.md | 8 +++----- docs/4-implementation/agent-state/persistence.md | 4 +++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/2-handbook/swarm/matrix.md b/docs/2-handbook/swarm/matrix.md index 4cb1c3bcb..4d3b949ef 100644 --- a/docs/2-handbook/swarm/matrix.md +++ b/docs/2-handbook/swarm/matrix.md @@ -136,11 +136,9 @@ each member not yet in `#admins:` it sends lands on. - **Leaving `admins` revokes what the sync granted.** The controller - records each account it sends a grant for under the key `granted` of the - `operator-matrix-admins` NATS KV bucket, which only the controller writes. - An upgraded controller imports the old - `/var/lib/swarm-controller/operator-matrix-admins.json` once and deletes it. - When one of them is no longer in `admins` but still in `#admins`, it sends + remembers each account it sends a grant for, across restarts and a lost + state directory. When one of them is no longer in `admins` but still in + `#admins`, it sends `!admin users force-leave-room @: ` there as `@swarm`; leaving that room is what ends homeserver admin. - **Admins the sync didn't make keep admin.** An admin missing from that diff --git a/docs/4-implementation/agent-state/persistence.md b/docs/4-implementation/agent-state/persistence.md index 3a2e1bacb..196024cec 100644 --- a/docs/4-implementation/agent-state/persistence.md +++ b/docs/4-implementation/agent-state/persistence.md @@ -581,7 +581,9 @@ current admin in place; a key it can't parse stops the sync, grants included, and the controller logs `operator matrix admin: pass failed` on every pass. A controller that finds no key and an `operator-matrix-admins.json` in this directory imports the file into the -key and deletes the file; the upgrade needs no manual step. See +key and deletes the file; the upgrade needs no manual step. The +controller writes the key against the revision it read, so a second pass or +controller running at once fails instead of overwriting. See [matrix.md](../../2-handbook/swarm/matrix.md#operators-are-homeserver-admins). Everything else here is rebuildable once the store holds the webhook secret: