OverviewFilesCommitsIssuesDocsReleasesPeers

favela-identity commits / a9580e3

spec: the peer owns the registry, favela-web reads (§7.5)
Closes §10 item 4. hyper-proto-peer is the sole writer of favela's IdentityRegistry autobase; favela-web reads it and every mutation it offers is a peer RPC rather than a direct append. This extends the existing topology rather than adding one — favela-web already treats the peer as its daemon (cli.js:120 "no hpp connection — is the local hpp running?") and already describes itself as a keyless view (auth.js:19). It is also pgv3's shape: the daemon owns the autobase, the CLI and web reach it over UDS. Two writers to one autobase from one machine is a fork waiting to happen, and a web process is the wrong thing to hold a write lock. Also settles §10 item 1 (the registry lives in the peer's storage, backed up with it) and constrains item 2 (a second device is a second peer, admitted as a writer, so DeviceLinker pairing runs peer-to-peer). Notes that a reader's copy of globalPermissions is advisory: the gate is re-checked at the writer, which is where pgv3's revocation-bypass audit says it belongs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
a9580e332049bedec0f827ce9e5ed6d1d1c69b9f
by plankatron <fleeky@gmail.com> · 2026-09-03T01:42:33.000Z

Changed files (1) +36 -2

spec/identity.md +36 -2
……@@ -178,6 +178,40 @@ favela's signer election is the same shape. Granting a user `write` on `bridge:b
178178make its device a writer on the room's autobase. Both grants are needed, and they are separate
179179ceremonies. Design them as two from the start rather than discovering it in production.
180180
181### 7.5 The peer owns the registry; favela-web reads it
182
183**Decision (user, 2026-09-02).** `hyper-proto-peer` is the sole **writer** of favela's
184IdentityRegistry autobase. favela-web is a **reader**, and every mutation it offers is an RPC to
185the peer — never a direct append.
186
187This is not a new topology, it is the existing one extended to identity. favela-web already treats
188the peer as its daemon: `favela-web/lib/cli.js:120` fails with *"no hpp connection — is the local
189hpp running? (pgh app status hyper-proto-peer)"*, and `lib/auth.js:19` already describes favela-web
190as a *"keyless VIEW"*. That comment was half right — favela-web does not need to **write** the
191registry. It does need to read it.
192
193It is also exactly pear-git-v3's shape: the daemon owns the autobase, and the CLI and web talk to it
194over UDS. `pgh` is the sole CLI and its daemon-RPC commands receive a hyper-svc client rather than
195opening the store. Same split here, for the same reason — **two writers to one autobase from one
196machine is a fork waiting to happen**, and a web process is the wrong thing to hold a write lock.
197
198**What follows:**
199
2001. **Sign-in, credential linking, designating an atproto credential (§5.1), and bridge grants (§6)
201 are all peer RPCs.** favela-web renders the form; the peer performs the op and is the only thing
202 that appends.
2032. **The registry lives in the peer's storage**, which also settles §10 item 1: it is backed up and
204 blast-radiused with the peer, not with the web app.
2053. **A second device is a second peer**, admitted as an autobase writer — not a second web process.
206 That constrains §10 item 2: `DeviceLinker` blind-pairing runs peer-to-peer.
2074. **favela-web without a local peer can only read.** The SSR gateway serving other people's DIDs
208 has no write path at all, which is the correct and already-shipped posture (the own-repo write
209 gate) rather than a new limitation.
2105. ⚠ **A read is not a permission check.** favela-web reading `globalPermissions` renders UI; the
211 peer re-checks on every RPC. pgv3's audit found the mirror of this — surfaces that resolved a
212 user without consulting `isRevoked()` — so the gate belongs at the writer, and the reader's copy
213 is advisory only.
214
181215---
182216
183217## 8. Migration
……@@ -217,8 +251,8 @@ designed before either registry is in use would be designed against guesses.
2172512. **Who admits the first writer**, and how a second device joins. `DeviceLinker` blind-pairing is
218252 the candidate and is what #49 describes from scratch; it is not yet chosen here.
2192533. **Scoping the ~120 call sites** — mechanical rename or genuine model change, per site.
2204. **Whether the peer or favela-web owns the registry instance.** Both need it; only one should
221 write it.
2544. ~~**Whether the peer or favela-web owns the registry instance.**~~ **CLOSED (2026-09-02)** —
255 the peer owns and writes it; favela-web reads. See §7.5.
2222565. **Bridge credential custody.** §6.1 says a bridge holds its own secrets; where they live, and
223257 what happens on device loss, is #49's question wearing a different hat.
224258