OverviewFilesCommitsIssuesDocsReleasesPeers

favela-android commits / 93878c4

name the local hpp so the embedded favela-web can write
The worklet sets FAVELA_PORT/HOST/STORE_ROOT for its in-process favela-web and never told it where the hpp is, so that server refused every write while reads worked — invisible until a write is tried. The hpp is in this same process with its control socket open; point at it. Local IPC, no DHT, and the DID key never leaves the handset — which is why FAVELA_CONTROL_KEY (the remote transport) stays unset here. The path comes from hpp's own `uds` field, not from rebuilding its storage layout. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
93878c42eb06c90138ec7ad61735e7009abeec98
by plankatron <fleeky@gmail.com> · 2026-08-11T20:53:51.000Z

Changed files (1) +11 -0

lib/node.js +11 -0
……@@ -194,6 +194,17 @@ async function boot () {
194194 process.env.FAVELA_HOST = '127.0.0.1'
195195 process.env.FAVELA_STORE_ROOT = path.join(dirs.root, 'favela-web')
196196 process.env.FAVELA_SOCK = path.join(dirs.root, 'favela-web', 'svc.sock')
197 // THE WRITE PATH. favela-web refuses writes unless it can NAME the hpp it writes to, and it was
198 // never told — so the embedded server logged "writes are DISABLED" and every compose/like/follow
199 // through it failed, while reads worked fine and hid it. The hpp is in THIS process with its control
200 // socket already open, so name that: local IPC, no DHT, and the DID key never leaves the handset
201 // (which is why FAVELA_CONTROL_KEY, the REMOTE-hpp transport, must stay unset here).
202 //
203 // The path comes from hpp itself (bootSwarmDevice's `uds`) rather than being rebuilt from its private
204 // <storage>/dids/<roomId>/ layout — see the note on that field in device-node.js.
205 const ctlSock = state.hpp && state.hpp.nodes && state.hpp.nodes[0] && state.hpp.nodes[0].uds
206 if (ctlSock) process.env.FAVELA_HPP_SOCK = ctlSock
207 else log('hpp exposed no control socket — favela-web will refuse writes (reads unaffected)')
197208 fs.mkdirSync(process.env.FAVELA_STORE_ROOT, { recursive: true })
198209 await import('favela-web/bin/favela-web.js')
199210 state.favelaUrl = 'http://127.0.0.1:' + FAVELA_PORT