OverviewFilesCommitsIssuesDocsReleasesPeers

favela-surface-android commits / 7469977

0.0.12: the SECOND homedir in the OTA path, which the first one was hiding
⛔ 0.0.11 still reported `ENOENT stat '/data/config'` — the same message 0.0.10 was supposed to have fixed. It was a DIFFERENT default. `NetworkFetcher` has its own: `homedir()/.config/pgh/release-registry`, and it stats it. On Android that is `/data/config/…`, which an unprivileged app cannot stat at all, so it throws rather than returning false. ⚠ THE FIRST FIX MASKED IT. While `resolveRelease`'s homedir default failed first, this line was never reached. Repairing that one moved the ENOENT here and it read as the same bug returning — which is exactly what it looked like from the phone. ⇒ So the fix is "no homedir ANYWHERE in this path", not "fix the one that threw". Swept the packed bundle for it: only three pgh modules are reachable — resolve-release, network-fetcher, release-registry — and both homedir defaults among them are now overridden (`storeDir`, `localRegistryDir`). Verified cold, end to end: ota: watching favela-surface-android — releases arrive as events, not on a timer ota: downloading 0.0.11 ota: staged f4395e54… — active on next start Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
74699772345e66fe6a285a21ce3ca2935a128139
by plankatron <fleeky@gmail.com> · 2026-09-10T17:47:54.000Z

Changed files (3) +14 -4

lib/host/ota.js +11 -1
……@@ -353,7 +353,17 @@ export async function swarmFetcher ({ registryKeyHex = DEFAULT_REGISTRY, repo =
353353 const latest = opts_latest || await getLatestRelease(repo)
354354 if (!latest || !latest.serverKey) throw new Error('no published release with a serverKey for ' + repo)
355355
356 const fetcher = new NetworkFetcher({ topic: latest.serverKey, timeout, destDir, swarm })
356 // ⛔ localRegistryDir, THE SECOND HOMEDIR IN THIS PATH. NetworkFetcher defaults it to
357 // `homedir()/.config/pgh/release-registry` and stats it — on Android that is `/data/config/…`,
358 // which an unprivileged app cannot stat at all, so it throws rather than returning false.
359 //
360 // ⚠ IT WAS MASKED. In 0.0.10 `resolveRelease`'s own homedir default failed FIRST, so fixing that
361 // one simply moved the ENOENT here and it looked like the same bug returning. Two independent
362 // defaults, one symptom — which is why the fix has to be "no homedir anywhere in this path"
363 // rather than "fix the one that threw".
364 const fetcher = new NetworkFetcher({
365 topic: latest.serverKey, timeout, destDir, swarm, localRegistryDir: path.join(destDir, '..', 'registry-local')
366 })
357367 // NetworkFetcher's own getLatestRelease reads a LOCAL registry, which a phone does not have. Its header
358368 // calls the replacement a follow-on; the follow-on is the resolver above, and this is the same
359369 // substitution runtime-factory makes for the same reason.
lib/version.js +2 -2
……@@ -1,4 +1,4 @@
11// GENERATED by scripts/gen-version.mjs — do not edit.
2export const VERSION = "0.0.11"
3export const BUILT_AT = 1789060099935
2export const VERSION = "0.0.12"
3export const BUILT_AT = 1789062464186
44export default { VERSION, BUILT_AT }
package.json +1 -1
……@@ -1,6 +1,6 @@
11{
22 "name": "favela-surface-android",
3 "version": "0.0.11",
3 "version": "0.0.12",
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,