OverviewFilesCommitsIssuesDocsReleasesPeers

favela-surface-android commits / 961ee86

0.0.10: the OTA registry replica goes under app storage, not $HOME
⛔ THE REASON THE PHONE COULD NEVER UPDATE. `resolveRelease` opened its registry replica at a path derived from the home directory; Android has none, so it threw ENOENT and `swarmFetcher` reported 'no swarm fetcher — updates disabled this boot'. Every check since the first install has been failing at that line. Found only because 0.0.8 started surfacing the node's own last OTA message — the diagnostic paid for itself on its first run. Needs pgh 0.1.152. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
961ee860bf3f55974e3b09eb5324d6269f7ac232
by plankatron <fleeky@gmail.com> · 2026-09-10T16:39:33.000Z

Changed files (3) +16 -6

lib/host/ota.js +13 -3
……@@ -323,11 +323,15 @@ export { chooseBundle } from './choose-bundle.js'
323323 * has no sidecar and never will, so the probe is pure latency — and SELinux makes pathname sockets their
324324 * own hazard here.
325325 */
326export async function swarmFetcher ({ registryKeyHex = DEFAULT_REGISTRY, repo = DEFAULT_REPO, timeout = 120000, destDir = null, swarm = null } = {}) {
326export async function swarmFetcher ({ registryKeyHex = DEFAULT_REGISTRY, repo = DEFAULT_REPO, timeout = 120000, destDir = null, swarm = null, storeDir = null } = {}) {
327327 const { makeGetLatestRelease } = await import('pgh/resolve-release')
328328 const { NetworkFetcher } = await import('pgh/network-fetcher')
329329
330 const getLatestRelease = makeGetLatestRelease({ registryKeyHex, preferSidecar: false })
330 // ⛔ storeDir, OR THE REGISTRY REPLICA GOES TO A HOME DIRECTORY THAT DOES NOT EXIST HERE.
331 // Measured on a handset: ENOENT stat'ing the default path, caught into "no swarm fetcher —
332 // updates disabled this boot". The phone could never update and said so only once the app was
333 // taught to surface its own last OTA line.
334 const getLatestRelease = makeGetLatestRelease({ registryKeyHex, preferSidecar: false, storeDir })
331335 const latest = await getLatestRelease(repo)
332336 if (!latest || !latest.serverKey) throw new Error('no published release with a serverKey for ' + repo)
333337
……@@ -371,7 +375,13 @@ export async function startOta ({ storage, say = () => {}, repo = DEFAULT_REPO,
371375 let fetcher = injectedFetcher
372376 if (!fetcher) {
373377 try {
374 ;({ fetcher } = await swarmFetcher({ registryKeyHex, repo, destDir: path.join(dir, '.fetch'), swarm }))
378 // ⛔ `storeDir` UNDER THIS APP'S STORAGE. Without it the registry replica goes to a path
379 // derived from the home directory, which Android does not have — measured on a handset as
380 // ENOENT, surfacing as "no swarm fetcher — updates disabled this boot". A phone that could
381 // never update, for a reason nothing on the device could show until now.
382 ;({ fetcher } = await swarmFetcher({
383 registryKeyHex, repo, destDir: path.join(dir, '.fetch'), swarm, storeDir: path.join(dir, 'registry')
384 }))
375385 } catch (err) {
376386 say('ota: no swarm fetcher — updates disabled this boot (' + ((err && err.message) || err) + ')')
377387 return null
lib/version.js +2 -2
……@@ -1,4 +1,4 @@
11// GENERATED by scripts/gen-version.mjs — do not edit.
2export const VERSION = "0.0.9"
3export const BUILT_AT = 1789057956723
2export const VERSION = "0.0.10"
3export const BUILT_AT = 1789058363744
44export default { VERSION, BUILT_AT }
package.json +1 -1
……@@ -1,6 +1,6 @@
11{
22 "name": "favela-surface-android",
3 "version": "0.0.9",
3 "version": "0.0.10",
44 "description": "favela-surface-android \u2014 a React Native shell over a bare-kit worklet running a full favela-peer node (markdown records, no atproto) with favela-surface rendering its pages in a WebView.",
55 "type": "module",
66 "private": true,